Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing certifi dependency #277

Merged
merged 1 commit into from
Jan 13, 2024
Merged

Add missing certifi dependency #277

merged 1 commit into from
Jan 13, 2024

Conversation

jhamon
Copy link
Collaborator

@jhamon jhamon commented Jan 13, 2024

Problem

Recent integration testing with our published dev releases shows we are missing a dependency: certifi.

Traceback (most recent call last):
  File "/home/runner/work/pinecone-python-client/pinecone-python-client/scripts/3.x/delete-all-indexes.py", line 4, in <module>
    from pinecone import Pinecone
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/__init__.py", line 4, in <module>
    from .config import *
  File "/opt/hostedtoolcache/Python/3.9.18/x[64](https://github.com/pinecone-io/pinecone-python-client/actions/runs/7514956364/job/20458392131#step:3:69)/lib/python3.9/site-packages/pinecone/config/__init__.py", line 4, in <module>
    from .config import ConfigBuilder, Config
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/config/config.py", line 5, in <module>
    from pinecone.config.openapi import OpenApiConfigFactory
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/config/openapi.py", line 4, in <module>
    import certifi
ModuleNotFoundError: No module named 'certifi'

Solution

We need to declare a direct dependency on certifi, which is used when we setup configuration to get information about current SSL certs. We used to get this as a transitive dependency when we had a dependency on the requests package, but that was recently removed while pruning unused dependencies.

The certifi package does not follow semver (versions are date based) and should ideally always be on the latest version. But since we are developing a library that needs broad compatibility we will specify a very broad range to be compatible with everyone's apps and other libraries that may be pinned to specific versions or narrow ranges.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Test Plan

Need to build a new dev release and rerun install-based integration test.

@jhamon jhamon merged commit e296d22 into main Jan 13, 2024
64 checks passed
@jhamon jhamon deleted the jhamon/missing-deps branch January 13, 2024 22:26
jhamon added a commit that referenced this pull request Jan 14, 2024
## Problem

Recent integration testing with our published dev releases shows we are
missing a dependency: `certifi`.

```
Traceback (most recent call last):
  File "/home/runner/work/pinecone-python-client/pinecone-python-client/scripts/3.x/delete-all-indexes.py", line 4, in <module>
    from pinecone import Pinecone
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/__init__.py", line 4, in <module>
    from .config import *
  File "/opt/hostedtoolcache/Python/3.9.18/x[64](https://github.com/pinecone-io/pinecone-python-client/actions/runs/7514956364/job/20458392131#step:3:69)/lib/python3.9/site-packages/pinecone/config/__init__.py", line 4, in <module>
    from .config import ConfigBuilder, Config
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/config/config.py", line 5, in <module>
    from pinecone.config.openapi import OpenApiConfigFactory
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pinecone/config/openapi.py", line 4, in <module>
    import certifi
ModuleNotFoundError: No module named 'certifi'
```

## Solution

We need to declare a direct dependency on `certifi`, which is used when
we setup configuration to get information about current SSL certs. We
used to get this as a transitive dependency when we had a dependency on
the `requests` package, but that was recently removed while pruning
unused dependencies.

The `certifi` package does not follow semver (versions are date based)
and should ideally always be on the latest version. But since we are
developing a library that needs broad compatibility we will specify a
very broad range to be compatible with everyone's apps and other
libraries that may be pinned to specific versions or narrow ranges.

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)

## Test Plan

Need to build a new dev release and rerun install-based integration
test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants