Skip to content

Commit aa28524

Browse files
authored
Merge branch 'main' into getaddrinfo-docs
2 parents b0ea0a2 + a083633 commit aa28524

File tree

91 files changed

+1950
-1134
lines changed

Some content is hidden

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

91 files changed

+1950
-1134
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ jobs:
185185
needs: build-context
186186
if: fromJSON(needs.build-context.outputs.run-windows-msi)
187187
strategy:
188+
fail-fast: false
188189
matrix:
189190
arch:
190191
- x86
@@ -236,6 +237,7 @@ jobs:
236237
needs: build-context
237238
if: needs.build-context.outputs.run-tests == 'true'
238239
strategy:
240+
fail-fast: false
239241
matrix:
240242
bolt:
241243
- false
@@ -452,6 +454,7 @@ jobs:
452454
needs: build-context
453455
if: needs.build-context.outputs.run-tests == 'true'
454456
strategy:
457+
fail-fast: false
455458
matrix:
456459
os: [ubuntu-24.04]
457460
env:
@@ -515,6 +518,7 @@ jobs:
515518
needs: build-context
516519
if: needs.build-context.outputs.run-tests == 'true'
517520
strategy:
521+
fail-fast: false
518522
matrix:
519523
free-threading:
520524
- false

.github/workflows/jit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
runs-on: ubuntu-24.04
140140
timeout-minutes: 90
141141
strategy:
142+
fail-fast: false
142143
matrix:
143144
llvm:
144145
- 19

.github/workflows/project-updater.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 10
1717
strategy:
18+
fail-fast: false
1819
matrix:
1920
include:
2021
# if an issue has any of these labels, it will be added

.github/workflows/require-pr-label.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ jobs:
1010
if: github.repository_owner == 'python'
1111
runs-on: ubuntu-latest
1212
permissions:
13-
issues: write
14-
pull-requests: write
13+
pull-requests: read
1514
timeout-minutes: 10
1615

1716
steps:
@@ -28,8 +27,7 @@ jobs:
2827
if: github.repository_owner == 'python'
2928
runs-on: ubuntu-latest
3029
permissions:
31-
issues: write
32-
pull-requests: write
30+
pull-requests: read
3331
timeout-minutes: 10
3432

3533
steps:

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ Glossary
719719
iterables include all sequence types (such as :class:`list`, :class:`str`,
720720
and :class:`tuple`) and some non-sequence types like :class:`dict`,
721721
:term:`file objects <file object>`, and objects of any classes you define
722-
with an :meth:`~iterator.__iter__` method or with a
722+
with an :meth:`~object.__iter__` method or with a
723723
:meth:`~object.__getitem__` method
724724
that implements :term:`sequence` semantics.
725725

Doc/library/abc.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ a helper class :class:`ABC` to alternatively define ABCs through inheritance:
141141
MyIterable.register(Foo)
142142

143143
The ABC ``MyIterable`` defines the standard iterable method,
144-
:meth:`~iterator.__iter__`, as an abstract method. The implementation given
144+
:meth:`~object.__iter__`, as an abstract method. The implementation given
145145
here can still be called from subclasses. The :meth:`!get_iterator` method
146146
is also part of the ``MyIterable`` abstract base class, but it does not have
147147
to be overridden in non-abstract derived classes.
148148

149149
The :meth:`__subclasshook__` class method defined here says that any class
150-
that has an :meth:`~iterator.__iter__` method in its
150+
that has an :meth:`~object.__iter__` method in its
151151
:attr:`~object.__dict__` (or in that of one of its base classes, accessed
152152
via the :attr:`~type.__mro__` list) is considered a ``MyIterable`` too.
153153

154154
Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``,
155-
even though it does not define an :meth:`~iterator.__iter__` method (it uses
155+
even though it does not define an :meth:`~object.__iter__` method (it uses
156156
the old-style iterable protocol, defined in terms of :meth:`~object.__len__` and
157157
:meth:`~object.__getitem__`). Note that this will not make ``get_iterator``
158158
available as a method of ``Foo``, so it is provided separately.

Doc/library/email.errors.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,12 @@ The following exception classes are defined in the :mod:`email.errors` module:
4545

4646
.. exception:: MultipartConversionError()
4747

48-
Raised when a payload is added to a :class:`~email.message.Message` object
49-
using :meth:`add_payload`, but the payload is already a scalar and the
50-
message's :mailheader:`Content-Type` main type is not either
51-
:mimetype:`multipart` or missing. :exc:`MultipartConversionError` multiply
52-
inherits from :exc:`MessageError` and the built-in :exc:`TypeError`.
53-
54-
Since :meth:`Message.add_payload` is deprecated, this exception is rarely
55-
raised in practice. However the exception may also be raised if the
56-
:meth:`~email.message.Message.attach`
57-
method is called on an instance of a class derived from
48+
Raised if the :meth:`~email.message.Message.attach` method is called
49+
on an instance of a class derived from
5850
:class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g.
5951
:class:`~email.mime.image.MIMEImage`).
52+
:exc:`MultipartConversionError` multiply
53+
inherits from :exc:`MessageError` and the built-in :exc:`TypeError`.
6054

6155

6256
.. exception:: HeaderWriteError()

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,9 +949,9 @@ Generator Types
949949
---------------
950950

951951
Python's :term:`generator`\s provide a convenient way to implement the iterator
952-
protocol. If a container object's :meth:`~iterator.__iter__` method is implemented as a
952+
protocol. If a container object's :meth:`~object.__iter__` method is implemented as a
953953
generator, it will automatically return an iterator object (technically, a
954-
generator object) supplying the :meth:`!__iter__` and :meth:`~generator.__next__`
954+
generator object) supplying the :meth:`~iterator.__iter__` and :meth:`~generator.__next__`
955955
methods.
956956
More information about generators can be found in :ref:`the documentation for
957957
the yield expression <yieldexpr>`.

Doc/library/string.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,19 @@ non-empty format specification typically modifies the result.
319319
The general form of a *standard format specifier* is:
320320

321321
.. productionlist:: format-spec
322-
format_spec: [[`fill`]`align`][`sign`]["z"]["#"]["0"][`width`][`grouping_option`]["." `precision`][`type`]
322+
format_spec: [`options`][`width_and_precision`][`type`]
323+
options: [[`fill`]`align`][`sign`]["z"]["#"]["0"]
323324
fill: <any character>
324325
align: "<" | ">" | "=" | "^"
325326
sign: "+" | "-" | " "
327+
width_and_precision: [`width_with_grouping`][`precision_with_grouping`]
328+
width_with_grouping: [`width`][`grouping_option`]
329+
precision_with_grouping: "." [`precision`]`grouping_option`
326330
width: `~python-grammar:digit`+
327331
grouping_option: "_" | ","
328332
precision: `~python-grammar:digit`+
329-
type: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
333+
type: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g"
334+
: | "G" | "n" | "o" | "s" | "x" | "X" | "%"
330335

331336
If a valid *align* value is specified, it can be preceded by a *fill*
332337
character that can be any character and defaults to a space if omitted.
@@ -458,6 +463,13 @@ indicates the maximum field size - in other words, how many characters will be
458463
used from the field content. The *precision* is not allowed for integer
459464
presentation types.
460465

466+
The ``'_'`` or ``','`` option after *precision* means the use of an underscore
467+
or a comma for a thousands separator of the fractional part for floating-point
468+
presentation types.
469+
470+
.. versionchanged:: 3.14
471+
Support thousands separators for the fractional part.
472+
461473
Finally, the *type* determines how the data should be presented.
462474

463475
The available string presentation types are:
@@ -704,10 +716,18 @@ Replacing ``%x`` and ``%o`` and converting the value to different bases::
704716
>>> "int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42)
705717
'int: 42; hex: 0x2a; oct: 0o52; bin: 0b101010'
706718

707-
Using the comma as a thousands separator::
719+
Using the comma or the underscore as a thousands separator::
708720

709721
>>> '{:,}'.format(1234567890)
710722
'1,234,567,890'
723+
>>> '{:_}'.format(1234567890)
724+
'1_234_567_890'
725+
>>> '{:_}'.format(123456789.123456789)
726+
'123_456_789.12345679'
727+
>>> '{:._}'.format(123456789.123456789)
728+
'123456789.123_456_79'
729+
>>> '{:_._}'.format(123456789.123456789)
730+
'123_456_789.123_456_79'
711731

712732
Expressing a percentage::
713733

Doc/library/uuid.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ The :mod:`uuid` module defines the following functions:
184184
administered MAC addresses, since the former are guaranteed to be
185185
globally unique, while the latter are not.
186186

187-
.. index:: single: getnode
188-
189187

190188
.. function:: uuid1(node=None, clock_seq=None)
191189

@@ -194,33 +192,25 @@ The :mod:`uuid` module defines the following functions:
194192
*clock_seq* is given, it is used as the sequence number; otherwise a random
195193
14-bit sequence number is chosen.
196194

197-
.. index:: single: uuid1
198-
199195

200196
.. function:: uuid3(namespace, name)
201197

202198
Generate a UUID based on the MD5 hash of a namespace identifier (which is a
203199
UUID) and a name (which is a :class:`bytes` object or a string
204200
that will be encoded using UTF-8).
205201

206-
.. index:: single: uuid3
207-
208202

209203
.. function:: uuid4()
210204

211205
Generate a random UUID.
212206

213-
.. index:: single: uuid4
214-
215207

216208
.. function:: uuid5(namespace, name)
217209

218210
Generate a UUID based on the SHA-1 hash of a namespace identifier (which is a
219211
UUID) and a name (which is a :class:`bytes` object or a string
220212
that will be encoded using UTF-8).
221213

222-
.. index:: single: uuid5
223-
224214

225215
.. function:: uuid8(a=None, b=None, c=None)
226216

@@ -235,8 +225,6 @@ The :mod:`uuid` module defines the following functions:
235225

236226
.. versionadded:: 3.14
237227

238-
.. index:: single: uuid8
239-
240228

241229
The :mod:`uuid` module defines the following namespace identifiers for use with
242230
:func:`uuid3` or :func:`uuid5`.

0 commit comments

Comments
 (0)