Skip to content

Conversation

@vstinner
Copy link
Contributor

@vstinner vstinner commented Dec 4, 2020

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

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
@vstinner
Copy link
Contributor Author

vstinner commented Dec 4, 2020

Run upgrade_pythoncapi.py on immutables

See https://github.com/pythoncapi/pythoncapi_compat

@@ -1,4 +1,5 @@
#include <stddef.h> /* For offsetof */
#include "pythoncapi_compat.h"
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@1st1 1st1 merged commit 45105ec into MagicStack:master Dec 7, 2020
@1st1
Copy link
Member

1st1 commented Dec 7, 2020

Thanks Victor!

@vstinner vstinner deleted the python310 branch December 7, 2020 10:43
@vstinner
Copy link
Contributor Author

vstinner commented Dec 7, 2020

Thanks Victor!

You're welcome, thanks for the review. immutables is now the first official user of pythoncapi_compat.h :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build broken on Python 3.10

2 participants