Skip to content

Commit b3cbd66

Browse files
authored
Merge branch 'main' into main
2 parents f0c0aeb + 564c58c commit b3cbd66

83 files changed

Lines changed: 2100 additions & 1679 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/deprecations/pending-removal-in-3.21.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ Pending removal in Python 3.21
1717
are not generated by the parser or accepted by the code generator.
1818
* The ``dims`` property of ``ast.Tuple`` will be removed in Python 3.21. Use
1919
the ``ast.Tuple.elts`` property instead.
20+
21+
* :mod:`struct`:
22+
23+
* Soft-deprecated since Python 3.15, using ``'F'`` and ``'D'`` type codes are now
24+
deprecated. These codes will be removed in Python 3.21. Use instead
25+
two-letter forms ``'Zf'`` and ``'Zd'``.

Doc/deprecations/soft-deprecations.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,3 @@ There are no plans to remove :term:`soft deprecated` APIs.
1919

2020
(Contributed by Gregory P. Smith in :gh:`86519` and
2121
Hugo van Kemenade in :gh:`148100`.)
22-
23-
* Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module
24-
now are :term:`soft deprecated` in favor of two-letter forms ``'Zf'``
25-
and ``'Zd'``.
26-
(Contributed by Sergey B Kirpichev in :gh:`121249`.)

Doc/faq/design.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ In general, structured switch statements execute one block of code
263263
when an expression has a particular value or set of values.
264264
Since Python 3.10 one can easily match literal values, or constants
265265
within a namespace, with a ``match ... case`` statement.
266+
See :ref:`the specification <match>` and :ref:`the tutorial <tut-match>`
267+
for more information about :keyword:`match` statements.
266268
An older alternative is a sequence of ``if... elif... elif... else``.
267269

268270
For cases where you need to choose from a very large number of possibilities,

Doc/library/curses.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ Mouse
465465

466466
Return ``True`` if the mouse driver has been successfully initialized.
467467

468+
Availability: if the underlying curses library provides ``has_mouse()``.
469+
468470
.. versionadded:: next
469471

470472

Doc/library/dis.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,6 @@ iterations of the loop.
10561056
The compiler tries to use :opcode:`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible.
10571057

10581058

1059-
.. opcode:: DELETE_NAME (namei)
1060-
1061-
Implements ``del name``, where *namei* is the index into :attr:`~codeobject.co_names`
1062-
attribute of the :ref:`code object <code-objects>`.
1063-
1064-
10651059
.. opcode:: UNPACK_SEQUENCE (count)
10661060

10671061
Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack
@@ -1117,11 +1111,6 @@ iterations of the loop.
11171111
Works as :opcode:`STORE_NAME`, but stores the name as a global.
11181112

11191113

1120-
.. opcode:: DELETE_GLOBAL (namei)
1121-
1122-
Works as :opcode:`DELETE_NAME`, but deletes a global name.
1123-
1124-
11251114
.. opcode:: LOAD_CONST (consti)
11261115

11271116
Pushes ``co_consts[consti]`` onto the stack.

Doc/library/shutil.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ Directory and files operations
6464

6565
The destination location must be writable; otherwise, an :exc:`OSError`
6666
exception will be raised. If *dst* already exists, it will be replaced.
67-
Special files such as character or block devices and pipes cannot be
68-
copied with this function.
67+
Special files such as character or block devices, pipes, and sockets cannot
68+
be copied with this function.
6969

7070
If *follow_symlinks* is false and *src* is a symbolic link,
7171
a new symbolic link will be created instead of copying the
@@ -87,10 +87,13 @@ Directory and files operations
8787
copy the file more efficiently. See
8888
:ref:`shutil-platform-dependent-efficient-copy-operations` section.
8989

90+
.. versionchanged:: 3.15
91+
:exc:`SpecialFileError` is now also raised for sockets and device files.
92+
9093
.. exception:: SpecialFileError
9194

9295
This exception is raised when :func:`copyfile` or :func:`copytree` attempt
93-
to copy a named pipe.
96+
to copy a named pipe, socket, or device file.
9497

9598
.. versionadded:: 2.7
9699

Doc/library/struct.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ platform-dependent.
283283

284284
.. versionchanged:: 3.15
285285
Added support for the ``'Zf'`` and ``'Zd'`` formats.
286-
``'F'`` and ``'D'`` formats are :term:`soft deprecated`.
286+
287+
.. versionchanged:: 3.16
288+
``'F'`` and ``'D'`` formats are deprecated.
287289

288290
.. seealso::
289291

Doc/tools/removed-ids.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ c-api/file.html: deprecated-api
66

77
# Removed sections
88
library/asyncio-task.html: terminating-a-task-group
9+
library/dis.html: opcode-DELETE_GLOBAL
10+
library/dis.html: opcode-DELETE_NAME
911
library/asyncio-llapi-index.html: event-loop-policies
12+
1013
deprecations/index.html: pending-removal-in-python-3-15
1114
deprecations/index.html: pending-removal-in-python-3-16
1215
deprecations/index.html: c-api-pending-removal-in-python-3-15

Doc/whatsnew/3.15.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,14 @@ shelve
13981398
(Contributed by Furkan Onder in :gh:`99631`.)
13991399

14001400

1401+
shutil
1402+
------
1403+
1404+
* :func:`shutil.copyfile` now also raises :exc:`~shutil.SpecialFileError` for
1405+
sockets and device files.
1406+
(Contributed by Savannah Ostrowski in :gh:`142693`.)
1407+
1408+
14011409
socket
14021410
------
14031411

Doc/whatsnew/3.16.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,13 @@ New deprecations
550550
3.9, now issues a deprecation warning on use. This property is slated for
551551
removal in 3.21. Use ``ast.Tuple.elts`` instead.
552552

553+
* :mod:`struct`:
554+
555+
* Soft-deprecated since Python 3.15, using ``'F'`` and ``'D'`` type codes are now
556+
deprecated. These codes will be removed in Python 3.21. Use instead
557+
two-letter forms ``'Zf'`` and ``'Zd'``.
558+
(Contributed by Sergey B Kirpichev in :gh:`121249`.)
559+
553560
.. Add deprecations above alphabetically, not here at the end.
554561
555562
.. include:: ../deprecations/pending-removal-in-3.17.rst

0 commit comments

Comments
 (0)