Skip to content

Commit 531c415

Browse files
authored
Merge branch '3.13' into 3.13_recursion_inconsistency_fix
2 parents 6ea7aeb + 9f44feb commit 531c415

File tree

67 files changed

+764
-196
lines changed

Some content is hidden

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

67 files changed

+764
-196
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
# GitHub
88
.github/** @ezio-melotti @hugovk @webknjaz
9+
.github/workflows/jit.yml @savannahostrowski
10+
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
11+
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz
912

1013
# pre-commit
1114
.pre-commit-config.yaml @hugovk
@@ -21,7 +24,7 @@ configure* @erlend-aasland @corona10
2124
**/*context* @1st1
2225
**/*genobject* @markshannon
2326
**/*hamt* @1st1
24-
**/*jit* @brandtbucher
27+
**/*jit* @brandtbucher @savannahostrowski
2528
Python/perf_jit_trampoline.c # Exclude the owners of "**/*jit*", above.
2629
Objects/set* @rhettinger
2730
Objects/dict* @methane @markshannon

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install dependencies
6363
run: |
6464
sudo ./.github/workflows/posix-deps-apt.sh
65-
sudo apt-get install -yq abigail-tools
65+
sudo apt-get install -yq --no-install-recommends abigail-tools
6666
- name: Build CPython
6767
env:
6868
CFLAGS: -g3 -O0

.github/workflows/posix-deps-apt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
apt-get update
33

4-
apt-get -yq install \
4+
apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
77
ccache \

.github/workflows/regen-abidump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set -ex
22

33
export DEBIAN_FRONTEND=noninteractive
44
./.github/workflows/posix-deps-apt.sh
5-
apt-get install -yq abigail-tools python3
5+
apt-get install -yq --no-install-recommends abigail-tools python3
66
export CFLAGS="-g3 -O0"
77
./configure --enable-shared && make
88
make regen-abidump

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
restore-keys: |
9393
ubuntu-doc-
9494
- name: 'Install Dependencies'
95-
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
95+
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install --no-install-recommends wamerican
9696
- name: 'Configure CPython'
9797
run: ./configure --with-pydebug
9898
- name: 'Build CPython'

.github/workflows/verify-expat.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Verify bundled libexpat
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'Modules/expat/**'
8+
- '.github/workflows/verify-expat.yml'
9+
pull_request:
10+
paths:
11+
- 'Modules/expat/**'
12+
- '.github/workflows/verify-expat.yml'
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
verify:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
steps:
26+
- uses: actions/checkout@v6
27+
with:
28+
persist-credentials: false
29+
- name: Download and verify bundled libexpat files
30+
run: |
31+
./Modules/expat/refresh.sh
32+
git diff --exit-code Modules/expat/

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ repos:
4949
types: [python]
5050
exclude: ^Tools/c-analyzer/cpython/_parser.py
5151

52+
- repo: local
53+
hooks:
54+
- id: blurb-no-space-c-api
55+
name: Check C API news entries
56+
language: fail
57+
entry: Space found in path, move to Misc/NEWS.d/next/C_API/
58+
files: Misc/NEWS.d/next/C API/20.*.rst
59+
60+
- repo: local
61+
hooks:
62+
- id: blurb-no-space-core-and-builtins
63+
name: Check Core and Builtins news entries
64+
language: fail
65+
entry: Space found in path, move to Misc/NEWS.d/next/Core_and_Builtins/
66+
files: Misc/NEWS.d/next/Core and Builtins/20.*.rst
67+
5268
- repo: https://github.com/pre-commit/pre-commit-hooks
5369
rev: v6.0.0
5470
hooks:

Doc/c-api/exceptions.rst

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -673,28 +673,40 @@ Signal Handling
673673
single: SIGINT (C macro)
674674
single: KeyboardInterrupt (built-in exception)
675675
676-
This function interacts with Python's signal handling.
676+
Handle external interruptions, such as signals or activating a debugger,
677+
whose processing has been delayed until it is safe
678+
to run Python code and/or raise exceptions.
677679
678-
If the function is called from the main thread and under the main Python
679-
interpreter, it checks whether a signal has been sent to the processes
680-
and if so, invokes the corresponding signal handler. If the :mod:`signal`
681-
module is supported, this can invoke a signal handler written in Python.
680+
For example, pressing :kbd:`Ctrl-C` causes a terminal to send the
681+
:py:data:`signal.SIGINT` signal.
682+
This function executes the corresponding Python signal handler, which,
683+
by default, raises the :exc:`KeyboardInterrupt` exception.
682684
683-
The function attempts to handle all pending signals, and then returns ``0``.
684-
However, if a Python signal handler raises an exception, the error
685-
indicator is set and the function returns ``-1`` immediately (such that
686-
other pending signals may not have been handled yet: they will be on the
687-
next :c:func:`PyErr_CheckSignals()` invocation).
685+
:c:func:`!PyErr_CheckSignals` should be called by long-running C code
686+
frequently enough so that the response appears immediate to humans.
688687
689-
If the function is called from a non-main thread, or under a non-main
690-
Python interpreter, it does nothing and returns ``0``.
688+
Handlers invoked by this function currently include:
691689
692-
This function can be called by long-running C code that wants to
693-
be interruptible by user requests (such as by pressing Ctrl-C).
690+
- Signal handlers, including Python functions registered using
691+
the :mod:`signal` module.
694692
695-
.. note::
696-
The default Python signal handler for :c:macro:`!SIGINT` raises the
697-
:exc:`KeyboardInterrupt` exception.
693+
Signal handlers are only run in the main thread of the main interpreter.
694+
695+
(This is where the function got the name: originally, signals
696+
were the only way to interrupt the interpreter.)
697+
698+
- Running the garbage collector, if necessary.
699+
700+
If any handler raises an exception, immediately return ``-1`` with that
701+
exception set.
702+
Any remaining interruptions are left to be processed on the next
703+
:c:func:`PyErr_CheckSignals()` invocation, if appropriate.
704+
705+
If all handlers finish successfully, or there are no handlers to run,
706+
return ``0``.
707+
708+
.. versionchanged:: 3.12
709+
This function may now invoke the garbage collector.
698710
699711
700712
.. c:function:: void PyErr_SetInterrupt()

Doc/c-api/frame.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ See also :ref:`Reflection <reflection>`.
5050
5151
Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer
5252
frame.
53+
This raises no exceptions.
5354
5455
.. versionadded:: 3.9
5556

Doc/c-api/module.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ or request "multi-phase initialization" by returning the definition struct itsel
263263
.. versionchanged:: 3.9
264264
No longer called before the module state is allocated.
265265
266+
267+
.. c:var:: PyTypeObject PyModuleDef_Type
268+
269+
The type of ``PyModuleDef`` objects.
270+
271+
266272
Single-phase initialization
267273
...........................
268274

0 commit comments

Comments
 (0)