Skip to content

Commit c7fda8f

Browse files
Merge branch 'main' into compile-syntax-warnings2
2 parents 3990961 + 3490a99 commit c7fda8f

File tree

840 files changed

+14421
-4858
lines changed

Some content is hidden

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

840 files changed

+14421
-4858
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

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
4444
- name: Install Homebrew dependencies
4545
run: |
46-
brew install pkg-config [email protected] xz gdbm tcl-tk@8 make
46+
brew install pkg-config [email protected] xz gdbm tcl-tk@9 make
4747
# Because alternate versions are not symlinked into place by default:
48-
brew link --overwrite tcl-tk@8
48+
brew link --overwrite tcl-tk@9
4949
- name: Configure CPython
5050
run: |
5151
MACOSX_DEPLOYMENT_TARGET=10.15 \

.pre-commit-config.yaml

Lines changed: 8 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]
@@ -34,6 +38,10 @@ repos:
3438
name: Run Ruff (format) on Tools/build/check_warnings.py
3539
args: [--check, --config=Tools/build/.ruff.toml]
3640
files: ^Tools/build/check_warnings.py
41+
- id: ruff-format
42+
name: Run Ruff (format) on Tools/wasm/
43+
args: [--check, --config=Tools/wasm/.ruff.toml]
44+
files: ^Tools/wasm/
3745

3846
- repo: https://github.com/psf/black-pre-commit-mirror
3947
rev: 25.9.0

Doc/c-api/arg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ the minimal value for the corresponding signed integer type of the same size.
305305
``D`` (:class:`complex`) [Py_complex]
306306
Convert a Python complex number to a C :c:type:`Py_complex` structure.
307307

308-
.. deprecated:: next
308+
.. deprecated:: 3.15
309309

310310
For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``,
311311
:exc:`DeprecationWarning` is emitted when the value is larger than

Doc/c-api/bytes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ PyBytesWriter
236236
The :c:type:`PyBytesWriter` API can be used to create a Python :class:`bytes`
237237
object.
238238
239-
.. versionadded:: next
239+
.. versionadded:: 3.15
240240
241241
.. c:type:: PyBytesWriter
242242
@@ -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/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Complex Number Objects
1616
1717
The complex number value, using the C :c:type:`Py_complex` representation.
1818

19-
.. deprecated-removed:: next 3.20
19+
.. deprecated-removed:: 3.15 3.20
2020
Use :c:func:`PyComplex_AsCComplex` and
2121
:c:func:`PyComplex_FromCComplex` to convert a
2222
Python complex number to/from the C :c:type:`Py_complex`

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Object Protocol
201201
This case can arise from forgetting ``NULL`` checks and would delete the
202202
attribute.
203203
204-
.. versionchanged:: next
204+
.. versionchanged:: 3.15
205205
Must not be called with NULL value if an exception is set.
206206
207207
@@ -226,7 +226,7 @@ Object Protocol
226226
For more details, see :c:func:`PyUnicode_InternFromString`, which may be
227227
used internally to create a key object.
228228
229-
.. versionchanged:: next
229+
.. versionchanged:: 3.15
230230
Must not be called with NULL value if an exception is set.
231231
232232
@@ -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/stable.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ third-party distributors.
202202
ABI Checking
203203
============
204204

205-
.. versionadded:: next
205+
.. versionadded:: 3.15
206206

207207
Python includes a rudimentary check for ABI compatibility.
208208

@@ -249,7 +249,7 @@ The full API is described below for advanced use cases.
249249
may lead to crashes.
250250
In particular, it is not safe to examine the raised exception.
251251
252-
.. versionadded:: next
252+
.. versionadded:: 3.15
253253
254254
.. c:macro:: PyABIInfo_VAR(NAME)
255255
@@ -266,7 +266,7 @@ The full API is described below for advanced use cases.
266266
PyABIInfo_DEFAULT_ABI_VERSION
267267
}
268268
269-
.. versionadded:: next
269+
.. versionadded:: 3.15
270270

271271
.. c:type:: PyABIInfo
272272
@@ -352,7 +352,7 @@ The full API is described below for advanced use cases.
352352
values of macros such as :c:macro:`Py_LIMITED_API`,
353353
:c:macro:`PY_VERSION_HEX` and :c:macro:`Py_GIL_DISABLED`.
354354

355-
.. versionadded:: next
355+
.. versionadded:: 3.15
356356

357357

358358
.. _limited-api-list:

0 commit comments

Comments
 (0)