Skip to content

Commit 22b3b72

Browse files
Merge branch 'main' into ordereddict
2 parents 4d8e596 + 525dcfe commit 22b3b72

File tree

166 files changed

+4262
-1764
lines changed

Some content is hidden

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

166 files changed

+4262
-1764
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,23 +202,15 @@ jobs:
202202
strategy:
203203
fail-fast: false
204204
matrix:
205-
# Cirrus and macos-14 are M1, macos-15-intel is default GHA Intel.
206-
# macOS 13 only runs tests against the GIL-enabled CPython.
207-
# Cirrus used for upstream, macos-14 for forks.
205+
# macos-14 is M1, macos-15-intel is Intel.
206+
# macos-15-intel only runs tests against the GIL-enabled CPython.
208207
os:
209-
- ghcr.io/cirruslabs/macos-runner:sonoma
210208
- macos-14
211209
- macos-15-intel
212-
is-fork: # only used for the exclusion trick
213-
- ${{ github.repository_owner != 'python' }}
214210
free-threading:
215211
- false
216212
- true
217213
exclude:
218-
- os: ghcr.io/cirruslabs/macos-runner:sonoma
219-
is-fork: true
220-
- os: macos-14
221-
is-fork: false
222214
- os: macos-15-intel
223215
free-threading: true
224216
uses: ./.github/workflows/reusable-macos.yml
@@ -409,9 +401,8 @@ jobs:
409401
fail-fast: false
410402
matrix:
411403
include:
412-
# Use the same runs-on configuration as build-macos and build-ubuntu.
413404
- arch: aarch64
414-
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
405+
runs-on: macos-14
415406
- arch: x86_64
416407
runs-on: ubuntu-24.04
417408

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ repos:
2626
name: Run Ruff (lint) on Tools/peg_generator/
2727
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
2828
files: ^Tools/peg_generator/
29+
- id: ruff-check
30+
name: Run Ruff (lint) on Tools/wasm/
31+
args: [--exit-non-zero-on-fix, --config=Tools/wasm/.ruff.toml]
32+
files: ^Tools/wasm/
2933
- id: ruff-format
3034
name: Run Ruff (format) on Doc/
3135
args: [--check]

Doc/c-api/bytes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Create, Finish, Discard
260260
writer size to *size*. The caller is responsible to write *size*
261261
bytes using :c:func:`PyBytesWriter_GetData`.
262262
263-
On error, set an exception and return NULL.
263+
On error, set an exception and return ``NULL``.
264264
265265
*size* must be positive or zero.
266266

Doc/c-api/function.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ There are a few functions specific to Python functions.
175175
176176
.. versionadded:: 3.12
177177
178+
- ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``
179+
180+
.. versionadded:: 3.15
178181
179182
.. c:type:: int (*PyFunction_WatchCallback)(PyFunction_WatchEvent event, PyFunctionObject *func, PyObject *new_value)
180183

Doc/c-api/init.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ code, or when embedding the Python interpreter:
11131113
This function is safe to call without an :term:`attached thread state`; it
11141114
will simply return ``NULL`` indicating that there was no prior thread state.
11151115
1116-
.. seealso:
1116+
.. seealso::
11171117
:c:func:`PyEval_ReleaseThread`
11181118
11191119
.. note::
@@ -1124,6 +1124,19 @@ code, or when embedding the Python interpreter:
11241124
The following functions use thread-local storage, and are not compatible
11251125
with sub-interpreters:
11261126
1127+
.. c:type:: PyGILState_STATE
1128+
1129+
The type of the value returned by :c:func:`PyGILState_Ensure` and passed to
1130+
:c:func:`PyGILState_Release`.
1131+
1132+
.. c:enumerator:: PyGILState_LOCKED
1133+
1134+
The GIL was already held when :c:func:`PyGILState_Ensure` was called.
1135+
1136+
.. c:enumerator:: PyGILState_UNLOCKED
1137+
1138+
The GIL was not held when :c:func:`PyGILState_Ensure` was called.
1139+
11271140
.. c:function:: PyGILState_STATE PyGILState_Ensure()
11281141
11291142
Ensure that the current thread is ready to call the Python C API regardless
@@ -1174,12 +1187,12 @@ with sub-interpreters:
11741187
made on the main thread. This is mainly a helper/diagnostic function.
11751188
11761189
.. note::
1177-
This function does not account for :term:`thread states <thread state>` created
1178-
by something other than :c:func:`PyGILState_Ensure` (such as :c:func:`PyThreadState_New`).
1190+
This function may return non-``NULL`` even when the :term:`thread state`
1191+
is detached.
11791192
Prefer :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked`
11801193
for most cases.
11811194
1182-
.. seealso: :c:func:`PyThreadState_Get``
1195+
.. seealso:: :c:func:`PyThreadState_Get`
11831196
11841197
.. c:function:: int PyGILState_Check()
11851198
@@ -1278,11 +1291,11 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
12781291
must be :term:`attached <attached thread state>`
12791292
12801293
.. versionchanged:: 3.9
1281-
This function now calls the :c:member:`PyThreadState.on_delete` callback.
1294+
This function now calls the :c:member:`!PyThreadState.on_delete` callback.
12821295
Previously, that happened in :c:func:`PyThreadState_Delete`.
12831296
12841297
.. versionchanged:: 3.13
1285-
The :c:member:`PyThreadState.on_delete` callback was removed.
1298+
The :c:member:`!PyThreadState.on_delete` callback was removed.
12861299
12871300
12881301
.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ Object Protocol
600600
601601
Clear the managed dictionary of *obj*.
602602
603-
This function must only be called in a traverse function of the type which
603+
This function must only be called in a clear function of the type which
604604
has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set.
605605
606606
.. versionadded:: 3.13

Doc/c-api/tuple.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ Tuple Objects
3737
or ``NULL`` with an exception set on failure.
3838
3939
40+
.. c:function:: PyObject* PyTuple_FromArray(PyObject *const *array, Py_ssize_t size)
41+
42+
Create a tuple of *size* items and copy references from *array* to the new
43+
tuple.
44+
45+
*array* can be NULL if *size* is ``0``.
46+
47+
On success, return a new reference.
48+
On error, set an exception and return ``NULL``.
49+
50+
.. versionadded:: next
51+
52+
4053
.. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)
4154
4255
Return a new tuple object of size *n*,

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
17041704
:c:func:`Py_CLEAR` macro performs the operations in a safe order.
17051705

17061706
If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the
1707-
:c:member:`~PyTypeObject.tp_flags` field, the traverse function must call
1707+
:c:member:`~PyTypeObject.tp_flags` field, the clear function must call
17081708
:c:func:`PyObject_ClearManagedDict` like this::
17091709

17101710
PyObject_ClearManagedDict((PyObject*)self);

Doc/library/crypt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ being deprecated in Python 3.11. The removal was decided in :pep:`594`.
1313

1414
Applications can use the :mod:`hashlib` module from the standard library.
1515
Other possible replacements are third-party libraries from PyPI:
16-
:pypi:`legacycrypt`, :pypi:`bcrypt`, :pypi:`argon2-cffi`, or :pypi:`passlib`.
16+
:pypi:`legacycrypt`, :pypi:`bcrypt`, or :pypi:`argon2-cffi`.
1717
These are not supported or maintained by the Python core team.
1818

1919
The last version of Python that provided the :mod:`!crypt` module was

Doc/library/importlib.resources.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ for example, a package and its resources can be imported from a zip file using
7272

7373
.. versionadded:: 3.9
7474

75-
.. deprecated-removed:: 3.12 3.15
76-
*package* parameter was renamed to *anchor*. *anchor* can now be a
75+
.. versionchanged:: 3.12
76+
*package* parameter was renamed to *anchor*.
77+
*package* was still accepted, but deprecated.
78+
79+
.. versionchanged:: 3.15
80+
*package* parameter was fully removed. *anchor* can now be a
7781
non-package module and if omitted will default to the caller's module.
7882
*package* is no longer accepted since Python 3.15. Consider passing the
7983
anchor positionally or using ``importlib_resources >= 5.10`` for a

0 commit comments

Comments
 (0)