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

Skip to content

Commit eda424d

Browse files
committed
Catch up with main
2 parents c4bf874 + d4426e8 commit eda424d

192 files changed

Lines changed: 21565 additions & 31656 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/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ jobs:
518518
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
519519
with:
520520
allowed-failures: >-
521-
build_macos,
522521
build_macos_free_threaded,
523522
build_ubuntu_free_threaded,
524523
build_ubuntu_ssltests,

Doc/bugs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ though it may take a while to be processed.
3838
`Helping with Documentation <https://devguide.python.org/docquality/#helping-with-documentation>`_
3939
Comprehensive guide for individuals that are interested in contributing to Python documentation.
4040

41-
`Documentation Translations <https://devguide.python.org/documenting/#translating>`_
41+
`Documentation Translations <https://devguide.python.org/documentation/translating/>`_
4242
A list of GitHub pages for documentation translation and their primary contacts.
4343

4444

Doc/c-api/bytes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ called with a non-bytes parameter.
155155
156156
Return the null-terminated contents of the object *obj*
157157
through the output variables *buffer* and *length*.
158+
Returns ``0`` on success.
158159
159160
If *length* is ``NULL``, the bytes object
160161
may not contain embedded null bytes;

Doc/howto/descriptor.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,10 @@ it can be updated:
943943
>>> Movie('Star Wars').director
944944
'J.J. Abrams'
945945

946+
.. testcleanup::
947+
948+
conn.close()
949+
946950

947951
Pure Python Equivalents
948952
^^^^^^^^^^^^^^^^^^^^^^^

Doc/library/difflib.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,12 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
171171
expressed in the ISO 8601 format. If not specified, the
172172
strings default to blanks.
173173

174+
>>> import sys
175+
>>> from difflib import *
174176
>>> s1 = ['bacon\n', 'eggs\n', 'ham\n', 'guido\n']
175177
>>> s2 = ['python\n', 'eggy\n', 'hamster\n', 'guido\n']
176-
>>> sys.stdout.writelines(context_diff(s1, s2, fromfile='before.py', tofile='after.py'))
178+
>>> sys.stdout.writelines(context_diff(s1, s2, fromfile='before.py',
179+
... tofile='after.py'))
177180
*** before.py
178181
--- after.py
179182
***************
@@ -294,13 +297,12 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
294297
For inputs that do not have trailing newlines, set the *lineterm* argument to
295298
``""`` so that the output will be uniformly newline free.
296299

297-
The context diff format normally has a header for filenames and modification
300+
The unified diff format normally has a header for filenames and modification
298301
times. Any or all of these may be specified using strings for *fromfile*,
299302
*tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally
300303
expressed in the ISO 8601 format. If not specified, the
301304
strings default to blanks.
302305

303-
304306
>>> s1 = ['bacon\n', 'eggs\n', 'ham\n', 'guido\n']
305307
>>> s2 = ['python\n', 'eggy\n', 'hamster\n', 'guido\n']
306308
>>> sys.stdout.writelines(unified_diff(s1, s2, fromfile='before.py', tofile='after.py'))

Doc/library/dis.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,8 @@ iterations of the loop.
824824
oparg set to be the exception block depth, for efficient closing of generators.
825825

826826
.. versionchanged:: 3.13
827-
this opcode no longer has an oparg
827+
oparg is ``1`` if this instruction is part of a yield-from or await, and ``0``
828+
otherwise.
828829

829830
.. opcode:: SETUP_ANNOTATIONS
830831

Doc/library/ipaddress.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ write code that handles both IP versions correctly. Address objects are
219219
``True`` if the address is reserved for link-local usage. See
220220
:RFC:`3927`.
221221

222+
.. attribute:: ipv6_mapped
223+
224+
:class:`IPv4Address` object representing the IPv4-mapped IPv6 address. See :RFC:`4291`.
225+
226+
.. versionadded:: 3.13
227+
228+
222229
.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
223230
.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
224231

Doc/library/logging.handlers.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,7 @@ supports sending logging messages to a remote or local Unix syslog.
656656
to the other end. This method is called during handler initialization,
657657
but it's not regarded as an error if the other end isn't listening at
658658
this point - the method will be called again when emitting an event, if
659-
but it's not regarded as an error if the other end isn't listening yet
660-
--- the method will be called again when emitting an event,
661-
if there is no socket at that point.
659+
there is no socket at that point.
662660

663661
.. versionadded:: 3.11
664662

Doc/library/pdb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ can be overridden by the local file.
580580

581581
Create an alias called *name* that executes *command*. The *command* must
582582
*not* be enclosed in quotes. Replaceable parameters can be indicated by
583-
``%1``, ``%2``, and so on, while ``%*`` is replaced by all the parameters.
583+
``%1``, ``%2``, ... and ``%9``, while ``%*`` is replaced by all the parameters.
584584
If *command* is omitted, the current alias for *name* is shown. If no
585585
arguments are given, all aliases are listed.
586586

Doc/library/typing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ without the dedicated syntax, as documented below.
19541954

19551955
.. doctest::
19561956

1957-
>>> from typing import ParamSpec
1957+
>>> from typing import ParamSpec, get_origin
19581958
>>> P = ParamSpec("P")
19591959
>>> get_origin(P.args) is P
19601960
True
@@ -3059,14 +3059,14 @@ Introspection helpers
30593059

30603060
Return the set of members defined in a :class:`Protocol`.
30613061

3062-
::
3062+
.. doctest::
30633063

30643064
>>> from typing import Protocol, get_protocol_members
30653065
>>> class P(Protocol):
30663066
... def a(self) -> str: ...
30673067
... b: int
3068-
>>> get_protocol_members(P)
3069-
frozenset({'a', 'b'})
3068+
>>> get_protocol_members(P) == frozenset({'a', 'b'})
3069+
True
30703070

30713071
Raise :exc:`TypeError` for arguments that are not Protocols.
30723072

0 commit comments

Comments
 (0)