Skip to content

Commit 02d6f4f

Browse files
miss-islingtonakuchling
authored andcommitted
Rebased version of what's new PR (GH-16745) (#16748)
* Use Unicode character for accent * Various grammar fixes * Sort library modules alphabetically; remove duplicated idlelib/IDLE section (cherry picked from commit bb78f6c) Co-authored-by: Andrew Kuchling <[email protected]>
1 parent c732660 commit 02d6f4f

File tree

1 file changed

+67
-83
lines changed

1 file changed

+67
-83
lines changed

Doc/whatsnew/3.8.rst

Lines changed: 67 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Assignment expressions
8282
----------------------
8383

8484
There is new syntax ``:=`` that assigns values to variables as part of a larger
85-
expression. It is affectionately known as "walrus operator" due to
85+
expression. It is affectionately known as "the walrus operator" due to
8686
its resemblance to `the eyes and tusks of a walrus
8787
<https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg>`_.
8888

@@ -620,6 +620,16 @@ where the DLL is stored (if a full or partial path is used to load the initial
620620
DLL) and paths added by :func:`~os.add_dll_directory`.
621621

622622

623+
datetime
624+
--------
625+
626+
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
627+
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`date` and
628+
:class:`datetime` objects respectively from ISO year, week number, and weekday;
629+
these are the inverse of each class's ``isocalendar`` method.
630+
(Contributed by Paul Ganssle in :issue:`36004`.)
631+
632+
623633
functools
624634
---------
625635

@@ -637,14 +647,12 @@ than as a function returning a decorator. So both of these are now supported::
637647
(Contributed by Raymond Hettinger in :issue:`36772`.)
638648

639649

640-
datetime
641-
--------
650+
gc
651+
--
642652

643-
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
644-
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`date` and
645-
:class:`datetime` objects respectively from ISO year, week number and weekday;
646-
these are the inverse of each class's ``isocalendar`` method.
647-
(Contributed by Paul Ganssle in :issue:`36004`.)
653+
:func:`~gc.get_objects` can now receive an optional *generation* parameter
654+
indicating a generation to get objects from. Contributed in
655+
:issue:`36016` by Pablo Galindo.
648656

649657

650658
gettext
@@ -654,6 +662,18 @@ Added :func:`~gettext.pgettext` and its variants.
654662
(Contributed by Franz Glasner, Éric Araujo, and Cheryl Sabella in :issue:`2504`.)
655663

656664

665+
gzip
666+
----
667+
668+
Added the *mtime* parameter to :func:`gzip.compress` for reproducible output.
669+
(Contributed by Guo Ci Teo in :issue:`34898`.)
670+
671+
A :exc:`~gzip.BadGzipFile` exception is now raised instead of :exc:`OSError`
672+
for certain types of invalid or corrupt gzip files.
673+
(Contributed by Filip Gruszczyński, Michele Orrù, and Zackery Spytz in
674+
:issue:`6584`.)
675+
676+
657677
idlelib and IDLE
658678
----------------
659679

@@ -704,44 +724,6 @@ fails. The exception is ignored silently by default in release build.
704724
(Contributed by Victor Stinner in :issue:`18748`.)
705725

706726

707-
gc
708-
--
709-
710-
:func:`~gc.get_objects` can now receive an optional *generation* parameter
711-
indicating a generation to get objects from. Contributed in
712-
:issue:`36016` by Pablo Galindo.
713-
714-
715-
gzip
716-
----
717-
718-
Added the *mtime* parameter to :func:`gzip.compress` for reproducible output.
719-
(Contributed by Guo Ci Teo in :issue:`34898`.)
720-
721-
A :exc:`~gzip.BadGzipFile` exception is now raised instead of :exc:`OSError`
722-
for certain types of invalid or corrupt gzip files.
723-
(Contributed by Filip Gruszczyński, Michele Orrù, and Zackery Spytz in
724-
:issue:`6584`.)
725-
726-
727-
idlelib and IDLE
728-
----------------
729-
730-
Add optional line numbers for IDLE editor windows. Windows
731-
open without line numbers unless set otherwise in the General
732-
tab of the configuration dialog.
733-
(Contributed by Tal Einat and Saimadhav Heblikar in :issue:`17535`.)
734-
735-
Output over N lines (50 by default) is squeezed down to a button.
736-
N can be changed in the PyShell section of the General page of the
737-
Settings dialog. Fewer, but possibly extra long, lines can be squeezed by
738-
right clicking on the output. Squeezed output can be expanded in place
739-
by double-clicking the button or into the clipboard or a separate window
740-
by right-clicking the button. (Contributed by Tal Einat in :issue:`1529353`.)
741-
742-
The changes above have been backported to 3.7 maintenance releases.
743-
744-
745727
json.tool
746728
---------
747729

@@ -899,18 +881,6 @@ py_compile
899881
(Contributed by Joannah Nanjekye in :issue:`22640`.)
900882

901883

902-
socket
903-
------
904-
905-
Added :meth:`~socket.create_server()` and :meth:`~socket.has_dualstack_ipv6()`
906-
convenience functions to automate the necessary tasks usually involved when
907-
creating a server socket, including accepting both IPv4 and IPv6 connections
908-
on the same socket. (Contributed by Giampaolo Rodola in :issue:`17561`.)
909-
910-
The :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`, and
911-
:func:`socket.if_indextoname()` functions have been implemented on Windows.
912-
(Contributed by Zackery Spytz in :issue:`37007`.)
913-
914884
shlex
915885
----------
916886

@@ -932,6 +902,19 @@ inherited from the corresponding change to the :mod:`tarfile` module.
932902
recursively removing their contents first.
933903

934904

905+
socket
906+
------
907+
908+
Added :meth:`~socket.create_server()` and :meth:`~socket.has_dualstack_ipv6()`
909+
convenience functions to automate the necessary tasks usually involved when
910+
creating a server socket, including accepting both IPv4 and IPv6 connections
911+
on the same socket. (Contributed by Giampaolo Rodolà in :issue:`17561`.)
912+
913+
The :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`, and
914+
:func:`socket.if_indextoname()` functions have been implemented on Windows.
915+
(Contributed by Zackery Spytz in :issue:`37007`.)
916+
917+
935918
ssl
936919
---
937920

@@ -1202,14 +1185,14 @@ Optimizations
12021185
+26% on Linux, +50% on macOS and +40% on Windows. Also, much less CPU cycles
12031186
are consumed.
12041187
See :ref:`shutil-platform-dependent-efficient-copy-operations` section.
1205-
(Contributed by Giampaolo Rodola' in :issue:`33671`.)
1188+
(Contributed by Giampaolo Rodolà in :issue:`33671`.)
12061189

12071190
* :func:`shutil.copytree` uses :func:`os.scandir` function and all copy
12081191
functions depending from it use cached :func:`os.stat` values. The speedup
12091192
for copying a directory with 8000 files is around +9% on Linux, +20% on
12101193
Windows and +30% on a Windows SMB share. Also the number of :func:`os.stat`
12111194
syscalls is reduced by 38% making :func:`shutil.copytree` especially faster
1212-
on network filesystems. (Contributed by Giampaolo Rodola' in :issue:`33695`.)
1195+
on network filesystems. (Contributed by Giampaolo Rodolà in :issue:`33695`.)
12131196

12141197
* The default protocol in the :mod:`pickle` module is now Protocol 4,
12151198
first introduced in Python 3.4. It offers better performance and smaller
@@ -1361,7 +1344,7 @@ Deprecated
13611344
(Contributed by Victor Stinner in :issue:`37481`.)
13621345

13631346
* Deprecated methods ``getchildren()`` and ``getiterator()`` in
1364-
the :mod:`~xml.etree.ElementTree` module emit now a
1347+
the :mod:`~xml.etree.ElementTree` module now emit a
13651348
:exc:`DeprecationWarning` instead of :exc:`PendingDeprecationWarning`.
13661349
They will be removed in Python 3.9.
13671350
(Contributed by Serhiy Storchaka in :issue:`29209`.)
@@ -1456,28 +1439,29 @@ The following features and APIs have been removed from Python 3.8:
14561439
* The :mod:`macpath` module, deprecated in Python 3.7, has been removed.
14571440
(Contributed by Victor Stinner in :issue:`35471`.)
14581441

1459-
* The function :func:`platform.popen` has been removed, it was deprecated since
1460-
Python 3.3: use :func:`os.popen` instead.
1442+
* The function :func:`platform.popen` has been removed, after having been
1443+
deprecated since Python 3.3: use :func:`os.popen` instead.
14611444
(Contributed by Victor Stinner in :issue:`35345`.)
14621445

1463-
* The function :func:`time.clock` has been removed, it was deprecated since Python
1464-
3.3: use :func:`time.perf_counter` or :func:`time.process_time` instead, depending
1465-
on your requirements, to have a well defined behavior.
1446+
* The function :func:`time.clock` has been removed, after having been
1447+
deprecated since Python 3.3: use :func:`time.perf_counter` or
1448+
:func:`time.process_time` instead, depending
1449+
on your requirements, to have well-defined behavior.
14661450
(Contributed by Matthias Bussonnier in :issue:`36895`.)
14671451

14681452
* The ``pyvenv`` script has been removed in favor of ``python3.8 -m venv``
14691453
to help eliminate confusion as to what Python interpreter the ``pyvenv``
14701454
script is tied to. (Contributed by Brett Cannon in :issue:`25427`.)
14711455

1472-
* ``parse_qs``, ``parse_qsl``, and ``escape`` are removed from :mod:`cgi`
1473-
module. They are deprecated from Python 3.2 or older. They should be imported
1456+
* ``parse_qs``, ``parse_qsl``, and ``escape`` are removed from the :mod:`cgi`
1457+
module. They are deprecated in Python 3.2 or older. They should be imported
14741458
from the ``urllib.parse`` and ``html`` modules instead.
14751459

1476-
* ``filemode`` function is removed from :mod:`tarfile` module.
1460+
* ``filemode`` function is removed from the :mod:`tarfile` module.
14771461
It is not documented and deprecated since Python 3.3.
14781462

14791463
* The :class:`~xml.etree.ElementTree.XMLParser` constructor no longer accepts
1480-
the *html* argument. It never had effect and was deprecated in Python 3.4.
1464+
the *html* argument. It never had an effect and was deprecated in Python 3.4.
14811465
All other parameters are now :ref:`keyword-only <keyword-only_parameter>`.
14821466
(Contributed by Serhiy Storchaka in :issue:`29209`.)
14831467

@@ -1536,8 +1520,8 @@ Changes in Python behavior
15361520

15371521
* On AIX, :attr:`sys.platform` doesn't contain the major version anymore.
15381522
It is always ``'aix'``, instead of ``'aix3'`` .. ``'aix7'``. Since
1539-
older Python versions include the version number, it is recommended to
1540-
always use the ``sys.platform.startswith('aix')``.
1523+
older Python versions include the version number, so it is recommended to
1524+
always use ``sys.platform.startswith('aix')``.
15411525
(Contributed by M. Felt in :issue:`36588`.)
15421526

15431527
* :c:func:`PyEval_AcquireLock` and :c:func:`PyEval_AcquireThread` now
@@ -1557,8 +1541,8 @@ Changes in the Python API
15571541

15581542
* :class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases
15591543
for better performance. On Windows Subsystem for Linux and QEMU User
1560-
Emulation, Popen constructor using :func:`os.posix_spawn` no longer raise an
1561-
exception on errors like missing program, but the child process fails with a
1544+
Emulation, the :class:`Popen` constructor using :func:`os.posix_spawn` no longer raises an
1545+
exception on errors like "missing program". Instead the child process fails with a
15621546
non-zero :attr:`~Popen.returncode`.
15631547
(Contributed by Joannah Nanjekye and Victor Stinner in :issue:`35537`.)
15641548

@@ -1571,7 +1555,7 @@ Changes in the Python API
15711555
* The :meth:`imap.IMAP4.logout` method no longer ignores silently arbitrary
15721556
exceptions.
15731557

1574-
* The function :func:`platform.popen` has been removed, it was deprecated since
1558+
* The function :func:`platform.popen` has been removed, after having been deprecated since
15751559
Python 3.3: use :func:`os.popen` instead.
15761560
(Contributed by Victor Stinner in :issue:`35345`.)
15771561

@@ -1586,9 +1570,9 @@ Changes in the Python API
15861570
specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for
15871571
changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)
15881572

1589-
* The :meth:`writexml`, :meth:`toxml` and :meth:`toprettyxml` methods of the
1590-
:mod:`xml.dom.minidom` module, and :mod:`xml.etree` now preserve the attribute
1591-
order specified by the user.
1573+
* The :meth:`writexml`, :meth:`toxml` and :meth:`toprettyxml` methods of
1574+
:mod:`xml.dom.minidom`, and the :meth:`write` method of :mod:`xml.etree`,
1575+
now preserve the attribute order specified by the user.
15921576
(Contributed by Diego Rojas and Raymond Hettinger in :issue:`34160`.)
15931577

15941578
* A :mod:`dbm.dumb` database opened with flags ``'r'`` is now read-only.
@@ -1598,7 +1582,7 @@ Changes in the Python API
15981582

15991583
* The ``doctype()`` method defined in a subclass of
16001584
:class:`~xml.etree.ElementTree.XMLParser` will no longer be called and will
1601-
cause emitting a :exc:`RuntimeWarning` instead of a :exc:`DeprecationWarning`.
1585+
emit a :exc:`RuntimeWarning` instead of a :exc:`DeprecationWarning`.
16021586
Define the :meth:`doctype() <xml.etree.ElementTree.TreeBuilder.doctype>`
16031587
method on a target for handling an XML doctype declaration.
16041588
(Contributed by Serhiy Storchaka in :issue:`29209`.)
@@ -1641,7 +1625,7 @@ Changes in the Python API
16411625

16421626
* The :meth:`mmap.flush() <mmap.mmap.flush>` method now returns ``None`` on
16431627
success and raises an exception on error under all platforms. Previously,
1644-
its behavior was platform-depended: a nonzero value was returned on success;
1628+
its behavior was platform-dependent: a nonzero value was returned on success;
16451629
zero was returned on error under Windows. A zero value was returned on
16461630
success; an exception was raised on error under Unix.
16471631
(Contributed by Berker Peksag in :issue:`2122`.)
@@ -1685,17 +1669,17 @@ Changes in the Python API
16851669
* :class:`types.CodeType` has a new parameter in the second position of the
16861670
constructor (*posonlyargcount*) to support positional-only arguments defined
16871671
in :pep:`570`. The first argument (*argcount*) now represents the total
1688-
number of positional arguments (including positional-only arguments). A new
1672+
number of positional arguments (including positional-only arguments). The new
16891673
``replace()`` method of :class:`types.CodeType` can be used to make the code
16901674
future-proof.
16911675

16921676

16931677
Changes in the C API
16941678
--------------------
16951679

1696-
* The :c:type:`PyCompilerFlags` structure gets a new *cf_feature_version*
1680+
* The :c:type:`PyCompilerFlags` structure got a new *cf_feature_version*
16971681
field. It should be initialized to ``PY_MINOR_VERSION``. The field is ignored
1698-
by default, it is used if and only if ``PyCF_ONLY_AST`` flag is set in
1682+
by default, and is used if and only if ``PyCF_ONLY_AST`` flag is set in
16991683
*cf_flags*.
17001684

17011685
* The :c:func:`PyEval_ReInitThreads` function has been removed from the C API.

0 commit comments

Comments
 (0)