Skip to content

Commit d1e65fc

Browse files
committed
Merge branch 'main' into docs/refwarn/whatsnew-3.10
# Conflicts: # Doc/tools/.nitignore
2 parents c0685b8 + 6d730b1 commit d1e65fc

24 files changed

+182
-105
lines changed

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ A pointer to the module definition must be returned via :c:func:`PyModuleDef_Ini
426426
so that the import machinery can create the module and store it in ``sys.modules``.
427427

428428
When embedding Python, the :c:func:`!PyInit_spam` function is not called
429-
automatically unless there's an entry in the :c:data:`PyImport_Inittab` table.
429+
automatically unless there's an entry in the :c:data:`!PyImport_Inittab` table.
430430
To add the module to the initialization table, use :c:func:`PyImport_AppendInittab`,
431431
optionally followed by an import of the module::
432432

Doc/library/shutil.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ Directory and files operations
9090
copy the file more efficiently. See
9191
:ref:`shutil-platform-dependent-efficient-copy-operations` section.
9292

93+
.. exception:: SpecialFileError
94+
95+
This exception is raised when :func:`copyfile` or :func:`copytree` attempt
96+
to copy a named pipe.
97+
98+
.. versionadded:: 2.7
99+
93100
.. exception:: SameFileError
94101

95102
This exception is raised if source and destination in :func:`copyfile`

Doc/library/test.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ The :mod:`test.support` module defines the following functions:
851851
Decorator for tests that fill the address space.
852852

853853

854-
.. function:: linked_with_musl()
854+
.. function:: linked_to_musl()
855855

856856
Return ``False`` if there is no evidence the interpreter was compiled with
857857
``musl``, otherwise return a version triple, either ``(0, 0, 0)`` if the

Doc/reference/simple_stmts.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ where the :keyword:`import` statement occurs.
831831

832832
.. index:: single: __all__ (optional module attribute)
833833

834+
.. attribute:: module.__all__
835+
:no-typesetting:
836+
834837
The *public names* defined by a module are determined by checking the module's
835838
namespace for a variable named ``__all__``; if defined, it must be a sequence
836839
of strings which are names defined or imported by that module. The names

Doc/tools/.nitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Doc/c-api/module.rst
1111
Doc/c-api/stable.rst
1212
Doc/c-api/type.rst
1313
Doc/c-api/typeobj.rst
14-
Doc/extending/extending.rst
1514
Doc/library/ast.rst
1615
Doc/library/asyncio-extending.rst
1716
Doc/library/email.charset.rst
@@ -61,7 +60,4 @@ Doc/using/windows.rst
6160
Doc/whatsnew/2.4.rst
6261
Doc/whatsnew/2.5.rst
6362
Doc/whatsnew/2.6.rst
64-
Doc/whatsnew/2.7.rst
65-
Doc/whatsnew/3.4.rst
6663
Doc/whatsnew/3.5.rst
67-
Doc/whatsnew/3.6.rst

Doc/whatsnew/2.7.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ changes, or look through the Subversion logs for all the details.
15411541
buffer API, which fixed a test suite failure (fix by Antoine Pitrou;
15421542
:issue:`7133`) and automatically set
15431543
OpenSSL's :c:macro:`!SSL_MODE_AUTO_RETRY`, which will prevent an error
1544-
code being returned from :meth:`recv` operations that trigger an SSL
1544+
code being returned from :meth:`!recv` operations that trigger an SSL
15451545
renegotiation (fix by Antoine Pitrou; :issue:`8222`).
15461546

15471547
The :func:`~ssl.SSLContext.wrap_socket` constructor function now takes a
@@ -2031,7 +2031,7 @@ version 1.3. Some of the new features are:
20312031
* ElementTree's code for converting trees to a string has been
20322032
significantly reworked, making it roughly twice as fast in many
20332033
cases. The :meth:`ElementTree.write() <xml.etree.ElementTree.ElementTree.write>`
2034-
and :meth:`Element.write` methods now have a *method* parameter that can be
2034+
and :meth:`!Element.write` methods now have a *method* parameter that can be
20352035
"xml" (the default), "html", or "text". HTML mode will output empty
20362036
elements as ``<empty></empty>`` instead of ``<empty/>``, and text
20372037
mode will skip over elements and only output the text chunks. If
@@ -2044,7 +2044,7 @@ version 1.3. Some of the new features are:
20442044
Namespace handling has also been improved. All ``xmlns:<whatever>``
20452045
declarations are now output on the root element, not scattered throughout
20462046
the resulting XML. You can set the default namespace for a tree
2047-
by setting the :attr:`default_namespace` attribute and can
2047+
by setting the :attr:`!default_namespace` attribute and can
20482048
register new prefixes with :meth:`~xml.etree.ElementTree.register_namespace`. In XML mode,
20492049
you can use the true/false *xml_declaration* parameter to suppress the
20502050
XML declaration.
@@ -2181,14 +2181,14 @@ Changes to Python's build process and to the C API include:
21812181
discussed in :issue:`5753`, and fixed by Antoine Pitrou.
21822182

21832183
* New macros: the Python header files now define the following macros:
2184-
:c:macro:`Py_ISALNUM`,
2185-
:c:macro:`Py_ISALPHA`,
2186-
:c:macro:`Py_ISDIGIT`,
2187-
:c:macro:`Py_ISLOWER`,
2188-
:c:macro:`Py_ISSPACE`,
2189-
:c:macro:`Py_ISUPPER`,
2190-
:c:macro:`Py_ISXDIGIT`,
2191-
:c:macro:`Py_TOLOWER`, and :c:macro:`Py_TOUPPER`.
2184+
:c:macro:`!Py_ISALNUM`,
2185+
:c:macro:`!Py_ISALPHA`,
2186+
:c:macro:`!Py_ISDIGIT`,
2187+
:c:macro:`!Py_ISLOWER`,
2188+
:c:macro:`!Py_ISSPACE`,
2189+
:c:macro:`!Py_ISUPPER`,
2190+
:c:macro:`!Py_ISXDIGIT`,
2191+
:c:macro:`!Py_TOLOWER`, and :c:macro:`!Py_TOUPPER`.
21922192
All of these functions are analogous to the C
21932193
standard macros for classifying characters, but ignore the current
21942194
locale setting, because in
@@ -2234,7 +2234,7 @@ Changes to Python's build process and to the C API include:
22342234

22352235
* When using the :c:type:`PyMemberDef` structure to define attributes
22362236
of a type, Python will no longer let you try to delete or set a
2237-
:c:macro:`T_STRING_INPLACE` attribute.
2237+
:c:macro:`!T_STRING_INPLACE` attribute.
22382238

22392239
.. rev 79644
22402240
@@ -2259,12 +2259,12 @@ Changes to Python's build process and to the C API include:
22592259
:issue:`6491`.)
22602260

22612261
* The :program:`configure` script now checks for floating-point rounding bugs
2262-
on certain 32-bit Intel chips and defines a :c:macro:`X87_DOUBLE_ROUNDING`
2262+
on certain 32-bit Intel chips and defines a :c:macro:`!X87_DOUBLE_ROUNDING`
22632263
preprocessor definition. No code currently uses this definition,
22642264
but it's available if anyone wishes to use it.
22652265
(Added by Mark Dickinson; :issue:`2937`.)
22662266

2267-
:program:`configure` also now sets a :envvar:`LDCXXSHARED` Makefile
2267+
:program:`configure` also now sets a :envvar:`!LDCXXSHARED` Makefile
22682268
variable for supporting C++ linking. (Contributed by Arfrever
22692269
Frehtes Taifersar Arahesis; :issue:`1222585`.)
22702270

Doc/whatsnew/3.4.rst

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Significantly improved library modules:
122122
on Unix <whatsnew-multiprocessing-no-fork>` (:issue:`8713`).
123123
* :mod:`email` has a new submodule, :mod:`~email.contentmanager`, and
124124
a new :mod:`~email.message.Message` subclass
125-
(:class:`~email.contentmanager.EmailMessage`) that :ref:`simplify MIME
125+
(:class:`~email.message.EmailMessage`) that :ref:`simplify MIME
126126
handling <whatsnew_email_contentmanager>` (:issue:`18891`).
127127
* The :mod:`inspect` and :mod:`pydoc` modules are now capable of
128128
correct introspection of a much wider variety of callable objects,
@@ -154,7 +154,7 @@ Security improvements:
154154
<whatsnew34-sslcontext>`.
155155
* All modules in the standard library that support SSL now support server
156156
certificate verification, including hostname matching
157-
(:func:`ssl.match_hostname`) and CRLs (Certificate Revocation lists, see
157+
(:func:`!ssl.match_hostname`) and CRLs (Certificate Revocation lists, see
158158
:func:`ssl.SSLContext.load_verify_locations`).
159159

160160
CPython implementation improvements:
@@ -739,7 +739,7 @@ these new components.
739739
In addition, a new application-friendly class :class:`~dis.Bytecode` provides
740740
an object-oriented API for inspecting bytecode in both in human-readable form
741741
and for iterating over instructions. The :class:`~dis.Bytecode` constructor
742-
takes the same arguments that :func:`~dis.get_instruction` does (plus an
742+
takes the same arguments that :func:`~dis.get_instructions` does (plus an
743743
optional *current_offset*), and the resulting object can be iterated to produce
744744
:class:`~dis.Instruction` objects. But it also has a :mod:`~dis.Bytecode.dis`
745745
method, equivalent to calling :mod:`~dis.dis` on the constructor argument, but
@@ -958,8 +958,9 @@ http
958958
optional additional *explain* parameter which can be used to provide an
959959
extended error description, overriding the hardcoded default if there is one.
960960
This extended error description will be formatted using the
961-
:attr:`~http.server.HTTP.error_message_format` attribute and sent as the body
962-
of the error response. (Contributed by Karl Cow in :issue:`12921`.)
961+
:attr:`~http.server.BaseHTTPRequestHandler.error_message_format` attribute
962+
and sent as the body of the error response.
963+
(Contributed by Karl Cow in :issue:`12921`.)
963964

964965
The :mod:`http.server` :ref:`command line interface <http-server-cli>` now has
965966
a ``-b/--bind`` option that causes the server to listen on a specific address.
@@ -1221,7 +1222,7 @@ pickle
12211222
:mod:`pickle` now supports (but does not use by default) a new pickle protocol,
12221223
protocol 4. This new protocol addresses a number of issues that were present
12231224
in previous protocols, such as the serialization of nested classes, very large
1224-
strings and containers, and classes whose :meth:`__new__` method takes
1225+
strings and containers, and classes whose :meth:`~object.__new__` method takes
12251226
keyword-only arguments. It also provides some efficiency improvements.
12261227

12271228
.. seealso::
@@ -1299,7 +1300,7 @@ affect the behaviour of :func:`help`.
12991300
re
13001301
--
13011302

1302-
New :func:`~re.fullmatch` function and :meth:`.regex.fullmatch` method anchor
1303+
New :func:`~re.fullmatch` function and :meth:`.Pattern.fullmatch` method anchor
13031304
the pattern at both ends of the string to match. This provides a way to be
13041305
explicit about the goal of the match, which avoids a class of subtle bugs where
13051306
``$`` characters get lost during code changes or the addition of alternatives
@@ -1519,7 +1520,7 @@ subprocess
15191520
be used to provide the contents of ``stdin`` for the command that is run.
15201521
(Contributed by Zack Weinberg in :issue:`16624`.)
15211522

1522-
:func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now
1523+
:func:`~subprocess.getoutput` and :func:`~subprocess.getstatusoutput` now
15231524
work on Windows. This change was actually inadvertently made in 3.3.4.
15241525
(Contributed by Tim Golden in :issue:`10197`.)
15251526

@@ -1535,7 +1536,7 @@ plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)
15351536
called automatically at the end of the block. (Contributed by Serhiy Storchaka
15361537
in :issue:`18878`.)
15371538

1538-
:meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding
1539+
:meth:`!AU_write.setsampwidth` now supports 24 bit samples, thus adding
15391540
support for writing 24 sample using the module. (Contributed by
15401541
Serhiy Storchaka in :issue:`19261`.)
15411542

@@ -1615,7 +1616,7 @@ A new :func:`~types.DynamicClassAttribute` descriptor provides a way to define
16151616
an attribute that acts normally when looked up through an instance object, but
16161617
which is routed to the *class* ``__getattr__`` when looked up through the
16171618
class. This allows one to have properties active on a class, and have virtual
1618-
attributes on the class with the same name (see :mod:`Enum` for an example).
1619+
attributes on the class with the same name (see :mod:`enum` for an example).
16191620
(Contributed by Ethan Furman in :issue:`19030`.)
16201621

16211622

@@ -1709,7 +1710,7 @@ matching calls, which means an argument can now be matched by either position
17091710
or name, instead of only by position. (Contributed by Antoine Pitrou in
17101711
:issue:`17015`.)
17111712

1712-
:func:`~mock.mock_open` objects now have ``readline`` and ``readlines``
1713+
:func:`~unittest.mock.mock_open` objects now have ``readline`` and ``readlines``
17131714
methods. (Contributed by Toshio Kuratomi in :issue:`17467`.)
17141715

17151716

@@ -1729,8 +1730,8 @@ installed in the virtual environment. (Contributed by Nick Coghlan in
17291730
wave
17301731
----
17311732

1732-
The :meth:`~wave.getparams` method now returns a namedtuple rather than a
1733-
plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.)
1733+
The :meth:`~wave.Wave_read.getparams` method now returns a namedtuple rather
1734+
than a plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.)
17341735

17351736
:meth:`wave.open` now supports the context management protocol. (Contributed
17361737
by Claudiu Popa in :issue:`17616`.)
@@ -1788,7 +1789,7 @@ example, this could be used to exclude test files from the archive.
17881789
(Contributed by Christian Tismer in :issue:`19274`.)
17891790

17901791
The *allowZip64* parameter to :class:`~zipfile.ZipFile` and
1791-
:class:`~zipfile.PyZipfile` is now ``True`` by default. (Contributed by
1792+
:class:`~zipfile.PyZipFile` is now ``True`` by default. (Contributed by
17921793
William Mallard in :issue:`17201`.)
17931794

17941795

@@ -1817,7 +1818,7 @@ PEP 442: Safe Object Finalization
18171818
---------------------------------
18181819

18191820
:pep:`442` removes the current limitations and quirks of object finalization
1820-
in CPython. With it, objects with :meth:`__del__` methods, as well as
1821+
in CPython. With it, objects with :meth:`~object.__del__` methods, as well as
18211822
generators with :keyword:`finally` clauses, can be finalized when they are
18221823
part of a reference cycle.
18231824

@@ -2043,7 +2044,7 @@ Significant Optimizations
20432044
strings is now significantly faster. (Contributed by Victor Stinner and
20442045
Antoine Pitrou in :issue:`15596`.)
20452046

2046-
* A performance issue in :meth:`io.FileIO.readall` has been solved. This
2047+
* A performance issue in :meth:`!io.FileIO.readall` has been solved. This
20472048
particularly affects Windows, and significantly speeds up the case of piping
20482049
significant amounts of data through :mod:`subprocess`. (Contributed
20492050
by Richard Oudkerk in :issue:`15758`.)
@@ -2103,7 +2104,7 @@ Deprecations in the Python API
21032104
* The :mod:`!imp` module is pending deprecation. To keep compatibility with
21042105
Python 2/3 code bases, the module's removal is currently not scheduled.
21052106

2106-
* The :mod:`formatter` module is pending deprecation and is slated for removal
2107+
* The :mod:`!formatter` module is pending deprecation and is slated for removal
21072108
in Python 3.6.
21082109

21092110
* ``MD5`` as the default *digestmod* for the :func:`hmac.new` function is
@@ -2120,11 +2121,11 @@ Deprecations in the Python API
21202121

21212122
* The *strict* argument of :class:`~html.parser.HTMLParser` is deprecated.
21222123

2123-
* The :mod:`plistlib` :func:`~plistlib.readPlist`,
2124-
:func:`~plistlib.writePlist`, :func:`~plistlib.readPlistFromBytes`, and
2125-
:func:`~plistlib.writePlistToBytes` functions are deprecated in favor of the
2124+
* The :mod:`plistlib` :func:`!readPlist`,
2125+
:func:`!writePlist`, :func:`!readPlistFromBytes`, and
2126+
:func:`!writePlistToBytes` functions are deprecated in favor of the
21262127
corresponding new functions :func:`~plistlib.load`, :func:`~plistlib.dump`,
2127-
:func:`~plistlib.loads`, and :func:`~plistlib.dumps`. :func:`~plistlib.Data`
2128+
:func:`~plistlib.loads`, and :func:`~plistlib.dumps`. :func:`!Data`
21282129
is deprecated in favor of just using the :class:`bytes` constructor.
21292130

21302131
* The :mod:`sysconfig` key ``SO`` is deprecated, it has been replaced by
@@ -2212,8 +2213,8 @@ removed:
22122213
that do not have a __format__ method that handles it. See :issue:`7994` for
22132214
background.
22142215

2215-
* :meth:`difflib.SequenceMatcher.isbjunk` and
2216-
:meth:`difflib.SequenceMatcher.isbpopular` were deprecated in 3.2, and have
2216+
* :meth:`!difflib.SequenceMatcher.isbjunk` and
2217+
:meth:`!difflib.SequenceMatcher.isbpopular` were deprecated in 3.2, and have
22172218
now been removed: use ``x in sm.bjunk`` and
22182219
``x in sm.bpopular``, where *sm* is a :class:`~difflib.SequenceMatcher` object
22192220
(:issue:`13248`).
@@ -2280,7 +2281,7 @@ Changes in the Python API
22802281
* :meth:`!importlib.util.module_for_loader` now sets ``__loader__`` and
22812282
``__package__`` unconditionally to properly support reloading. If this is not
22822283
desired then you will need to set these attributes manually. You can use
2283-
:func:`importlib.util.module_to_load` for module management.
2284+
:func:`!importlib.util.module_to_load` for module management.
22842285

22852286
* Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``,
22862287
``__package__``, ``__file__``, ``__cached__``) unconditionally when reloading.
@@ -2428,7 +2429,7 @@ Changes in the Python API
24282429
disallowed command forms didn't make any sense and are unlikely to be in use.
24292430

24302431
* The :func:`re.split`, :func:`re.findall`, and :func:`re.sub` functions, and
2431-
the :meth:`~re.match.group` and :meth:`~re.match.groups` methods of
2432+
the :meth:`~re.Match.group` and :meth:`~re.Match.groups` methods of
24322433
``match`` objects now always return a *bytes* object when the string
24332434
to be matched is a :term:`bytes-like object`. Previously the return type
24342435
matched the input type, so if your code was depending on the return value

0 commit comments

Comments
 (0)