Skip to content

Commit 6fa0e1e

Browse files
Merge branch 'main' into fix-issue-118524-match-union
2 parents 8ccc73b + 7d90b8a commit 6fa0e1e

File tree

179 files changed

+5315
-1973
lines changed

Some content is hidden

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

179 files changed

+5315
-1973
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
with:
209209
config_hash: ${{ needs.check_source.outputs.config_hash }}
210210
# macos-14 is M1, macos-13 is Intel
211-
os-matrix: '["macos-14", "macos-13"]'
211+
os-matrix: '["macos-14-xlarge", "macos-13-large"]'
212212

213213
build_macos_free_threading:
214214
name: 'macOS (free-threading)'
@@ -218,8 +218,8 @@ jobs:
218218
with:
219219
config_hash: ${{ needs.check_source.outputs.config_hash }}
220220
free-threading: true
221-
# macos-14 is M1
222-
os-matrix: '["macos-14"]'
221+
# macos-14-large is Intel with 12 cores (most parallelism)
222+
os-matrix: '["macos-14-large"]'
223223

224224
build_ubuntu:
225225
name: 'Ubuntu'

.github/workflows/jit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
jit:
2424
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
2525
runs-on: ${{ matrix.runner }}
26-
timeout-minutes: 75
26+
timeout-minutes: 90
2727
strategy:
2828
fail-fast: false
2929
matrix:

.github/workflows/posix-deps-apt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ apt-get -yq install \
1515
libgdbm-dev \
1616
libgdbm-compat-dev \
1717
liblzma-dev \
18+
libmpdec-dev \
1819
libncurses5-dev \
1920
libreadline6-dev \
2021
libsqlite3-dev \

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
--prefix=/opt/python-dev \
5151
--with-openssl="$(brew --prefix openssl@3.0)"
5252
- name: Build CPython
53-
run: make -j4
53+
run: make -j8
5454
- name: Display build info
5555
run: make pythoninfo
5656
- name: Tests

.github/workflows/reusable-tsan.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ jobs:
2929
- name: Install Dependencies
3030
run: |
3131
sudo ./.github/workflows/posix-deps-apt.sh
32-
sudo apt install -y clang
32+
# Install clang-18
33+
wget https://apt.llvm.org/llvm.sh
34+
chmod +x llvm.sh
35+
sudo ./llvm.sh 18
36+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
37+
sudo update-alternatives --set clang /usr/bin/clang-18
38+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
39+
sudo update-alternatives --set clang++ /usr/bin/clang++-18
3340
# Reduce ASLR to avoid TSAN crashing
3441
sudo sysctl -w vm.mmap_rnd_bits=28
3542
- name: TSAN Option Setup

Doc/c-api/init_config.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,10 +1250,10 @@ PyConfig
12501250
If non-zero, initialize the perf trampoline. See :ref:`perf_profiling`
12511251
for more information.
12521252
1253-
Set by :option:`-X perf <-X>` command line option and by the
1254-
:envvar:`PYTHONPERFSUPPORT` environment variable for perf support
1255-
with stack pointers and :option:`-X perfjit <-X>` command line option
1256-
and by the :envvar:`PYTHONPERFJITSUPPORT` environment variable for perf
1253+
Set by :option:`-X perf <-X>` command-line option and by the
1254+
:envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support
1255+
with stack pointers and :option:`-X perf_jit <-X>` command-line option
1256+
and by the :envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf
12571257
support with DWARF JIT information.
12581258
12591259
Default: ``-1``.

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ state:
634634
635635
.. versionadded:: 3.9
636636
637-
.. c:function:: int PyModule_ExperimentalSetGIL(PyObject *module, void *gil)
637+
.. c:function:: int PyUnstable_Module_SetGIL(PyObject *module, void *gil)
638638
639639
Indicate that *module* does or does not support running without the global
640640
interpreter lock (GIL), using one of the values from

Doc/howto/perf_profiling.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,19 @@ needs to generate unwinding information for every Python function call on the fl
216216
``perf`` will take more time to process the data because it will need to use the DWARF debugging
217217
information to unwind the stack and this is a slow process.
218218

219-
To enable this mode, you can use the environment variable :envvar:`PYTHONPERFJITSUPPORT` or the
220-
:option:`-X perfjit <-X>` option, which will enable the JIT mode for the ``perf`` profiler.
219+
To enable this mode, you can use the environment variable :envvar:`PYTHON_PERF_JIT_SUPPORT` or the
220+
:option:`-X perf_jit <-X>` option, which will enable the JIT mode for the ``perf`` profiler.
221221

222222
When using the perf JIT mode, you need an extra step before you can run ``perf report``. You need to
223223
call the ``perf inject`` command to inject the JIT information into the ``perf.data`` file.
224224

225-
$ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperfjit my_script.py
225+
$ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperf_jit my_script.py
226226
$ perf inject -i perf.data --jit
227227
$ perf report -g -i perf.data
228228

229229
or using the environment variable::
230230

231-
$ PYTHONPERFJITSUPPORT=1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
231+
$ PYTHON_PERF_JIT_SUPPORT=1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
232232
$ perf inject -i perf.data --jit
233233
$ perf report -g -i perf.data
234234

Doc/includes/email-dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main():
5353
# Guess the content type based on the file's extension. Encoding
5454
# will be ignored, although we should check for simple things like
5555
# gzip'd or compressed files.
56-
ctype, encoding = mimetypes.guess_type(path)
56+
ctype, encoding = mimetypes.guess_file_type(path)
5757
if ctype is None or encoding is not None:
5858
# No guess could be made, or the file is encoded (compressed), so
5959
# use a generic bag-of-bits type.

Doc/library/ast.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Node classes
6161

6262
.. attribute:: _fields
6363

64-
Each concrete class has an attribute :attr:`_fields` which gives the names
64+
Each concrete class has an attribute :attr:`!_fields` which gives the names
6565
of all child nodes.
6666

6767
Each instance of a concrete class has one attribute for each child node,
@@ -74,6 +74,18 @@ Node classes
7474
as Python lists. All possible attributes must be present and have valid
7575
values when compiling an AST with :func:`compile`.
7676

77+
.. attribute:: _field_types
78+
79+
The :attr:`!_field_types` attribute on each concrete class is a dictionary
80+
mapping field names (as also listed in :attr:`_fields`) to their types.
81+
82+
.. doctest::
83+
84+
>>> ast.TypeVar._field_types
85+
{'name': <class 'str'>, 'bound': ast.expr | None, 'default_value': ast.expr | None}
86+
87+
.. versionadded:: 3.13
88+
7789
.. attribute:: lineno
7890
col_offset
7991
end_lineno

0 commit comments

Comments
 (0)