-
Notifications
You must be signed in to change notification settings - Fork 432
[refactor] Use minimal versions instead of pinned for setuptools #4501
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hi,
Thanks for the change. However, I wouldn't agree with changing dependency versions compared to what we describe in requirements.txt files. There should be a single source of dependencies and versions.
Also, I would say that at only minor version changes should be allowed in an automatic manner.
Yes, as stated, this was a very naive attempt, but I still think the referred issue is a valid one. Any alternative suggestions? |
Actually, requiring specific versions has historical reasons. In the beginning of the project's lifecycle it caused a lot of headache to detect whether an issue is due to a dependency version mismatch, or CodeChecker itself. So, we decided to use specific version numbers so it is common for everyone.
|
2d19175
to
7aadfc2
Compare
Great!
It is common however to use tooling (
I've the updated the PR, is this how you prefer the changes? |
There are many other files, too. Otherwise the change looks fine. Thank you! ./tools/tu_collector/requirements_py/dev/requirements.txt |
7aadfc2
to
ddfb19b
Compare
Sure, didn't know it was good if I touched all those files, instead of the ones used for pypi packaging. Updated |
Now it occurred that an automatic upgrade of a dependency (mypy in this case) caused a failing CI. I'm starting to be skeptic with the usefulness of the recommendation of auto version upgrade. It feels like it will cause more headache in the future. |
Normally you pin ci versions, but not the package versions. |
Ps. Its very very useful in others ci environment which may pull in stuff like sphinx to build docs and other tools. If codechecker pins its packages, these will conflict with other projects pins. Which is why it should not be pinned in the package description. |
Also. I you dont use Poetry/uv lock files or pip compile to ensure a stable CI environment. You are still susceptible to sub package dependency upgrades. |
Exactly, moreover you pin using hashes to avoid tampered versions.
@bruntib what's the plan then? Is there a clear distinction between package dependencies vs testing dependencies? One approach I can recommend is using tooling to pin the dependencies for you. You provide a $ pip-compile --generate-hashes --output-file=requirements.txt requirements.in The Next to that, add a dependabot configuration that checks for updates, which can be tested in CI before pushing to the main branch. |
@bruntib any more feedback on this? I often need to uninstall CodeChecker because it forces versions of dependencies for an entire environment, which isn't ideal. Projects should pin in CI and during testing, so users can always fallback to those if issues arise. |
@pdgendt, Sorry for disappearing this long. Alright, let's try using the |
2309628
to
a6a1339
Compare
It is not recommended by the Python Packaging User Guide to pin dependencies. Signed-off-by: Pieter De Gendt <[email protected]>
a6a1339
to
eda2fa4
Compare
@pdgendt seems some checks are failing? |
It is not recommended by the Python Packaging User Guide to pin dependencies. This is a naive approach to set the project's pinned dependencies as the package's minimal dependencies.
Fixes #4500