-
-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
PyArena was removed from the public api in python/cpython#25007 This commit adds two new files: * pycore_pyarena.h: Taken from the cpython source code with minimal changes * pyarena.h: Maps the new, underscored function names to the old function names, allowing the code to work on both python 3.10 and older versions
Hi! I'm the author of the Python-ast.h mess: https://bugs.python.org/issue43244 :-) (move the whole API into the internal C API) I noticed that changes will break typed-ast and I planed to offer a fix. I just got a build error when debugging packaging on Python 3.10 (packaging requires typed-ast). I was fixing the issue but... it's already fixed! Great :-) Thanks you @freundTech !!! A few changes may land into Python 3.10: python/cpython#25252 or python/cpython#25256 (PR currently under review). For the new Python 3.10 internal header files (pycore_asdl.h, pycore_ast.h, pycore_ast_state.h, pycore_pyarena.h), you can copy and use them in typed-ast. You just to define Py_BUILD_CORE_MODULE macro when you build your C extension. I hesitate to request a release to get Python 3.10 support, since at least one more change may land into https://bugs.python.org/issue43244 and I don't know yet if it would affect typed-ast. |
I tested How can I help you to release a new version including this fix? |
At this point I'm the only one who can do a release and upload the wheels to PyPI (a few mypy and ex-mypy team members could too but they're also too busy). It doesn't take much effort but I am trying to reduce my computer time and it keeps falling off my todo list. Same for typing-extensions BTW. Sorry. |
We now have some new helpers: Jelle Zijlstra, Shantanu Jain, and Sebastian Rittau. One of them will handle releases from now on. |
Cut the 1.4.3 release including this change. I didn't build Python 3.10 wheels since it's still alpha, but the rest of the matrix of wheels should be uploaded. Let me know if you see issues. |
To fix compilation on Python 3.10 and newer, we need to bump typed-ast to 1.4.3 to get the fix from python/typed_ast#158.
These two bumps are required for pytest to work with Python 3.10. This doesn't matter for builds, or for in CI, but this does matter for developers whose system Python is up-to-date. Since Emissary 1.14 is in maintenance mode, I did the smallest upgrades possible to get things working. For typed-ast, that means including python/typed_ast#158, which was first included in 1.4.3. For pytest, that means 6.2.5, since that's when the changelog mentions "Python 3.10 is now supported." https://docs.pytest.org/en/stable/changelog.html#pytest-6-2-5-2021-08-29 Signed-off-by: Luke Shumaker <[email protected]>
1.4.3 has this fix, which fixes compilation on Ubuntu 22.04 python/typed_ast#158
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files:
changes
function names, allowing the code to work on both python 3.10 and
older versions