prosegrinder / python-cmudict

A versioned python wrapper package for cmudict (https://github.com/cmusphinx/cmudict).
GNU General Public License v3.0
61 stars 6 forks source link

Please avoid upper limits on dependency versions #47

Closed swertz closed 10 months ago

swertz commented 11 months ago

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 this one.

cmudict 1.0.15 has the following dependencies:

importlib-resources = "^5.10.1"

This means that installing it will force a downgrade of importlib to 5.10.1 (current version = 6.0).

Unless you are absolutely sure that any version newer than those will break your package, which is usually unlikely, 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).

C.f. this blog post for context: https://iscinumpy.dev/post/bound-version-constraints/

davidlday commented 11 months ago

@swertz - Thank you for pointing this out. Huge miss on my part when I converted my libraries to poetry. I agree, major caps don't make sense for libraries. Will remove them across my libraries as appropriate, starting here.

swertz commented 11 months ago

Thanks a lot for the swift reply @davidlday !