Skip to content

Commit 363a96c

Browse files
authored
Merge branch 'main' into pthread_jit_write_protect_np
2 parents a2e5f6c + 7d7d56d commit 363a96c

File tree

108 files changed

+1403
-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.

108 files changed

+1403
-830
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ Objects/exceptions.c @iritkatriel
8888
**/sha* @gpshead @tiran
8989
Modules/md5* @gpshead @tiran
9090
**/*blake* @gpshead @tiran
91-
Modules/_blake2/** @gpshead @tiran
9291
Modules/_hacl/** @gpshead
9392

9493
# logging
@@ -255,8 +254,8 @@ Modules/_interp*module.c @ericsnowcurrently
255254
Lib/test/test_interpreters/ @ericsnowcurrently
256255

257256
# Android
258-
**/*Android* @mhsmith
259-
**/*android* @mhsmith
257+
**/*Android* @mhsmith @freakboy3742
258+
**/*android* @mhsmith @freakboy3742
260259

261260
# iOS (but not termios)
262261
**/iOS* @freakboy3742
@@ -267,7 +266,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
267266
**/*-ios* @freakboy3742
268267

269268
# WebAssembly
270-
/Tools/wasm/ @brettcannon
269+
/Tools/wasm/ @brettcannon @freakboy3742
271270

272271
# SBOM
273272
/Misc/externals.spdx.json @sethmlarson

.github/workflows/jit.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-22.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
@@ -61,7 +61,7 @@ jobs:
6161
- true
6262
- false
6363
llvm:
64-
- 18
64+
- 19
6565
include:
6666
- target: i686-pc-windows-msvc/msvc
6767
architecture: Win32
@@ -85,19 +85,19 @@ jobs:
8585
compiler: clang
8686
- target: x86_64-unknown-linux-gnu/gcc
8787
architecture: x86_64
88-
runner: ubuntu-latest
88+
runner: ubuntu-22.04
8989
compiler: gcc
9090
- target: x86_64-unknown-linux-gnu/clang
9191
architecture: x86_64
92-
runner: ubuntu-latest
92+
runner: ubuntu-22.04
9393
compiler: clang
9494
- target: aarch64-unknown-linux-gnu/gcc
9595
architecture: aarch64
96-
runner: ubuntu-latest
96+
runner: ubuntu-22.04
9797
compiler: gcc
9898
- target: aarch64-unknown-linux-gnu/clang
9999
architecture: aarch64
100-
runner: ubuntu-latest
100+
runner: ubuntu-22.04
101101
compiler: clang
102102
env:
103103
CC: ${{ matrix.compiler }}
@@ -121,10 +121,15 @@ jobs:
121121
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
122122
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
123123
124+
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
125+
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
126+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
127+
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
124128
- name: Native macOS
125129
if: runner.os == 'macOS'
126130
run: |
127131
brew update
132+
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
128133
brew install llvm@${{ matrix.llvm }}
129134
SDKROOT="$(xcrun --show-sdk-path)" \
130135
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
@@ -164,16 +169,20 @@ jobs:
164169
jit-with-disabled-gil:
165170
name: Free-Threaded (Debug)
166171
needs: interpreter
167-
runs-on: ubuntu-latest
172+
runs-on: ubuntu-22.04
173+
strategy:
174+
matrix:
175+
llvm:
176+
- 19
168177
steps:
169178
- uses: actions/checkout@v4
170179
- uses: actions/setup-python@v5
171180
with:
172181
python-version: '3.11'
173182
- name: Build with JIT enabled and GIL disabled
174183
run: |
175-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
176-
export PATH="$(llvm-config-18 --bindir):$PATH"
184+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
185+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
177186
./configure --enable-experimental-jit --with-pydebug --disable-gil
178187
make all --jobs 4
179188
- name: Run tests

Doc/c-api/conversion.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The following functions provide locale-independent string to number conversions.
105105
106106
If ``s`` represents a value that is too large to store in a float
107107
(for example, ``"1e500"`` is such a string on many platforms) then
108-
if ``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with
108+
if ``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with
109109
an appropriate sign) and don't set any exception. Otherwise,
110110
``overflow_exception`` must point to a Python exception object;
111111
raise that exception and return ``-1.0``. In both cases, set

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ slot typedefs
355355
+-----------------------------+-----------------------------+----------------------+
356356
| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * |
357357
| | | |
358-
| | :c:type:`PyObject` * | |
358+
| | :c:type:`PyTypeObject` * | |
359359
| | :c:type:`PyObject` * | |
360360
| | :c:type:`PyObject` * | |
361361
+-----------------------------+-----------------------------+----------------------+
@@ -2647,7 +2647,7 @@ Slot Type typedefs
26472647
26482648
See :c:member:`~PyTypeObject.tp_free`.
26492649

2650-
.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *)
2650+
.. c:type:: PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *)
26512651
26522652
See :c:member:`~PyTypeObject.tp_new`.
26532653

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Pending removal in Python 3.14
8585
:meth:`~pathlib.PurePath.relative_to`: passing additional arguments is
8686
deprecated.
8787

88-
* :mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader`
88+
* :mod:`pkgutil`: :func:`!pkgutil.find_loader` and :func:!pkgutil.get_loader`
8989
now raise :exc:`DeprecationWarning`;
9090
use :func:`importlib.util.find_spec` instead.
9191
(Contributed by Nikita Sobolev in :gh:`97850`.)

Doc/library/collections.abc.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ ABC Inherits from Abstract Methods Mi
143143

144144
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
145145
``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``,
146-
``__len__`` ``__sub__``, ``__xor__``, and ``isdisjoint``
146+
``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__``
147+
and ``isdisjoint``
147148

148149
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and
149150
``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``,
@@ -162,7 +163,7 @@ ABC Inherits from Abstract Methods Mi
162163
``__len__``
163164

164165

165-
:class:`MappingView` :class:`Sized` ``__len__``
166+
:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
166167
:class:`ItemsView` :class:`MappingView`, ``__contains__``,
167168
:class:`Set` ``__iter__``
168169
:class:`KeysView` :class:`MappingView`, ``__contains__``,

Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ iterations of the loop.
16471647

16481648
.. versionadded:: 3.13
16491649

1650-
.. opcode:: FORMAT_SPEC
1650+
.. opcode:: FORMAT_WITH_SPEC
16511651

16521652
Formats the given value with the given format spec::
16531653

Doc/library/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ using function-call syntax::
4444
... BLUE = 3
4545

4646
>>> # functional syntax
47-
>>> Color = Enum('Color', ['RED', 'GREEN', 'BLUE'])
47+
>>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])
4848

4949
Even though we can use :keyword:`class` syntax to create Enums, Enums
5050
are not normal Python classes. See

Doc/library/functions.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,10 @@ are always available. They are listed here in alphabetical order.
12931293

12941294
.. class:: object()
12951295

1296-
Return a new featureless object. :class:`object` is a base for all classes.
1297-
It has methods that are common to all instances of Python classes. This
1298-
function does not accept any arguments.
1296+
This is the ultimate base class of all other classes. It has methods
1297+
that are common to all instances of Python classes. When the constructor
1298+
is called, it returns a new featureless object. The constructor does not
1299+
accept any arguments.
12991300

13001301
.. note::
13011302

Doc/library/importlib.metadata.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ Distribution metadata
229229
.. class:: PackageMetadata
230230

231231
A concrete implementation of the
232-
`PackageMetadata protocol <https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata>`_.
232+
`PackageMetadata protocol <https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata>`_.
233233

234-
In addition to providing the defined protocol methods and attributes, subscripting
235-
the instance is equivalent to calling the :meth:`!get` method.
234+
In addition to providing the defined protocol methods and attributes, subscripting
235+
the instance is equivalent to calling the :meth:`!get` method.
236236

237237
Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_
238238
includes some metadata, which you can extract using the :func:`!metadata` function::

0 commit comments

Comments
 (0)