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

[Fix] Module can be imported even when incompatible grpc deps are present #224

Closed
wants to merge 1 commit into from

Conversation

jhamon
Copy link
Collaborator

@jhamon jhamon commented Oct 19, 2023

Problem

When installing pinecone-client alongside other packages that include GRPC dependencies, imports may succeed even though the grpc dependencies are not sufficient for our GRPC code to be loaded correctly. This causes the entire module import to fail in some situations because the error thrown is some other runtime error (e.g. AttributeError instead of ImportError in the bug report we received) we are not catching.

This seems like a general problem in the python ecosystem, since there's no easy way to tell whether extras were installed and dependency requirements met other than try running and see what happens.

Solution

GRPC: Catch all exceptions, not just ImportError

Workflow changes are unrelated, but necessary to release a dev build with this change. Seems like the nightly build has been broken since the poetry changes were merged last week because version numbers are stored in a different place now.

Type of Change

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

Test Plan

Make a dev build, see if that can install

@jhamon jhamon changed the title Fix install problem alongside incompatible grpc deps [Fix] Module can be imported even when incompatible grpc deps are present Oct 19, 2023
@jhamon jhamon force-pushed the jhamon/grpc-import-shenanigans branch from d8e6d48 to 96917f8 Compare October 19, 2023 23:22
@jhamon jhamon closed this Nov 7, 2023
@jhamon jhamon deleted the jhamon/grpc-import-shenanigans branch June 20, 2024 23:14
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.

2 participants