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

Skip to content

Commit 66bf12a

Browse files
committed
whatsnew: FileIO.readall performance, os.cpu_count.
And more news item tweaks.
1 parent 6f17deb commit 66bf12a

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

Doc/whatsnew/3.4.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,11 @@ descriptors or a Windows handle:
853853
* :func:`os.get_inheritable`, :func:`os.set_inheritable`
854854
* :func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`
855855

856+
The :mod:`os` module now provides a :func:`~os.cpu_count` function, analogous to
857+
the :func:`multiprocessing.cpu_count` function (which is now implemented in
858+
terms of the new :mod:`os` function). (Contributed by Trent Nelson, Yogesh
859+
Chaudhari, Victor Stinner, and Charles-François Natali in :issue:`17914`.)
860+
856861

857862
pdb
858863
---
@@ -985,6 +990,8 @@ The ``socket.AF_*`` and ``socket.SOCK_*`` constants are now enumeration values
985990
using the new :mod:`enum` module. This allows meaningful names to be printed
986991
during debugging, instead of integer "magic numbers".
987992

993+
The :data:`~socket.AF_LINK` constant is now available on BSD and OSX.
994+
988995

989996
sqlite3
990997
-------
@@ -1341,6 +1348,11 @@ Significant Optimizations
13411348
strings is now significantly faster. (Contributed by Victor Stinner and
13421349
Antoine Pitrou in :issue:`15596`.)
13431350

1351+
* A performance issue in :meth:`io.FileIO.readall` has been solved. This
1352+
particularly affects Windows, and significantly speeds up the case of piping
1353+
significant amounts of data through :mod:`subprocess`. (Contributed
1354+
by Richard Oudkerk in :issue:`15758`.)
1355+
13441356

13451357

13461358
Deprecated

Misc/NEWS

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,9 +2163,11 @@ Library
21632163

21642164
- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity.
21652165

2166-
- Issue #14596: The struct.Struct() objects now use more compact implementation.
2166+
- Issue #14596: The struct.Struct() objects now use a more compact
2167+
implementation.
21672168

2168-
- Issue #17981: Closed socket on error in SysLogHandler.
2169+
- Issue #17981: logging's SysLogHandler now closes the socket when it catches
2170+
socket OSErrors.
21692171

21702172
- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
21712173
is long, not int.
@@ -2186,8 +2188,8 @@ Library
21862188
- Issue #17915: Fix interoperability of xml.sax with file objects returned by
21872189
codecs.open().
21882190

2189-
- Issue #16601: Restarting iteration over tarfile no more continues from where
2190-
it left off. Patch by Michael Birtwell.
2191+
- Issue #16601: Restarting iteration over tarfile really restarts rather
2192+
than continuing from where it left off. Patch by Michael Birtwell.
21912193

21922194
- Issue #17289: The readline module now plays nicer with external modules
21932195
or applications changing the rl_completer_word_break_characters global

0 commit comments

Comments
 (0)