Repository navigation
RFC: restrict wcs extension modules to CPython's limited API - #18231
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.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
astropy_wcs Cython module for compatibility with CPython's limited API
|
@neutrinoceros just to check, did you forget to paste the error? |
|
Whoops, yes ! thanks for your quick response ! |
4b64975 to
fac10b9
Compare
0713776 to
4e74776
Compare
4e74776 to
26acbf4
Compare
astropy_wcs Cython module for compatibility with CPython's limited APIastropy_wcs extension module for compatibility with CPython's limited API
26acbf4 to
a5249ed
Compare
astropy_wcs extension module for compatibility with CPython's limited APIa5249ed to
8edb949
Compare
d6b457b to
161d76b
Compare
|
What an epic effort - nice work! 👏 |
9ac87c6 to
fd79957
Compare
0ab79bb to
65b7559
Compare
|
@neutrinoceros - could you rebase this so that it picks up the multiple limited API CI jobs? |
65b7559 to
46f5179
Compare
|
rebased ! |
|
I would prefer to review myself in order to understand (for my own education) the proposed changes but I will not be able to look at this PR in detail for the next 2 weeks. At first glance (without me following all the links to CPython and initial issues), changes look non-controversial. So I am fine with someone else reviewing this PR, especially if time is critical. |
46f5179 to
0982f1c
Compare
|
rebased with no modifications to refresh CI |
mhvk
left a comment
There was a problem hiding this comment.
I tried to have a look, and made some comments, in particular about decref'ing what I think are borrowed references (from Py_TYPE). Not sure I'm correct, or that I caught all. Am a bit worried that, if my reasoning is correct, this is not caught by testing. In numpy, there is a test run that somehow checks things more carefully -- cannot easily find out right now what that is (am travelling), but can try next week.
0982f1c to
5ee3035
Compare
5ee3035 to
93c37b1
Compare
|
Time is still not critical, but I'd like to emphasize that this the last remaining PR for making astropy (as a whole) limited-api compliant. |
mhvk
left a comment
There was a problem hiding this comment.
With my earlier worries proven wrong, I think this is all OK, so approving. I'll leave merging to the wcs team, though.
Really nice work!
mcara
left a comment
There was a problem hiding this comment.
LGTM. Thank you!
I run regression tests on drizzlepac and they all pass. All stwcs and tweakwcs unit tests pass as well.
Description
Following @da-woods' advice, I think I got most of this right, but I'm still struggling to resolve the last compilation-error I'm getting, namely:
At this point, I'd like to ask @astrofrog and @da-woods for a hand solving this last bit.
Partially address #18163
update: notes to reviewers
FIXMEcomments indicating what I believe are bug-for-bug refactors, where I found some methods defined but not included in their natural parent structsPy_List_GET_ITEM->Py_List_GetItem). It should be possible to instead select the version we want at compile time using#ifdef ...pre-proc directives (if we keep LIMITED_API as a opt-in build option). Let me know if this (small) additional complexity is desired.PY_XDECREFexpects aPyObject*pointer)