Skip to content

Commit de5f353

Browse files
committed
Merge branch 'master' into complex-float-arith-69639
2 parents 76bad15 + 26ff32b commit de5f353

File tree

395 files changed

+6030
-3590
lines changed

Some content is hidden

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

395 files changed

+6030
-3590
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ Programs/_bootstrap_python.c @ericsnowcurrently
8181
Programs/python.c @ericsnowcurrently
8282
Tools/build/generate_global_objects.py @ericsnowcurrently
8383

84+
# Initialization
85+
Doc/library/sys_path_init.rst @FFY00
86+
Doc/c-api/init_config.rst @FFY00
87+
88+
# getpath
89+
**/*getpath* @FFY00
90+
91+
# site
92+
**/*site.py @FFY00
93+
Doc/library/site.rst @FFY00
94+
8495
# Exceptions
8596
Lib/test/test_except*.py @iritkatriel
8697
Objects/exceptions.c @iritkatriel
@@ -97,7 +108,7 @@ Modules/_hacl/** @gpshead
97108
**/*logging* @vsajip
98109

99110
# venv
100-
**/*venv* @vsajip
111+
**/*venv* @vsajip @FFY00
101112

102113
# Launcher
103114
/PC/launcher.c @vsajip

.github/actionlint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
self-hosted-runner:
2+
labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
3+
4+
config-variables: null
5+
6+
paths:
7+
.github/workflows/**/*.yml:
8+
ignore:
9+
- 1st argument of function call is not assignable
10+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
steps:
5454
- name: Install Git
5555
run: |
56-
apt install git -yq
56+
apt update && apt install git -yq
5757
git config --global --add safe.directory "$GITHUB_WORKSPACE"
5858
- uses: actions/checkout@v4
5959
with:
@@ -150,16 +150,28 @@ jobs:
150150
needs: check_source
151151
if: fromJSON(needs.check_source.outputs.run_tests)
152152
strategy:
153+
fail-fast: false
153154
matrix:
155+
os:
156+
- windows-latest
154157
arch:
155-
- Win32
156-
- x64
157-
- arm64
158+
- x64
158159
free-threading:
159-
- false
160-
- true
160+
- false
161+
- true
162+
include:
163+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
164+
arch: arm64
165+
free-threading: false
166+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
arch: arm64
168+
free-threading: true
169+
- os: windows-latest
170+
arch: Win32
171+
free-threading: false
161172
uses: ./.github/workflows/reusable-windows.yml
162173
with:
174+
os: ${{ matrix.os }}
163175
arch: ${{ matrix.arch }}
164176
free-threading: ${{ matrix.free-threading }}
165177

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [ubuntu-24.04]
23+
os: [ubuntu-24.04, ubuntu-24.04-aarch64]
2424
env:
2525
FORCE_COLOR: 1
2626
OPENSSL_VER: 3.0.15
@@ -82,11 +82,11 @@ jobs:
8282
- name: Build CPython out-of-tree
8383
if: ${{ inputs.free-threading }}
8484
working-directory: ${{ env.CPYTHON_BUILDDIR }}
85-
run: make -j4
85+
run: make -j
8686
- name: Build CPython out-of-tree (for compiler warning check)
8787
if: ${{ !inputs.free-threading}}
8888
working-directory: ${{ env.CPYTHON_BUILDDIR }}
89-
run: set -o pipefail; make -j4 --output-sync 2>&1 | tee compiler_output_ubuntu.txt
89+
run: set -o pipefail; make -j --output-sync 2>&1 | tee compiler_output_ubuntu.txt
9090
- name: Display build info
9191
working-directory: ${{ env.CPYTHON_BUILDDIR }}
9292
run: make pythoninfo

.github/workflows/reusable-windows.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Reusable Windows
33
on:
44
workflow_call:
55
inputs:
6+
os:
7+
description: OS to run on
8+
required: true
9+
type: string
610
arch:
711
description: CPU architecture
812
required: true
@@ -19,10 +23,8 @@ env:
1923
2024
jobs:
2125
build:
22-
name: >-
23-
build${{ inputs.arch != 'arm64' && ' and test' || '' }}
24-
(${{ inputs.arch }})
25-
runs-on: windows-latest
26+
name: 'build and test (${{ inputs.arch }})'
27+
runs-on: ${{ inputs.os }}
2628
timeout-minutes: 60
2729
steps:
2830
- uses: actions/checkout@v4
@@ -31,17 +33,17 @@ jobs:
3133
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3234
- name: Build CPython
3335
run: >-
34-
.\PCbuild\build.bat
36+
.\\PCbuild\\build.bat
3537
-e -d -v
3638
-p ${{ inputs.arch }}
3739
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
38-
- name: Display build info
40+
- name: Display build info # FIXME(diegorusso): remove the `if`
3941
if: inputs.arch != 'arm64'
40-
run: .\python.bat -m test.pythoninfo
41-
- name: Tests
42+
run: .\\python.bat -m test.pythoninfo
43+
- name: Tests # FIXME(diegorusso): remove the `if`
4244
if: inputs.arch != 'arm64'
4345
run: >-
44-
.\PCbuild\rt.bat
46+
.\\PCbuild\\rt.bat
4547
-p ${{ inputs.arch }}
4648
-d -q --fast-ci
4749
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}

.pre-commit-config.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ repos:
5757
- id: check-github-workflows
5858

5959
- repo: https://github.com/rhysd/actionlint
60-
rev: v1.7.3
60+
rev: v1.7.4
6161
hooks:
6262
- id: actionlint
63-
args: [
64-
-ignore=1st argument of function call is not assignable,
65-
-ignore=SC2(015|038|086|091|097|098|129|155),
66-
]
6763

6864
- repo: https://github.com/sphinx-contrib/sphinx-lint
6965
rev: v1.0.0

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ check: _ensure-pre-commit
294294

295295
.PHONY: serve
296296
serve:
297-
@echo "The serve target was removed, use htmlview instead (see bpo-36329)"
297+
@echo "The serve target was removed, use htmllive instead (see gh-80510)"
298298

299299
# Targets for daily automated doc build
300300
# By default, Sphinx only rebuilds pages where the page content has changed.

Doc/c-api/init.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,9 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
13791379
This function now calls the :c:member:`PyThreadState.on_delete` callback.
13801380
Previously, that happened in :c:func:`PyThreadState_Delete`.
13811381
1382+
.. versionchanged:: 3.13
1383+
The :c:member:`PyThreadState.on_delete` callback was removed.
1384+
13821385
13831386
.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)
13841387
@@ -1735,7 +1738,11 @@ function. You can create and destroy them using the following functions:
17351738
.check_multi_interp_extensions = 1,
17361739
.gil = PyInterpreterConfig_OWN_GIL,
17371740
};
1738-
PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);
1741+
PyThreadState *tstate = NULL;
1742+
PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);
1743+
if (PyStatus_Exception(status)) {
1744+
Py_ExitStatusException(status);
1745+
}
17391746
17401747
Note that the config is used only briefly and does not get modified.
17411748
During initialization the config's values are converted into various
@@ -2463,7 +2470,7 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
24632470
24642471
{
24652472
PyCriticalSection2 _py_cs2;
2466-
PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))
2473+
PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))
24672474
24682475
In the default build, this macro expands to ``{``.
24692476
@@ -2475,7 +2482,7 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
24752482
24762483
In the free-threaded build, this macro expands to::
24772484
2478-
PyCriticalSection_End2(&_py_cs2);
2485+
PyCriticalSection2_End(&_py_cs2);
24792486
}
24802487
24812488
In the default build, this macro expands to ``}``.

Doc/c-api/init_config.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
Python Initialization Configuration
77
***********************************
88

9+
.. _pyconfig_api:
10+
911
PyConfig C API
1012
==============
1113

@@ -1592,6 +1594,8 @@ The ``__PYVENV_LAUNCHER__`` environment variable is used to set
15921594
:c:member:`PyConfig.base_executable`.
15931595
15941596
1597+
.. _pyinitconfig_api:
1598+
15951599
PyInitConfig C API
15961600
==================
15971601

Doc/c-api/long.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
590590
return ``1`` when it's positive and ``0`` otherwise. Else set an
591591
exception and return ``-1``.
592592
593-
.. versionadded:: next
593+
.. versionadded:: 3.14
594594
595595
596596
.. c:function:: int PyLong_IsNegative(PyObject *obj)
@@ -601,7 +601,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
601601
return ``1`` when it's negative and ``0`` otherwise. Else set an
602602
exception and return ``-1``.
603603
604-
.. versionadded:: next
604+
.. versionadded:: 3.14
605605
606606
607607
.. c:function:: int PyLong_IsZero(PyObject *obj)
@@ -612,7 +612,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
612612
return ``1`` when it's zero and ``0`` otherwise. Else set an
613613
exception and return ``-1``.
614614
615-
.. versionadded:: next
615+
.. versionadded:: 3.14
616616
617617
618618
.. c:function:: PyObject* PyLong_GetInfo(void)

0 commit comments

Comments
 (0)