Skip to content

Commit 59547b8

Browse files
Merge branch 'main' into gh-159689-processpool-mid-send
2 parents ceb82b2 + 8c3b566 commit 59547b8

75 files changed

Lines changed: 2280 additions & 754 deletions

File tree

Some content is hidden

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

‎.github/workflows/reusable-macos.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
--enable-slower-safety \
5252
--enable-safety \
5353
${{ inputs.free-threading && '--disable-gil' || '' }} \
54+
--with-tail-call-interp \
5455
--prefix=/opt/python-dev \
5556
--with-openssl="$(brew --prefix openssl@3.5)"
5657
- name: Build CPython

‎.github/workflows/tail-call.yml‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,6 @@ env:
2323
LLVM_VERSION: 21
2424

2525
jobs:
26-
macos:
27-
name: aarch64-apple-darwin/clang
28-
runs-on: macos-26
29-
timeout-minutes: 60
30-
steps:
31-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32-
with:
33-
persist-credentials: false
34-
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
35-
with:
36-
python-version: '3.11'
37-
- name: Install dependencies
38-
run: |
39-
brew update
40-
brew install llvm@${{ env.LLVM_VERSION }}
41-
- name: Build
42-
run: |
43-
export SDKROOT="$(xcrun --show-sdk-path)"
44-
export PATH="/opt/homebrew/opt/llvm@${{ env.LLVM_VERSION }}/bin:$PATH"
45-
CC=clang-${{ env.LLVM_VERSION }} ./configure --with-tail-call-interp
46-
make all --jobs 4
47-
- name: Test
48-
run: |
49-
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
50-
5126
linux:
5227
name: ${{ matrix.target }}
5328
runs-on: ${{ matrix.runner }}

‎Doc/conf.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,11 @@
608608
r'https://unix.org/version2/whatsnew/lp64_wp.html',
609609
]
610610

611+
# Options to adjust search results sorting
612+
# ----------------------------------------
613+
614+
html_search_scorer = "tools/static/search_scorer.js"
615+
611616

612617
# Options for sphinx.ext.extlinks
613618
# -------------------------------

‎Doc/pylock.toml‎

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e
167167

168168
[[packages]]
169169
name = "docutils"
170-
version = "0.21.2"
171-
sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", upload-time = 2024-04-23T18:57:18Z, size = 2204444, hashes = { sha256 = "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" } }
172-
wheels = [{ url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", upload-time = 2024-04-23T18:57:14Z, size = 587408, hashes = { sha256 = "dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2" } }]
170+
version = "0.22.4"
171+
sdist = { url = "https://files.pythonhosted.org/packages/ae/b6/03bb70946330e88ffec97aefd3ea75ba575cb2e762061e0e62a213befee8/docutils-0.22.4.tar.gz", upload-time = 2025-12-18T19:00:26Z, size = 2291750, hashes = { sha256 = "4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968" } }
172+
wheels = [{ url = "https://files.pythonhosted.org/packages/02/10/5da547df7a391dcde17f59520a231527b8571e6f46fc8efb02ccb370ab12/docutils-0.22.4-py3-none-any.whl", upload-time = 2025-12-18T19:00:18Z, size = 633196, hashes = { sha256 = "d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de" } }]
173173

174174
[[packages]]
175175
name = "idna"
@@ -236,12 +236,6 @@ version = "4.1.0"
236236
sdist = { url = "https://files.pythonhosted.org/packages/ae/f9/41dc953bbeb056c17d5f7a519f50fdf010bd0553be2d630bc69d1e022703/roman_numerals-4.1.0.tar.gz", upload-time = 2025-12-17T18:25:34Z, size = 9077, hashes = { sha256 = "1af8b147eb1405d5839e78aeb93131690495fe9da5c91856cb33ad55a7f1e5b2" } }
237237
wheels = [{ url = "https://files.pythonhosted.org/packages/04/54/6f679c435d28e0a568d8e8a7c0a93a09010818634c3c3907fc98d8983770/roman_numerals-4.1.0-py3-none-any.whl", upload-time = 2025-12-17T18:25:33Z, size = 7676, hashes = { sha256 = "647ba99caddc2cc1e55a51e4360689115551bf4476d90e8162cf8c345fe233c7" } }]
238238

239-
[[packages]]
240-
name = "roman-numerals-py"
241-
version = "4.1.0"
242-
sdist = { url = "https://files.pythonhosted.org/packages/cb/b5/de96fca640f4f656eb79bbee0e79aeec52e3e0e359f8a3e6a0d366378b64/roman_numerals_py-4.1.0.tar.gz", upload-time = 2025-12-17T18:25:41Z, size = 4274, hashes = { sha256 = "f5d7b2b4ca52dd855ef7ab8eb3590f428c0b1ea480736ce32b01fef2a5f8daf9" } }
243-
wheels = [{ url = "https://files.pythonhosted.org/packages/27/2c/daca29684cbe9fd4bc711f8246da3c10adca1ccc4d24436b17572eb2590e/roman_numerals_py-4.1.0-py3-none-any.whl", upload-time = 2025-12-17T18:25:40Z, size = 4547, hashes = { sha256 = "553114c1167141c1283a51743759723ecd05604a1b6b507225e91dc1a6df0780" } }]
244-
245239
[[packages]]
246240
name = "snowballstemmer"
247241
version = "2.2.0"
@@ -250,9 +244,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/ed/dc/c02e01294f7265e
250244

251245
[[packages]]
252246
name = "sphinx"
253-
version = "8.2.3"
254-
sdist = { url = "https://files.pythonhosted.org/packages/38/ad/4360e50ed56cb483667b8e6dadf2d3fda62359593faabbe749a27c4eaca6/sphinx-8.2.3.tar.gz", upload-time = 2025-03-02T22:31:59Z, size = 8321876, hashes = { sha256 = "398ad29dee7f63a75888314e9424d40f52ce5a6a87ae88e7071e80af296ec348" } }
255-
wheels = [{ url = "https://files.pythonhosted.org/packages/31/53/136e9eca6e0b9dc0e1962e2c908fbea2e5ac000c2a2fbd9a35797958c48b/sphinx-8.2.3-py3-none-any.whl", upload-time = 2025-03-02T22:31:56Z, size = 3589741, hashes = { sha256 = "4405915165f13521d875a8c29c8970800a0141c14cc5416a38feca4ea5d9b9c3" } }]
247+
version = "9.1.1"
248+
sdist = { url = "https://files.pythonhosted.org/packages/fc/73/567727fc8c8d85bc3adc88a246e12937cfda8d565cf1d80e85bceaa61fe5/sphinx-9.1.1.tar.gz", upload-time = 2026-10-20T00:41:13Z, size = 8725638, hashes = { sha256 = "48b627f02908f22c601b3ba9c7b17265b4f315dd05c8bc64cd4da41183f44fbc" } }
249+
wheels = [{ url = "https://files.pythonhosted.org/packages/47/18/3c66ea76da7de47e716b181c35bdbfafbd5e9af0bb247b14578e9de348e9/sphinx-9.1.1-py3-none-any.whl", upload-time = 2026-10-20T00:41:11Z, size = 3923559, hashes = { sha256 = "f8b60013ce25017be41a509e5c2d265bc1918410061315c36b809c7f335646c0" } }]
256250

257251
[[packages]]
258252
name = "sphinx-linklint"

‎Doc/requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# won't suddenly cause build failures. Updating the version is fine as long
88
# as no warnings are raised by doing so.
99
# Keep this version in sync with ``Doc/conf.py``.
10-
sphinx<9.0.0
10+
sphinx~=9.1.1
1111

1212
pygments>=2.21
1313

‎Doc/tools/static/search_scorer.js‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var Scorer = {
2+
score: function (result) {
3+
let [docname, title, anchor, descr, score, filename, kind] = result;
4+
5+
// boost the score of built-in functions and types
6+
const builtinPages = [
7+
"builtins/constants",
8+
"builtins/exceptions",
9+
"builtins/functions",
10+
"builtins/stdtypes",
11+
];
12+
if (kind === "object" && builtinPages.includes(docname)) {
13+
score += 7;
14+
}
15+
16+
return score;
17+
},
18+
19+
// all values below this line are the Sphinx defaults
20+
// (see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_search_scorer)
21+
22+
// Additive scores depending on the priority of the object
23+
// Priority is set by object domains
24+
// (see https://www.sphinx-doc.org/en/master/extdev/domainapi.html)
25+
objPrio: {
26+
0: 15,
27+
1: 5,
28+
2: -5,
29+
},
30+
objPrioDefault: 0,
31+
32+
objNameMatch: 11, // score if object's name exactly matches search query
33+
objPartialMatch: 6, // score if object's name contains search query
34+
35+
title: 15, // score if title exactly matches search query
36+
partialTitle: 7, // score if title contains search query
37+
38+
term: 5, // score if a term exactly matches search query
39+
partialTerm: 2, // score if a term contains search query
40+
};

‎Include/internal/pycore_dict.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ PyAPI_FUNC(int) _PyDict_SetItem_KnownHash_LockHeld(PyDictObject *mp, PyObject *k
170170
PyAPI_FUNC(int) _PyDict_GetItemRef_KnownHash_LockHeld(PyDictObject *op, PyObject *key, Py_hash_t hash, PyObject **result);
171171
PyAPI_FUNC(int) _PyDict_GetItemRef_KnownHash(PyDictObject *op, PyObject *key, Py_hash_t hash, PyObject **result);
172172
extern int _PyDict_GetItemRef_Unicode_LockHeld(PyDictObject *op, PyObject *key, PyObject **result);
173+
extern PyObject *_PyDict_GetItem_ExactUnicode(PyDictObject *mp, PyObject *key);
174+
extern int _PyDict_GetItemStackRef_ExactUnicode(PyDictObject *mp,
175+
PyObject *key,
176+
_PyStackRef *value_addr);
173177
PyAPI_FUNC(int) _PyObjectDict_SetItem(PyTypeObject *tp, PyObject *obj, PyObject **dictptr, PyObject *name, PyObject *value);
174178

175179
extern int _PyDict_Pop_KnownHash(

‎Lib/asyncio/base_events.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ def __init__(self):
432432
# Identifier of the thread running the event loop, or None if the
433433
# event loop is not running
434434
self._thread_id = None
435-
self._clock_resolution = time.get_clock_info('monotonic').resolution
436435
self._exception_handler = None
437436
self.set_debug(coroutines._is_debug_mode())
438437
# The preserved state of async generator hooks.
@@ -2057,7 +2056,7 @@ def _run_once(self):
20572056
now = self.time()
20582057
# Ensure that `end_time` is strictly increasing
20592058
# when the clock resolution is too small.
2060-
end_time = now + max(self._clock_resolution, math.ulp(now))
2059+
end_time = now + max(constants.CLOCK_RESOLUTION, math.ulp(now))
20612060
while self._scheduled:
20622061
handle = self._scheduled[0]
20632062
if handle._when >= end_time:

‎Lib/asyncio/base_tasks.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ def _task_get_stack(task, limit):
4242
elif hasattr(task._coro, 'ag_frame'):
4343
# case 3: async generators
4444
f = task._coro.ag_frame
45+
elif not task.done() and hasattr(task._coro, 'aga_gen'):
46+
# case 4: async generator's asend/athrow/aclose
47+
f = task._coro.aga_gen.ag_frame
4548
else:
46-
# case 4: unknown objects
49+
# case 5: unknown objects
4750
f = None
4851
if f is not None:
4952
while f is not None:

‎Lib/asyncio/constants.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# SPDX-FileCopyrightText: Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
44

55
import enum
6+
import time
67

78
# After the connection is lost, log warnings after this many write()s.
89
LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
@@ -33,6 +34,9 @@
3334
# Default timeout for joining the threads in the threadpool
3435
THREAD_JOIN_TIMEOUT = 300
3536

37+
# Resolution of the clock used by the event loop, in seconds.
38+
CLOCK_RESOLUTION = time.get_clock_info('monotonic').resolution
39+
3640
# The enum should be here to break circular dependencies between
3741
# base_events and sslproto
3842
class _SendfileMode(enum.Enum):

0 commit comments

Comments
 (0)