-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Don't hard-pin cachetools version #2757
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
Conversation
Wouldn't the same argument apply to APScheduler? Why did you only make the change for cachetools? In general, there is an issue with dependency python has: If one does not hard pin the version, breaking changes in a dependency can make our library code break. If we hard pin the version, we force our users to miss out on (security) updates to the libraries, and they cant have a higher version in their projects then the one we hard pin, which seems to be your case. I don't know the reasoning behind hard pinning two libraries right now, having two at "higher then this version" and have one at no version at all, another maintainer will be able to shed light on that. |
In general, the usus / best practice in python is as follows (at least that's what i understand from past research): in Now this creates a different maintainability problem - as now every dependency has to be defined twice (once in
Yes that's correct, but that's not an immediate problem i encounter - but i'm more than happy to change it for this as well if you would prefer this. |
Very good point you made, thanks. Lets see what the other maintainers have to say, maybe we can come up with a solution. |
Hi. Thanks for the input @xmatthias ! This is definitely something that we should have a more clear policy on. So I don't want to make any quick call on this. We'll have to evaluate the different possibilities and double check what we're comfortable with. |
For a final solution, i tend to agree. |
Let me clarify: We're not planning to make any minor release before v14 (unless there is an API update). See also the last paragraph of the v13.7 release notes. pip install python-telegram-bot
pip install cachetools>=4.2.2 -U the second command will give you a warning along the lines ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
This behaviour is the source of the following dependency conflicts.
python-telegram-bot 13.7 requires cachetools==4.2.2, but you have cachetools 4.2.4 which is incompatible. but it will still install cachetools 4.2.4 :) |
This will for sure work for me personally - but is unsuitable to be used by an application where we'll have to support general installation, where ptb is only a dependency, not the main tool. |
I see your point. However, you're the first persion I know of that asks to upgrade the cachetools dependency (and I only recall 1 case where someone asked about APScheduler). So if the "update cachetools after installing PTB" strategy works out for you, I'd prefer to make a well prepared change for v14 instead of making a quick call for master that might end up never to be included in a release :) |
So what's the release date of v14? With your comments here (not going to upgrade dependencies to the 13x branch) i assume it'll only be days (maybe 2-3 weeks) out until v14 is ready (that would however also make me assume you'd have an alpha version published?). Otherwise, i find your statements unacceptable and quite strange, as i'm sure you'll forget about this version-bump should you have to do another release in the 13.x branch. |
I don't know. You apparently have found this announcement from which it should be clear that v14 is a big project and that we don't like to give ETAs.
Then you've misunderstood me. What I said was that if you're the only one so far who has problems with the pinned cachetools dependeny and are okay with my proposed workaround, then I don't deem a change in the dependency management necessary for the 13.x branch.
Rest assured that the organizational skills of this libraries developer group are quite sufficient to keep track of the changes that we want to include in a release. Our policy on the v13 branch is basically the following:
This policy is in place to make development of v14 easier, hence faster. For the reasons mentioned above I don't (yet) see a compelling reason to change the dependency management on the v13 branch. It's not clear to me what your aim in this discussion is: You confirmed #2757 (comment) that my proposed workaround #2757 (comment) works for you. So I'm wondering what you'd gain from a release including the change coming sooner than later, if you need to employ the workaround anyway, until such a release drops. |
I do understand this, and wouldn't do this either - but without an ETA, i don't think it's justified to no longer fix propblems that appear in v13.
This sounds like you've just invented it - otherwise you'd not write it down here, but link to where the so-called policy is documented, clearly, for everyone to see.
The workaround works for me personally - but does not work for me as a project maintainer of a project depending on ptb. It's the same with vendoring - that's an unreasonable approach, and seems to only try and "push away" the problem without looking for a fix. I can throw this question back at you, too. Also a proper resolution to this can be found and merged to v14 - and immediately backported to the existing version, so a potentially necessary release will include this - but that would assume the will to do so.
I confirmed that the approach may work for me from a conceptual perspective (so i thought it may fix it for myself, but not for the project i'm working on) - but indeed after trying the fix myself, it will not work with uptodate pip versions. I've understood now that you do not aim to accept this PR, but rather like arguing - so i'll convert this into an issue, where you can find a proper fix. I'd also urge you to stick to your own code of conduct here:
I don't think it's good for the community to try and push people trying to fix a detected problem away, but should rather try to understand the problem first. |
Checklist for PRs
.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)AUTHORS.rst
(optional)cachetools version should not be hardpinned - as this will prevent projects depending on this library from upgrading dependencies.