Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c46ab0

Browse files
committed
Merge remote-tracking branch 'origin/main' into cibuildwheel
2 parentsb273bc7 +120c9d4 commit9c46ab0

File tree

752 files changed

+50834
-11256
lines changed

Some content is hidden

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

752 files changed

+50834
-11256
lines changed

‎.github/CODEOWNERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Include/internal/pycore_time.h @pganssle @abalkin
188188

189189
# AST
190190
Python/ast.c@isidentical@JelleZijlstra@eclips4
191-
Python/ast_opt.c@isidentical@eclips4
191+
Python/ast_preprocess.c@isidentical@eclips4
192192
Parser/asdl.py@isidentical@JelleZijlstra@eclips4
193193
Parser/asdl_c.py@isidentical@JelleZijlstra@eclips4
194194
Lib/ast.py@isidentical@JelleZijlstra@eclips4
@@ -320,3 +320,9 @@ Lib/test/test__colorize.py @hugovk
320320

321321
# Fuzzing
322322
Modules/_xxtestfuzz/@ammaraskar
323+
324+
# t-strings
325+
**/*interpolationobject*@lysnikolaou
326+
**/*templateobject*@lysnikolaou
327+
**/*templatelib*@lysnikolaou
328+
**/*tstring*@lysnikolaou

‎.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
fail-fast:false
265265
matrix:
266266
os:[ubuntu-24.04]
267-
openssl_ver:[3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
267+
openssl_ver:[3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
268268
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
269269
env:
270270
OPENSSL_VER:${{ matrix.openssl_ver }}
@@ -331,7 +331,7 @@ jobs:
331331
needs:build-context
332332
if:needs.build-context.outputs.run-tests == 'true'
333333
env:
334-
OPENSSL_VER:3.0.15
334+
OPENSSL_VER:3.0.16
335335
PYTHONSTRICTEXTENSIONBUILD:1
336336
steps:
337337
-uses:actions/checkout@v4
@@ -422,8 +422,9 @@ jobs:
422422
# failing when executed from inside a virtual environment.
423423
"${VENV_PYTHON}" -m test \
424424
-W \
425-
-o \
425+
--slowest \
426426
-j4 \
427+
--timeout 900 \
427428
-x test_asyncio \
428429
-x test_multiprocessing_fork \
429430
-x test_multiprocessing_forkserver \
@@ -450,7 +451,7 @@ jobs:
450451
matrix:
451452
os:[ubuntu-24.04]
452453
env:
453-
OPENSSL_VER:3.0.15
454+
OPENSSL_VER:3.0.16
454455
PYTHONSTRICTEXTENSIONBUILD:1
455456
ASAN_OPTIONS:detect_leaks=0:allocator_may_return_null=1:handle_segv=0
456457
steps:

‎.github/workflows/jit.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ jobs:
9595
with:
9696
python-version:'3.11'
9797

98+
# PCbuild downloads LLVM automatically:
9899
-name:Windows
99100
if:runner.os == 'Windows'
100101
run:|
101-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
102102
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
103103
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
104104
@@ -113,7 +113,7 @@ jobs:
113113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
114114
brew install llvm@${{ matrix.llvm }}
115115
export SDKROOT="$(xcrun --show-sdk-path)"
116-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
116+
./configure --enable-experimental-jit--enable-universalsdk --with-universal-archs=universal2${{ matrix.debug && '--with-pydebug' || '' }}
117117
make all --jobs 4
118118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
119119
@@ -126,29 +126,30 @@ jobs:
126126
make all --jobs 4
127127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128128
129-
jit-with-disabled-gil:
130-
name:Free-Threaded (Debug)
131-
needs:interpreter
132-
runs-on:ubuntu-24.04
133-
timeout-minutes:90
134-
strategy:
135-
fail-fast:false
136-
matrix:
137-
llvm:
138-
-19
139-
steps:
140-
-uses:actions/checkout@v4
141-
with:
142-
persist-credentials:false
143-
-uses:actions/setup-python@v5
144-
with:
145-
python-version:'3.11'
146-
-name:Build with JIT enabled and GIL disabled
147-
run:|
148-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
149-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
150-
./configure --enable-experimental-jit --with-pydebug --disable-gil
151-
make all --jobs 4
152-
-name:Run tests
153-
run:|
154-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
129+
# XXX: GH-133171
130+
# jit-with-disabled-gil:
131+
# name: Free-Threaded (Debug)
132+
# needs: interpreter
133+
# runs-on: ubuntu-24.04
134+
# timeout-minutes: 90
135+
# strategy:
136+
# fail-fast: false
137+
# matrix:
138+
# llvm:
139+
# - 19
140+
# steps:
141+
# - uses: actions/checkout@v4
142+
# with:
143+
# persist-credentials: false
144+
# - uses: actions/setup-python@v5
145+
# with:
146+
# python-version: '3.11'
147+
# - name: Build with JIT enabled and GIL disabled
148+
# run: |
149+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
150+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
151+
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
152+
# make all --jobs 4
153+
# - name: Run tests
154+
# run: |
155+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

‎.github/workflows/mypy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ on:
88
pull_request:
99
paths:
1010
-".github/workflows/mypy.yml"
11+
-"Lib/_colorize.py"
1112
-"Lib/_pyrepl/**"
1213
-"Lib/test/libregrtest/**"
14+
-"Lib/tomllib/**"
15+
-"Misc/mypy/**"
1316
-"Tools/build/generate_sbom.py"
1417
-"Tools/cases_generator/**"
1518
-"Tools/clinic/**"
@@ -42,6 +45,7 @@ jobs:
4245
target:[
4346
"Lib/_pyrepl",
4447
"Lib/test/libregrtest",
48+
"Lib/tomllib",
4549
"Tools/build",
4650
"Tools/cases_generator",
4751
"Tools/clinic",

‎.github/workflows/reusable-context.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
run:python Tools/build/compute-changes.py
9898
env:
9999
GITHUB_DEFAULT_BRANCH:${{ github.event.repository.default_branch }}
100+
CCF_TARGET_REF:${{ github.base_ref || github.event.repository.default_branch }}
101+
CCF_HEAD_REF:${{ github.event.pull_request.head.sha || github.sha }}
100102

101103
-name:Compute hash for config cache key
102104
id:config-hash

‎.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run:|
6767
set -Eeuo pipefail
6868
# Build docs with the nit-picky option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --warning-file sphinx-warnings.txt" html
7070
-name:'Check warnings'
7171
if:github.event_name == 'pull_request'
7272
run:|
@@ -101,4 +101,4 @@ jobs:
101101
run:make -C Doc/ PYTHON=../python venv
102102
# Use "xvfb-run" since some doctest tests open GUI windows
103103
-name:'Run documentation doctest'
104-
run:xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest
104+
run:xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,12 @@ Tools/unicode/data/
138138
# hendrikmuhs/ccache-action@v1
139139
/.ccache
140140
/cross-build/
141-
/jit_stencils.h
141+
/jit_stencils*.h
142142
/platform
143143
/profile-clean-stamp
144144
/profile-run-stamp
145145
/profile-bolt-stamp
146+
/profile-gen-stamp
146147
/pybuilddir.txt
147148
/pyconfig.h
148149
/python-config

‎.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
-repo:https://github.com/astral-sh/ruff-pre-commit
3-
rev:v0.11.6
3+
rev:v0.11.8
44
hooks:
55
-id:ruff
66
name:Run Ruff (lint) on Doc/
@@ -22,14 +22,14 @@ repos:
2222
name:Run Ruff (format) on Doc/
2323
args:[--check]
2424
files:^Doc/
25+
-id:ruff-format
26+
name:Run Ruff (format) on Tools/build/check_warnings.py
27+
args:[--check, --config=Tools/build/.ruff.toml]
28+
files:^Tools/build/check_warnings.py
2529

2630
-repo:https://github.com/psf/black-pre-commit-mirror
2731
rev:25.1.0
2832
hooks:
29-
-id:black
30-
name:Run Black on Tools/build/check_warnings.py
31-
files:^Tools/build/check_warnings.py
32-
args:[--line-length=79]
3333
-id:black
3434
name:Run Black on Tools/jit/
3535
files:^Tools/jit/

‎.ruff.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Default settings for Ruff in CPython
2+
3+
# PYTHON_FOR_REGEN
4+
target-version ="py310"
5+
6+
# PEP 8
7+
line-length =79
8+
9+
# Enable automatic fixes by default.
10+
# To override this, use ``fix = false`` in a subdirectory's config file
11+
# or ``--no-fix`` on the command line.
12+
fix =true

‎Doc/.ruff.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
extend ="../.ruff.toml"# Inherit the project-wide settings
2+
13
target-version ="py312"# Align with the version in oldest_supported_sphinx
2-
fix =true
3-
output-format ="full"
4-
line-length =79
54
extend-exclude = [
65
"includes/*",
76
# Temporary exclusions:

‎Doc/c-api/arg.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,19 @@ small to receive the value.
274274
Convert a Python integer to a C:c:expr:`unsigned long` without
275275
overflow checking.
276276

277+
..versionchanged::next
278+
Use:meth:`~object.__index__` if available.
279+
277280
``L`` (:class:`int`) [long long]
278281
Convert a Python integer to a C:c:expr:`long long`.
279282

280283
``K`` (:class:`int`) [unsigned long long]
281284
Convert a Python integer to a C:c:expr:`unsigned long long`
282285
without overflow checking.
283286

287+
..versionchanged::next
288+
Use:meth:`~object.__index__` if available.
289+
284290
``n`` (:class:`int`) [:c:type:`Py_ssize_t`]
285291
Convert a Python integer to a C:c:type:`Py_ssize_t`.
286292

@@ -669,6 +675,8 @@ Building values
669675
``L`` (:class:`int`) [long long]
670676
Convert a C :c:expr:`long long` to a Python integer object.
671677
678+
.. _capi-py-buildvalue-format-K:
679+
672680
``K`` (:class:`int`) [unsigned long long]
673681
Convert a C :c:expr:`unsigned long long` to a Python integer object.
674682

‎Doc/c-api/float.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ NaNs (if such things exist on the platform) isn't handled correctly, and
9696
attempting to unpack a bytes string containing an IEEE INF or NaN will raise an
9797
exception.
9898
99+
Note that NaNs type may not be preserved on IEEE platforms (silent NaN become
100+
quiet), for example on x86 systems in 32-bit mode.
101+
99102
On non-IEEE platforms with more precision, or larger dynamic range, than IEEE
100103
754 supports, not all values can be packed; on non-IEEE platforms with less
101104
precision, or smaller dynamic range, not all values can be unpacked. What

‎Doc/c-api/init.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ Cautions regarding runtime finalization
11311131
In the late stage of :term:`interpreter shutdown`, after attempting to wait for
11321132
non-daemon threads to exit (though this can be interrupted by
11331133
:class:`KeyboardInterrupt`) and running the :mod:`atexit` functions, the runtime
1134-
is marked as *finalizing*: :c:func:`_Py_IsFinalizing` and
1134+
is marked as *finalizing*: :c:func:`Py_IsFinalizing` and
11351135
:func:`sys.is_finalizing` return true. At this point, only the *finalization
11361136
thread* that initiated finalization (typically the main thread) is allowed to
11371137
acquire the :term:`GIL`.
@@ -1517,16 +1517,6 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
15171517
.. versionadded:: 3.8
15181518
15191519
1520-
.. c:function:: PyObject* PyUnstable_InterpreterState_GetMainModule(PyInterpreterState *interp)
1521-
1522-
Return a :term:`strong reference` to the ``__main__`` :ref:`module object <moduleobjects>`
1523-
for the given interpreter.
1524-
1525-
The caller must have an :term:`attached thread state`.
1526-
1527-
.. versionadded:: 3.13
1528-
1529-
15301520
.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
15311521
15321522
Type of a frame evaluation function.

‎Doc/c-api/init_config.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ Configuration Options
320320
* - ``"cpu_count"``
321321
-:c:member:`cpu_count <PyConfig.cpu_count>`
322322
- ``int``
323-
-Read-only
323+
-Public
324324
* - ``"dev_mode"``
325325
-:c:member:`dev_mode <PyConfig.dev_mode>`
326326
- ``bool``
@@ -363,7 +363,7 @@ Configuration Options
363363
- Read-only
364364
* - ``"import_time"``
365365
-:c:member:`import_time <PyConfig.import_time>`
366-
- ``bool``
366+
- ``int``
367367
- Read-only
368368
* - ``"inspect"``
369369
-:c:member:`inspect <PyConfig.inspect>`
@@ -619,6 +619,8 @@ Some options are read from the :mod:`sys` attributes. For example, the option
619619
The caller must have an :term:`attached thread state`. The function cannot
620620
be called before Python initialization nor after Python finalization.
621621
622+
.. audit-event:: cpython.PyConfig_Set name,value c.PyConfig_Set
623+
622624
.. versionadded:: 3.14
623625
624626
@@ -1475,13 +1477,19 @@ PyConfig
14751477
14761478
.. c:member:: int import_time
14771479
1478-
If non-zero, profile import time.
1480+
If ``1``, profile import time.
1481+
If ``2``, include additional output that indicates
1482+
when an imported module has already been loaded.
14791483
1480-
Setthe ``1``by the :option:`-X importtime <-X>` option and the
1484+
Set by the :option:`-X importtime <-X>` option and the
14811485
:envvar:`PYTHONPROFILEIMPORTTIME` environment variable.
14821486
14831487
Default: ``0``.
14841488
1489+
.. versionchanged:: next
1490+
1491+
Added support for ``import_time = 2``
1492+
14851493
.. c:member:: int inspect
14861494
14871495
Enter interactive mode after executing a script or a command.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp