mirror of https://github.com/python/cpython
whatsnew: threading.main_thread, os.urandom persistent handle, sunau.open with.
This commit is contained in:
parent
0b32adf832
commit
54bf73a54a
|
@ -1208,7 +1208,10 @@ sunau
|
|||
The :meth:`~sunau.getparams` method now returns a namedtuple rather than a
|
||||
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
|
||||
|
@ -1236,6 +1239,15 @@ specified placeholder is added (by default, ``[...]``, stored in the new
|
|||
: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
|
||||
---------
|
||||
|
||||
|
@ -1569,6 +1581,10 @@ Significant Optimizations
|
|||
``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory
|
||||
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
|
||||
==========
|
||||
|
|
Loading…
Reference in New Issue