-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add Python 3.10 support: use Py_SET_SIZE() #52
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means we need to drop support for Python 3.5, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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