Skip to content

Commit 52fd5ab

Browse files
committed
Merge branch 'main' into clang-pgo
2 parents 1aae65d + 07f5e33 commit 52fd5ab

File tree

98 files changed

+4584
-2002
lines changed

Some content is hidden

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

98 files changed

+4584
-2002
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/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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ Pending removal in Python 3.15
9696
and :meth:`~wave.Wave_read.getmarkers` methods of
9797
the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes
9898
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,3 @@ although there is currently no date scheduled for their removal.
151151
:class:`~xml.etree.ElementTree.Element` is deprecated. In a future release it
152152
will always return ``True``. Prefer explicit ``len(elem)`` or
153153
``elem is not None`` tests instead.
154-
155-
* :meth:`zipimport.zipimporter.load_module` is deprecated:
156-
use :meth:`~zipimport.zipimporter.exec_module` instead.

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

Doc/library/traceback.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ Module-Level Functions
257257

258258
.. versionadded:: 3.5
259259

260+
.. versionchanged:: 3.14
261+
This function previously returned a generator that would walk the stack
262+
when first iterated over. The generator returned now is the state of the
263+
stack when ``walk_stack`` is called.
264+
260265
.. function:: walk_tb(tb)
261266

262267
Walk a traceback following :attr:`~traceback.tb_next` yielding the frame and

Doc/library/zipimport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ zipimporter Objects
148148
qualified (dotted) module name. Returns the imported module on success,
149149
raises :exc:`ZipImportError` on failure.
150150

151-
.. deprecated:: 3.10
151+
.. deprecated-removed:: 3.10 3.15
152152

153153
Use :meth:`exec_module` instead.
154154

Doc/using/editors.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
There are a number of IDEs that support Python programming language.
1010
Many editors and IDEs provide syntax highlighting, debugging tools, and :pep:`8` checks.
1111

12+
13+
IDLE --- Python editor and shell
14+
================================
15+
16+
IDLE is Python’s Integrated Development and Learning Environment and is generally bundled with Python installs.
17+
If you are on Linux and do not have IDLE installed see :ref:`Installing IDLE on Linux <installing_idle_on_linux>`.
18+
For more information see the :ref:`IDLE docs <idle>`.
19+
20+
21+
Other Editors and IDEs
22+
======================
23+
24+
Python's community wiki has information submitted by the community on Editors and IDEs.
1225
Please go to `Python Editors <https://wiki.python.org/moin/PythonEditors>`_ and
1326
`Integrated Development Environments <https://wiki.python.org/moin/IntegratedDevelopmentEnvironments>`_
1427
for a comprehensive list.

0 commit comments

Comments
 (0)