Repository navigation
Closed
Labels
bugSomething isn't working
Description
Is this a new bug in the Pinecone Python client?
- I believe this is a new bug in the Pinecone Python Client
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
This warning is generated when running unit tests that include PineconeGRPC on python 3.12.
../../Library/Caches/pypoetry/virtualenvs/ragie-EJQDw0bC-py3.12/lib/python3.12/site-packages/google/protobuf/internal/well_known_types.py:91
/Users/bob/Library/Caches/pypoetry/virtualenvs/ragie-EJQDw0bC-py3.12/lib/python3.12/site-packages/google/protobuf/internal/well_known_types.py:91: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
_EPOCH_DATETIME_NAIVE = datetime.datetime.utcfromtimestamp(0)
Expected Behavior
No warning is generated.
Steps To Reproduce
Minimal test case:
from pinecone.grpc import PineconeGRPC
def test_foo():
passRelevant log output
============================================================================================================= test session starts ==============================================================================================================
platform darwin -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0
rootdir: /Users/bob/workspace/ragie
configfile: pyproject.toml
plugins: anyio-4.3.0, asyncio-0.23.6
asyncio: mode=Mode.STRICT
collected 1 item
tests/test_foo.py . [100%]
=============================================================================================================== warnings summary ===============================================================================================================
../../Library/Caches/pypoetry/virtualenvs/ragie-EJQDw0bC-py3.12/lib/python3.12/site-packages/google/protobuf/internal/well_known_types.py:91
/Users/bob/Library/Caches/pypoetry/virtualenvs/ragie-EJQDw0bC-py3.12/lib/python3.12/site-packages/google/protobuf/internal/well_known_types.py:91: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
_EPOCH_DATETIME_NAIVE = datetime.datetime.utcfromtimestamp(0)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================= 1 passed, 1 warning in 0.06s =========================================================================================================Environment
- OS: macOS 14.3 (23D56)
- Python: 3.12
- pinecone: 3.2.2Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
daverigby commentedon May 1, 2024
The warning from protobuf
Should be resolved as of pinecone-client v4.0.0 as that upgrades to a version of protobuf (v4.25) which has fixed the deprecation issue.
foobarfighter commentedon May 3, 2024
Thank you!
fix(models): export the nested namespace types (#330)
Merge pull request #561 from pinecone-io/fix/330-namespace-model-exports
docs: teach the document interface, and name the TypeErrors (#541, #438)