Python 3.12.0 stable release launched

  • October 4, 2023

On October 2, 2023, Python 3.12.0 was released as the stable version of the latest major update of the Python programming language. This release includes a variety of new features and optimizations that aim to improve the overall performance and functionality of the language.

Some of the prominent new features in Python 3.12 include more flexible parsing of f-strings, support for the buffer protocol in Python code, a new debugging and profiling API, and the ability to use isolated subinterpreters with separate Global Interpreter Locks. Additionally, this release also includes significant improvements in error messaging, with more exceptions providing suggestions to help users troubleshoot issues.

The type annotation system has also been expanded with this update, introducing new syntax for generic classes and a new “override” decorator for methods.

In terms of deprecations, Python 3.12 removes the wstr and wstr_length members of the C implementation of unicode objects, which had been deprecated for some time. The unittest module also sees the removal of several long deprecated methods and classes. The smtpd and distutils modules have also been removed, with their functionalities now being provided by the setuptools package.

Several other old, broken, and deprecated functions, classes, and methods have been removed in this release as well. Additionally, invalid backslash escape sequences in strings now result in a SyntaxWarning instead of a DeprecationWarning, making them more visible to users. It is worth noting that the internal representation of integers has also been modified in preparation for future performance enhancements, which may affect certain codes generated by Cython.

Prepare for your Python Certification exams at MyExamCloud AI by taking advantage of the author-generated and AI-based preparation courses available on the site. Visit https://www.myexamcloud.com/onlineexam/python-certification-practice-tests.courses to get started.