Skip to content

Commit 75433c1

Browse files
Merge remote-tracking branch 'upstream/main' into properly_disable
2 parents 49533e1 + 9d1e668 commit 75433c1

File tree

258 files changed

+6395
-2647
lines changed

Some content is hidden

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

258 files changed

+6395
-2647
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
Windows
155155
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156156
needs: build-context
157-
if: fromJSON(needs.build-context.outputs.run-tests)
157+
if: fromJSON(needs.build-context.outputs.run-windows-tests)
158158
strategy:
159159
fail-fast: false
160160
matrix:
@@ -621,6 +621,7 @@ jobs:
621621
- build_wasi
622622
- build_windows
623623
- build_windows_msi
624+
- cross-build-linux
624625
- test_hypothesis
625626
- build_asan
626627
- build_tsan
@@ -654,13 +655,19 @@ jobs:
654655
build_ubuntu,
655656
build_ubuntu_ssltests,
656657
build_wasi,
657-
build_windows,
658658
build_asan,
659659
build_tsan,
660660
test_hypothesis,
661661
'
662662
|| ''
663663
}}
664+
${{
665+
!fromJSON(needs.build-context.outputs.run-windows-tests)
666+
&& '
667+
build_windows,
668+
'
669+
|| ''
670+
}}
664671
${{
665672
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
666673
&& '

.github/workflows/reusable-context.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on: # yamllint disable-line rule:truthy
2626
run-tests:
2727
description: Whether to run the regular tests
2828
value: ${{ jobs.compute-changes.outputs.run-tests }} # bool
29+
run-windows-tests:
30+
description: Whether to run the Windows tests
31+
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
2932
run-windows-msi:
3033
description: Whether to run the MSI installer smoke tests
3134
value: ${{ jobs.compute-changes.outputs.run-windows-msi }} # bool
@@ -44,6 +47,7 @@ jobs:
4447
run-docs: ${{ steps.changes.outputs.run-docs }}
4548
run-tests: ${{ steps.changes.outputs.run-tests }}
4649
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
50+
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
4751
steps:
4852
- name: Set up Python
4953
uses: actions/setup-python@v5

.github/workflows/tail-call.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- aarch64-apple-darwin/clang
4242
- x86_64-unknown-linux-gnu/gcc
4343
- aarch64-unknown-linux-gnu/gcc
44+
- free-threading
4445
llvm:
4546
- 19
4647
include:
@@ -65,6 +66,9 @@ jobs:
6566
- target: aarch64-unknown-linux-gnu/gcc
6667
architecture: aarch64
6768
runner: ubuntu-22.04-arm
69+
- target: free-threading
70+
architecture: x86_64
71+
runner: ubuntu-24.04
6872
steps:
6973
- uses: actions/checkout@v4
7074
with:
@@ -105,11 +109,20 @@ jobs:
105109
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
106110
107111
- name: Native Linux (release)
108-
if: runner.os == 'Linux'
112+
if: runner.os == 'Linux' && matrix.target != 'free-threading'
109113
run: |
110114
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
111115
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
112116
CC=clang-19 ./configure --with-tail-call-interp
113117
make all --jobs 4
114118
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
115119
120+
- name: Native Linux with free-threading (release)
121+
if: matrix.target == 'free-threading'
122+
run: |
123+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
124+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
125+
CC=clang-19 ./configure --with-tail-call-interp --disable-gil
126+
make all --jobs 4
127+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128+

Doc/c-api/bytearray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Direct API functions
7676
Resize the internal buffer of *bytearray* to *len*.
7777
Failure is a ``-1`` return with an exception set.
7878
79-
.. versionchanged:: next
79+
.. versionchanged:: 3.14
8080
A negative *len* will now result in an exception being set and -1 returned.
8181
8282

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ Object Protocol
623623
Objects that are immortal in one CPython version are not guaranteed to
624624
be immortal in another.
625625
626-
.. versionadded:: next
626+
.. versionadded:: 3.14
627627
628628
.. c:function:: int PyUnstable_TryIncRef(PyObject *obj)
629629

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
18301830
dictionary, so it is may be more efficient to call :c:func:`PyObject_GetAttr`
18311831
when accessing an attribute on the object.
18321832

1833-
It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and
1833+
It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and
18341834
:c:member:`~PyTypeObject.tp_dictoffset`.
18351835

18361836
**Inheritance:**

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Pending removal in Python 3.15
2929
* The :option:`!--cgi` flag to the :program:`python -m http.server`
3030
command-line interface has been deprecated since Python 3.13.
3131

32+
* :mod:`importlib`:
33+
34+
* ``load_module()`` method: use ``exec_module()`` instead.
35+
3236
* :class:`locale`:
3337

3438
* The :func:`~locale.getdefaultlocale` function
@@ -92,3 +96,9 @@ Pending removal in Python 3.15
9296
and :meth:`~wave.Wave_read.getmarkers` methods of
9397
the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes
9498
have been deprecated since Python 3.13.
99+
100+
* :mod:`zipimport`:
101+
102+
* :meth:`~zipimport.zipimporter.load_module` has been deprecated since
103+
Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead.
104+
(Contributed by Jiahao Li in :gh:`125746`.)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ although there is currently no date scheduled for their removal.
6363

6464
* :mod:`importlib`:
6565

66-
* ``load_module()`` method: use ``exec_module()`` instead.
6766
* :func:`~importlib.util.cache_from_source` *debug_override* parameter is
6867
deprecated: use the *optimization* parameter instead.
6968

@@ -152,6 +151,3 @@ although there is currently no date scheduled for their removal.
152151
:class:`~xml.etree.ElementTree.Element` is deprecated. In a future release it
153152
will always return ``True``. Prefer explicit ``len(elem)`` or
154153
``elem is not None`` tests instead.
155-
156-
* :meth:`zipimport.zipimporter.load_module` is deprecated:
157-
use :meth:`~zipimport.zipimporter.exec_module` instead.

Doc/library/asyncio-graph.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ a suspended *future*. These utilities and the underlying machinery
1717
can be used from within a Python program or by external profilers
1818
and debuggers.
1919

20-
.. versionadded:: next
20+
.. versionadded:: 3.14
2121

2222

2323
.. function:: print_call_graph(future=None, /, *, file=None, depth=1, limit=None)

Doc/library/contextvars.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,21 @@ Context Variables
101101
the value of the variable to what it was before the corresponding
102102
*set*.
103103

104+
The token supports :ref:`context manager protocol <context-managers>`
105+
to restore the corresponding context variable value at the exit from
106+
:keyword:`with` block::
107+
108+
var = ContextVar('var', default='default value')
109+
110+
with var.set('new value'):
111+
assert var.get() == 'new value'
112+
113+
assert var.get() == 'default value'
114+
115+
.. versionadded:: next
116+
117+
Added support for usage as a context manager.
118+
104119
.. attribute:: Token.var
105120

106121
A read-only property. Points to the :class:`ContextVar` object

0 commit comments

Comments
 (0)