Skip to content

Commit 3852b32

Browse files
authored
Merge branch 'main' into pythongh-126606-dont-write-incomplete-pyc-files
2 parents bffdc02 + f6b0361 commit 3852b32

File tree

218 files changed

+3112
-830
lines changed

Some content is hidden

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

218 files changed

+3112
-830
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4747
runs-on: ubuntu-24.04
4848
container:
49-
image: ghcr.io/python/autoconf:2024.10.16.11360930377
49+
image: ghcr.io/python/autoconf:2024.11.11.11786316759
5050
timeout-minutes: 60
5151
needs: check_source
5252
if: needs.check_source.outputs.run_tests == 'true'
@@ -76,7 +76,7 @@ jobs:
7676
# Check for changes in regenerated files
7777
if test -n "$changes"; then
7878
echo "Generated files not up to date."
79-
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
79+
echo "Perhaps you forgot to run make regen-configure ;)"
8080
echo "configure files must be regenerated with a specific version of autoconf."
8181
echo "$changes"
8282
echo ""

Doc/c-api/long.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,39 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
582582
.. versionadded:: 3.14
583583
584584
585+
.. c:function:: int PyLong_IsPositive(PyObject *obj)
586+
587+
Check if the integer object *obj* is positive (``obj > 0``).
588+
589+
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
590+
return ``1`` when it's positive and ``0`` otherwise. Else set an
591+
exception and return ``-1``.
592+
593+
.. versionadded:: next
594+
595+
596+
.. c:function:: int PyLong_IsNegative(PyObject *obj)
597+
598+
Check if the integer object *obj* is negative (``obj < 0``).
599+
600+
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
601+
return ``1`` when it's negative and ``0`` otherwise. Else set an
602+
exception and return ``-1``.
603+
604+
.. versionadded:: next
605+
606+
607+
.. c:function:: int PyLong_IsZero(PyObject *obj)
608+
609+
Check if the integer object *obj* is zero.
610+
611+
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
612+
return ``1`` when it's zero and ``0`` otherwise. Else set an
613+
exception and return ``-1``.
614+
615+
.. versionadded:: next
616+
617+
585618
.. c:function:: PyObject* PyLong_GetInfo(void)
586619
587620
On success, return a read only :term:`named tuple`, that holds

Doc/c-api/object.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,27 @@ Object Protocol
575575
has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set.
576576
577577
.. versionadded:: 3.13
578+
579+
.. c:function:: int PyUnstable_Object_EnableDeferredRefcount(PyObject *obj)
580+
581+
Enable `deferred reference counting <https://peps.python.org/pep-0703/#deferred-reference-counting>`_ on *obj*,
582+
if supported by the runtime. In the :term:`free-threaded <free threading>` build,
583+
this allows the interpreter to avoid reference count adjustments to *obj*,
584+
which may improve multi-threaded performance. The tradeoff is
585+
that *obj* will only be deallocated by the tracing garbage collector.
586+
587+
This function returns ``1`` if deferred reference counting is enabled on *obj*
588+
(including when it was enabled before the call),
589+
and ``0`` if deferred reference counting is not supported or if the hint was
590+
ignored by the runtime. This function is thread-safe, and cannot fail.
591+
592+
This function does nothing on builds with the :term:`GIL` enabled, which do
593+
not support deferred reference counting. This also does nothing if *obj* is not
594+
an object tracked by the garbage collector (see :func:`gc.is_tracked` and
595+
:c:func:`PyObject_GC_IsTracked`).
596+
597+
This function is intended to be used soon after *obj* is created,
598+
by the code that creates it.
599+
600+
.. versionadded:: next
601+

Doc/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@
6767

6868
# General substitutions.
6969
project = 'Python'
70-
if sphinx.version_info[:2] >= (8, 1):
71-
copyright = "2001-%Y, Python Software Foundation"
72-
else:
73-
copyright = f"2001-{time.strftime('%Y')}, Python Software Foundation"
70+
copyright = "2001 Python Software Foundation"
7471

7572
# We look for the Include/patchlevel.h file in the current Python source tree
7673
# and replace the values accordingly.

Doc/copyright.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright
44

55
Python and this documentation is:
66

7-
Copyright © 2001-2024 Python Software Foundation. All rights reserved.
7+
Copyright © 2001 Python Software Foundation. All rights reserved.
88

99
Copyright © 2000 BeOpen.com. All rights reserved.
1010

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
Pending removal in Python 3.14
22
------------------------------
33

4-
* The import system:
5-
6-
* Setting :attr:`~module.__loader__` on a module while
7-
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
8-
is deprecated. In Python 3.14, :attr:`!__loader__` will cease to be set or
9-
taken into consideration by the import system or the standard library.
10-
114
* :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
125
of :class:`!argparse.BooleanOptionalAction` are deprecated
136
and will be removed in 3.14.

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Pending removal in Python 3.16
22
------------------------------
33

4+
* The import system:
5+
6+
* Setting :attr:`~module.__loader__` on a module while
7+
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
8+
is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
9+
taken into consideration by the import system or the standard library.
10+
411
* :mod:`array`:
512

613
* The ``'u'`` format code (:c:type:`wchar_t`)

Doc/library/aifc.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:mod:`!aifc` --- Read and write AIFF and AIFC files
2+
===================================================
3+
4+
.. module:: aifc
5+
:synopsis: Removed in 3.13.
6+
:deprecated:
7+
8+
.. deprecated-removed:: 3.11 3.13
9+
10+
This module is no longer part of the Python standard library.
11+
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
12+
being deprecated in Python 3.11. The removal was decided in :pep:`594`.
13+
14+
The last version of Python that provided the :mod:`!aifc` module was
15+
`Python 3.12 <https://docs.python.org/3.12/library/aifc.html>`_.

Doc/library/asynchat.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:mod:`!asynchat` --- Asynchronous socket command/response handler
2+
=================================================================
3+
4+
.. module:: asynchat
5+
:synopsis: Removed in 3.12.
6+
:deprecated:
7+
8+
.. deprecated-removed:: 3.6 3.12
9+
10+
This module is no longer part of the Python standard library.
11+
It was :ref:`removed in Python 3.12 <whatsnew312-removed>` after
12+
being deprecated in Python 3.6. The removal was decided in :pep:`594`.
13+
14+
Applications should use the :mod:`asyncio` module instead.
15+
16+
The last version of Python that provided the :mod:`!asynchat` module was
17+
`Python 3.11 <https://docs.python.org/3.11/library/asynchat.html>`_.

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,7 @@ By default asyncio is configured to use :class:`EventLoop`.
17971797
.. seealso::
17981798

17991799
`MSDN documentation on I/O Completion Ports
1800-
<https://docs.microsoft.com/en-ca/windows/desktop/FileIO/i-o-completion-ports>`_.
1800+
<https://learn.microsoft.com/windows/win32/fileio/i-o-completion-ports>`_.
18011801

18021802
.. class:: EventLoop
18031803

0 commit comments

Comments
 (0)