-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Loosen dependency specifiers in package config #16262
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
[py] Loosen dependency specifiers in package config #16262
Conversation
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, no CVE for these ranges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and works for our case.
I don't know much but is mentioning non-released version limits as deps a common practice?
Does it mean I am not be able to upgrade |
For upper limits, yes that's common practice. |
This means that during Selenium installation, it will never download and install 2.0+ for you. Once installation is complete, you can upgrade websocket-client to whatever version you want and selenium will attempt to use it at runtime. |
User description
💥 What does this PR do?
This PR loosens the dependency specifiers used in Python packaging configuration.
Since Selenium is a library used in various projects, we can't force specific versions of our dependencies on users because it might conflict with different versions of the same packages they use with other libraries. However, we want to ensure the selenium package still works with some range of declared dependencies, and not just let it pull in possibly incompatible dependencies on installation. There is no perfect solution for this.
Currently we use the "compatible release" specifier for Python package dependencies, which allows new dependency versions within the same minor version. Based on user feedback, this seems to be too strict. This PR changes the dependency specifications to use a minimum and maximum version instead, with the maximum being the next major version.
This will allow more installation flexibility, while (hopefully) not pulling in new dependency versions that introduce breaking changes (major version upgrades).
💡 Additional Considerations
Going forward, we would raise the minimum version occasionally with new releases. For CI and development, we will continue to pin a specific version via
requirements.txt
.🔄 Types of changes
PR Type
Other
Description
Changed dependency specifiers from compatible release (~=) to minimum/maximum version ranges
Updated trio, trio-websocket, typing_extensions, and websocket-client version constraints
Allows more installation flexibility while preventing major version conflicts
Diagram Walkthrough
File Walkthrough
BUILD.bazel
Update Bazel wheel dependency constraints
py/BUILD.bazel
websocket-client
pyproject.toml
Update pyproject dependency constraints
py/pyproject.toml
websocket-client