
On 2020-02-10 9:15 a.m., Soni L. wrote:
[...]
I think they mean that instead of e.g. https://pypi.org/project/six/ just showing `pip install six`, it should also show example install_requires values. E.g. `install_requires: ['six~=1.14.0']`. Or maybe a dropdown where you select the compatibility you want and and it formats the version string.
This does seem like a good way to encourage people to specify or at least think about versioned dependencies, although I wonder how many people look at pypi when specifying their dependencies in `install_requires`?
-1. I don't want everyone to pin to an exact version just because it's the obvious copy/paste command. That's what happens all the time in the Node.js world, and the result is a constant battle to get everyone to upgrade their packages, because they've unnecessarily pinned them.
Instead, encourage everyone to install *without* version numbers. If that results in a package being broken because of a backward-incompatible change, that's the fault of the package, and it SHOULD be seen as a problem.
I'm with Chris here. Install without versions unless you've s specific requirement such as a feature to use or a bug/misfeature to avoid.
I look on pinning as a tool for reproducability; if I've tested against my venv happily, my build/install should use the versions from its "pip freeze".
I still think PyPI should suggest/encourage using at least >= by default. for comparison Rust/Cargo enforces semver and altho you specify a dependency like tokio="0.2" it'll actually use any compatible version as defined by semver.
there are many reasons to at least specify a minimum version. I see the reasons not to specify maximum versions tho.
fwiw, this works with non-semver versioning and basically any versioning that increments version numbers one way or another. the main benefit here is when adding a new dependency to an old project, so that it'll update the other dependencies as needed rather than giving you an error because the new dependency relies on new features not available in the version you're using.
Cheers, Cameron Simpson <cs@cskk.id.au> _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/W7F64I... Code of Conduct: http://python.org/psf/codeofconduct/