Skip to content

Commit 87b98ef

Browse files
Merge branch 'main' into fix-suspended
2 parents ce1a27d + fa44efa commit 87b98ef

File tree

155 files changed

+16987
-1563
lines changed

Some content is hidden

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

155 files changed

+16987
-1563
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
.azure-pipelines/ @AA-Turner
6464

6565
# GitHub & related scripts
66-
.github/ @ezio-melotti @hugovk @AA-Turner
67-
Tools/build/compute-changes.py @AA-Turner
66+
.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz
67+
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
6868
Tools/build/verify_ensurepip_wheels.py @AA-Turner @pfmoore @pradyunsg
6969

7070
# Pre-commit

.github/workflows/build.yml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -641,45 +641,45 @@ jobs:
641641
run: |
642642
"$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
643643
644-
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
645644
cifuzz:
646-
name: CIFuzz
647-
runs-on: ubuntu-latest
648-
timeout-minutes: 60
645+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
646+
name: CIFuzz${{ '' }} # zizmor: ignore[obfuscation]
649647
needs: build-context
650-
if: needs.build-context.outputs.run-ci-fuzz == 'true'
648+
if: >-
649+
needs.build-context.outputs.run-ci-fuzz == 'true'
650+
|| needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
651651
permissions:
652652
security-events: write
653653
strategy:
654654
fail-fast: false
655655
matrix:
656-
sanitizer: [address, undefined, memory]
657-
steps:
658-
- name: Build fuzzers (${{ matrix.sanitizer }})
659-
id: build
660-
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
661-
with:
662-
oss-fuzz-project-name: cpython3
663-
sanitizer: ${{ matrix.sanitizer }}
664-
- name: Run fuzzers (${{ matrix.sanitizer }})
665-
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
666-
with:
667-
fuzz-seconds: 600
668-
oss-fuzz-project-name: cpython3
669-
output-sarif: true
670-
sanitizer: ${{ matrix.sanitizer }}
671-
- name: Upload crash
672-
if: failure() && steps.build.outcome == 'success'
673-
uses: actions/upload-artifact@v6
674-
with:
675-
name: ${{ matrix.sanitizer }}-artifacts
676-
path: ./out/artifacts
677-
- name: Upload SARIF
678-
if: always() && steps.build.outcome == 'success'
679-
uses: github/codeql-action/upload-sarif@v4
680-
with:
681-
sarif_file: cifuzz-sarif/results.sarif
682-
checkout_path: cifuzz-sarif
656+
sanitizer:
657+
- address
658+
- undefined
659+
- memory
660+
oss-fuzz-project-name:
661+
- cpython3
662+
- python3-libraries
663+
exclude:
664+
# Note that the 'no-exclude' sentinel below is to prevent
665+
# an empty string value from excluding all jobs and causing
666+
# GHA to create a 'default' matrix entry with all empty values.
667+
- oss-fuzz-project-name: >-
668+
${{
669+
needs.build-context.outputs.run-ci-fuzz == 'true'
670+
&& 'no-exclude'
671+
|| 'cpython3'
672+
}}
673+
- oss-fuzz-project-name: >-
674+
${{
675+
needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
676+
&& 'no-exclude'
677+
|| 'python3-libraries'
678+
}}
679+
uses: ./.github/workflows/reusable-cifuzz.yml
680+
with:
681+
oss-fuzz-project-name: ${{ matrix.oss-fuzz-project-name }}
682+
sanitizer: ${{ matrix.sanitizer }}
683683

684684
all-required-green: # This job does nothing and is only used for the branch protection
685685
name: All required checks pass
@@ -734,7 +734,12 @@ jobs:
734734
|| ''
735735
}}
736736
${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
737-
${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
737+
${{
738+
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
739+
&& !fromJSON(needs.build-context.outputs.run-ci-fuzz-stdlib)
740+
&& 'cifuzz,' ||
741+
''
742+
}}
738743
${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
739744
${{
740745
!fromJSON(needs.build-context.outputs.run-ubuntu)

.github/workflows/jit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- 'Python/optimizer*.c'
88
- 'Python/executor_cases.c.h'
99
- 'Python/optimizer_cases.c.h'
10+
- '**_testinternalcapi**'
1011
- '!Python/perf_jit_trampoline.c'
1112
- '!**/*.md'
1213
- '!**/*.ini'
@@ -17,6 +18,7 @@ on:
1718
- 'Python/optimizer*.c'
1819
- 'Python/executor_cases.c.h'
1920
- 'Python/optimizer_cases.c.h'
21+
- '**_testinternalcapi**'
2022
- '!Python/perf_jit_trampoline.c'
2123
- '!**/*.md'
2224
- '!**/*.ini'
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
2+
name: Reusable CIFuzz
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
oss-fuzz-project-name:
8+
description: OSS-Fuzz project name
9+
required: true
10+
type: string
11+
sanitizer:
12+
description: OSS-Fuzz sanitizer
13+
required: true
14+
type: string
15+
16+
jobs:
17+
cifuzz:
18+
name: ${{ inputs.oss-fuzz-project-name }} (${{ inputs.sanitizer }})
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 60
21+
steps:
22+
- name: Build fuzzers (${{ inputs.sanitizer }})
23+
id: build
24+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
25+
with:
26+
oss-fuzz-project-name: ${{ inputs.oss-fuzz-project-name }}
27+
sanitizer: ${{ inputs.sanitizer }}
28+
- name: Run fuzzers (${{ inputs.sanitizer }})
29+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
30+
with:
31+
fuzz-seconds: 600
32+
oss-fuzz-project-name: ${{ inputs.oss-fuzz-project-name }}
33+
output-sarif: true
34+
sanitizer: ${{ inputs.sanitizer }}
35+
- name: Upload crash
36+
if: failure() && steps.build.outcome == 'success'
37+
uses: actions/upload-artifact@v6
38+
with:
39+
name: ${{ inputs.sanitizer }}-artifacts
40+
path: ./out/artifacts
41+
- name: Upload SARIF
42+
if: always() && steps.build.outcome == 'success'
43+
uses: github/codeql-action/upload-sarif@v4
44+
with:
45+
sarif_file: cifuzz-sarif/results.sarif
46+
checkout_path: cifuzz-sarif

.github/workflows/reusable-context.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ on: # yamllint disable-line rule:truthy
2121
description: Whether to run the Android tests
2222
value: ${{ jobs.compute-changes.outputs.run-android }} # bool
2323
run-ci-fuzz:
24-
description: Whether to run the CIFuzz job
24+
description: Whether to run the CIFuzz job for 'cpython' fuzzer
2525
value: ${{ jobs.compute-changes.outputs.run-ci-fuzz }} # bool
26+
run-ci-fuzz-stdlib:
27+
description: Whether to run the CIFuzz job for 'python3-libraries' fuzzer
28+
value: ${{ jobs.compute-changes.outputs.run-ci-fuzz-stdlib }} # bool
2629
run-docs:
2730
description: Whether to build the docs
2831
value: ${{ jobs.compute-changes.outputs.run-docs }} # bool
@@ -56,6 +59,7 @@ jobs:
5659
outputs:
5760
run-android: ${{ steps.changes.outputs.run-android }}
5861
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
62+
run-ci-fuzz-stdlib: ${{ steps.changes.outputs.run-ci-fuzz-stdlib }}
5963
run-docs: ${{ steps.changes.outputs.run-docs }}
6064
run-ios: ${{ steps.changes.outputs.run-ios }}
6165
run-macos: ${{ steps.changes.outputs.run-macos }}

Doc/c-api/descriptor.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ found in the dictionary of type objects.
1010

1111
.. XXX document these!
1212
13-
.. c:var:: PyTypeObject PyProperty_Type
14-
15-
The type object for the built-in descriptor types.
16-
17-
1813
.. c:function:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)
1914
2015
@@ -74,9 +69,26 @@ found in the dictionary of type objects.
7469
.. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)
7570
7671
72+
.. c:macro:: PyDescr_COMMON
73+
74+
This is a :term:`soft deprecated` macro including the common fields for a
75+
descriptor object.
76+
77+
This was included in Python's C API by mistake; do not use it in extensions.
78+
For creating custom descriptor objects, create a class implementing the
79+
descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and
80+
:c:member:`~PyTypeObject.tp_descr_set`).
81+
82+
7783
Built-in descriptors
7884
^^^^^^^^^^^^^^^^^^^^
7985
86+
.. c:var:: PyTypeObject PyProperty_Type
87+
88+
The type object for property objects. This is the same object as
89+
:class:`property` in the Python layer.
90+
91+
8092
.. c:var:: PyTypeObject PySuper_Type
8193
8294
The type object for super objects. This is the same object as

Doc/c-api/exceptions.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,17 @@ Exception Classes
793793
Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*.
794794
795795
796+
.. c:macro:: PyException_HEAD
797+
798+
This is a :term:`soft deprecated` macro including the base fields for an
799+
exception object.
800+
801+
This was included in Python's C API by mistake and is not designed for use
802+
in extensions. For creating custom exception objects, use
803+
:c:func:`PyErr_NewException` or otherwise create a class inheriting from
804+
:c:data:`PyExc_BaseException`.
805+
806+
796807
Exception Objects
797808
=================
798809

Doc/c-api/lifecycle.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ To allocate and free memory, see :ref:`allocating-objects`.
256256
collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set); this may
257257
change in the future.
258258
259+
.. versionadded:: 3.4
260+
259261
260262
.. c:function:: int PyObject_CallFinalizerFromDealloc(PyObject *op)
261263
@@ -266,6 +268,8 @@ To allocate and free memory, see :ref:`allocating-objects`.
266268
should happen. Otherwise, this function returns 0 and destruction can
267269
continue normally.
268270
271+
.. versionadded:: 3.4
272+
269273
.. seealso::
270274
271275
:c:member:`~PyTypeObject.tp_dealloc` for example code.

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Object Protocol
8585
instead of the :func:`repr`.
8686
8787
88-
.. c:function:: void PyUnstable_Object_Dump(PyObject *op)
88+
.. c:function:: void PyObject_Dump(PyObject *op)
8989
9090
Dump an object *op* to ``stderr``. This should only be used for debugging.
9191

Doc/library/idle.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Go to Line
158158

159159
Show Completions
160160
Open a scrollable list allowing selection of existing names. See
161-
:ref:`Completions <completions>` in the Editing and navigation section below.
161+
:ref:`Completions <completions>` in the Editing and Navigation section below.
162162

163163
Expand Word
164164
Expand a prefix you have typed to match a full word in the same window;
@@ -167,7 +167,7 @@ Expand Word
167167
Show Call Tip
168168
After an unclosed parenthesis for a function, open a small window with
169169
function parameter hints. See :ref:`Calltips <calltips>` in the
170-
Editing and navigation section below.
170+
Editing and Navigation section below.
171171

172172
Show Surrounding Parens
173173
Highlight the surrounding parenthesis.
@@ -178,9 +178,9 @@ Format menu (Editor window only)
178178
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179179

180180
Format Paragraph
181-
Reformat the current blank-line-delimited paragraph in comment block or
182-
multiline string or selected line in a string. All lines in the
183-
paragraph will be formatted to less than N columns, where N defaults to 72.
181+
Rewrap the text block containing the text insert cursor.
182+
Avoid code lines. See :ref:`Format block<format-block>` in the
183+
Editing and Navigation section below.
184184

185185
Indent Region
186186
Shift selected lines right by the indent width (default 4 spaces).
@@ -566,6 +566,20 @@ In an editor, import statements have no effect until one runs the file.
566566
One might want to run a file after writing import statements, after
567567
adding function definitions, or after opening an existing file.
568568

569+
.. _format-block:
570+
571+
Format block
572+
^^^^^^^^^^^^
573+
574+
Reformat Paragraph rewraps a block ('paragraph') of contiguous equally
575+
indented non-blank comments, a similar block of text within a multiline
576+
string, or a selected subset of either.
577+
If needed, add a blank line to separate string from code.
578+
Partial lines in a selection expand to complete lines.
579+
The resulting lines have the same indent as before
580+
but have maximum total length of N columns (characters).
581+
Change the default N of 72 on the Window tab of IDLE Settings.
582+
569583
.. _code-context:
570584

571585
Code Context

0 commit comments

Comments
 (0)