-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: use oldest-supported-numpy #43146
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
looks fine, do we need to somehow add this to our build configuration on CI? |
Well, it's already being built in most the jobs, but the important thing is what version of NumPy the PEP 517 build process downloads. It seems the build I checked ( The reason this (the old list of NumPy versions and the package that maintains that list) exists is that you can't use newer runtime NumPy than you built with. As long as the Python 3.7 tests pass and we can verify it is downloading a pinned NumPy version, I think it's pretty safe. I don't actually see Python 3.7 listed in the checks, though? |
Is FAILED pandas/tests/frame/methods/test_rename.py::TestRename::test_rename_inplace Here, Line 112 in 8b90070
|
just because the CI passes doesn't mean this change actually works. We don't build wheels in this repo. We are no longer on 3.7 |
Ah, looks like master has dropped Python 3.7, so I guess 1.4 is planned for after December 26, which is the NEP 29 drop date for Python 3.7. However, there needs to be a Python 3.10 supporting release before December 26. Python 3.10 hits fully in October (and ideally packages are supposed to pick up support during the RC phase). Should this be backported to the 1.3 branch? I'm guessing that's where the Python 3.7 tests are. (Sort of assuming Pandas is following NEP 29, seems to be in #29034 (comment) for example) |
yes we can backport this |
pandas/.github/workflows/sdist.yml Line 61 in 8b90070
This builds from SDist, which builds via PEP 517 with PEP 518 requirements (the comment in the pyproject.toml is wrong, by the way, using the implied default What about slightly modifying that test, both to add "-v" for verbose output, as well as installing the oldest supported NumPy (not the package, just the version) after the build and then running at least one test that touches NumPy? |
This code is currently hand-copied from SciPy, now there's a package that exists to do just that. As a bonus, NumPy will no longer need to build wheels on 3.10 (Linux 64-bit only currently)
I didn't add a test, the current job just does a simple import, which might not trigger the error. Any ideas for a simple test that would touch the NumPy portions? |
- name: Force oldest supported NumPy | ||
run: | | ||
case "${{matrix.python-version}}" in | ||
3.8) |
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.
this needs 3.7 as well (as this is going to be backported); will need to followup and then remove 3.7 on master. so this is complicated. let's just leave these additions to the sdist workflow for a followup PR instead. alt we can simply target master (maybe a better idea).
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
What's the status here? From what I understood, "we can simply target master (maybe a better idea)." is the current state, and there also was a suggestion to backport and add 3.7 to this list. |
this PR overlaps with #43729 (now wouldn't mind adding the specific CI job that you are adding). |
Replaced by #43729 |
This code is currently hand-copied from SciPy, now there's a package that exists to do just that. As a bonus, NumPy will no longer need to build wheels on 3.10 (Linux 64-bit only currently)
Two things to consider: first, for Python 3.7, this sets an older build time requirement for NumPy than is there currently. According to the NumPy devs, this is fine, older build time requirements than the run requirement is okay. But we could use selectors and manually set NumPy for this one case, it's not something that changes.
Second, we could pin here, but given that this just pins old versions, I don't think it needs pinning. We could set a minimum, though, >=0.10 for example.