Skip to content

Commit db56d94

Browse files
Merge branch 'main' into wip-compile-module
2 parents 05a48bc + b36f01d commit db56d94

File tree

291 files changed

+7916
-3569
lines changed

Some content is hidden

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

291 files changed

+7916
-3569
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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ dist-pdf:
241241
# as otherwise the full latexmk process is run twice.
242242
# ($$ is needed to escape the $; https://www.gnu.org/software/make/manual/make.html#Basics-of-Variable-References)
243243
-sed -i 's/: all-$$(FMT)/:/' build/latex/Makefile
244-
(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`nproc`+1)) --output-sync LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2)
244+
if [ -n "$(filter output-sync,$(value .FEATURES))" ]; then OUTPUTSYNC=--output-sync; else OUTPUTSYNC=; fi && \
245+
(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`getconf _NPROCESSORS_ONLN`+1)) $$OUTPUTSYNC LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2)
245246
cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
246247
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
247248
@echo "Build finished and archived!"

Doc/c-api/buffer.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ readonly, format
261261
MUST be consistent for all consumers. For example, :c:expr:`PyBUF_SIMPLE | PyBUF_WRITABLE`
262262
can be used to request a simple writable buffer.
263263

264+
.. c:macro:: PyBUF_WRITEABLE
265+
266+
This is a :term:`soft deprecated` alias to :c:macro:`PyBUF_WRITABLE`.
267+
264268
.. c:macro:: PyBUF_FORMAT
265269
266270
Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST

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

0 commit comments

Comments
 (0)