[BUG] Please avoid upper limits on dependency versions
swertz opened this issue · comments
Describe the bug
Not really a bug, more of an (big) annoyance: it is a well-known issue with poetry that it insists to add upper limits on dependency versions. While this fine for an application which is at the end of the dependency tree, it is a much bigger problem for a library that will be installed together with many other dependencies, such as pytsmod.
pytsmod 0.3.7 has the following dependencies:
numpy = "^1.20"
scipy = "^1.8"
soundfile = "^0.10"
This means that installing it will force a downgrade of numpy to 1.20 (current version = 1.26), of scipy to 1.8 (instead of 1.11), and soundfile to 0.10 (instead of 0.12).
Unless you are absolutely sure that any version newer than those will break your package, this should really be avoided for a library, unless you update your library sufficiently often so as to always keep these upper bounds to the latest available working versions of all your dependencies (using e.g. dependabot). But evidently, this is not the case here (which is not a critique - it doesn't really make sense to release a new version every week just because the requirements have to be updated).
Note: what is a bit strange is that in the current main
branch (not released), the soundfile
dependency was changed to soundfile = ">=0.10"
, which is better, but the issue remains for numpy and scipy.
To Reproduce
Steps to reproduce the behavior:
pip install soundfile numpy
pip install pytsmod
Expected behavior
soundfile
and numpy
should not be downgraded when installing pytsmod
.
Desktop (please complete the following information):
- OS: any
- Python version: any/3.10
- Version 0.3.7
Additional context
See this blog post: https://iscinumpy.dev/post/bound-version-constraints/
Oh, I see. It just followed the basic poetry rule, but I think you are right. I will change it in the next version.
Thanks a lot @seyong92 !
I updated the package to 0.3.8, which removed the upper limit on dependency. Please enjoy!
That's great, many thanks again!