-
Notifications
You must be signed in to change notification settings - Fork 99
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
Remove upper caps on dependencies #452
Conversation
@andrefurlan-db @benc-db @jackyhu-db @kravets-levko @rcypher-databricks @yunbodeng-db pinging any of you in case this has gone unseen |
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.
Change LGTM and the motivation is a solid one.
@jackyhu-db any chance you could take a look at this? I'm interested in removing the preemptive cap for numpy 2 (see also #432 ) |
@arredond thanks for making the change. Can you reduce the scope of the change? Only change the |
Of course, I'll make a change to this PR reducing the scope. However, at the risk of repeating myself and being annoying, please consider removing all upper caps in the future. Numpy and pyarrow have been the problem this time but it's very likely that in the near future you'll be seeing this same issue with, say, Once again copying that quote from Brett Cannon in the PR description, since these well-established folks make the case much better than I do:
|
* Remove upper caps on numpy and pyarrow versions
What
Like many Poetry-managed projects, this package sets upper caps on dependencies both via caret (
^
) and lesser-than signs (<=
). This PR relaxes these requirements to just establishing lower bounds, not upper ones.Why
Poetry heavily believes in SemVer but many projects do not strictly follow it. For instance, pyarrow has bumped major versions eight times in the last 2 years without really making breaking changes for the vast majority of users.
Many well-regarded devs in the Python ecosystem are calling against upper-bounds in projects due to the complications it generates for end users (here's an excellent discussion on the topic from a PyPa member).
Personally, I find myself in "dependency hell" in a project where we use SQLAlchemy to interface with many kinds of databases (the area where SQLAlchemy excels, for sure). The latest dialects we're trying to support require SQLAlchemy >= 2.0, but our current
databricks-sql-connector
version of2.9.3
doesn't allow it. We also can't upgrade to the latest3.4.0
because an upper limit onpyarrow
has been set (which didn't exist before). A similar experience happens with Numpy >= 2.0.Related issues / PRs
Many versions of this issue have popped up before for this package (especially for
pyarrow
andnumpy
):#427
#55
#428
#74
#88
#432
Note
If this PR seems too ambitious, I'm happy to provide another one that only removes or, at least, bumps the upper cap for
pyarrow
andnumpy
. However, I believe removing upper caps in a general sense is the way to go. Major version bumps in Python are very frequently backwards compatible, and it's a much better experience for users to fix problems when they occur than to prevent them from upgrading (and eventually ditching your package altogether).Here's a quote in the linked article from Brett Cannon, Python Steering Council Member and packaging expert:
Or another quote from the author of the article himself: