Skip to content

Commit 5f206e9

Browse files
Merge branch 'main' into gh-122679
2 parents 58091f7 + d6b3e78 commit 5f206e9

File tree

329 files changed

+5749
-2158
lines changed

Some content is hidden

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

329 files changed

+5749
-2158
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ configure* @erlend-aasland @corona10
1616
Makefile.pre.in @erlend-aasland
1717
Modules/Setup* @erlend-aasland
1818

19+
# argparse
20+
**/*argparse* @savannahostrowski
21+
1922
# asyncio
2023
**/*asyncio* @1st1 @asvetlov @kumaraditya303 @willingc
2124

2225
# Core
2326
**/*context* @1st1
2427
**/*genobject* @markshannon
2528
**/*hamt* @1st1
26-
**/*jit* @brandtbucher
29+
**/*jit* @brandtbucher @savannahostrowski
2730
Objects/set* @rhettinger
2831
Objects/dict* @methane @markshannon
2932
Objects/typevarobject.c @JelleZijlstra

.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/marshal.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ binary mode.
1313

1414
Numeric values are stored with the least significant byte first.
1515

16-
The module supports two versions of the data format: version 0 is the
17-
historical version, version 1 shares interned strings in the file, and upon
18-
unmarshalling. Version 2 uses a binary format for floating-point numbers.
19-
``Py_MARSHAL_VERSION`` indicates the current file format (currently 2).
16+
The module supports several versions of the data format; see
17+
the :py:mod:`Python module documentation <marshal>` for details.
2018

19+
.. c:macro:: Py_MARSHAL_VERSION
20+
21+
The current format version. See :py:data:`marshal.version`.
2122

2223
.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)
2324

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/data/refcounts.dat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,19 @@ PyLong_FromUnsignedLong:unsignedlong:v::
12841284
PyLong_FromVoidPtr:PyObject*::+1:
12851285
PyLong_FromVoidPtr:void*:p::
12861286

1287+
PyLong_IsPositive:int:::
1288+
PyLong_IsPositive:PyObject*:obj:0:
1289+
1290+
PyLong_IsNegative:int:::
1291+
PyLong_IsNegative:PyObject*:obj:0:
1292+
1293+
PyLong_IsZero:int:::
1294+
PyLong_IsZero:PyObject*:obj:0:
1295+
1296+
PyLong_GetSign:int:::
1297+
PyLong_GetSign:PyObject*:v:0:
1298+
PyLong_GetSign:int*:sign::
1299+
12871300
PyMapping_Check:int:::
12881301
PyMapping_Check:PyObject*:o:0:
12891302

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>`_.

0 commit comments

Comments
 (0)