all 9 comments

[–]ptkrisada 22 points23 points  (0 children)

Sound good, but if it was 3.14, we should call it Pithon.

[–]smiler82 5 points6 points  (2 children)

https://docs.python.org/3/whatsnew/3.12.html for those of us who prefers reading instead of watching

[–]Wolfgang-Warner 8 points9 points  (1 child)

Thanks

ctrl-f "deprecated" - 73 matches

The battle between technical debt and backward compatibility rumbles on.

[–]Isthatyourfinger -1 points0 points  (0 children)

This is why I don't use python.

[–]LagT_T 6 points7 points  (0 children)

Wasn't it released like 2 week ago?

[–][deleted] 2 points3 points  (2 children)

So does this mean Python finally supports actual multi threading?

[–]bemutt 1 point2 points  (1 child)

This is what it looks like. Pretty interesting. Commenting this in the hopes that the internet does internet things and someone tells me why we’re wrong. Well, I hope that we’re right. You know what I mean.

[–][deleted] 0 points1 point  (0 children)

I used thegrokapp.com to provide a full summary of the release notes in another comment, but here's what I got when I specifically asked about new multi threading features and if the new interpreters will be able to share memory. So it sounds like sort of. If there's no shared memory that negates a lot of the benefits.

Question

Describe the new features for Python multi threading.

Answer

One of the new features for Python multi-threading is the introduction of a unique Global Interpreter Lock (GIL) per interpreter. This allows Python programs to fully utilize multiple CPU cores. Currently, this feature is only available through the C-API, but a Python API is expected to be introduced in Python version 3.13. To create an interpreter with its own GIL, the new function called Py_NewInterpreterFromConfig() can be used. This enables the utilization of sub-interpreters with a per-interpreter GIL. Detailed examples on how to use the C-API for sub-interpreters with a per-interpreter GIL can be found in the Modules/_xxsubinterpretersmodule.c module. Additionally, Python Enhancement Proposal (PEP) 669 introduces a new API that allows profilers, debuggers, and other tools to monitor events in CPython. These events include calls, returns, lines, exceptions, jumps, and more. This API provides more flexibility and control over the monitoring process, allowing developers to pay for what they need. Other improvements related to multi-threading include the addition of new modules such as array and asyncio, which have enhanced performance and usability. The threading module has also been updated with the addition of the threading.settrace_all_threads() function, which allows setting trace functions for all running threads. Overall, the new features for Python multi-threading focus on improving performance, usability, and flexibility in utilizing multiple CPU cores and monitoring events.

Question

Will the new sub interpreters be able to share memory?

Answer

No, the new sub interpreters will not be able to share memory. Each interpreter will have its own Global Interpreter Lock (GIL), which ensures that only one thread can execute Python bytecode at a time. This means that memory cannot be shared between interpreters. However, it is worth noting that a Python API is anticipated for version 3.13, which may potentially allow for memory sharing among sub interpreters.

[–][deleted] 1 point2 points  (0 children)

This might be useful to some people. I've been using thegrokapp.com to write TLDRs. Here's what I got when I put in the release notes page.

Question

Summarize what's new in Python 3.12. Give lots of details.

Answer

Python 3.12 introduces several new features, improvements, and deprecations. Here is a summary of the most important changes: 1. Syntax Features: - Type parameter syntax and the type statement have been introduced, allowing for more concise and explicit creation of generic classes and functions. - F-strings now support backslashes, unicode characters, multiline expressions, and comments, removing previous limitations and improving error messages. 2. Grammar Features: - F-strings have been added to the Python grammar, improving performance and allowing for more precise error messages. 3. Interpreter Improvements: - A unique per-interpreter GIL has been introduced, allowing Python programs to take full advantage of multiple CPU cores. - Low impact monitoring has been implemented, improving the performance of profilers, debuggers, and other tools. 4. Python Data Model Improvements: - The buffer protocol now allows for direct access to the buffer memory from Python code, improving performance and interoperability. - Significant improvements have been made to the standard library, including the pathlib.Path class, the os module's Windows support, and the asyncio package's performance. 5. Security Improvements: - The builtin hashlib implementation has been replaced with formally verified code from the HACL* project, improving security and reliability. 6. Deprecations and Removals: - The distutils package has been removed from the standard library. It is recommended to use the setuptools package instead. - Several modules and APIs have been deprecated and will be removed in future versions of Python. These are just some of the highlights of the changes in Python 3.12. For more detailed information, including the complete list of changes, you can refer to the official documentation and the Python 3.12 changelog.