What’s New in Python 3.12 rc1? Key Features, Deprecations, and Upgrade Guidance
Python 3.12 rc1 introduces flexible f‑string parsing, buffer protocol support, new debugging APIs, isolated sub‑interpreters, improved error messages, performance boosts, and several deprecations, while urging developers to test compatibility and avoid using this preview in production environments.
This is the first release candidate of Python 3.12.0. Version 3.12.0rc1 is the penultimate preview before the final release, with only approved bug‑fix changes allowed. The second candidate (rc2) is planned for 4 September 2023 and the final 3.12.0 release for 2 October 2023.
From this point onward the 3.12 series will have no ABI changes, aiming for minimal code modifications.
Call to Action
Maintainers of third‑party Python projects are strongly encouraged to ensure 3.12 compatibility now, publish Python 3.12 wheels on PyPI if needed, and report any issues to the Python issue tracker. Wheels built for 3.12.0rc1 will work with future 3.12 releases, but the preview should not be used in production.
New Features Compared to 3.11
More flexible f‑string parsing allowing previously disallowed constructs (PEP 701).
Support for the buffer protocol in Python code (PEP 688).
New debugging/analysis API (PEP 669).
Isolated sub‑interpreters with separate global interpreter locks (PEP 684).
Improved error messages that suggest fixes for likely misspellings.
Support for displaying Python function names in Linux perf reports.
Numerous performance improvements (e.g., PEP 709) expected to raise overall speed by about 5%.
Deprecations
Removal of the deprecated wstr and wstr_length members from the C implementation of Unicode objects (PEP 623).
Many long‑standing deprecated methods and classes in the unittest module have been removed.
The smtpd and distutils modules have been removed (see PEP 594 and PEP 632); setuptools continues to provide a stub for distutils.
Various other obsolete, broken, or deprecated functions, classes, and methods have been eliminated.
Invalid backslash escape sequences in strings now raise SyntaxWarning instead of DeprecationWarning, signaling they will become syntax errors.
The internal representation of integers has changed to prepare for performance enhancements, which may affect Cython‑generated code.
For more details on the changes in Python 3.12, see the “What’s New in Python 3.12” documentation. The next pre‑release will be 3.12.0rc2, scheduled for 4 September 2023.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
