WHL: build limited-api compliant wheels#372
WHL: build limited-api compliant wheels#372neutrinoceros wants to merge 2 commits intoUnidata:masterfrom
Conversation
b149f00 to
c41b7f6
Compare
|
(that said, I think I found the issue and updated the branch here) |
c41b7f6 to
c7e138c
Compare
|
Here's the current error this is likely caused by some limitation (or bug) in Cython where it can still generate code that isn't strictly Limited-API-compliant. This is similar to why |
|
let's try |
|
This again might be a sign of a limitation or bug in Cython, but I imagine it could also be a symptom of 3.14 not being completely stabilized yet (even though we're on rc3 at this point). I cannot do much more for now, I'll need to wait for the final 3.14.0 release, about 2 weeks from now, to see if anything changes. |
|
python 3.14 is released, would like to merge this PR before making a new release (if possible) |
|
I can try out a new run |
|
actually, it looks like cibuildwheels needs to be patched (and then upgraded here) to use the final 3.14.0 release, but the patch isn't there yet. |
|
I wonder why it worked for netcdf4-python (Unidata/netcdf4-python#1427)? |
|
I'm OK with waiting, we can always issue a patch release with the limited abi wheels |
It worked out of the box for most packages I tried this on indeed, but not all. It depends on Cython for generating correct and compatible code, and maybe we're just hitting a bug in Cython or CPython itself (yikes). If 3.14.0 final doesn't work, I'll upstream the discussion to interested parties. |
4b6bb8b to
adc3dff
Compare
|
here's a clue; the warning we see before the interpreter crashes, namely is generated by Cython (specifically |
|
I could be wrong but it looks to me like the information that we want to target abi3 is somehow not reaching Cython. I suspect it might be caused by the specific logic used in setup.py for this project but I'm not certain yet. |
|
I see that the cftime setup.py uses Cython.Build.cythonize, while netcdf4-python doesn't. |
|
that's definitely the difference, thanks. |
|
I opened #375 to unblock your release process |
473d26f to
18906d6
Compare
BTW, I tried to build this locally for cp313 and ran the tests on cp314, everything works. I could not reproduce the error here :-/ |
d5695da to
cfe3322
Compare
|
refreshing CI with a rebase just in case it works better this time (and because I forgot what the error looked like) |
94cdf37 to
5e54e7f
Compare
setup.py
Outdated
| if USE_PY_LIMITED_API: | ||
| DEFINE_MACROS.append(("Py_LIMITED_API", ABI3_TARGET_HEX)) |
There was a problem hiding this comment.
I think I found the problem. These should probably be defined outside of this if-clause. I also believe that CYTHON_TRACE is not compatible with ABI3.
There was a problem hiding this comment.
Nice. Feel free to push to this branch if you like. I'll be AFK until tomorrow
Based off #371, similar to Unidata/netcdf4-python#1427
I've included a commit to drop support for 3.8 and 3.9 (soon to be EOL), but it can easily be split out of this PR if desired.