Skip to content

Commit b51b265

Browse files
committed
Merge in the main branch
2 parents 2cd9bf4 + fa43a1e commit b51b265

File tree

231 files changed

+5162
-2918
lines changed

Some content is hidden

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

231 files changed

+5162
-2918
lines changed

.github/workflows/jit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
8+
- 'Python/executor_cases.c.h'
9+
- 'Python/optimizer_cases.c.h'
810
- '!Python/perf_jit_trampoline.c'
911
- '!**/*.md'
1012
- '!**/*.ini'
@@ -13,6 +15,8 @@ on:
1315
- '**jit**'
1416
- 'Python/bytecodes.c'
1517
- 'Python/optimizer*.c'
18+
- 'Python/executor_cases.c.h'
19+
- 'Python/optimizer_cases.c.h'
1620
- '!Python/perf_jit_trampoline.c'
1721
- '!**/*.md'
1822
- '!**/*.ini'

.github/workflows/posix-deps-apt.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ apt-get -yq install \
2525
uuid-dev \
2626
xvfb \
2727
zlib1g-dev
28+
29+
# Workaround missing libmpdec-dev on ubuntu 24.04:
30+
# https://launchpad.net/~ondrej/+archive/ubuntu/php
31+
# https://deb.sury.org/
32+
sudo add-apt-repository ppa:ondrej/php
33+
apt-get update
34+
apt-get -yq install libmpdec-dev

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ repos:
3434
name: Run Black on Tools/jit/
3535
files: ^Tools/jit/
3636

37+
- repo: https://github.com/Lucas-C/pre-commit-hooks
38+
rev: v1.5.5
39+
hooks:
40+
- id: remove-tabs
41+
types: [python]
42+
exclude: ^Tools/c-analyzer/cpython/_parser.py
43+
3744
- repo: https://github.com/pre-commit/pre-commit-hooks
3845
rev: v5.0.0
3946
hooks:

Doc/c-api/capsule.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,19 @@ Refer to :ref:`using-capsules` for more information on using these objects.
105105
``module.attribute``. The *name* stored in the capsule must match this
106106
string exactly.
107107
108+
This function splits *name* on the ``.`` character, and imports the first
109+
element. It then processes further elements using attribute lookups.
110+
108111
Return the capsule's internal *pointer* on success. On failure, set an
109112
exception and return ``NULL``.
110113
114+
.. note::
115+
116+
If *name* points to an attribute of some submodule or subpackage, this
117+
submodule or subpackage must be previously imported using other means
118+
(for example, by using :c:func:`PyImport_ImportModule`) for the
119+
attribute lookups to succeed.
120+
111121
.. versionchanged:: 3.3
112122
*no_block* has no effect anymore.
113123

Doc/c-api/init.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
12501250
.. c:function:: void PyInterpreterState_Clear(PyInterpreterState *interp)
12511251
12521252
Reset all information in an interpreter state object. There must be
1253-
an :term:`attached thread state` for the the interpreter.
1253+
an :term:`attached thread state` for the interpreter.
12541254
12551255
.. audit-event:: cpython.PyInterpreterState_Clear "" c.PyInterpreterState_Clear
12561256
@@ -2277,6 +2277,18 @@ The C-API provides a basic mutual exclusion lock.
22772277
22782278
.. versionadded:: 3.13
22792279
2280+
.. c:function:: int PyMutex_IsLocked(PyMutex *m)
2281+
2282+
Returns non-zero if the mutex *m* is currently locked, zero otherwise.
2283+
2284+
.. note::
2285+
2286+
This function is intended for use in assertions and debugging only and
2287+
should not be used to make concurrency control decisions, as the lock
2288+
state may change immediately after the check.
2289+
2290+
.. versionadded:: next
2291+
22802292
.. _python-critical-section-api:
22812293
22822294
Python Critical Section API

Doc/c-api/long.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
439439
All *n_bytes* of the buffer are written: large buffers are padded with
440440
zeroes.
441441
442-
If the returned value is greater than than *n_bytes*, the value was
442+
If the returned value is greater than *n_bytes*, the value was
443443
truncated: as many of the lowest bits of the value as could fit are written,
444444
and the higher bits are ignored. This matches the typical behavior
445445
of a C-style downcast.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Pending removal in Python 3.15
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

4-
* The bundled copy of ``libmpdecimal``.
54
* The :c:func:`!PyImport_ImportModuleNoBlock`:
65
Use :c:func:`PyImport_ImportModule` instead.
76
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Pending removal in Python 3.16
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The bundled copy of ``libmpdec``.

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ Pending removal in Python 3.15
9797
After eight years in the :mod:`typing` module,
9898
it has yet to be supported by any major type checker.
9999

100+
* :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules.
101+
100102
* :mod:`wave`:
101103

102104
* The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of

Doc/deprecations/pending-removal-in-future.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ although there is currently no date scheduled for their removal.
8989
underscore.
9090
(Contributed by Serhiy Storchaka in :gh:`91760`.)
9191

92-
* :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules.
93-
9492
* :mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in
9593
Python 3.12; use the *onexc* parameter instead.
9694

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy