Skip to content

Commit ebdc293

Browse files
committed
Merge branch 'main' of https://github.com/python/cpython into list-init-thread-safety
2 parents 8dcba72 + 78ffba4 commit ebdc293

File tree

296 files changed

+5052
-2410
lines changed

Some content is hidden

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

296 files changed

+5052
-2410
lines changed

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@8 make
4444
# Because alternate versions are not symlinked into place by default:
45-
brew link tcl-tk@8
45+
brew link --overwrite tcl-tk@8
4646
- name: Configure CPython
4747
run: |
4848
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \

Doc/c-api/long.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
657657
Export API
658658
^^^^^^^^^^
659659
660-
.. versionadded:: next
660+
.. versionadded:: 3.14
661661
662662
.. c:struct:: PyLongLayout
663663
@@ -769,7 +769,7 @@ PyLongWriter API
769769
770770
The :c:type:`PyLongWriter` API can be used to import an integer.
771771
772-
.. versionadded:: next
772+
.. versionadded:: 3.14
773773
774774
.. c:struct:: PyLongWriter
775775

Doc/c-api/monitoring.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,14 @@ See :mod:`sys.monitoring` for descriptions of the events.
7575
Fire a ``JUMP`` event.
7676
7777
78-
.. c:function:: int PyMonitoring_FireBranchEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *target_offset)
78+
.. c:function:: int PyMonitoring_FireBranchLeftEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *target_offset)
7979
80-
Fire a ``BRANCH`` event.
80+
Fire a ``BRANCH_LEFT`` event.
81+
82+
83+
.. c:function:: int PyMonitoring_FireBranchRightEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *target_offset)
84+
85+
Fire a ``BRANCH_RIGHT`` event.
8186
8287
8388
.. c:function:: int PyMonitoring_FireCReturnEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *retval)
@@ -168,7 +173,8 @@ would typically correspond to a python function.
168173
================================================== =====================================
169174
Macro Event
170175
================================================== =====================================
171-
.. c:macro:: PY_MONITORING_EVENT_BRANCH :monitoring-event:`BRANCH`
176+
.. c:macro:: PY_MONITORING_EVENT_BRANCH_LEFT :monitoring-event:`BRANCH_LEFT`
177+
.. c:macro:: PY_MONITORING_EVENT_BRANCH_RIGHT :monitoring-event:`BRANCH_RIGHT`
172178
.. c:macro:: PY_MONITORING_EVENT_CALL :monitoring-event:`CALL`
173179
.. c:macro:: PY_MONITORING_EVENT_C_RAISE :monitoring-event:`C_RAISE`
174180
.. c:macro:: PY_MONITORING_EVENT_C_RETURN :monitoring-event:`C_RETURN`

Doc/c-api/sequence.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ Sequence Protocol
105105
equivalent to the Python expression ``value in o``.
106106
107107
108+
.. c:function:: int PySequence_In(PyObject *o, PyObject *value)
109+
110+
Alias for :c:func:`PySequence_Contains`.
111+
112+
.. deprecated:: 3.14
113+
The function is :term:`soft deprecated` and should no longer be used to
114+
write new code.
115+
116+
108117
.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)
109118
110119
Return the first index *i* for which ``o[i] == value``. On error, return

Doc/c-api/weakref.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ as much as it can.
8888
Use :c:func:`PyWeakref_GetRef` instead.
8989
9090
91+
.. c:function:: int PyWeakref_IsDead(PyObject *ref)
92+
93+
Test if the weak reference *ref* is dead. Returns 1 if the reference is
94+
dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak
95+
reference object.
96+
97+
.. versionadded:: 3.14
98+
99+
91100
.. c:function:: void PyObject_ClearWeakRefs(PyObject *object)
92101
93102
This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler

Doc/library/asyncio-policy.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,20 @@ for the current process:
4040

4141
Return the current process-wide policy.
4242

43+
.. deprecated:: next
44+
The :func:`get_event_loop_policy` function is deprecated and
45+
will be removed in Python 3.16.
46+
4347
.. function:: set_event_loop_policy(policy)
4448

4549
Set the current process-wide policy to *policy*.
4650

4751
If *policy* is set to ``None``, the default policy is restored.
4852

53+
.. deprecated:: next
54+
The :func:`set_event_loop_policy` function is deprecated and
55+
will be removed in Python 3.16.
56+
4957

5058
.. _asyncio-policy-objects:
5159

Doc/library/ctypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ Utility functions
19641964

19651965
.. availability:: Windows
19661966

1967-
.. versionadded:: next
1967+
.. versionadded:: 3.14
19681968

19691969

19701970
.. function:: cast(obj, type)
@@ -2825,4 +2825,4 @@ Exceptions
28252825

28262826
.. availability:: Windows
28272827

2828-
.. versionadded:: next
2828+
.. versionadded:: 3.14

Doc/library/enum.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@ Module Contents
149149

150150
Return a list of all power-of-two integers contained in a flag.
151151

152+
:class:`EnumDict`
153+
154+
A subclass of :class:`dict` for use when subclassing :class:`EnumType`.
155+
152156

153157
.. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto``
154158
.. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, ``member``, ``nonmember``, ``global_enum``, ``show_flag_values``
159+
.. versionadded:: 3.14 ``EnumDict``
155160

156161
---------------
157162

@@ -821,7 +826,17 @@ Data Types
821826
>>> KeepFlag(2**2 + 2**4)
822827
<KeepFlag.BLUE|16: 20>
823828

824-
.. versionadded:: 3.11
829+
.. versionadded:: 3.11
830+
831+
.. class:: EnumDict
832+
833+
*EnumDict* is a subclass of :class:`dict` for use when subclassing :class:`EnumType`.
834+
835+
.. attribute:: EnumDict.member_names
836+
837+
Return list of member names.
838+
839+
.. versionadded:: 3.14
825840

826841
---------------
827842

Doc/library/errno.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ defined by the module. The specific list of defined symbols is available as
617617

618618
Memory page has hardware error.
619619

620-
.. versionadded:: next
620+
.. versionadded:: 3.14
621621

622622

623623
.. data:: EALREADY

Doc/library/inspect.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,13 @@ which is a bitmap of the following flags:
17081708

17091709
.. versionadded:: 3.14
17101710

1711+
.. data:: CO_METHOD
1712+
1713+
The flag is set when the code object is a function defined in class
1714+
scope.
1715+
1716+
.. versionadded:: 3.14
1717+
17111718
.. note::
17121719
The flags are specific to CPython, and may not be defined in other
17131720
Python implementations. Furthermore, the flags are an implementation

0 commit comments

Comments
 (0)