Skip to content

Commit e47555f

Browse files
authored
Merge branch 'main' into cprofile-module-multiprocessing-update
2 parents 7c5f2d3 + bfecfcc commit e47555f

68 files changed

Lines changed: 10212 additions & 1926 deletions

File tree

Some content is hidden

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

.github/workflows/reusable-san.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ jobs:
8686
run: >-
8787
./python -m test
8888
${{ inputs.sanitizer == 'TSan' && '--tsan' || '' }}
89-
-j4 -W
89+
-j4 -W --timeout=900 --slowest
9090
- name: Parallel tests
9191
if: >-
9292
inputs.sanitizer == 'TSan'
9393
&& fromJSON(inputs.free-threading)
94-
run: ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W
94+
run: ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W --timeout=600 --slowest
9595
- name: Display logs
9696
if: always()
9797
run: find "${GITHUB_WORKSPACE}" -name 'san_log.*' | xargs head -n 1000

Doc/c-api/type.rst

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,10 @@ but need extra remarks for use as slots:
563563
:c:member:`Slot ID <PySlot.sl_id>` for the name of the type,
564564
used to set :c:member:`PyTypeObject.tp_name`.
565565
566-
This slot (or :c:func:`PyType_Spec.name`) is required to create a type.
566+
This slot (or :c:member:`PyType_Spec.name`) is required to create a type.
567567
568568
This may not be used in :c:member:`PyType_Spec.slots`.
569-
Use :c:func:`PyType_Spec.name` instead.
569+
Use :c:member:`PyType_Spec.name` instead.
570570
571571
.. impl-detail::
572572
@@ -585,7 +585,7 @@ but need extra remarks for use as slots:
585585
The value must be positive.
586586
587587
This may not be used in :c:member:`PyType_Spec.slots`.
588-
Use :c:func:`PyType_Spec.basicsize` instead.
588+
Use :c:member:`PyType_Spec.basicsize` instead.
589589
590590
This slot may not be used with :c:func:`PyType_GetSlot`.
591591
Use :c:member:`PyTypeObject.tp_basicsize` instead if needed, but be aware
@@ -616,7 +616,7 @@ but need extra remarks for use as slots:
616616
:c:macro:`!Py_tp_extra_basicsize` is an error.
617617
618618
This may not be used in :c:member:`PyType_Spec.slots`.
619-
Use negative :c:func:`PyType_Spec.basicsize` instead.
619+
Use negative :c:member:`PyType_Spec.basicsize` instead.
620620
621621
This slot may not be used with :c:func:`PyType_GetSlot`.
622622
@@ -648,7 +648,7 @@ but need extra remarks for use as slots:
648648
- With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag.
649649
650650
This may not be used in :c:member:`PyType_Spec.slots`.
651-
Use :c:func:`PyType_Spec.itemsize` instead.
651+
Use :c:member:`PyType_Spec.itemsize` instead.
652652
653653
This slot may not be used with :c:func:`PyType_GetSlot`.
654654
@@ -663,13 +663,44 @@ but need extra remarks for use as slots:
663663
:c:func:`PyType_FromSpecWithBases` sets it automatically.
664664
665665
This may not be used in :c:member:`PyType_Spec.slots`.
666-
Use negative :c:func:`PyType_Spec.basicsize` instead.
666+
Use negative :c:member:`PyType_Spec.basicsize` instead.
667667
668668
This slot may not be used with :c:func:`PyType_GetSlot`.
669669
Use :c:func:`PyType_GetFlags` instead.
670670
671671
.. versionadded:: 3.15
672672
673+
.. c:macro:: Py_tp_bases
674+
675+
:c:member:`Slot ID <PySlot.sl_id>` for type flags, used to set
676+
:c:member:`PyTypeObject.tp_bases`.
677+
678+
The slot can be set to a tuple of type objects which the newly created
679+
type should inherit from, like the "positional arguments" of
680+
a Python :ref:`class definition <class>`.
681+
682+
Alternately, the slot can be set to a single type object to specify
683+
a single base.
684+
The effect is the same as specifying a one-element tuple.
685+
686+
.. versionchanged:: 3.15
687+
688+
Previously, :c:macro:`!Py_tp_bases` required a tuple of types.
689+
690+
.. c:macro:: Py_tp_base
691+
692+
Equivalent to :c:macro:`Py_tp_bases` (with ``s`` at the end).
693+
If both are specified, :c:macro:`!Py_tp_bases` takes priority and
694+
this slot is ignored.
695+
696+
.. versionchanged:: 3.15
697+
698+
Previously, :c:macro:`!Py_tp_base` required a single type, not a tuple.
699+
700+
.. soft-deprecated:: 3.15
701+
702+
When not targetting older Python versions, pefer :c:macro:`!Py_tp_bases`.
703+
673704
The following slots do not correspond to public fields in the
674705
underlying structures:
675706

Doc/c-api/typeobj.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,12 +1936,12 @@ and :c:data:`PyType_Type` effectively act as defaults.)
19361936

19371937
.. c:member:: PyTypeObject* PyTypeObject.tp_base
19381938
1939-
.. corresponding-type-slot:: Py_tp_base
1940-
19411939
An optional pointer to a base type from which type properties are inherited. At
19421940
this level, only single inheritance is supported; multiple inheritance require
19431941
dynamically creating a type object by calling the metatype.
19441942

1943+
For the corresponding slot ID, see :c:macro:`Py_tp_base`.
1944+
19451945
.. note::
19461946

19471947
.. from Modules/xxmodule.c
@@ -2253,17 +2253,12 @@ and :c:data:`PyType_Type` effectively act as defaults.)
22532253

22542254
.. c:member:: PyObject* PyTypeObject.tp_bases
22552255
2256-
.. corresponding-type-slot:: Py_tp_bases
2257-
22582256
Tuple of base types.
22592257

22602258
This field should be set to ``NULL`` and treated as read-only.
22612259
Python will fill it in when the type is :c:func:`initialized <PyType_Ready>`.
22622260

2263-
For dynamically created classes, the :c:data:`Py_tp_bases`
2264-
:c:type:`slot <PyType_Slot>` can be used instead of the *bases* argument
2265-
of :c:func:`PyType_FromSpecWithBases`.
2266-
The argument form is preferred.
2261+
For the corresponding slot ID, see :c:macro:`Py_tp_bases`.
22672262

22682263
.. warning::
22692264

Doc/library/curses.ascii.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ C library:
114114

115115
.. function:: isblank(c)
116116

117-
Checks for an ASCII whitespace character; space or horizontal tab.
117+
Checks for an ASCII blank character; space or horizontal tab.
118118

119119

120120
.. function:: iscntrl(c)
@@ -168,7 +168,8 @@ C library:
168168

169169
.. function:: isctrl(c)
170170

171-
Checks for an ASCII control character (ordinal values 0 to 31).
171+
Checks for an ASCII control character (ordinal values 0 to 31). Unlike
172+
:func:`iscntrl`, this does not include the delete character (0x7f).
172173

173174

174175
.. function:: ismeta(c)

Doc/library/curses.panel.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ The module :mod:`!curses.panel` defines the following functions:
2626

2727
.. function:: new_panel(win)
2828

29-
Returns a panel object, associating it with the given window *win*. Be aware
29+
Returns a panel object, associating it with the given window *win* and
30+
placing the new panel on top of the panel stack. Be aware
3031
that you need to keep the returned panel object referenced explicitly. If you
3132
don't, the panel object is garbage collected and removed from the panel stack.
3233

@@ -44,7 +45,7 @@ The module :mod:`!curses.panel` defines the following functions:
4445

4546
.. _curses-panel-objects:
4647

47-
Panel Objects
48+
Panel objects
4849
-------------
4950

5051
Panel objects, as returned by :func:`new_panel` above, are windows with a
@@ -99,7 +100,8 @@ Panel objects have the following methods:
99100

100101
.. method:: Panel.show()
101102

102-
Display the panel (which might have been hidden).
103+
Display the panel (which might have been hidden), placing it on top of
104+
the panel stack.
103105

104106

105107
.. method:: Panel.top()

0 commit comments

Comments
 (0)