Skip to content

Commit f1d2c8b

Browse files
committed
Merge branch 'main' of https://github.com/python/cpython into fix-scanner-capturing-groups-backup
2 parents 29db6ca + 947bb46 commit f1d2c8b

Some content is hidden

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

63 files changed

+1650
-623
lines changed

.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"

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/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/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

Doc/c-api/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ found in the dictionary of type objects.
3232
3333
.. c:function:: int PyDescr_IsData(PyObject *descr)
3434
35-
Return non-zero if the descriptor objects *descr* describes a data attribute, or
35+
Return non-zero if the descriptor object *descr* describes a data attribute, or
3636
``0`` if it describes a method. *descr* must be a descriptor object; there is
3737
no error checking.
3838

Doc/c-api/init_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Error Handling
102102
* Set *\*err_msg* and return ``1`` if an error is set.
103103
* Set *\*err_msg* to ``NULL`` and return ``0`` otherwise.
104104
105-
An error message is an UTF-8 encoded string.
105+
An error message is a UTF-8 encoded string.
106106
107107
If *config* has an exit code, format the exit code as an error
108108
message.

Doc/c-api/mapping.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
102102
103103
.. note::
104104
105-
Exceptions which occur when this calls :meth:`~object.__getitem__`
105+
Exceptions which occur when this calls the :meth:`~object.__getitem__`
106106
method are silently ignored.
107107
For proper error handling, use :c:func:`PyMapping_HasKeyWithError`,
108108
:c:func:`PyMapping_GetOptionalItem` or :c:func:`PyObject_GetItem()` instead.
@@ -116,7 +116,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
116116
117117
.. note::
118118
119-
Exceptions that occur when this calls :meth:`~object.__getitem__`
119+
Exceptions that occur when this calls the :meth:`~object.__getitem__`
120120
method or while creating the temporary :class:`str`
121121
object are silently ignored.
122122
For proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`,

Doc/c-api/marshal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The following functions allow marshalled values to be read back in.
8282
assumes that no further objects will be read from the file, allowing it to
8383
aggressively load file data into memory so that the de-serialization can
8484
operate from data in memory rather than reading a byte at a time from the
85-
file. Only use these variant if you are certain that you won't be reading
85+
file. Only use this variant if you are certain that you won't be reading
8686
anything else from the file.
8787
8888
On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError`

Doc/c-api/memory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ All allocating functions belong to one of three different "domains" (see also
102102
strategies and are optimized for different purposes. The specific details on
103103
how every domain allocates memory or what internal functions each domain calls
104104
is considered an implementation detail, but for debugging purposes a simplified
105-
table can be found at :ref:`here <default-memory-allocators>`.
105+
table can be found at :ref:`default-memory-allocators`.
106106
The APIs used to allocate and free a block of memory must be from the same domain.
107107
For example, :c:func:`PyMem_Free` must be used to free memory allocated using :c:func:`PyMem_Malloc`.
108108

0 commit comments

Comments
 (0)