Skip to content

Commit c4f365e

Browse files
committed
Merge branch 'master' into complex-abs-errno/155526
2 parents 3b851ac + 03503dc commit c4f365e

167 files changed

Lines changed: 4724 additions & 2004 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.

.github/workflows/reusable-check-html-ids.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ jobs:
2020
with:
2121
persist-credentials: false
2222
ref: ${{ github.event.pull_request.head.sha }}
23-
- name: 'Downgrade Git'
24-
# Temporarily downgrade to 2.43 until 2.55 is in the runner image,
25-
# to avoid "fatal: shallow file has changed since we read it" bug.
26-
# See https://github.com/python/cpython/issues/151365.
27-
run: |
28-
sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'
29-
git --version
3023
- name: 'Find merge base'
3124
id: merge-base
3225
run: |

.github/workflows/reusable-context.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ jobs:
9090
|| ''
9191
}}
9292
93-
- name: 'Downgrade Git'
94-
# Temporarily downgrade to 2.43 until 2.55 is in the runner image,
95-
# to avoid "fatal: shallow file has changed since we read it" bug.
96-
# See https://github.com/python/cpython/issues/151365.
97-
if: github.event_name == 'pull_request'
98-
run: |
99-
sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'
100-
git --version
101-
10293
# Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
10394
- name: Fetch commits to get branch diff
10495
if: github.event_name == 'pull_request'

.github/workflows/reusable-docs.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ jobs:
4747
&& github.event.pull_request.head.sha
4848
|| ''
4949
}}
50-
- name: 'Downgrade Git'
51-
# Temporarily downgrade to 2.43 until 2.55 is in the runner image,
52-
# to avoid "fatal: shallow file has changed since we read it" bug.
53-
# See https://github.com/python/cpython/issues/151365.
54-
if: github.event_name == 'pull_request'
55-
run: |
56-
sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'
57-
git --version
5850
# Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
5951
- name: 'Fetch commits to get branch diff'
6052
if: github.event_name == 'pull_request'

Doc/library/asyncio-task.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ and reliable way to wait for all tasks in the group to finish.
356356
The signature matches that of :func:`asyncio.create_task`.
357357
If the task group is inactive (e.g. not yet entered,
358358
already finished, or in the process of shutting down),
359-
we will close the given ``coro``.
359+
we will close the given ``coro`` and raise :exc:`RuntimeError`.
360360

361361
.. versionchanged:: 3.13
362362

Doc/library/ctypes.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,11 @@ Specifying function pointers using type annotations
715715
and do not have to match the underlying C implementation.
716716

717717
If the decorated function does not have a return type annotation, a
718-
:exc:`ValueError` is raised. If the name of the function does not exist
719-
in *dll*, an :exc:`AttributeError` is raised.
718+
:exc:`ValueError` is raised. A :exc:`ValueError` is also raised if it has a
719+
keyword-only, ``*args``, or ``**kwargs`` parameter, since
720+
:attr:`~ctypes._CFuncPtr.argtypes` describes positional arguments only. If
721+
the name of the function does not exist in *dll*, an :exc:`AttributeError`
722+
is raised.
720723

721724
For example::
722725

Doc/library/doctest.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,12 @@ from text files and modules with doctests:
11621162
.. versionchanged:: 3.15
11631163
Run each example as a :ref:`subtest <subtests>`.
11641164

1165+
.. versionchanged:: next
1166+
Report every example, as in verbose mode, if the test runner reports
1167+
more than the test names, i.e. its
1168+
:attr:`~unittest.TestResult.verbosity` is 3 or higher (for example
1169+
with ``python -m unittest -vv``).
1170+
11651171
Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` out
11661172
of :class:`!doctest.DocTestCase` instances, and :class:`!DocTestCase` is a
11671173
subclass of :class:`unittest.TestCase`. :class:`!DocTestCase` isn't documented

Doc/library/imaplib.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,20 @@ An :class:`IMAP4` instance has the following methods:
907907

908908
The following attributes are defined on instances of :class:`IMAP4`:
909909

910+
.. attribute:: IMAP4.capabilities
911+
912+
A tuple of the capabilities advertised by the server, in upper case.
913+
914+
It is set when the connection is established,
915+
and refreshed after a successful :meth:`~IMAP4.login`,
916+
:meth:`~IMAP4.authenticate` or :meth:`~IMAP4.starttls`,
917+
because the server can advertise different capabilities
918+
in different connection states.
919+
920+
.. versionchanged:: 3.14.7
921+
Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`.
922+
923+
910924
.. attribute:: IMAP4.PROTOCOL_VERSION
911925

912926
The most recent supported protocol in the ``CAPABILITY`` response from the

Doc/library/mimetypes.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ than one MIME-type database; it provides an interface similar to the one of the
211211
.. class:: MimeTypes(filenames=(), strict=True)
212212

213213
This class represents a MIME-types database. By default, it provides access to
214-
the same database as the rest of this module. The initial database is a copy of
215-
that provided by the module, and may be extended by loading additional
214+
the same database as the rest of this module. The initial database is created from
215+
Python's built-in MIME type tables. It may be extended by loading additional
216216
:file:`mime.types`\ -style files into the database using the :meth:`read` or
217217
:meth:`readfp` methods. The mapping dictionaries may also be cleared before
218218
loading additional data if the default data is not desired.
@@ -226,30 +226,32 @@ than one MIME-type database; it provides an interface similar to the one of the
226226
Dictionary mapping suffixes to suffixes. This is used to allow recognition of
227227
encoded files for which the encoding and the type are indicated by the same
228228
extension. For example, the :file:`.tgz` extension is mapped to :file:`.tar.gz`
229-
to allow the encoding and type to be recognized separately. This is initially a
230-
copy of the global :data:`suffix_map` defined in the module.
229+
to allow the encoding and type to be recognized separately.
230+
This is initialized with some predefined values.
231231

232232

233233
.. attribute:: MimeTypes.encodings_map
234234

235-
Dictionary mapping filename extensions to encoding types. This is initially a
236-
copy of the global :data:`encodings_map` defined in the module.
235+
Dictionary mapping filename extensions to encoding types.
236+
This is initialized with some predefined values.
237237

238238

239239
.. attribute:: MimeTypes.types_map
240240

241241
Tuple containing two dictionaries, mapping filename extensions to MIME types:
242242
the first dictionary is for the non-standards types and the second one is for
243-
the standard types. They are initialized by :data:`common_types` and
244-
:data:`types_map`.
243+
the standard types.
244+
They are initialized with some predefined values and MIME type
245+
information loaded from files specified by the *filenames* argument.
245246

246247

247248
.. attribute:: MimeTypes.types_map_inv
248249

249250
Tuple containing two dictionaries, mapping MIME types to a list of filename
250251
extensions: the first dictionary is for the non-standards types and the
251-
second one is for the standard types. They are initialized by
252-
:data:`common_types` and :data:`types_map`.
252+
second one is for the standard types.
253+
They are initialized with some predefined values and MIME type
254+
information loaded from files specified by the *filenames* argument.
253255

254256

255257
.. method:: MimeTypes.guess_extension(type, strict=True)

Doc/library/pyexpat.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,20 @@ XMLParser Objects
172172
or ``None`` if :meth:`SetBase` hasn't been called.
173173

174174

175+
.. method:: xmlparser.GetSpecifiedAttributeCount()
176+
177+
Return the index just past the attributes given in the start tag.
178+
Attributes defaulted from the DTD follow the specified ones,
179+
so attributes at lower indices in the list
180+
passed to :attr:`StartElementHandler` were given in the start tag.
181+
Each attribute takes two items in that list,
182+
its name and its value.
183+
Only meaningful inside a :attr:`StartElementHandler` call,
184+
and only if :attr:`ordered_attributes` is true.
185+
186+
.. versionadded:: next
187+
188+
175189
.. method:: xmlparser.GetInputContext()
176190

177191
Returns the input data that generated the current event as a string. The data is

Doc/library/site.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,10 @@ Module contents
453453

454454
Return a list containing all global site-packages directories.
455455

456-
For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
457-
is ``None``), this function will find its site-packages subdirectory
458-
depending on the system environment, and will return a list of full paths.
456+
For each directory given in *prefixes* (or :data:`PREFIXES` if *prefixes*
457+
is ``None``), this function will compute its site-packages subdirectory
458+
depending on the system environment, and will return a list of full paths,
459+
which are not checked for existence.
459460

460461
.. versionadded:: 3.2
461462

0 commit comments

Comments
 (0)