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

Don't pin dependencies #20

Open
bpedersen2 opened this issue Nov 30, 2022 · 4 comments
Open

Don't pin dependencies #20

bpedersen2 opened this issue Nov 30, 2022 · 4 comments

Comments

@bpedersen2
Copy link

As this is a library, please don' hard-pin dependencies, instead use suitable ranges.

Especially: requests>=2.27.1 instead of requests==2.27.1 unless 2.28+ is really breaking yuos_query as e.g. has other deps that require >=2.28.1 resulting in conflict

@mattclarke
Copy link
Member

PyPi seems to be a popular target for scumbags at the moment, so I am reluctant to have an open ended range if it can be avoided.
I can setup dependabot, so we can at least keep our version relatively up-to-date - work that be an acceptable compromise?

@bpedersen2
Copy link
Author

I would allow a rather open intervall ( take a look at the numpy recommendations, they do latest +3 (minor) versions)
and pin the versions on the application (nicos, your internal apps) level. otherwise all consumers of this lib are locked to the single version, which gets hard to manage over time.

@danesss
Copy link

danesss commented Dec 2, 2022

One recommended approach, specially for libraries, is to use setuptools install_requires to define compatible versions,
and leave the version pinning for the requirements.txt file.
install_requires would be used by dependent packages, and requirements.txt when installing the package directly.

It is not considered best practice to use install_requires to pin dependencies to specific versions

@mattclarke
Copy link
Member

@bpedersen2: I've done what @danesss suggested and loosened the dependencies in the setup.py.
I am just creating a gerrit patch. Can you let me know if this fixes the issue pls?

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

No branches or pull requests

3 participants