Add Python 3.10 support: use Py_SET_SIZE()#52
Add Python 3.10 support: use Py_SET_SIZE()#521st1 merged 3 commits intoMagicStack:masterfrom vstinner:python310
Conversation
Run upgrade_pythoncapi.py on immutables: replace Py_SIZE(node)=size with Py_SET_SIZE(node, size). Add pythoncapi_compat.h header file to support Python 3.8 and older. Fix #46
|
| @@ -1,4 +1,5 @@ | |||
| #include <stddef.h> /* For offsetof */ | |||
| #include "pythoncapi_compat.h" | |||
There was a problem hiding this comment.
This means we need to drop support for Python 3.5, right?
There was a problem hiding this comment.
I updated https://github.com/pythoncapi/pythoncapi_compat to support Python 2.7, 3.4 and 3.5 as well.
I updated pythoncapi_compat.h to the latest version in my PR.
There was a problem hiding this comment.
Python 3.5 was already supported by I was too lazy to port the tests to Python 3.5. Since I'm trying to use pythoncapi_compat.h on Mercurial which still supports Python 2.7, I ported it to Python 2.7, 3.4 and 3.5. And 2.7 and 3.5 are now tested on the project CI.
|
Thanks Victor! |
You're welcome, thanks for the review. immutables is now the first official user of pythoncapi_compat.h :-D |
Run upgrade_pythoncapi.py on immutables: replace Py_SIZE(node)=size
with Py_SET_SIZE(node, size).
Add pythoncapi_compat.h header file to support Python 3.8 and older.
Fix #46