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: narrow version ranges for project dependencies #5005

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

italojohnny
Copy link
Member

This PR aims to address the installation issues of the project package via pip. To simplify dependency resolution, the version ranges of dependencies have been replaced with exact versions to avoid conflicts during pip installation.

The package installation has been tested with Python versions 3.10, 3.11, and 3.12.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 2, 2024
@github-actions github-actions bot added the bug Something isn't working label Dec 2, 2024
@erichare
Copy link
Collaborator

erichare commented Dec 2, 2024

@italojohnny I definitely like this, but just wondering, do you think == is better than ~= in general? Only asking because i thought it kind of makes sense to allow minor version increments, but maybe that still causes dependency resolution issues?

@italojohnny
Copy link
Member Author

I definitely like this, but just wondering, do you think == is better than ~= in general? Only asking because i thought it kind of makes sense to allow minor version increments, but maybe that still causes dependency resolution issues?

@erichare, I performed a quick test where I replaced == with ~= in the dependency specifications, generated the package, and attempted to install it in virtual environments using pip: all attempts timed out while trying to resolve dependencies.

I admit my solution is quite rudimentary, but it solves the problem without considering other factors.
If anyone remembers something I might be overlooking, please let us know.

@italojohnny italojohnny added lgtm This PR has been approved by a maintainer and removed lgtm This PR has been approved by a maintainer labels Dec 2, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 2, 2024
@erichare
Copy link
Collaborator

erichare commented Dec 2, 2024

I definitely like this, but just wondering, do you think == is better than ~= in general? Only asking because i thought it kind of makes sense to allow minor version increments, but maybe that still causes dependency resolution issues?

@erichare, I performed a quick test where I replaced == with ~= in the dependency specifications, generated the package, and attempted to install it in virtual environments using pip: all attempts timed out while trying to resolve dependencies.

I admit my solution is quite rudimentary, but it solves the problem without considering other factors. If anyone remembers something I might be overlooking, please let us know.

Probably specifying exact versions is the safest bet anyway 😄 i'll approve! when i worked on the langchain upgrade PR, i switched a lot of >= version dependencies to ~= hoping that would solve the problem, but if the resolver is still struggling i think its all the more reason just to fix everything as much as possible. We'll just want to constantly keep a watch on both critical bugfixes and feature releases that we might be missing... hopefully as the community-provided components get more capable that will be less of a concern!

@ogabrielluiz
Copy link
Contributor

Using ~= is pretty useful so we don't block other projects but also to grab bug fixes in other projects. It won't be as open as >= so it isn't as problematic.

@italojohnny italojohnny force-pushed the fix/version_dependencies branch from 5c67996 to 2e72e96 Compare December 10, 2024 10:31
@italojohnny italojohnny enabled auto-merge (squash) December 10, 2024 10:31
@italojohnny italojohnny merged commit c395150 into main Dec 10, 2024
15 checks passed
@italojohnny italojohnny deleted the fix/version_dependencies branch December 10, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants