Skip to content

Commit 17292a3

Browse files
committed
Catch up with main
2 parents 6e3869c + c085974 commit 17292a3

File tree

838 files changed

+14497
-4177
lines changed

Some content is hidden

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

838 files changed

+14497
-4177
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Lib/ast.py @isidentical
135135

136136
**/*idlelib* @terryjreedy
137137

138-
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
138+
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
139139

140140
**/*asyncore @giampaolo
141141
**/*asynchat @giampaolo

.github/CONTRIBUTING.rst

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,9 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- main
7+
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_
88

9-
+ `Stable buildbots <https://buildbot.python.org/3.x.stable/>`_
10-
11-
- 3.9
12-
13-
+ `Stable buildbots <https://buildbot.python.org/3.9.stable/>`_
14-
15-
- 3.8
16-
17-
+ `Stable buildbots <https://buildbot.python.org/3.8.stable/>`_
18-
19-
- 3.7
20-
21-
+ `Stable buildbots <https://buildbot.python.org/3.7.stable/>`_
9+
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_
2210

2311

2412
Thank You

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The Python team applies security fixes according to the table
66
in [the devguide](
7-
https://devguide.python.org/#status-of-python-branches
7+
https://devguide.python.org/versions/#supported-versions
88
).
99

1010
## Reporting a Vulnerability

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
id: check
4242
run: |
4343
if [ -z "$GITHUB_BASE_REF" ]; then
44-
echo '::set-output name=run_tests::true'
44+
echo "run_tests=true" >> $GITHUB_OUTPUT
4545
else
4646
git fetch origin $GITHUB_BASE_REF --depth=1
4747
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -57,7 +57,7 @@ jobs:
5757
# into the PR branch anyway.
5858
#
5959
# https://github.com/python/core-workflow/issues/373
60-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
60+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
6161
fi
6262
6363
check_generated_files:

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ is not possible due to its implementation being opaque at build time.
19331933
19341934
.. note::
19351935
A freed key becomes a dangling pointer. You should reset the key to
1936-
`NULL`.
1936+
``NULL``.
19371937
19381938
19391939
Methods

Doc/c-api/init_config.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,6 @@ Private provisional API:
15711571
15721572
* :c:member:`PyConfig._init_main`: if set to ``0``,
15731573
:c:func:`Py_InitializeFromConfig` stops at the "Core" initialization phase.
1574-
* :c:member:`PyConfig._isolated_interpreter`: if non-zero,
1575-
disallow threads, subprocesses and fork.
15761574
15771575
.. c:function:: PyStatus _Py_InitializeMain(void)
15781576

Doc/c-api/structures.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -387,27 +387,27 @@ Accessing attributes of extension types
387387
Structure which describes an attribute of a type which corresponds to a C
388388
struct member. Its fields are:
389389
390-
+------------------+---------------+-------------------------------+
391-
| Field | C Type | Meaning |
392-
+==================+===============+===============================+
393-
| :attr:`name` | const char \* | name of the member |
394-
+------------------+---------------+-------------------------------+
395-
| :attr:`!type` | int | the type of the member in the |
396-
| | | C struct |
397-
+------------------+---------------+-------------------------------+
398-
| :attr:`offset` | Py_ssize_t | the offset in bytes that the |
399-
| | | member is located on the |
400-
| | | type's object struct |
401-
+------------------+---------------+-------------------------------+
402-
| :attr:`flags` | int | flag bits indicating if the |
403-
| | | field should be read-only or |
404-
| | | writable |
405-
+------------------+---------------+-------------------------------+
406-
| :attr:`doc` | const char \* | points to the contents of the |
407-
| | | docstring |
408-
+------------------+---------------+-------------------------------+
390+
.. c:member:: const char* PyMemberDef.name
391+
392+
Name of the member
393+
394+
.. c:member:: int PyMemberDef.type
395+
396+
The type of the member in the C struct.
397+
398+
.. c:member:: Py_ssize_t PyMemberDef.offset
399+
400+
The offset in bytes that the member is located on the types object struct.
401+
402+
.. c:member:: int PyMemberDef.flags
403+
404+
Flag bits indicating if the field should be read-only or writable.
405+
406+
.. c:member:: const char* PyMemberDef.doc
407+
408+
Points to the contents of the docstring.
409409
410-
:attr:`!type` can be one of many ``T_`` macros corresponding to various C
410+
:c:member:`PyMemberDef.type` can be one of many ``T_`` macros corresponding to various C
411411
types. When the member is accessed in Python, it will be converted to the
412412
equivalent Python type.
413413
@@ -441,7 +441,7 @@ Accessing attributes of extension types
441441
handles use of the :keyword:`del` statement on that attribute more correctly
442442
than :c:macro:`T_OBJECT`.
443443
444-
:attr:`flags` can be ``0`` for write and read access or :c:macro:`READONLY` for
444+
:c:member:`PyMemberDef.flags` can be ``0`` for write and read access or :c:macro:`READONLY` for
445445
read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies
446446
:c:macro:`READONLY`. :c:macro:`T_STRING` data is interpreted as UTF-8.
447447
Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX`

Doc/c-api/tuple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Tuple Objects
6969
7070
Return the slice of the tuple pointed to by *p* between *low* and *high*,
7171
or ``NULL`` on failure. This is the equivalent of the Python expression
72-
``p[low:high]``. Indexing from the end of the list is not supported.
72+
``p[low:high]``. Indexing from the end of the tuple is not supported.
7373
7474
7575
.. c:function:: int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o)

Doc/c-api/type.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,55 @@ Type Objects
5757
modification of the attributes or base classes of the type.
5858
5959
60+
.. c:function:: int PyType_AddWatcher(PyType_WatchCallback callback)
61+
62+
Register *callback* as a type watcher. Return a non-negative integer ID
63+
which must be passed to future calls to :c:func:`PyType_Watch`. In case of
64+
error (e.g. no more watcher IDs available), return ``-1`` and set an
65+
exception.
66+
67+
.. versionadded:: 3.12
68+
69+
70+
.. c:function:: int PyType_ClearWatcher(int watcher_id)
71+
72+
Clear watcher identified by *watcher_id* (previously returned from
73+
:c:func:`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error (e.g.
74+
if *watcher_id* was never registered.)
75+
76+
An extension should never call ``PyType_ClearWatcher`` with a *watcher_id*
77+
that was not returned to it by a previous call to
78+
:c:func:`PyType_AddWatcher`.
79+
80+
.. versionadded:: 3.12
81+
82+
83+
.. c:function:: int PyType_Watch(int watcher_id, PyObject *type)
84+
85+
Mark *type* as watched. The callback granted *watcher_id* by
86+
:c:func:`PyType_AddWatcher` will be called whenever
87+
:c:func:`PyType_Modified` reports a change to *type*. (The callback may be
88+
called only once for a series of consecutive modifications to *type*, if
89+
:c:func:`PyType_Lookup` is not called on *type* between the modifications;
90+
this is an implementation detail and subject to change.)
91+
92+
An extension should never call ``PyType_Watch`` with a *watcher_id* that was
93+
not returned to it by a previous call to :c:func:`PyType_AddWatcher`.
94+
95+
.. versionadded:: 3.12
96+
97+
98+
.. c:type:: int (*PyType_WatchCallback)(PyObject *type)
99+
100+
Type of a type-watcher callback function.
101+
102+
The callback must not modify *type* or cause :c:func:`PyType_Modified` to be
103+
called on *type* or any type in its MRO; violating this rule could cause
104+
infinite recursion.
105+
106+
.. versionadded:: 3.12
107+
108+
60109
.. c:function:: int PyType_HasFeature(PyTypeObject *o, int feature)
61110
62111
Return non-zero if the type object *o* sets the feature *feature*.

Doc/data/stable_abi.dat

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

0 commit comments

Comments
 (0)