Skip to content

Commit 10f09e0

Browse files
committed
Merge branch 'main' into sqlite3-cli-completion-table-index-triger-view-column-function-schema
2 parents 445e279 + d6dd64a commit 10f09e0

File tree

154 files changed

+4329
-1959
lines changed

Some content is hidden

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

154 files changed

+4329
-1959
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/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/library/contextlib.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ Functions and classes provided:
327327
.. function:: redirect_stdout(new_target)
328328

329329
Context manager for temporarily redirecting :data:`sys.stdout` to
330-
another file or file-like object.
330+
another :term:`file object`.
331331

332332
This tool adds flexibility to existing functions or classes whose output
333-
is hardwired to stdout.
333+
is hardwired to :data:`sys.stdout`.
334334

335335
For example, the output of :func:`help` normally is sent to *sys.stdout*.
336336
You can capture that output in a string by redirecting the output to an
@@ -366,8 +366,8 @@ Functions and classes provided:
366366

367367
.. function:: redirect_stderr(new_target)
368368

369-
Similar to :func:`~contextlib.redirect_stdout` but redirecting
370-
:data:`sys.stderr` to another file or file-like object.
369+
Similar to :func:`~contextlib.redirect_stdout` but redirecting the global
370+
:data:`sys.stderr` to another :term:`file object`.
371371

372372
This context manager is :ref:`reentrant <reentrant-cms>`.
373373

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

Doc/library/os.rst

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ process and user.
216216

217217
You can delete items in this mapping to unset environment variables.
218218
:func:`unsetenv` will be called automatically when an item is deleted from
219-
:data:`os.environ`, and when one of the :meth:`pop` or :meth:`clear` methods is
220-
called.
219+
:data:`os.environ`, and when one of the :meth:`~dict.pop` or
220+
:meth:`~dict.clear` methods is called.
221221

222222
.. seealso::
223223

@@ -430,8 +430,8 @@ process and user.
430430
associated with the effective user id of the process; the group access
431431
list may change over the lifetime of the process, it is not affected by
432432
calls to :func:`setgroups`, and its length is not limited to 16. The
433-
deployment target value, :const:`MACOSX_DEPLOYMENT_TARGET`, can be
434-
obtained with :func:`sysconfig.get_config_var`.
433+
deployment target value can be obtained with
434+
:func:`sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') <sysconfig.get_config_var>`.
435435

436436

437437
.. function:: getlogin()
@@ -2606,10 +2606,10 @@ features:
26062606

26072607
Create a filesystem node (file, device special file or named pipe) named
26082608
*path*. *mode* specifies both the permissions to use and the type of node
2609-
to be created, being combined (bitwise OR) with one of ``stat.S_IFREG``,
2610-
``stat.S_IFCHR``, ``stat.S_IFBLK``, and ``stat.S_IFIFO`` (those constants are
2611-
available in :mod:`stat`). For ``stat.S_IFCHR`` and ``stat.S_IFBLK``,
2612-
*device* defines the newly created device special file (probably using
2609+
to be created, being combined (bitwise OR) with one of :const:`stat.S_IFREG`,
2610+
:const:`stat.S_IFCHR`, :const:`stat.S_IFBLK`, and :const:`stat.S_IFIFO`.
2611+
For :const:`stat.S_IFCHR` and :const:`stat.S_IFBLK`, *device* defines the
2612+
newly created device special file (probably using
26132613
:func:`os.makedev`), otherwise it is ignored.
26142614

26152615
This function can also support :ref:`paths relative to directory descriptors
@@ -2627,13 +2627,13 @@ features:
26272627
.. function:: major(device, /)
26282628

26292629
Extract the device major number from a raw device number (usually the
2630-
:attr:`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`).
2630+
:attr:`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:`stat`).
26312631

26322632

26332633
.. function:: minor(device, /)
26342634

26352635
Extract the device minor number from a raw device number (usually the
2636-
:attr:`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`).
2636+
:attr:`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:`stat`).
26372637

26382638

26392639
.. function:: makedev(major, minor, /)
@@ -3364,8 +3364,8 @@ features:
33643364

33653365
.. versionchanged:: 3.8
33663366
On Windows, the :attr:`st_mode` member now identifies special
3367-
files as :const:`S_IFCHR`, :const:`S_IFIFO` or :const:`S_IFBLK`
3368-
as appropriate.
3367+
files as :const:`~stat.S_IFCHR`, :const:`~stat.S_IFIFO` or
3368+
:const:`~stat.S_IFBLK` as appropriate.
33693369

33703370
.. versionchanged:: 3.12
33713371
On Windows, :attr:`st_ctime` is deprecated. Eventually, it will
@@ -4285,10 +4285,10 @@ to be ignored.
42854285

42864286
.. function:: abort()
42874287

4288-
Generate a :const:`SIGABRT` signal to the current process. On Unix, the default
4288+
Generate a :const:`~signal.SIGABRT` signal to the current process. On Unix, the default
42894289
behavior is to produce a core dump; on Windows, the process immediately returns
42904290
an exit code of ``3``. Be aware that calling this function will not call the
4291-
Python signal handler registered for :const:`SIGABRT` with
4291+
Python signal handler registered for :const:`~signal.SIGABRT` with
42924292
:func:`signal.signal`.
42934293

42944294

@@ -4592,6 +4592,8 @@ written in Python, such as a mail server's external command delivery program.
45924592
master end of the pseudo-terminal. For a more portable approach, use the
45934593
:mod:`pty` module. If an error occurs :exc:`OSError` is raised.
45944594

4595+
The returned file descriptor *fd* is :ref:`non-inheritable <fd_inheritance>`.
4596+
45954597
.. audit-event:: os.forkpty "" os.forkpty
45964598

45974599
.. warning::
@@ -4608,6 +4610,9 @@ written in Python, such as a mail server's external command delivery program.
46084610
threads, this now raises a :exc:`DeprecationWarning`. See the
46094611
longer explanation on :func:`os.fork`.
46104612

4613+
.. versionchanged:: next
4614+
The returned file descriptor is now made non-inheritable.
4615+
46114616
.. availability:: Unix, not WASI, not Android, not iOS.
46124617

46134618

0 commit comments

Comments
 (0)