Skip to content

Commit c611710

Browse files
authored
Merge branch 'main' into gh-139282-match-recursive
2 parents ac8f149 + 89b5571 commit c611710

Some content is hidden

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

59 files changed

+2116
-318
lines changed

.github/workflows/jit.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,34 @@ jobs:
134134
make all --jobs 4
135135
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
136136
137+
jit-with-disabled-gil:
138+
name: Free-Threaded (Debug)
139+
needs: interpreter
140+
runs-on: ubuntu-24.04
141+
timeout-minutes: 90
142+
strategy:
143+
fail-fast: false
144+
matrix:
145+
llvm:
146+
- 19
147+
steps:
148+
- uses: actions/checkout@v4
149+
with:
150+
persist-credentials: false
151+
- uses: actions/setup-python@v5
152+
with:
153+
python-version: '3.11'
154+
- name: Build with JIT enabled and GIL disabled
155+
run: |
156+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
157+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
158+
./configure --enable-experimental-jit --with-pydebug --disable-gil
159+
make all --jobs 4
160+
- name: Run tests
161+
run: |
162+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163+
continue-on-error: true
164+
137165
no-opt-jit:
138166
name: JIT without optimizations (Debug)
139167
needs: interpreter
@@ -160,31 +188,3 @@ jobs:
160188
- name: Run tests without optimizations
161189
run: |
162190
PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163-
164-
# XXX: GH-133171
165-
# jit-with-disabled-gil:
166-
# name: Free-Threaded (Debug)
167-
# needs: interpreter
168-
# runs-on: ubuntu-24.04
169-
# timeout-minutes: 90
170-
# strategy:
171-
# fail-fast: false
172-
# matrix:
173-
# llvm:
174-
# - 19
175-
# steps:
176-
# - uses: actions/checkout@v4
177-
# with:
178-
# persist-credentials: false
179-
# - uses: actions/setup-python@v5
180-
# with:
181-
# python-version: '3.11'
182-
# - name: Build with JIT enabled and GIL disabled
183-
# run: |
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"
186-
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
187-
# make all --jobs 4
188-
# - name: Run tests
189-
# run: |
190-
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Doc/c-api/weakref.rst

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,6 @@ as much as it can.
6464
.. versionadded:: 3.13
6565
6666
67-
.. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref)
68-
69-
Return a :term:`borrowed reference` to the referenced object from a weak
70-
reference, *ref*. If the referent is no longer live, returns ``Py_None``.
71-
72-
.. note::
73-
74-
This function returns a :term:`borrowed reference` to the referenced object.
75-
This means that you should always call :c:func:`Py_INCREF` on the object
76-
except when it cannot be destroyed before the last usage of the borrowed
77-
reference.
78-
79-
.. deprecated-removed:: 3.13 3.15
80-
Use :c:func:`PyWeakref_GetRef` instead.
81-
82-
83-
.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
84-
85-
Similar to :c:func:`PyWeakref_GetObject`, but does no error checking.
86-
87-
.. deprecated-removed:: 3.13 3.15
88-
Use :c:func:`PyWeakref_GetRef` instead.
89-
90-
9167
.. c:function:: int PyWeakref_IsDead(PyObject *ref)
9268
9369
Test if the weak reference *ref* is dead. Returns 1 if the reference is

Doc/data/refcounts.dat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,12 +2947,6 @@ PyWeakref_CheckProxy:PyObject*:ob:0:
29472947
PyWeakref_CheckRef:int:::
29482948
PyWeakref_CheckRef:PyObject*:ob:0:
29492949

2950-
PyWeakref_GET_OBJECT:PyObject*::0:
2951-
PyWeakref_GET_OBJECT:PyObject*:ref:0:
2952-
2953-
PyWeakref_GetObject:PyObject*::0:
2954-
PyWeakref_GetObject:PyObject*:ref:0:
2955-
29562950
PyWeakref_GetRef:int:::
29572951
PyWeakref_GetRef:PyObject*:ref:0:
29582952
PyWeakref_GetRef:PyObject**:pobj:+1:

Doc/data/stable_abi.dat

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pending removal in Python 3.15
33

44
* The :c:func:`!PyImport_ImportModuleNoBlock`:
55
Use :c:func:`PyImport_ImportModule` instead.
6-
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
6+
* :c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`:
77
Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project
88
<https://github.com/python/pythoncapi-compat/>`__ can be used to get
99
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.

Doc/howto/free-threading-extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ that return :term:`strong references <strong reference>`.
173173
+-----------------------------------+-----------------------------------+
174174
| :c:func:`PyDict_Next` | none (see :ref:`PyDict_Next`) |
175175
+-----------------------------------+-----------------------------------+
176-
| :c:func:`PyWeakref_GetObject` | :c:func:`PyWeakref_GetRef` |
176+
| :c:func:`!PyWeakref_GetObject` | :c:func:`PyWeakref_GetRef` |
177177
+-----------------------------------+-----------------------------------+
178-
| :c:func:`PyWeakref_GET_OBJECT` | :c:func:`PyWeakref_GetRef` |
178+
| :c:func:`!PyWeakref_GET_OBJECT` | :c:func:`PyWeakref_GetRef` |
179179
+-----------------------------------+-----------------------------------+
180180
| :c:func:`PyImport_AddModule` | :c:func:`PyImport_AddModuleRef` |
181181
+-----------------------------------+-----------------------------------+

Doc/library/codecs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ particular, the following variants typically exist:
13391339
+-----------------+--------------------------------+--------------------------------+
13401340
| utf_8 | U8, UTF, utf8, cp65001 | all languages |
13411341
+-----------------+--------------------------------+--------------------------------+
1342-
| utf_8_sig | | all languages |
1342+
| utf_8_sig | utf8-sig | all languages |
13431343
+-----------------+--------------------------------+--------------------------------+
13441344

13451345
.. versionchanged:: 3.4

Doc/library/typing.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,19 +2435,6 @@ types.
24352435
Using :func:`super` (and the ``__class__`` :term:`closure variable`) in methods of ``NamedTuple`` subclasses
24362436
is unsupported and causes a :class:`TypeError`.
24372437

2438-
.. deprecated-removed:: 3.13 3.15
2439-
The undocumented keyword argument syntax for creating NamedTuple classes
2440-
(``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed
2441-
in 3.15. Use the class-based syntax or the functional syntax instead.
2442-
2443-
.. deprecated-removed:: 3.13 3.15
2444-
When using the functional syntax to create a NamedTuple class, failing to
2445-
pass a value to the 'fields' parameter (``NT = NamedTuple("NT")``) is
2446-
deprecated. Passing ``None`` to the 'fields' parameter
2447-
(``NT = NamedTuple("NT", None)``) is also deprecated. Both will be
2448-
disallowed in Python 3.15. To create a NamedTuple class with 0 fields,
2449-
use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``.
2450-
24512438
.. class:: NewType(name, tp)
24522439

24532440
Helper class to create low-overhead :ref:`distinct types <distinct>`.
@@ -2823,13 +2810,6 @@ types.
28232810
.. versionchanged:: 3.13
28242811
Support for the :data:`ReadOnly` qualifier was added.
28252812

2826-
.. deprecated-removed:: 3.13 3.15
2827-
When using the functional syntax to create a TypedDict class, failing to
2828-
pass a value to the 'fields' parameter (``TD = TypedDict("TD")``) is
2829-
deprecated. Passing ``None`` to the 'fields' parameter
2830-
(``TD = TypedDict("TD", None)``) is also deprecated. Both will be
2831-
disallowed in Python 3.15. To create a TypedDict class with 0 fields,
2832-
use ``class TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``.
28332813

28342814
Protocols
28352815
---------

Doc/whatsnew/3.11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,7 @@ Removed
26732673

26742674
(Contributed by Victor Stinner in :issue:`45474`.)
26752675

2676-
* Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never
2676+
* Exclude :c:func:`!PyWeakref_GET_OBJECT` from the limited C API. It never
26772677
worked since the :c:type:`!PyWeakReference` structure is opaque in the
26782678
limited C API.
26792679
(Contributed by Victor Stinner in :issue:`35134`.)

Doc/whatsnew/3.13.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,7 +2246,7 @@ New Features
22462246
(Contributed by Serhiy Storchaka in :gh:`110289`.)
22472247

22482248
* Add the :c:func:`PyWeakref_GetRef` function
2249-
as an alternative to :c:func:`PyWeakref_GetObject`
2249+
as an alternative to :c:func:`!PyWeakref_GetObject`
22502250
that returns a :term:`strong reference`
22512251
or ``NULL`` if the referent is no longer live.
22522252
(Contributed by Victor Stinner in :gh:`105927`.)
@@ -2531,8 +2531,8 @@ Deprecated C APIs
25312531
are just aliases to :c:type:`!wchar_t`.
25322532
(Contributed by Victor Stinner in :gh:`105156`.)
25332533

2534-
* Deprecate the :c:func:`PyWeakref_GetObject` and
2535-
:c:func:`PyWeakref_GET_OBJECT` functions,
2534+
* Deprecate the :c:func:`!PyWeakref_GetObject` and
2535+
:c:func:`!PyWeakref_GET_OBJECT` functions,
25362536
which return a :term:`borrowed reference`.
25372537
Replace them with the new :c:func:`PyWeakref_GetRef` function,
25382538
which returns a :term:`strong reference`.

0 commit comments

Comments
 (0)