Skip to content

Commit

Permalink
Merge branch 'main' into imaginary-class-109218
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev authored Nov 14, 2024
2 parents df7fe38 + 3966d8d commit a6854ff
Show file tree
Hide file tree
Showing 218 changed files with 3,162 additions and 833 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ configure* @erlend-aasland @corona10
Makefile.pre.in @erlend-aasland
Modules/Setup* @erlend-aasland

# argparse
**/*argparse* @savannahostrowski

# asyncio
**/*asyncio* @1st1 @asvetlov @kumaraditya303 @willingc

# Core
**/*context* @1st1
**/*genobject* @markshannon
**/*hamt* @1st1
**/*jit* @brandtbucher
**/*jit* @brandtbucher @savannahostrowski
Objects/set* @rhettinger
Objects/dict* @methane @markshannon
Objects/typevarobject.c @JelleZijlstra
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
runs-on: ubuntu-24.04
container:
image: ghcr.io/python/autoconf:2024.10.16.11360930377
image: ghcr.io/python/autoconf:2024.11.11.11786316759
timeout-minutes: 60
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
# Check for changes in regenerated files
if test -n "$changes"; then
echo "Generated files not up to date."
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
echo "Perhaps you forgot to run make regen-configure ;)"
echo "configure files must be regenerated with a specific version of autoconf."
echo "$changes"
echo ""
Expand Down
33 changes: 33 additions & 0 deletions Doc/c-api/long.rst
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,39 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionadded:: 3.14
.. c:function:: int PyLong_IsPositive(PyObject *obj)
Check if the integer object *obj* is positive (``obj > 0``).
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
return ``1`` when it's positive and ``0`` otherwise. Else set an
exception and return ``-1``.
.. versionadded:: next
.. c:function:: int PyLong_IsNegative(PyObject *obj)
Check if the integer object *obj* is negative (``obj < 0``).
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
return ``1`` when it's negative and ``0`` otherwise. Else set an
exception and return ``-1``.
.. versionadded:: next
.. c:function:: int PyLong_IsZero(PyObject *obj)
Check if the integer object *obj* is zero.
If *obj* is an instance of :c:type:`PyLongObject` or its subtype,
return ``1`` when it's zero and ``0`` otherwise. Else set an
exception and return ``-1``.
.. versionadded:: next
.. c:function:: PyObject* PyLong_GetInfo(void)
On success, return a read only :term:`named tuple`, that holds
Expand Down
24 changes: 24 additions & 0 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,27 @@ Object Protocol
has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set.
.. versionadded:: 3.13
.. c:function:: int PyUnstable_Object_EnableDeferredRefcount(PyObject *obj)
Enable `deferred reference counting <https://peps.python.org/pep-0703/#deferred-reference-counting>`_ on *obj*,
if supported by the runtime. In the :term:`free-threaded <free threading>` build,
this allows the interpreter to avoid reference count adjustments to *obj*,
which may improve multi-threaded performance. The tradeoff is
that *obj* will only be deallocated by the tracing garbage collector.
This function returns ``1`` if deferred reference counting is enabled on *obj*
(including when it was enabled before the call),
and ``0`` if deferred reference counting is not supported or if the hint was
ignored by the runtime. This function is thread-safe, and cannot fail.
This function does nothing on builds with the :term:`GIL` enabled, which do
not support deferred reference counting. This also does nothing if *obj* is not
an object tracked by the garbage collector (see :func:`gc.is_tracked` and
:c:func:`PyObject_GC_IsTracked`).
This function is intended to be used soon after *obj* is created,
by the code that creates it.
.. versionadded:: next
5 changes: 1 addition & 4 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@

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

# We look for the Include/patchlevel.h file in the current Python source tree
# and replace the values accordingly.
Expand Down
2 changes: 1 addition & 1 deletion Doc/copyright.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright

Python and this documentation is:

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

Copyright © 2000 BeOpen.com. All rights reserved.

Expand Down
15 changes: 15 additions & 0 deletions Doc/library/aifc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:mod:`!aifc` --- Read and write AIFF and AIFC files
===================================================

.. module:: aifc
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

The last version of Python that provided the :mod:`!aifc` module was
`Python 3.12 <https://docs.python.org/3.12/library/aifc.html>`_.
17 changes: 17 additions & 0 deletions Doc/library/asynchat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:mod:`!asynchat` --- Asynchronous socket command/response handler
=================================================================

.. module:: asynchat
:synopsis: Removed in 3.12.
:deprecated:

.. deprecated-removed:: 3.6 3.12

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.12 <whatsnew312-removed>` after
being deprecated in Python 3.6. The removal was decided in :pep:`594`.

Applications should use the :mod:`asyncio` module instead.

The last version of Python that provided the :mod:`!asynchat` module was
`Python 3.11 <https://docs.python.org/3.11/library/asynchat.html>`_.
2 changes: 1 addition & 1 deletion Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ By default asyncio is configured to use :class:`EventLoop`.
.. seealso::

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

.. class:: EventLoop

Expand Down
17 changes: 17 additions & 0 deletions Doc/library/asyncore.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:mod:`!asyncore` --- Asynchronous socket handler
================================================

.. module:: asyncore
:synopsis: Removed in 3.12.
:deprecated:

.. deprecated-removed:: 3.6 3.12

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.12 <whatsnew312-removed>` after
being deprecated in Python 3.6. The removal was decided in :pep:`594`.

Applications should use the :mod:`asyncio` module instead.

The last version of Python that provided the :mod:`!asyncore` module was
`Python 3.11 <https://docs.python.org/3.11/library/asyncore.html>`_.
15 changes: 15 additions & 0 deletions Doc/library/audioop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:mod:`!audioop` --- Manipulate raw audio data
=============================================

.. module:: audioop
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

The last version of Python that provided the :mod:`!audioop` module was
`Python 3.12 <https://docs.python.org/3.12/library/audioop.html>`_.
19 changes: 19 additions & 0 deletions Doc/library/cgi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:mod:`!cgi` --- Common Gateway Interface support
================================================

.. module:: cgi
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`.
This is a copy of the cgi module, no longer maintained or supported by the core
Python team.

The last version of Python that provided the :mod:`!cgi` module was
`Python 3.12 <https://docs.python.org/3.12/library/cgi.html>`_.
19 changes: 19 additions & 0 deletions Doc/library/cgitb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:mod:`!cgitb` --- Traceback manager for CGI scripts
===================================================

.. module:: cgitb
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`.
This is a copy of the cgi module, no longer maintained or supported by the core
Python team.

The last version of Python that provided the :mod:`!cgitb` module was
`Python 3.12 <https://docs.python.org/3.12/library/cgitb.html>`_.
15 changes: 15 additions & 0 deletions Doc/library/chunk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:mod:`!chunk` --- Read IFF chunked data
=======================================

.. module:: chunk
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

The last version of Python that provided the :mod:`!chunk` module was
`Python 3.12 <https://docs.python.org/3.12/library/chunk.html>`_.
20 changes: 20 additions & 0 deletions Doc/library/crypt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:mod:`!crypt` --- Function to check Unix passwords
==================================================

.. module:: crypt
:synopsis: Removed in 3.13.
:deprecated:

.. deprecated-removed:: 3.11 3.13

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
being deprecated in Python 3.11. The removal was decided in :pep:`594`.

Applications can use the :mod:`hashlib` module from the standard library.
Other possible replacements are third-party libraries from PyPI:
:pypi:`legacycrypt`, :pypi:`bcrypt`, :pypi:`argon2-cffi`, or :pypi:`passlib`.
These are not supported or maintained by the Python core team.

The last version of Python that provided the :mod:`!crypt` module was
`Python 3.12 <https://docs.python.org/3.12/library/crypt.html>`_.
17 changes: 17 additions & 0 deletions Doc/library/distutils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:mod:`!distutils` --- Building and installing Python modules
============================================================

.. module:: distutils
:synopsis: Removed in 3.12.
:deprecated:

.. deprecated-removed:: 3.10 3.12

This module is no longer part of the Python standard library.
It was :ref:`removed in Python 3.12 <whatsnew312-removed-distutils>` after
being deprecated in Python 3.10. The removal was decided in :pep:`632`,
which has `migration advice
<https://peps.python.org/pep-0632/#migration-advice>`_.

The last version of Python that provided the :mod:`!distutils` module was
`Python 3.11 <https://docs.python.org/3.11/library/distutils.html>`_.
7 changes: 5 additions & 2 deletions Doc/library/functools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ The :mod:`functools` module defines the following functions:
.. versionadded:: 3.4


.. function:: reduce(function, iterable[, initial], /)
.. function:: reduce(function, iterable, /[, initial])

Apply *function* of two arguments cumulatively to the items of *iterable*, from
left to right, so as to reduce the iterable to a single value. For example,
Expand All @@ -468,7 +468,7 @@ The :mod:`functools` module defines the following functions:

initial_missing = object()

def reduce(function, iterable, initial=initial_missing, /):
def reduce(function, iterable, /, initial=initial_missing):
it = iter(iterable)
if initial is initial_missing:
value = next(it)
Expand All @@ -481,6 +481,9 @@ The :mod:`functools` module defines the following functions:
See :func:`itertools.accumulate` for an iterator that yields all intermediate
values.

.. versionchanged:: next
*initial* is now supported as a keyword argument.

.. decorator:: singledispatch

Transform a function into a :term:`single-dispatch <single
Expand Down
Loading

0 comments on commit a6854ff

Please sign in to comment.