Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 54bf73a

Browse files
committed
whatsnew: threading.main_thread, os.urandom persistent handle, sunau.open with.
1 parent 0b32adf commit 54bf73a

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

Doc/whatsnew/3.4.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,10 @@ sunau
12081208
The :meth:`~sunau.getparams` method now returns a namedtuple rather than a
12091209
plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)
12101210

1211-
:meth:`sunau.open` now supports the context manager protocol (:issue:`18878`).
1211+
:meth:`sunau.open` now supports the context manager protocol: when used in a
1212+
:keyword:`with` block, the ``close`` method of the returned object will be
1213+
called automatically at the end of the block. (Contributed by Serhiy Storchaka
1214+
in :issue:`18878`.)
12121215

12131216

12141217
sys
@@ -1236,6 +1239,15 @@ specified placeholder is added (by default, ``[...]``, stored in the new
12361239
:issue:`18585`.)
12371240

12381241

1242+
threading
1243+
---------
1244+
1245+
The :class:`~threading.Thread` object representing the main thread can be
1246+
obtained from the new :func:`~threading.main_thread` function. In normal
1247+
conditions this will be the thread from which the Python interpreter was
1248+
started. (Contributed by Andrew Svetlov in :issue:`18882`.)
1249+
1250+
12391251
traceback
12401252
---------
12411253

@@ -1569,6 +1581,10 @@ Significant Optimizations
15691581
``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory
15701582
savings.
15711583

1584+
* :func:`os.urandom` now uses a lazily-opened persistent file descriptor
1585+
so as to avoid using many file descriptors when run in parallel from
1586+
multiple threads. (Contributed by Antoine Pitrou in :issue:`18756`.)
1587+
15721588

15731589
Deprecated
15741590
==========

0 commit comments

Comments
 (0)