Skip to content

Commit fdfbef6

Browse files
Merge branch 'main' into strptime-short-month-names
2 parents f64b374 + 9944ad3 commit fdfbef6

File tree

243 files changed

+6500
-3911
lines changed

Some content is hidden

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

243 files changed

+6500
-3911
lines changed

.github/workflows/reusable-change-detection.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
3-
name: Change detection
1+
name: Reusable change detection
42

53
on: # yamllint disable-line rule:truthy
64
workflow_call:

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs
1+
name: Reusable Docs
22

33
on:
44
workflow_call:
@@ -95,7 +95,7 @@ jobs:
9595
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9696
doctest:
9797
name: 'Doctest'
98-
runs-on: ubuntu-latest
98+
runs-on: ubuntu-22.04
9999
timeout-minutes: 60
100100
steps:
101101
- uses: actions/checkout@v4

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable macOS
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-tsan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Thread Sanitizer
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-ubuntu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Ubuntu
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-wasi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable WASI
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: TestsMSI
1+
name: Reusable Windows MSI
22

33
on:
44
workflow_call:

.github/workflows/reusable-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Windows
2+
13
on:
24
workflow_call:
35
inputs:

Doc/c-api/contextvars.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,24 @@ Context object management functions:
122122
.. c:type:: PyContextEvent
123123
124124
Enumeration of possible context object watcher events:
125-
- ``Py_CONTEXT_EVENT_ENTER``
126-
- ``Py_CONTEXT_EVENT_EXIT``
125+
126+
- ``Py_CONTEXT_EVENT_ENTER``: A context has been entered, causing the
127+
:term:`current context` to switch to it. The object passed to the watch
128+
callback is the now-current :class:`contextvars.Context` object. Each
129+
enter event will eventually have a corresponding exit event for the same
130+
context object after any subsequently entered contexts have themselves been
131+
exited.
132+
- ``Py_CONTEXT_EVENT_EXIT``: A context is about to be exited, which will
133+
cause the :term:`current context` to switch back to what it was before the
134+
context was entered. The object passed to the watch callback is the
135+
still-current :class:`contextvars.Context` object.
127136
128137
.. versionadded:: 3.14
129138
130139
.. c:type:: int (*PyContext_WatchCallback)(PyContextEvent event, PyContext* ctx)
131140
132-
Type of a context object watcher callback function.
133-
If *event* is ``Py_CONTEXT_EVENT_ENTER``, then the callback is invoked
134-
after *ctx* has been set as the current context for the current thread.
135-
Otherwise, the callback is invoked before the deactivation of *ctx* as the current context
136-
and the restoration of the previous contex object for the current thread.
141+
Context object watcher callback function. The object passed to the callback
142+
is event-specific; see :c:type:`PyContextEvent` for details.
137143
138144
If the callback returns with an exception set, it must return ``-1``; this
139145
exception will be printed as an unraisable exception using

Doc/c-api/import.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ Importing Modules
136136
such modules have no way to know that the module object is an unknown (and
137137
probably damaged with respect to the module author's intents) state.
138138
139-
The module's :attr:`__spec__` and :attr:`__loader__` will be set, if
140-
not set already, with the appropriate values. The spec's loader will
141-
be set to the module's ``__loader__`` (if set) and to an instance of
142-
:class:`~importlib.machinery.SourceFileLoader` otherwise.
139+
The module's :attr:`~module.__spec__` and :attr:`~module.__loader__` will be
140+
set, if not set already, with the appropriate values. The spec's loader
141+
will be set to the module's :attr:`!__loader__` (if set) and to an instance
142+
of :class:`~importlib.machinery.SourceFileLoader` otherwise.
143143
144-
The module's :attr:`__file__` attribute will be set to the code object's
145-
:attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also
146-
be set.
144+
The module's :attr:`~module.__file__` attribute will be set to the code
145+
object's :attr:`~codeobject.co_filename`. If applicable,
146+
:attr:`~module.__cached__` will also be set.
147147
148148
This function will reload the module if it was already imported. See
149149
:c:func:`PyImport_ReloadModule` for the intended way to reload a module.
@@ -155,29 +155,29 @@ Importing Modules
155155
:c:func:`PyImport_ExecCodeModuleWithPathnames`.
156156
157157
.. versionchanged:: 3.12
158-
The setting of :attr:`__cached__` and :attr:`__loader__` is
159-
deprecated. See :class:`~importlib.machinery.ModuleSpec` for
158+
The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__`
159+
is deprecated. See :class:`~importlib.machinery.ModuleSpec` for
160160
alternatives.
161161
162162
163163
.. c:function:: PyObject* PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname)
164164
165-
Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute of
166-
the module object is set to *pathname* if it is non-``NULL``.
165+
Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`~module.__file__`
166+
attribute of the module object is set to *pathname* if it is non-``NULL``.
167167
168168
See also :c:func:`PyImport_ExecCodeModuleWithPathnames`.
169169
170170
171171
.. c:function:: PyObject* PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname, PyObject *cpathname)
172172
173-
Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__`
173+
Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`~module.__cached__`
174174
attribute of the module object is set to *cpathname* if it is
175175
non-``NULL``. Of the three functions, this is the preferred one to use.
176176
177177
.. versionadded:: 3.3
178178
179179
.. versionchanged:: 3.12
180-
Setting :attr:`__cached__` is deprecated. See
180+
Setting :attr:`~module.__cached__` is deprecated. See
181181
:class:`~importlib.machinery.ModuleSpec` for alternatives.
182182
183183

0 commit comments

Comments
 (0)