Skip to content

Commit

Permalink
Catch up with main
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Nov 19, 2024
2 parents 02d4d74 + 4cd1076 commit 1bb6bd0
Show file tree
Hide file tree
Showing 476 changed files with 9,766 additions and 4,160 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
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
4 changes: 2 additions & 2 deletions .github/workflows/reusable-wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
WASI_SDK_VERSION: 24
WASI_SDK_PATH: /opt/wasi-sdk
CROSS_BUILD_PYTHON: cross-build/build
CROSS_BUILD_WASI: cross-build/wasm32-wasi
CROSS_BUILD_WASI: cross-build/wasm32-wasip1
steps:
- uses: actions/checkout@v4
# No problem resolver registered as one doesn't currently exist for Clang.
Expand All @@ -31,7 +31,7 @@ jobs:
with:
path: ${{ env.WASI_SDK_PATH }}
key: ${{ runner.os }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}
- name: "Install WASI SDK"
- name: "Install WASI SDK" # Hard-coded to x64.
if: steps.cache-wasi-sdk.outputs.cache-hit != 'true'
run: |
mkdir ${{ env.WASI_SDK_PATH }} && \
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
9 changes: 5 additions & 4 deletions Doc/c-api/marshal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ binary mode.

Numeric values are stored with the least significant byte first.

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

.. c:macro:: Py_MARSHAL_VERSION
The current format version. See :py:data:`marshal.version`.

.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)
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
13 changes: 13 additions & 0 deletions Doc/data/refcounts.dat
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,19 @@ PyLong_FromUnsignedLong:unsignedlong:v::
PyLong_FromVoidPtr:PyObject*::+1:
PyLong_FromVoidPtr:void*:p::

PyLong_IsPositive:int:::
PyLong_IsPositive:PyObject*:obj:0:

PyLong_IsNegative:int:::
PyLong_IsNegative:PyObject*:obj:0:

PyLong_IsZero:int:::
PyLong_IsZero:PyObject*:obj:0:

PyLong_GetSign:int:::
PyLong_GetSign:PyObject*:v:0:
PyLong_GetSign:int*:sign::

PyMapping_Check:int:::
PyMapping_Check:PyObject*:o:0:

Expand Down
7 changes: 0 additions & 7 deletions Doc/deprecations/pending-removal-in-3.14.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Pending removal in Python 3.14
------------------------------

* The import system:

* Setting :attr:`~module.__loader__` on a module while
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
is deprecated. In Python 3.14, :attr:`!__loader__` will cease to be set or
taken into consideration by the import system or the standard library.

* :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
of :class:`!argparse.BooleanOptionalAction` are deprecated
and will be removed in 3.14.
Expand Down
7 changes: 7 additions & 0 deletions Doc/deprecations/pending-removal-in-3.16.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Pending removal in Python 3.16
------------------------------

* The import system:

* Setting :attr:`~module.__loader__` on a module while
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
taken into consideration by the import system or the standard library.

* :mod:`array`:

* The ``'u'`` format code (:c:type:`wchar_t`)
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
6 changes: 5 additions & 1 deletion Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ and work with streams:
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, ssl_handshake_timeout=None, \
reuse_port=None, keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, start_serving=True)
Start a socket server.
Expand Down Expand Up @@ -128,6 +129,9 @@ and work with streams:
.. versionchanged:: 3.11
Added the *ssl_shutdown_timeout* parameter.

.. versionchanged:: 3.13
Added the *keep_alive* parameter.


.. rubric:: Unix Sockets

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>`_.
7 changes: 7 additions & 0 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,10 @@ is meant to be exhaustive. Notice that spelling alternatives that only differ in
case or use a hyphen instead of an underscore are also valid aliases; therefore,
e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.

On Windows, ``cpXXX`` codecs are available for all code pages.
But only codecs listed in the following table are guarantead to exist on
other platforms.

.. impl-detail::

Some common encodings can bypass the codecs lookup machinery to
Expand Down Expand Up @@ -1307,6 +1311,9 @@ particular, the following variants typically exist:
.. versionchanged:: 3.8
``cp65001`` is now an alias to ``utf_8``.

.. versionchanged:: 3.14
On Windows, ``cpXXX`` codecs are now available for all code pages.


Python Specific Encodings
-------------------------
Expand Down
Loading

0 comments on commit 1bb6bd0

Please sign in to comment.