8000 MAINT: support python 3.10 by charris · Pull Request #16437 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: support python 3.10 #16437

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

Merged
merged 3 commits into from
May 30, 2020
Merged

Conversation

charris
Copy link
Member
@charris charris commented May 29, 2020

Backport of #16417.

In python/cpython#20290 CPython changed
Py_TYPE from a macro to an inline function. This requires a code
change to us Py_SET_TYPE instead when using Py_TYPE() as a lvalue
in c code.

This is a draft (and I expect it to fail all of the tests) because Py_SET_TYPE was only introduced in py39. Can I please have some guidance on how to do version gating (or have someone who knows take over this PR ;) )

tacaswell and others added 3 commits May 29, 2020 16:19
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.
To support the change to Py_SIZE and Py_TYPE the Py_SET_SIZE and
Py_SET_TYPE macros are provided in py39.  This provides the same
macros falling back to the old method for < py39.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@charris charris added this to the 1.19.0 release milestone May 29, 2020
@charris charris merged commit cdd5aa9 into numpy:maintenance/1.19.x May 30, 2020
@charris charris deleted the backport-16417 branch May 30, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0