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

Skip to content

Commit 508a81e

Browse files
committed
whatsnew/3.5: Second pass over NEWS entries
1 parent 02918ca commit 508a81e

1 file changed

Lines changed: 95 additions & 10 deletions

File tree

Doc/whatsnew/3.5.rst

Lines changed: 95 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:Release: |release|
66
:Date: |today|
7-
:Editor: Elvis Pranskevichus <[email protected]>
7+
:Editors: Elvis Pranskevichus <elprans@gmail.com>, Yury Selivanov <yselivanov@gmail.com>
88

99
.. Rules for maintenance:
1010
@@ -671,11 +671,18 @@ collections
671671
The :class:`~collections.OrderedDict` class is now implemented in C, which
672672
makes it 4 to 100 times faster. (Contributed by Eric Snow in :issue:`16991`.)
673673

674+
:meth:`OrderedDict.items <collections.OrderedDict.items>`,
675+
:meth:`OrderedDict.items <collections.OrderedDict.keys>`,
676+
:meth:`OrderedDict.items <collections.OrderedDict.values>` views now support
677+
:func:`reversed` iteration.
678+
(Contributed by Serhiy Storchaka in :issue:`19505`.)
679+
674680
The :class:`~collections.deque` class now defines
675681
:meth:`~collections.deque.index`, :meth:`~collections.deque.insert`, and
676-
:meth:`~collections.deque.copy`. This allows deques to be recognized as a
677-
:class:`~collections.abc.MutableSequence` and improves their substitutability
678-
for lists. (Contributed by Raymond Hettinger :issue:`23704`.)
682+
:meth:`~collections.deque.copy`, as well as supports ``+`` and ``*`` operators.
683+
This allows deques to be recognized as a :class:`~collections.abc.MutableSequence`
684+
and improves their substitutability for lists.
685+
(Contributed by Raymond Hettinger :issue:`23704`.)
679686

680687
Docstrings produced by :func:`~collections.namedtuple` can now be updated::
681688

@@ -945,6 +952,11 @@ now accept an ``(address, netmask)`` tuple argument, so as to easily construct
945952
network objects from existing addresses. (Contributed by Peter Moody
946953
and Antoine Pitrou in :issue:`16531`.)
947954

955+
New :attr:`~ipaddress.IPv4Network.reverse_pointer>` attribute for
956+
:class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
957+
returns the name of the reverse DNS PTR record.
958+
(Contributed by Leon Weber in :issue:`20480`.)
959+
948960

949961
json
950962
----
@@ -1100,6 +1112,13 @@ The :func:`~re.sub` and :func:`~re.subn` functions now replace unmatched
11001112
groups with empty strings instead of raising an exception.
11011113
(Contributed by Serhiy Storchaka in :issue:`1519638`.)
11021114

1115+
The :class:`re.error` exceptions have new attributes:
1116+
:attr:`~re.error.msg`, :attr:`~re.error.pattern`,
1117+
:attr:`~re.error.pos`, :attr:`~re.error.lineno`,
1118+
and :attr:`~re.error.colno` that provide better context
1119+
information about the error.
1120+
(Contributed by Serhiy Storchaka in :issue:`22578`.)
1121+
11031122

11041123
readline
11051124
--------
@@ -1109,6 +1128,13 @@ the specified number of trailing elements in history to the given file.
11091128
(Contributed by Bruno Cauet in :issue:`22940`.)
11101129

11111130

1131+
selectors
1132+
---------
1133+
1134+
The module now supports efficient ``/dev/poll`` on Solaris.
1135+
(Contributed by Giampaolo Rodola' in :issue:`18931`.)
1136+
1137+
11121138
shutil
11131139
------
11141140

@@ -1244,7 +1270,7 @@ the actual protocol version in use.
12441270

12451271
The :class:`~ssl.SSLSocket` class now implements
12461272
a :meth:`SSLSocket.sendfile <ssl.SSLSocket.sendfile>` method.
1247-
(Contributed by Giampaolo Rodola in :issue:`17552`.)
1273+
(Contributed by Giampaolo Rodola' in :issue:`17552`.)
12481274

12491275
The :meth:`SSLSocket.send <ssl.SSLSocket.send>` method now raises either
12501276
:exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on a
@@ -1289,6 +1315,20 @@ socket timeout every time bytes are received or sent. The socket timeout is
12891315
now the maximum total duration to send all data.
12901316
(Contributed by Victor Stinner in :issue:`23853`.)
12911317

1318+
The *backlog* argument of the :meth:`socket.listen <socket.socket.listen>`
1319+
method is now optional. By default it is set to
1320+
:data:`SOMAXCONN <socket.SOMAXCONN>` or to ``128`` whichever is less.
1321+
(Contributed by Charles-François Natali in :issue:`21455`.)
1322+
1323+
1324+
sqlite3
1325+
-------
1326+
1327+
The :class:`~sqlite3.Row` class now fully supports sequence protocol,
1328+
in particular :func:`reverse` and slice indexing.
1329+
(Contributed by Claudiu Popa in :issue:`10203`; by Lucas Sinclair,
1330+
Jessica McKellar, and Serhiy Storchaka in :issue:`13583`.)
1331+
12921332

12931333
subprocess
12941334
----------
@@ -1363,6 +1403,10 @@ New command line option ``-u`` or ``--unit=U`` can be used to specify the time
13631403
unit for the timer output. Supported options are ``usec``, ``msec``,
13641404
or ``sec``. (Contributed by Julian Gindi in :issue:`18983`.)
13651405

1406+
The :func:`~timeit.timeit` function has a new *globals* parameter for
1407+
specifying the namespace in which the code will be running.
1408+
(Contributed by Ben Roberts in :issue:`2527`.)
1409+
13661410

13671411
tkinter
13681412
-------
@@ -1424,6 +1468,11 @@ The :func:`request.urlopen <urllib.request.urlopen>` function accepts an
14241468
:class:`ssl.SSLContext` object as a *context* argument, which will be used for
14251469
the HTTPS connection. (Contributed by Alex Gaynor in :issue:`22366`.)
14261470

1471+
The :func:`parse.urljoin <urllib.parse.urljoin>` was updated to use the
1472+
:rfc:`3986` semantics for the resolution of relative URLs, rather than
1473+
:rfc:`1808` and :rfc:`2396`.
1474+
(Contributed by Demian Brecht and Senthil Kumaran in :issue:`22118`.)
1475+
14271476

14281477
unicodedata
14291478
-----------
@@ -1439,6 +1488,26 @@ New command line option ``--locals`` to show local variables in
14391488
tracebacks. (Contributed by Robert Collins in :issue:`22936`.)
14401489

14411490

1491+
unittest.mock
1492+
-------------
1493+
1494+
The :class:`~unittest.mock.Mock` has the following improvements:
1495+
1496+
* Class constructor has a new *unsafe* parameter, which causes mock
1497+
objects to raise :exc:`AttributeError` on attribute names starting
1498+
with ``"assert"``.
1499+
(Contributed by Kushal Das in :issue:`21238`.)
1500+
1501+
* A new :meth:`Mock.assert_not_called <unittest.mock.Mock.assert_not_called>`
1502+
method to check if the mock object was called.
1503+
(Contributed by Kushal Das in :issue:`21262`.)
1504+
1505+
The :class:`~unittest.mock.MagicMock` class now supports :meth:`__truediv__`,
1506+
:meth:`__divmod__` and :meth:`__matmul__` operators.
1507+
(Contributed by Johannes Baiter in :issue:`20968`, and Håkan Lövdahl
1508+
in :issue:`23581` and :issue:`23568`.)
1509+
1510+
14421511
wsgiref
14431512
-------
14441513

@@ -1548,16 +1617,32 @@ The :func:`property` getter calls are up to 25% faster.
15481617
Instantiation of :class:`fractions.Fraction` is now up to 30% faster.
15491618
(Contributed by Stefan Behnel in :issue:`22464`.)
15501619

1620+
String methods :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`,
1621+
:meth:`~str.partition` and :keyword:`in` string operator are now significantly
1622+
faster for searching 1-character substrings.
1623+
(Contributed by Serhiy Storchaka in :issue:`23573`.)
1624+
15511625

15521626
Build and C API Changes
15531627
=======================
15541628

15551629
New ``calloc`` functions were added:
15561630

1557-
* :c:func:`PyMem_RawCalloc`
1558-
* :c:func:`PyMem_Calloc`
1559-
* :c:func:`PyObject_Calloc`
1560-
* :c:func:`_PyObject_GC_Calloc`
1631+
* :c:func:`PyMem_RawCalloc`,
1632+
* :c:func:`PyMem_Calloc`,
1633+
* :c:func:`PyObject_Calloc`,
1634+
* :c:func:`_PyObject_GC_Calloc`.
1635+
1636+
(Contributed by Victor Stinner in :issue:`21233`.)
1637+
1638+
New encoding/decoding helper functions:
1639+
1640+
* :c:func:`Py_DecodeLocale` (replaced ``_Py_char2wchar()``),
1641+
* :c:func:`Py_EncodeLocale` (replaced ``_Py_wchar2char()``).
1642+
1643+
(Contributed by Victor Stinner in :issue:`18395`.)
1644+
1645+
The :c:member:`PyTypeObject.tp_finalize` slot is now part of stable ABI.
15611646

15621647
Windows builds now require Microsoft Visual C++ 14.0, which
15631648
is available as part of `Visual Studio 2015 <http://www.visualstudio.com>`_.
@@ -1833,6 +1918,7 @@ Changes in the C API
18331918
* Removed non-documented macro :c:macro:`PyObject_REPR` which leaked references.
18341919
Use format character ``%R`` in :c:func:`PyUnicode_FromFormat`-like functions
18351920
to format the :func:`repr` of the object.
1921+
(Contributed by Serhiy Storchaka in :issue:`22453`.)
18361922

18371923
* Because the lack of the :attr:`__module__` attribute breaks pickling and
18381924
introspection, a deprecation warning now is raised for builtin type without
@@ -1844,4 +1930,3 @@ Changes in the C API
18441930
:c:member:`tp_as_async` slot. Refer to :ref:`coro-objects` for
18451931
new types, structures and functions.
18461932

1847-
* :c:member:`PyTypeObject.tp_finalize` is now part of stable ABI.

0 commit comments

Comments
 (0)