Open AA-Turner opened 11 months ago
https://docs.python.org/dev/whatsnew/3.13.html#porting-to-python-3-13
The old trashcan macros Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END were removed. They should be replaced by the new macros Py_TRASHCAN_BEGIN and Py_TRASHCAN_END.
This is a C API change, it should be moved to: C API Changes > Porting to Python 3.13: https://docs.python.org/dev/whatsnew/3.13.html#id5
Originally posted by @vstinner in https://github.com/python/cpython/issues/109190#issuecomment-1735270581
Let's call out the increased share in full support from 3.13 onwards in PEP 602:
https://github.com/python/peps/commit/619e4e239383b5f59e34ebebc36278aebf599a5b
Py_TRASHCAN_*
- moved in https://github.com/python/cpython/pull/110994.
PEP 602 - added in https://github.com/python/cpython/pull/110997.
When it comes to the Free-threaded CPython section, I think it can benefit from a bit of a rewrite as it was written fairly early on in development.
Right now, it only really talks about how to build your own, but since then we have it as part of the official macOS and Windows installers, so they need to be mentioned.
We have a guide in the docs for installing via Windows, so let's link to this: https://docs.python.org/3.13/using/windows.html#installing-free-threaded-binaries
But not yet for macOS, so ideally this should also be added. There's some info in https://github.com/python/cpython/issues/120098.
It also only mentions sysconfig.get_config_var("Py_GIL_DISABLED")
for checking if the interpreter is configured for free-threading. We've since added the more-obvious "experimental free-threading build" to the double version flag:
❯ python3.13t --version --version
Python 3.13.0rc1 experimental free-threading build (v3.13.0rc1:e4a3e786a5e, Jul 31 2024, 19:57:27) [Clang 15.0.0 (clang-1500.3.9.4)]
Documentation
This is a meta-issue to capture PRs for copyedits to What's New in Python 3.13.
Other meta-issues:
Linked PRs