Commit 54bf73a5 authored by R David Murray's avatar R David Murray

whatsnew: threading.main_thread, os.urandom persistent handle, sunau.open with.

parent 0b32adf8
...@@ -1208,7 +1208,10 @@ sunau ...@@ -1208,7 +1208,10 @@ sunau
The :meth:`~sunau.getparams` method now returns a namedtuple rather than a The :meth:`~sunau.getparams` method now returns a namedtuple rather than a
plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.) plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)
:meth:`sunau.open` now supports the context manager protocol (:issue:`18878`). :meth:`sunau.open` now supports the context manager protocol: when used in a
:keyword:`with` block, the ``close`` method of the returned object will be
called automatically at the end of the block. (Contributed by Serhiy Storchaka
in :issue:`18878`.)
sys sys
...@@ -1236,6 +1239,15 @@ specified placeholder is added (by default, ``[...]``, stored in the new ...@@ -1236,6 +1239,15 @@ specified placeholder is added (by default, ``[...]``, stored in the new
:issue:`18585`.) :issue:`18585`.)
threading
---------
The :class:`~threading.Thread` object representing the main thread can be
obtained from the new :func:`~threading.main_thread` function. In normal
conditions this will be the thread from which the Python interpreter was
started. (Contributed by Andrew Svetlov in :issue:`18882`.)
traceback traceback
--------- ---------
...@@ -1569,6 +1581,10 @@ Significant Optimizations ...@@ -1569,6 +1581,10 @@ Significant Optimizations
``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory ``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory
savings. savings.
* :func:`os.urandom` now uses a lazily-opened persistent file descriptor
so as to avoid using many file descriptors when run in parallel from
multiple threads. (Contributed by Antoine Pitrou in :issue:`18756`.)
Deprecated Deprecated
========== ==========
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment