Skip to content

Commit c533172

Browse files
committed
Merge branch 'main' into gh-125451-test_processes_terminate
2 parents 2efa056 + 703227d commit c533172

Some content is hidden

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

41 files changed

+301
-223
lines changed

Doc/c-api/init_config.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,8 @@ Create Config
16211621
16221622
Free memory of the initialization configuration *config*.
16231623
1624+
If *config* is ``NULL``, no operation is performed.
1625+
16241626
16251627
Error Handling
16261628
--------------
@@ -1823,14 +1825,18 @@ return ``-1`` on error:
18231825
PyInitConfig_Free(config);
18241826
return 0;
18251827
1826-
// Display the error message
1827-
const char *err_msg;
18281828
error:
1829-
(void)PyInitConfig_GetError(config, &err_msg);
1830-
printf("PYTHON INIT ERROR: %s\n", err_msg);
1831-
PyInitConfig_Free(config);
1829+
{
1830+
// Display the error message
1831+
// This uncommon braces style is used, because you cannot make
1832+
// goto targets point to variable declarations.
1833+
const char *err_msg;
1834+
(void)PyInitConfig_GetError(config, &err_msg);
1835+
printf("PYTHON INIT ERROR: %s\n", err_msg);
1836+
PyInitConfig_Free(config);
18321837
1833-
return -1;
1838+
return -1;
1839+
}
18341840
}
18351841
18361842

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@
614614
# Sphinx 8.1 has in-built CVE and CWE roles.
615615
extlinks |= {
616616
"cve": (
617-
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s",
617+
"https://www.cve.org/CVERecord?id=CVE-%s",
618618
"CVE-%s",
619619
),
620620
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),

Doc/deprecations/c-api-pending-removal-in-3.14.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Python 3.14
1+
Pending removal in Python 3.14
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

44
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Python 3.15
1+
Pending removal in Python 3.15
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

44
* The bundled copy of ``libmpdecimal``.

Doc/deprecations/c-api-pending-removal-in-future.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Future Versions
1+
Pending removal in future versions
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

44
The following APIs are deprecated and will be removed,

Doc/deprecations/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Deprecations
77

88
.. include:: pending-removal-in-future.rst
99

10-
C API Deprecations
10+
C API deprecations
1111
------------------
1212

1313
.. include:: c-api-pending-removal-in-3.15.rst

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Python 3.13
1+
Pending removal in Python 3.13
22
------------------------------
33

44
Modules (see :pep:`594`):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Python 3.14
1+
Pending removal in Python 3.14
22
------------------------------
33

44
* The import system:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Python 3.15
1+
Pending removal in Python 3.15
22
------------------------------
33

44
* The import system:
@@ -63,7 +63,7 @@ Pending Removal in Python 3.15
6363

6464
* The undocumented keyword argument syntax for creating
6565
:class:`~typing.NamedTuple` classes
66-
(e.g. ``Point = NamedTuple("Point", x=int, y=int)``)
66+
(for example, ``Point = NamedTuple("Point", x=int, y=int)``)
6767
has been deprecated since Python 3.13.
6868
Use the class-based syntax or the functional syntax instead.
6969

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
Pending Removal in Python 3.16
1+
Pending removal in Python 3.16
22
------------------------------
33

4-
* :mod:`builtins`:
5-
6-
* Bitwise inversion on boolean types, ``~True`` or ``~False``
7-
has been deprecated since Python 3.12,
8-
as it produces surprising and unintuitive results (``-2`` and ``-1``).
9-
Use ``not x`` instead for the logical negation of a Boolean.
10-
In the rare case that you need the bitwise inversion of
11-
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
12-
134
* :mod:`array`:
145

156
* The ``'u'`` format code (:c:type:`wchar_t`)
@@ -20,11 +11,19 @@ Pending Removal in Python 3.16
2011

2112
* :mod:`asyncio`:
2213

23-
* :mod:`asyncio`:
24-
:func:`!asyncio.iscoroutinefunction` is deprecated
25-
and will be removed in Python 3.16,
26-
use :func:`inspect.iscoroutinefunction` instead.
27-
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
14+
* :func:`!asyncio.iscoroutinefunction` is deprecated
15+
and will be removed in Python 3.16,
16+
use :func:`inspect.iscoroutinefunction` instead.
17+
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
18+
19+
* :mod:`builtins`:
20+
21+
* Bitwise inversion on boolean types, ``~True`` or ``~False``
22+
has been deprecated since Python 3.12,
23+
as it produces surprising and unintuitive results (``-2`` and ``-1``).
24+
Use ``not x`` instead for the logical negation of a Boolean.
25+
In the rare case that you need the bitwise inversion of
26+
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
2827

2928
* :mod:`shutil`:
3029

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Pending Removal in Future Versions
1+
Pending removal in future versions
22
----------------------------------
33

44
The following APIs will be removed in the future,

Doc/library/datetime.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,19 @@ Objects of the :class:`date` type are always naive.
180180

181181
An object of type :class:`.time` or :class:`.datetime` may be aware or naive.
182182

183-
A :class:`.datetime` object *d* is aware if both of the following hold:
183+
A :class:`.datetime` object ``d`` is aware if both of the following hold:
184184

185185
1. ``d.tzinfo`` is not ``None``
186186
2. ``d.tzinfo.utcoffset(d)`` does not return ``None``
187187

188-
Otherwise, *d* is naive.
188+
Otherwise, ``d`` is naive.
189189

190-
A :class:`.time` object *t* is aware if both of the following hold:
190+
A :class:`.time` object ``t`` is aware if both of the following hold:
191191

192192
1. ``t.tzinfo`` is not ``None``
193193
2. ``t.tzinfo.utcoffset(None)`` does not return ``None``.
194194

195-
Otherwise, *t* is naive.
195+
Otherwise, ``t`` is naive.
196196

197197
The distinction between aware and naive doesn't apply to :class:`timedelta`
198198
objects.
@@ -358,8 +358,8 @@ Supported operations:
358358
+--------------------------------+-----------------------------------------------+
359359
| ``q, r = divmod(t1, t2)`` | Computes the quotient and the remainder: |
360360
| | ``q = t1 // t2`` (3) and ``r = t1 % t2``. |
361-
| | q is an integer and r is a :class:`timedelta` |
362-
| | object. |
361+
| | ``q`` is an integer and ``r`` is a |
362+
| | :class:`timedelta` object. |
363363
+--------------------------------+-----------------------------------------------+
364364
| ``+t1`` | Returns a :class:`timedelta` object with the |
365365
| | same value. (2) |
@@ -526,7 +526,7 @@ Other constructors, all class methods:
526526
January 1 of year 1 has ordinal 1.
527527

528528
:exc:`ValueError` is raised unless ``1 <= ordinal <=
529-
date.max.toordinal()``. For any date *d*,
529+
date.max.toordinal()``. For any date ``d``,
530530
``date.fromordinal(d.toordinal()) == d``.
531531

532532

@@ -730,7 +730,7 @@ Instance methods:
730730
.. method:: date.toordinal()
731731

732732
Return the proleptic Gregorian ordinal of the date, where January 1 of year 1
733-
has ordinal 1. For any :class:`date` object *d*,
733+
has ordinal 1. For any :class:`date` object ``d``,
734734
``date.fromordinal(d.toordinal()) == d``.
735735

736736

@@ -782,7 +782,7 @@ Instance methods:
782782

783783
.. method:: date.__str__()
784784

785-
For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``.
785+
For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``.
786786

787787

788788
.. method:: date.ctime()
@@ -1063,7 +1063,7 @@ Other constructors, all class methods:
10631063
is used. If the *date* argument is a :class:`.datetime` object, its time components
10641064
and :attr:`.tzinfo` attributes are ignored.
10651065

1066-
For any :class:`.datetime` object *d*,
1066+
For any :class:`.datetime` object ``d``,
10671067
``d == datetime.combine(d.date(), d.time(), d.tzinfo)``.
10681068

10691069
.. versionchanged:: 3.6
@@ -1270,11 +1270,11 @@ Supported operations:
12701270

12711271
If both are naive, or both are aware and have the same :attr:`~.datetime.tzinfo` attribute,
12721272
the :attr:`~.datetime.tzinfo` attributes are ignored, and the result is a :class:`timedelta`
1273-
object *t* such that ``datetime2 + t == datetime1``. No time zone adjustments
1273+
object ``t`` such that ``datetime2 + t == datetime1``. No time zone adjustments
12741274
are done in this case.
12751275

12761276
If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts
1277-
as if *a* and *b* were first converted to naive UTC datetimes. The
1277+
as if ``a`` and ``b`` were first converted to naive UTC datetimes. The
12781278
result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b.replace(tzinfo=None)
12791279
- b.utcoffset())`` except that the implementation never overflows.
12801280

@@ -1454,11 +1454,11 @@ Instance methods:
14541454

14551455
.. method:: datetime.utctimetuple()
14561456

1457-
If :class:`.datetime` instance *d* is naive, this is the same as
1457+
If :class:`.datetime` instance ``d`` is naive, this is the same as
14581458
``d.timetuple()`` except that :attr:`~.time.struct_time.tm_isdst` is forced to 0 regardless of what
14591459
``d.dst()`` returns. DST is never in effect for a UTC time.
14601460

1461-
If *d* is aware, *d* is normalized to UTC time, by subtracting
1461+
If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting
14621462
``d.utcoffset()``, and a :class:`time.struct_time` for the
14631463
normalized time is returned. :attr:`!tm_isdst` is forced to 0. Note
14641464
that an :exc:`OverflowError` may be raised if ``d.year`` was
@@ -1606,7 +1606,7 @@ Instance methods:
16061606

16071607
.. method:: datetime.__str__()
16081608

1609-
For a :class:`.datetime` instance *d*, ``str(d)`` is equivalent to
1609+
For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to
16101610
``d.isoformat(' ')``.
16111611

16121612

@@ -1853,7 +1853,7 @@ Instance attributes (read-only):
18531853
.. versionadded:: 3.6
18541854

18551855
:class:`.time` objects support equality and order comparisons,
1856-
where *a* is considered less than *b* when *a* precedes *b* in time.
1856+
where ``a`` is considered less than ``b`` when ``a`` precedes ``b`` in time.
18571857

18581858
Naive and aware :class:`!time` objects are never equal.
18591859
Order comparison between naive and aware :class:`!time` objects raises
@@ -2000,7 +2000,7 @@ Instance methods:
20002000

20012001
.. method:: time.__str__()
20022002

2003-
For a time *t*, ``str(t)`` is equivalent to ``t.isoformat()``.
2003+
For a time ``t``, ``str(t)`` is equivalent to ``t.isoformat()``.
20042004

20052005

20062006
.. method:: time.strftime(format)

0 commit comments

Comments
 (0)