Skip to content

Commit

Permalink
Merge branch 'main' into pthread_jit_write_protect_np
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher authored Nov 7, 2024
2 parents 4e5a0b5 + 09d6f5d commit 3d384fa
Show file tree
Hide file tree
Showing 141 changed files with 3,635 additions and 1,311 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
displayName: Pre-build checks

pool:
vmImage: ubuntu-22.04
vmImage: ubuntu-24.04

steps:
- template: ./prebuild-checks.yml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
name: 'Check if generated files are up to date'
# Don't use ubuntu-latest but a specific version to make the job
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 60
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:

test_hypothesis:
name: "Hypothesis tests on Ubuntu"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 60
needs: check_source
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
Expand Down Expand Up @@ -417,7 +417,7 @@ jobs:
if: needs.check_source.outputs.run_tests == 'true'
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
env:
OPENSSL_VER: 3.0.15
PYTHONSTRICTEXTENSIONBUILD: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ jobs:
brew update
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
brew install llvm@${{ matrix.llvm }}
SDKROOT="$(xcrun --show-sdk-path)" \
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
export SDKROOT="$(xcrun --show-sdk-path)"
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
make all --jobs 4
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/posix-deps-apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ apt-get -yq install \
libgdbm-dev \
libgdbm-compat-dev \
liblzma-dev \
libmpdec-dev \
libncurses5-dev \
libreadline6-dev \
libsqlite3-dev \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
build_tsan_reusable:
name: 'Thread sanitizer'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
env:
FORCE_COLOR: 1
OPENSSL_VER: 3.0.15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build_wasi_reusable:
name: 'build and test'
timeout-minutes: 60
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
WASMTIME_VERSION: 22.0.0
WASI_SDK_VERSION: 24
Expand Down
6 changes: 2 additions & 4 deletions Doc/c-api/allocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ Allocating Objects on the Heap
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
Initialize a newly allocated object *op* with its type and initial
reference. Returns the initialized object. If *type* indicates that the
object participates in the cyclic garbage detector, it is added to the
detector's set of observed objects. Other fields of the object are not
affected.
reference. Returns the initialized object. Other fields of the object are
not affected.
.. c:function:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)
Expand Down
14 changes: 7 additions & 7 deletions Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ This is done by filling a :c:type:`PyType_Spec` structure and calling
.. _number-structs:

Number Object Structures
========================
------------------------

.. sectionauthor:: Amaury Forgeot d'Arc

Expand Down Expand Up @@ -2344,7 +2344,7 @@ Number Object Structures
.. _mapping-structs:

Mapping Object Structures
=========================
-------------------------

.. sectionauthor:: Amaury Forgeot d'Arc

Expand Down Expand Up @@ -2381,7 +2381,7 @@ Mapping Object Structures
.. _sequence-structs:

Sequence Object Structures
==========================
--------------------------

.. sectionauthor:: Amaury Forgeot d'Arc

Expand Down Expand Up @@ -2461,7 +2461,7 @@ Sequence Object Structures
.. _buffer-structs:

Buffer Object Structures
========================
------------------------

.. sectionauthor:: Greg J. Stein <[email protected]>
.. sectionauthor:: Benjamin Peterson
Expand Down Expand Up @@ -2556,7 +2556,7 @@ Buffer Object Structures


Async Object Structures
=======================
-----------------------

.. sectionauthor:: Yury Selivanov <[email protected]>

Expand Down Expand Up @@ -2624,7 +2624,7 @@ Async Object Structures
.. _slot-typedefs:

Slot Type typedefs
==================
------------------

.. c:type:: PyObject *(*allocfunc)(PyTypeObject *cls, Py_ssize_t nitems)
Expand Down Expand Up @@ -2733,7 +2733,7 @@ Slot Type typedefs
.. _typedef-examples:

Examples
========
--------

The following are simple examples of Python type definitions. They
include common usage you may encounter. Some demonstrate tricky corner
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
Expand Up @@ -103,13 +103,6 @@ Pending removal in Python 3.14
if :ref:`named placeholders <sqlite3-placeholders>` are used and
*parameters* is a sequence instead of a :class:`dict`.

* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
deprecated in :pep:`626`
since 3.10 and was planned to be removed in 3.12,
but it only got a proper :exc:`DeprecationWarning` in 3.12.
May be removed in 3.14.
(Contributed by Nikita Sobolev in :gh:`101866`.)

* :mod:`typing`: :class:`!typing.ByteString`, deprecated since Python 3.9,
now causes a :exc:`DeprecationWarning` to be emitted when it is used.

Expand Down
9 changes: 9 additions & 0 deletions Doc/deprecations/pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ Pending removal in Python 3.15
but the C version allows any number of positional or keyword arguments,
ignoring every argument.

* :mod:`types`:

* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
deprecated in :pep:`626`
since 3.10 and was planned to be removed in 3.12,
but it only got a proper :exc:`DeprecationWarning` in 3.12.
May be removed in 3.15.
(Contributed by Nikita Sobolev in :gh:`101866`.)

* :mod:`typing`:

* The undocumented keyword argument syntax for creating
Expand Down
7 changes: 2 additions & 5 deletions Doc/howto/logging-cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1267,11 +1267,8 @@ to adapt in your own applications.

You could also write your own handler which uses the :class:`~multiprocessing.Lock`
class from the :mod:`multiprocessing` module to serialize access to the
file from your processes. The existing :class:`FileHandler` and subclasses do
not make use of :mod:`multiprocessing` at present, though they may do so in the
future. Note that at present, the :mod:`multiprocessing` module does not provide
working lock functionality on all platforms (see
https://bugs.python.org/issue3770).
file from your processes. The stdlib :class:`FileHandler` and subclasses do
not make use of :mod:`multiprocessing`.

.. currentmodule:: logging.handlers

Expand Down
31 changes: 28 additions & 3 deletions Doc/library/configparser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,13 @@ interpolation if an option used is not defined elsewhere. ::
ConfigParser Objects
--------------------

.. class:: ConfigParser(defaults=None, dict_type=dict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT, interpolation=BasicInterpolation(), converters={})
.. class:: ConfigParser(defaults=None, dict_type=dict, allow_no_value=False, *, \
delimiters=('=', ':'), comment_prefixes=('#', ';'), \
inline_comment_prefixes=None, strict=True, \
empty_lines_in_values=True, \
default_section=configparser.DEFAULTSECT, \
interpolation=BasicInterpolation(), converters={}, \
allow_unnamed_section=False)

The main configuration parser. When *defaults* is given, it is initialized
into the dictionary of intrinsic defaults. When *dict_type* is given, it
Expand Down Expand Up @@ -990,6 +996,10 @@ ConfigParser Objects
converter gets its own corresponding :meth:`!get*` method on the parser
object and section proxies.

When *allow_unnamed_section* is ``True`` (default: ``False``),
the first section name can be omitted. See the
`"Unnamed Sections" section <#unnamed-sections>`_.

It is possible to read several configurations into a single
:class:`ConfigParser`, where the most recently added configuration has the
highest priority. Any conflicting keys are taken from the more recent
Expand Down Expand Up @@ -1039,6 +1049,9 @@ ConfigParser Objects
Raise a :exc:`MultilineContinuationError` when *allow_no_value* is
``True``, and a key without a value is continued with an indented line.

.. versionchanged:: 3.13
The *allow_unnamed_section* argument was added.

.. method:: defaults()

Return a dictionary containing the instance-wide defaults.
Expand Down Expand Up @@ -1295,18 +1308,30 @@ RawConfigParser Objects
comment_prefixes=('#', ';'), \
inline_comment_prefixes=None, strict=True, \
empty_lines_in_values=True, \
default_section=configparser.DEFAULTSECT[, \
interpolation])
default_section=configparser.DEFAULTSECT, \
interpolation=BasicInterpolation(), converters={}, \
allow_unnamed_section=False)
Legacy variant of the :class:`ConfigParser`. It has interpolation
disabled by default and allows for non-string section names, option
names, and values via its unsafe ``add_section`` and ``set`` methods,
as well as the legacy ``defaults=`` keyword argument handling.

.. versionchanged:: 3.2
*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*,
*empty_lines_in_values*, *default_section* and *interpolation* were
added.

.. versionchanged:: 3.5
The *converters* argument was added.

.. versionchanged:: 3.8
The default *dict_type* is :class:`dict`, since it now preserves
insertion order.

.. versionchanged:: 3.13
The *allow_unnamed_section* argument was added.

.. note::
Consider using :class:`ConfigParser` instead which checks types of
the values to be stored internally. If you don't want interpolation, you
Expand Down
23 changes: 22 additions & 1 deletion Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,13 @@ iterations of the loop.
This opcode is now only used in situations where the local variable is
guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`.

.. opcode:: LOAD_FAST_LOAD_FAST (var_nums)

Pushes references to ``co_varnames[var_nums >> 4]`` and
``co_varnames[var_nums & 15]`` onto the stack.

.. versionadded:: 3.13

.. opcode:: LOAD_FAST_CHECK (var_num)

Pushes a reference to the local ``co_varnames[var_num]`` onto the stack,
Expand All @@ -1415,6 +1422,20 @@ iterations of the loop.

Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``.

.. opcode:: STORE_FAST_STORE_FAST (var_nums)

Stores ``STACK[-1]`` into ``co_varnames[var_nums >> 4]``
and ``STACK[-2]`` into ``co_varnames[var_nums & 15]``.

.. versionadded:: 3.13

.. opcode:: STORE_FAST_LOAD_FAST (var_nums)

Stores ``STACK.pop()`` into the local ``co_varnames[var_nums >> 4]``
and pushes a reference to the local ``co_varnames[var_nums & 15]``
onto the stack.

.. versionadded:: 3.13

.. opcode:: DELETE_FAST (var_num)

Expand Down Expand Up @@ -1562,7 +1583,7 @@ iterations of the loop.

.. opcode:: MAKE_FUNCTION

Pushes a new function object on the stack built from the code object at ``STACK[1]``.
Pushes a new function object on the stack built from the code object at ``STACK[-1]``.

.. versionchanged:: 3.10
Flag value ``0x04`` is a tuple of strings instead of dictionary
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ Number-theoretic and representation functions

Roughly equivalent to::

sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))
sum(map(operator.mul, p, q, strict=True))

For float and mixed int/float inputs, the intermediate products
and sums are computed with extended precision.
Expand Down
Loading

0 comments on commit 3d384fa

Please sign in to comment.