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
Backport fixes for PyPy (GH-5429) #5465
Conversation
Currently require a nightly PyPy build for Py3.9 to support async iteration and finalisation. Avoid PyIter_Next() and call tp_iternext() instead because PyIter_Next() swallows StopIteration exceptions and thus looses the return value. See https://foss.heptapod.net/pypy/pypy/-/issues/3280 See https://foss.heptapod.net/pypy/pypy/-/issues/3935
It seems skbuild is failing on macOS 2.7.
This is the old scikit-build as required by line-profiler v3.1.0 (which tag? hmm, maybe the fix_310_wheel branch), which is the last version to support python2.7, in its requirements/build.txt and not the newer scikit-build-core. They released 4 days ago, maybe something is broken? But when I look at that file line 41 is different and this code appears on line 66. @henryiii any thoughts? |
It's also an old scikit-build, 0.15, as 0.16 and 0.17 don't support 2.7. How does release not have a |
There's no line profiler with that number on PyPI. I think they deleted that release? I'm going to guess it never had wheels. Maybe try again? I can release fixes to 0.15.x if I know what needs fixing. |
I see line-proviler 3.1.0 here. It has wheels only for manylinux1 and manylinux2010. But back to the problem at hand: at scikit-build version 1.5, consts.py:41 has this code:
And indeed, in the CI actions file, there is
On master it is "10.15" |
This was changed in ba82c22 for both 3.0.0b3 and 0.29.x. I will try 11.0 |
CI is passing now (there are some timeouts after 40 minutes). |
I think we should probably allow settings like "11", I think that's supported when compiling; from (rather old) macOS source code, it looks like default values were injected if they were missing. Not sure why 11 is being targeted, though, 10.14 is enough for full C++ support, otherwise 10.9 or 10.10 is fine. Seeing it set to 11 when moving to macOS 11 looks suspicious. Edit, no, it was 10.14 -> 11 while macOS being compiled was always 11. |
I used target 11 (ok, probably should have used 11.0) to support Arm64. Isn't that needed? |
Oh, is it only setting 11 targeting ARM? Yes, 11 is the first supporting ARM, though IIRC it ignores a lower setting so that you can make Universal binaries that support 10.x too. Could be wrong there, but I know we don't have built in fuse support for cibuildwheel yet, so it has support something like this. Is this distributing binaries or just for testing? |
This is in the CI workflow, not the wheel build. The macOS CI build in 0.29.x has generally been unhappy for a while now, but 0.29.x is in boring legacy maintenance mode, so the macOS build setup isn't hugely important any more (to me, that is). If it's easy to fix, fine. If not, that's probably fine, too. |
"11.0" should be just fine then. I'll see if I can match the behavior for single digit values better (more permissive or better error message, whichever is closer). |
Cool. That is what I did in this PR. |
Does this need anything more? |
Thank @mattip |
Backported from #5429
Use
_PyEval_GetAsyncGenFinalizer
,_PyEval_GetAsyncGenFirstiter
on PyPy instead of probing inside thePyThreadState
structRequire a nightly PyPy build for Py3.9 to support async iteration and finalisation.
Avoid
PyIter_Next()
and calltp_iternext()
instead where possible becausePyIter_Next()
swallowsStopIteration
exceptions and thus looses the return value.See https://foss.heptapod.net/pypy/pypy/-/issues/3280
See https://foss.heptapod.net/pypy/pypy/-/issues/3935