Skip to content

Commit a05d971

Browse files
committed
Merge branch 'main' into fix-issue-115197-proxy-bypass
2 parents 4e4a4ee + 0a61e23 commit a05d971

File tree

711 files changed

+31915
-11961
lines changed

Some content is hidden

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

711 files changed

+31915
-11961
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
root = true
22

3-
[*.{py,c,cpp,h,rst,md,yml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml}]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
@@ -11,5 +11,5 @@ indent_size = 4
1111
[*.rst]
1212
indent_size = 3
1313

14-
[*.yml]
14+
[*.{js,yml}]
1515
indent_size = 2

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Include/internal/pycore_opcode.h generated
7777
Include/internal/pycore_opcode_metadata.h generated
7878
Include/internal/pycore_*_generated.h generated
7979
Include/internal/pycore_uop_ids.h generated
80+
Include/internal/pycore_uop_metadata.h generated
8081
Include/opcode.h generated
8182
Include/opcode_ids.h generated
8283
Include/token.h generated
@@ -94,6 +95,7 @@ Programs/test_frozenmain.h generated
9495
Python/Python-ast.c generated
9596
Python/executor_cases.c.h generated
9697
Python/generated_cases.c.h generated
98+
Python/optimizer_cases.c.h generated
9799
Python/opcode_targets.h generated
98100
Python/stdlib_module_names.h generated
99101
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 6 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/optimizer_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
@@ -247,3 +249,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
247249
# SBOM
248250
/Misc/sbom.spdx.json @sethmlarson
249251
/Tools/build/generate_sbom.py @sethmlarson
252+
253+
# Config Parser
254+
Lib/configparser.py @jaraco
255+
Lib/test/test_configparser.py @jaraco

.github/workflows/build.yml

Lines changed: 13 additions & 5 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
@@ -160,7 +162,7 @@ jobs:
160162
- name: Build CPython
161163
run: |
162164
make -j4 regen-all
163-
make regen-stdlib-module-names
165+
make regen-stdlib-module-names regen-sbom
164166
- name: Check for changes
165167
run: |
166168
git add -u
@@ -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/optimizer_bytecodes.c'
79
push:
810
paths:
911
- '**jit**'
1012
- 'Python/bytecodes.c'
13+
- 'Python/optimizer*.c'
14+
- 'Python/optimizer_bytecodes.c'
1115
workflow_dispatch:
1216

1317
concurrency:

.github/workflows/reusable-macos.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
HOMEBREW_NO_ANALYTICS: 1
1818
HOMEBREW_NO_AUTO_UPDATE: 1
1919
HOMEBREW_NO_INSTALL_CLEANUP: 1
20+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2021
PYTHONSTRICTEXTENSIONBUILD: 1
2122
strategy:
2223
fail-fast: false
@@ -28,11 +29,13 @@ jobs:
2829
runs-on: ${{ matrix.os }}
2930
steps:
3031
- uses: actions/checkout@v4
32+
- name: Runner image version
33+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
3134
- name: Restore config.cache
3235
uses: actions/cache@v4
3336
with:
3437
path: config.cache
35-
key: ${{ github.job }}-${{ matrix.os }}-${{ inputs.config_hash }}
38+
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3639
- name: Install Homebrew dependencies
3740
run: brew install pkg-config [email protected] xz gdbm tcl-tk
3841
- 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 }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Lib/test/data/*
6969
/_bootstrap_python
7070
/Makefile
7171
/Makefile.pre
72+
iOS/Resources/Info.plist
7273
Mac/Makefile
7374
Mac/PythonLauncher/Info.plist
7475
Mac/PythonLauncher/Makefile

Doc/c-api/buffer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ without intermediate copying.
2929
Python provides such a facility at the C level in the form of the :ref:`buffer
3030
protocol <bufferobjects>`. This protocol has two sides:
3131

32-
.. index:: single: PyBufferProcs
32+
.. index:: single: PyBufferProcs (C type)
3333

3434
- on the producer side, a type can export a "buffer interface" which allows
3535
objects of that type to expose information about their underlying buffer.

Doc/c-api/code.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@ bound into a function.
2222
.. c:var:: PyTypeObject PyCode_Type
2323
2424
This is an instance of :c:type:`PyTypeObject` representing the Python
25-
:class:`code` type.
25+
:ref:`code object <code-objects>`.
2626

2727

2828
.. c:function:: int PyCode_Check(PyObject *co)
2929
30-
Return true if *co* is a :class:`code` object. This function always succeeds.
30+
Return true if *co* is a :ref:`code object <code-objects>`.
31+
This function always succeeds.
3132
32-
.. c:function:: int PyCode_GetNumFree(PyCodeObject *co)
33+
.. c:function:: Py_ssize_t PyCode_GetNumFree(PyCodeObject *co)
3334
34-
Return the number of free variables in *co*.
35+
Return the number of free variables in a code object.
36+
37+
.. c:function:: int PyCode_GetFirstFree(PyCodeObject *co)
38+
39+
Return the position of the first free variable in a code object.
3540
3641
.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
3742
@@ -48,7 +53,7 @@ bound into a function.
4853
.. versionchanged:: 3.11
4954
Added ``qualname`` and ``exceptiontable`` parameters.
5055
51-
.. index:: single: PyCode_New
56+
.. index:: single: PyCode_New (C function)
5257
5358
.. versionchanged:: 3.12
5459
@@ -61,7 +66,7 @@ bound into a function.
6166
Similar to :c:func:`PyUnstable_Code_New`, but with an extra "posonlyargcount" for positional-only arguments.
6267
The same caveats that apply to ``PyUnstable_Code_New`` also apply to this function.
6368
64-
.. index:: single: PyCode_NewWithPosOnlyArgs
69+
.. index:: single: PyCode_NewWithPosOnlyArgs (C function)
6570
6671
.. versionadded:: 3.8 as ``PyCode_NewWithPosOnlyArgs``
6772
@@ -220,7 +225,7 @@ may change without deprecation warnings.
220225
*free* will be called on non-``NULL`` data stored under the new index.
221226
Use :c:func:`Py_DecRef` when storing :c:type:`PyObject`.
222227
223-
.. index:: single: _PyEval_RequestCodeExtraIndex
228+
.. index:: single: _PyEval_RequestCodeExtraIndex (C function)
224229
225230
.. versionadded:: 3.6 as ``_PyEval_RequestCodeExtraIndex``
226231
@@ -238,7 +243,7 @@ may change without deprecation warnings.
238243
If no data was set under the index, set *extra* to ``NULL`` and return
239244
0 without setting an exception.
240245
241-
.. index:: single: _PyCode_GetExtra
246+
.. index:: single: _PyCode_GetExtra (C function)
242247
243248
.. versionadded:: 3.6 as ``_PyCode_GetExtra``
244249
@@ -253,7 +258,7 @@ may change without deprecation warnings.
253258
Set the extra data stored under the given index to *extra*.
254259
Return 0 on success. Set an exception and return -1 on failure.
255260
256-
.. index:: single: _PyCode_SetExtra
261+
.. index:: single: _PyCode_SetExtra (C function)
257262
258263
.. versionadded:: 3.6 as ``_PyCode_SetExtra``
259264

0 commit comments

Comments
 (0)