Skip to content

Commit bffac1c

Browse files
authored
Merge branch 'main' into asyncio-repl-handle-python-startup
2 parents 149740a + d13ee0a commit bffac1c

File tree

337 files changed

+9491
-4500
lines changed

Some content is hidden

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

337 files changed

+9491
-4500
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Include/opcode_ids.h generated
8383
Include/token.h generated
8484
Lib/_opcode_metadata.py generated
8585
Lib/keyword.py generated
86+
Lib/idlelib/help.html generated
8687
Lib/test/certdata/*.pem generated
8788
Lib/test/certdata/*.0 generated
8889
Lib/test/levenshtein_examples.json generated

.github/workflows/jit.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- true
6969
- false
7070
llvm:
71-
- 19
71+
- 20
7272
include:
7373
- target: i686-pc-windows-msvc/msvc
7474
architecture: Win32
@@ -138,7 +138,7 @@ jobs:
138138
fail-fast: false
139139
matrix:
140140
llvm:
141-
- 19
141+
- 20
142142
steps:
143143
- uses: actions/checkout@v4
144144
with:
@@ -166,7 +166,7 @@ jobs:
166166
fail-fast: false
167167
matrix:
168168
llvm:
169-
- 19
169+
- 20
170170
steps:
171171
- uses: actions/checkout@v4
172172
with:
@@ -183,3 +183,27 @@ jobs:
183183
- name: Run tests without optimizations
184184
run: |
185185
PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
186+
187+
tail-call-jit:
188+
name: JIT with tail calling interpreter
189+
needs: interpreter
190+
runs-on: ubuntu-24.04
191+
timeout-minutes: 90
192+
strategy:
193+
fail-fast: false
194+
matrix:
195+
llvm:
196+
- 20
197+
steps:
198+
- uses: actions/checkout@v4
199+
with:
200+
persist-credentials: false
201+
- uses: actions/setup-python@v5
202+
with:
203+
python-version: '3.11'
204+
- name: Build with JIT and tailcall
205+
run: |
206+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
207+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
208+
CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
209+
make all --jobs 4

.github/workflows/reusable-wasi.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ env:
1313
jobs:
1414
build-wasi-reusable:
1515
name: 'build and test'
16-
runs-on: ubuntu-24.04
16+
runs-on: ubuntu-24.04-arm
1717
timeout-minutes: 60
1818
env:
19-
WASMTIME_VERSION: 38.0.2
19+
WASMTIME_VERSION: 38.0.3
2020
WASI_SDK_VERSION: 25
2121
WASI_SDK_PATH: /opt/wasi-sdk
2222
CROSS_BUILD_PYTHON: cross-build/build
@@ -40,7 +40,7 @@ jobs:
4040
if: steps.cache-wasi-sdk.outputs.cache-hit != 'true'
4141
run: |
4242
mkdir "${WASI_SDK_PATH}" && \
43-
curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz" | \
43+
curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-arm64-linux.tar.gz" | \
4444
tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip
4545
- name: "Configure ccache action"
4646
uses: hendrikmuhs/[email protected]
@@ -60,24 +60,24 @@ jobs:
6060
with:
6161
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
6262
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
63-
# Include the hash of `Tools/wasm/wasi.py` as it may change the environment variables.
63+
# Include the hash of `Tools/wasm/wasi/__main__.py` as it may change the environment variables.
6464
# (Make sure to keep the key in sync with the other config.cache step below.)
65-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
65+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
6666
- name: "Configure build Python"
67-
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
67+
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
6868
- name: "Make build Python"
69-
run: python3 Tools/wasm/wasi.py make-build-python
69+
run: python3 Tools/wasm/wasi make-build-python
7070
- name: "Restore host config.cache"
7171
uses: actions/cache@v4
7272
with:
7373
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
7474
# Should be kept in sync with the other config.cache step above.
75-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
75+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
7676
- name: "Configure host"
7777
# `--with-pydebug` inferred from configure-build-python
78-
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache
78+
run: python3 Tools/wasm/wasi configure-host -- --config-cache
7979
- name: "Make host"
80-
run: python3 Tools/wasm/wasi.py make-host
80+
run: python3 Tools/wasm/wasi make-host
8181
- name: "Display build info"
8282
run: make --directory "${CROSS_BUILD_WASI}" pythoninfo
8383
- name: "Test"

Apple/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def lib_non_platform_files(dirname, names):
507507
def create_xcframework(platform: str) -> str:
508508
"""Build an XCframework from the component parts for the platform.
509509
510-
:return: The version number of the Python verion that was packaged.
510+
:return: The version number of the Python version that was packaged.
511511
"""
512512
package_path = CROSS_BUILD_DIR / platform
513513
try:

Doc/c-api/capsule.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Refer to :ref:`using-capsules` for more information on using these objects.
2222
loaded modules.
2323

2424

25+
.. c:var:: PyTypeObject PyCapsule_Type
26+
27+
The type object corresponding to capsule objects. This is the same object
28+
as :class:`types.CapsuleType` in the Python layer.
29+
30+
2531
.. c:type:: PyCapsule_Destructor
2632
2733
The type of a destructor callback for a capsule. Defined as::

Doc/c-api/cell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Cell Objects
77

88
"Cell" objects are used to implement variables referenced by multiple scopes.
99
For each such variable, a cell object is created to store the value; the local
10-
variables of each stack frame that references the value contains a reference to
10+
variables of each stack frame that references the value contain a reference to
1111
the cells from outer scopes which also use that variable. When the value is
1212
accessed, the value contained in the cell is used instead of the cell object
1313
itself. This de-referencing of the cell object requires support from the

Doc/c-api/codec.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,13 @@ Registry API for Unicode encoding error handlers
129129
Replace the unicode encode error with ``\N{...}`` escapes.
130130
131131
.. versionadded:: 3.5
132+
133+
134+
Codec utility variables
135+
-----------------------
136+
137+
.. c:var:: const char *Py_hexdigits
138+
139+
A string constant containing the lowercase hexadecimal digits: ``"0123456789abcdef"``.
140+
141+
.. versionadded:: 3.3

Doc/c-api/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Complex Number Objects
8282
8383
.. c:type:: Py_complex
8484
85-
This C structure defines export format for a Python complex
85+
This C structure defines an export format for a Python complex
8686
number object.
8787
8888
.. c:member:: double real

Doc/c-api/conversion.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The return value (*rv*) for these functions should be interpreted as follows:
4141
``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is ``'\0'``
4242
in this case.
4343
44-
* When ``rv < 0``, "something bad happened." ``str[size-1]`` is ``'\0'`` in
44+
* When ``rv < 0``, the output conversion failed and ``str[size-1]`` is ``'\0'`` in
4545
this case too, but the rest of *str* is undefined. The exact cause of the error
4646
depends on the underlying platform.
4747

Doc/c-api/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ macros.
4646

4747
.. c:var:: PyTypeObject PyDateTime_DeltaType
4848
49-
This instance of :c:type:`PyTypeObject` represents Python type for
49+
This instance of :c:type:`PyTypeObject` represents the Python type for
5050
the difference between two datetime values;
5151
it is the same object as :class:`datetime.timedelta` in the Python layer.
5252

0 commit comments

Comments
 (0)