.Python 3.12 available in RHEL 8
RHEL 8.10 introduces Python 3.12, provided by the new package `python3.12` and a suite of packages built for it, as well as the `ubi8/python-312` container image.
Notable enhancements compared to the previously released Python 3.11 include:
* Python introduces a new `type` statement and new type parameter syntax for generic classes and functions.
* Formatted string literal (f-strings) have been formalized in the grammar and can now be integrated into the parser directly.
* Python now provides a unique per-interpreter global interpreter lock (GIL).
* You can now use the buffer protocol from Python code.
* To improve security, the builtin `hashlib` implementations of the SHA1, SHA3, SHA2-384, SHA2-512, and MD5 cryptographic algorithms have been replaced with formally verified code from the HACL* project. The builtin implementations remain available as fallback if OpenSSL does not provide them.
* Dictionary, list, and set comprehensions in `CPython` are now inlined. This significantly increases the speed of a comprehension execution.
* `CPython` now supports the Linux `perf` profiler.
* `CPython` now provides stack overflow protection on supported platforms.
To install packages from the `python3.12` stack, use, for example:
----
# yum install python3.12
# yum install python3.12-pip
----
To run the interpreter, use, for example:
----
$ python3.12
$ python3.12 -m pip --help
----
See link:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_basic_system_settings/index#assembly_installing-and-using-python_installing-and-using-dynamic-programming-languages[Installing and using Python] for more information.
For information about the length of support of Python 3.12, see link:
https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle[Red Hat Enterprise Linux Application Streams Life Cycle].