Skip to content

Commit 9694295

Browse files
authored
Merge branch 'main' into resourcetracker-status
2 parents 72c05ac + 7f074a7 commit 9694295

File tree

130 files changed

+3257
-2661
lines changed

Some content is hidden

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

130 files changed

+3257
-2661
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Python/flowgraph.c @markshannon @iritkatriel
3737
Python/ast_opt.c @isidentical
3838
Python/bytecodes.c @markshannon @gvanrossum
3939
Python/optimizer*.c @markshannon @gvanrossum
40+
Python/optimizer_analysis.c @Fidget-Spinner
41+
Python/tier2_redundancy_eliminator_bytecodes.c @Fidget-Spinner
4042
Lib/test/test_patma.py @brandtbucher
4143
Lib/test/test_type_*.py @JelleZijlstra
4244
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum

.github/workflows/build.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ jobs:
131131
- uses: actions/setup-python@v5
132132
with:
133133
python-version: '3.x'
134+
- name: Runner image version
135+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
134136
- name: Restore config.cache
135137
uses: actions/cache@v4
136138
with:
137139
path: config.cache
138-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
140+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
139141
- name: Install Dependencies
140142
run: sudo ./.github/workflows/posix-deps-apt.sh
141143
- name: Add ccache to PATH
@@ -258,11 +260,13 @@ jobs:
258260
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
259261
steps:
260262
- uses: actions/checkout@v4
263+
- name: Runner image version
264+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
261265
- name: Restore config.cache
262266
uses: actions/cache@v4
263267
with:
264268
path: config.cache
265-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
269+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
266270
- name: Register gcc problem matcher
267271
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
268272
- name: Install Dependencies
@@ -341,11 +345,13 @@ jobs:
341345
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
342346
- name: Bind mount sources read-only
343347
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
348+
- name: Runner image version
349+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
344350
- name: Restore config.cache
345351
uses: actions/cache@v4
346352
with:
347353
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
348-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
354+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
349355
- name: Configure CPython out-of-tree
350356
working-directory: ${{ env.CPYTHON_BUILDDIR }}
351357
run: |
@@ -420,11 +426,13 @@ jobs:
420426
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
421427
steps:
422428
- uses: actions/checkout@v4
429+
- name: Runner image version
430+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
423431
- name: Restore config.cache
424432
uses: actions/cache@v4
425433
with:
426434
path: config.cache
427-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
435+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
428436
- name: Register gcc problem matcher
429437
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
430438
- name: Install Dependencies

.github/workflows/jit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
paths:
55
- '**jit**'
66
- 'Python/bytecodes.c'
7+
- 'Python/optimizer*.c'
8+
- 'Python/tier2_redundancy_eliminator_bytecodes.c'
79
push:
810
paths:
911
- '**jit**'
1012
- 'Python/bytecodes.c'
13+
- 'Python/optimizer*.c'
14+
- 'Python/tier2_redundancy_eliminator_bytecodes.c'
1115
workflow_dispatch:
1216

1317
concurrency:

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ jobs:
2828
runs-on: ${{ matrix.os }}
2929
steps:
3030
- uses: actions/checkout@v4
31+
- name: Runner image version
32+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
3133
- name: Restore config.cache
3234
uses: actions/cache@v4
3335
with:
3436
path: config.cache
35-
key: ${{ github.job }}-${{ matrix.os }}-${{ inputs.config_hash }}
37+
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3638
- name: Install Homebrew dependencies
3739
run: brew install pkg-config [email protected] xz gdbm tcl-tk
3840
- name: Configure CPython

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ jobs:
5252
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
5353
- name: Bind mount sources read-only
5454
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
55+
- name: Runner image version
56+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
5557
- name: Restore config.cache
5658
uses: actions/cache@v4
5759
with:
5860
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
59-
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }}
61+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
6062
- name: Configure CPython out-of-tree
6163
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6264
run: ${{ inputs.options }}

Doc/c-api/structures.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,26 +187,26 @@ Implementing functions and methods
187187
PyObject *kwargs);
188188
189189
190-
.. c:type:: _PyCFunctionFast
190+
.. c:type:: PyCFunctionFast
191191
192192
Type of the functions used to implement Python callables in C
193193
with signature :c:macro:`METH_FASTCALL`.
194194
The function signature is::
195195
196-
PyObject *_PyCFunctionFast(PyObject *self,
197-
PyObject *const *args,
198-
Py_ssize_t nargs);
196+
PyObject *PyCFunctionFast(PyObject *self,
197+
PyObject *const *args,
198+
Py_ssize_t nargs);
199199
200-
.. c:type:: _PyCFunctionFastWithKeywords
200+
.. c:type:: PyCFunctionFastWithKeywords
201201
202202
Type of the functions used to implement Python callables in C
203203
with signature :ref:`METH_FASTCALL | METH_KEYWORDS <METH_FASTCALL-METH_KEYWORDS>`.
204204
The function signature is::
205205
206-
PyObject *_PyCFunctionFastWithKeywords(PyObject *self,
207-
PyObject *const *args,
208-
Py_ssize_t nargs,
209-
PyObject *kwnames);
206+
PyObject *PyCFunctionFastWithKeywords(PyObject *self,
207+
PyObject *const *args,
208+
Py_ssize_t nargs,
209+
PyObject *kwnames);
210210
211211
.. c:type:: PyCMethod
212212
@@ -290,7 +290,7 @@ There are these calling conventions:
290290
.. c:macro:: METH_FASTCALL
291291
292292
Fast calling convention supporting only positional arguments.
293-
The methods have the type :c:type:`_PyCFunctionFast`.
293+
The methods have the type :c:type:`PyCFunctionFast`.
294294
The first parameter is *self*, the second parameter is a C array
295295
of :c:expr:`PyObject*` values indicating the arguments and the third
296296
parameter is the number of arguments (the length of the array).
@@ -306,7 +306,7 @@ There are these calling conventions:
306306
307307
:c:expr:`METH_FASTCALL | METH_KEYWORDS`
308308
Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments,
309-
with methods of type :c:type:`_PyCFunctionFastWithKeywords`.
309+
with methods of type :c:type:`PyCFunctionFastWithKeywords`.
310310
Keyword arguments are passed the same way as in the
311311
:ref:`vectorcall protocol <vectorcall>`:
312312
there is an additional fourth :c:expr:`PyObject*` parameter

Doc/c-api/unicode.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,12 @@ wchar_t Support
854854
Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. At most
855855
*size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
856856
null termination character). Return the number of :c:type:`wchar_t` characters
857-
copied or ``-1`` in case of an error. Note that the resulting :c:expr:`wchar_t*`
857+
copied or ``-1`` in case of an error.
858+
859+
When *wstr* is ``NULL``, instead return the *size* that would be required
860+
to store all of *unicode* including a terminating null.
861+
862+
Note that the resulting :c:expr:`wchar_t*`
858863
string may or may not be null-terminated. It is the responsibility of the caller
859864
to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is
860865
required by the application. Also, note that the :c:expr:`wchar_t*` string

Doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767
rst_epilog = f"""
6868
.. |python_version_literal| replace:: ``Python {version}``
69+
.. |python_x_dot_y_literal| replace:: ``python{version}``
70+
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
6971
"""
7072

7173
# There are two options for replacing |today|: either, you set today to some

Doc/data/stable_abi.dat

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/library/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ Other constructor:
18111811
be truncated).
18121812
4. Fractional hours and minutes are not supported.
18131813

1814-
Examples::
1814+
Examples:
18151815

18161816
.. doctest::
18171817

0 commit comments

Comments
 (0)