Update sortedcontainers version requirement#18175
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
If you want to backport, please add a bugfix change log to justify this bump in a backport branch. Thanks! |
|
CI still got 2.1.0, so, by your argument, we should make that our minimal requirement. |
|
nevermind I actually got the explanation: |
|
The problem here is that |
|
The only robust solution I can see would be to drop |
|
Re: dropping pytest-astropy @astrofrog created that metapackage for astropy so he might have strong opinions. |
|
I don't really mind but does this really solve the issue in general? We still don't have control over hypothesis's dependency pinning? |
|
Indeed we don't, but we gain the ability to pin hypothesis itself, which prevents this issue from resurfacing unexpectedly |
23f7652 to
354648c
Compare
sortedcontainers requirementastropy dependency requirement to be testable
astropy dependency requirement to be testableastropy dependency requirements to be testable
|
I used |
354648c to
bcf1efa
Compare
pyproject.toml
Outdated
| "pandas>=2.0", | ||
| "sortedcontainers>=1.5.7", # (older versions may work) | ||
| "pytz>=2016.10", # (older versions may work) | ||
| "sortedcontainers>=2.1.0", # imposed by testing with hypothesis |
There was a problem hiding this comment.
If you look up the logs for the latest run of the oldest dependencies CI job on main you will see that sortedcontainers==2.1.0 is what that job already uses.
The reality is that if there is no automated test in a CI job for verifying that our oldest requirements are testable then people will forget to check. And if there is a CI job then it doesn't matter (for these purposes) if |
I don't think I understand your point here. |
9070fc9 to
69ef130
Compare
|
I am limiting this PR to |
astropy dependency requirements to be testablesortedcontainers version requirement
|
Hmm why all the dev deps failing? |
|
Looks like |
|
Might be transient then. Maybe a rebase would fix it. |
69ef130 to
c87f045
Compare
|
The index is up again. I rebased this for you Eero (but please let me know if I shouldn't do this again in the future). |
`astropy` claimed to support `sortedcontainers>=1.5.7`, but versions older than 2.0.5 are incompatible with Python 3.11. This went unnoticed because `hypothesis`, which is a dependency for `astropy` tests, requires `sortedcontainers>=2.1.0`. Given that 2.1.0 was released in 2018, declaring that as the oldest supported version is not controversial.
c87f045 to
af625c3
Compare
|
There is no good reason for removing my signature from the commit. |
|
did I do that ? Sorry, I'm not sure what you mean. |
|
The committer has the option of signing the commit. By rebasing you become the committer and my signature gets removed. |
|
FWIW we don't enforce GPG signed commit or that sort of stuff here. |
|
Ok I guess I cannot fix this unless I fully commit to stealing your identity... I'll just avoid rebasing your PRs then 😅 |
btw @eerovaher you might want to hop-on to #18783 Anyway, I don't see anything we still need to wait on here, so I'll merge it now. Thanks ! |
…175-on-v7.2.x Backport PR #18175 on branch v7.2.x (Update `sortedcontainers` version requirement)
Original description
The oldest version of
sortedcontainersthatastropyclaims to support is incompatible with Python 3.11 because it importsSequenceandMutableSequencefromcollectionswhereas it should be importing them fromcollections.abcinstead. The oldest version that is compatible with Python 3.11 is 2.0.5 (released in 2018).The reason this is not causing failures in our oldest dependencies CI job is that those jobs use version 2.1.0 despite what our
pyproject.tomlspecifies. I don't have an explanation for the discrepancy.UPDATE
Turns out that the discrepancy was caused by indirect dependencies. I investigated further (by running
uv pip compile --resolution lowest-direct --extra test_all pyproject.toml) and found a few more cases where the oldest versionastropyclaims to support cannot be tested. I expanded this pull request so that it updates our requirements accordingly at this point in time, but we still don't have a mechanism that would ensure our requirements stay consistent with what we actually test.UPDATE 2
The required versions of quite a few packages have been updated in other pull requests, so I am again limiting this PR to
sortedcontainers. Our oldest dependencies CI job is already using 2.1.0 because that is whathypothesisrequires. Claiming to support older versions than that is dangerous because if there are any problems our CI will not catch them. Indeed, versions older than 2.0.5 are known to be incompatible with modernastropybecause they are incompatible with Python 3.11, which is the oldest Python modernastropysupports.