Raymond Hettinger
c25400a4b6
Revert gh-139075. The sumprod fix needs more work. (gh-139092)
2025-09-18 02:05:27 -05:00
Oleksandr Kravets
444ebaf16e
Remove unnecessary slice in heapq.py (gh-139087)
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
2025-09-18 00:52:46 -05:00
Pablo Galindo Salgado
0ce9fb7e3b
gh-138970: Add general metadata system to the peg generator ( #138971 )
2025-09-18 02:17:04 +01:00
Raymond Hettinger
b485e50fde
gh-139074: Fix missing high precision case in sumprod() (gh-139075)
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
JIT / Interpreter (Debug) (push) Waiting to run
JIT / aarch64-pc-windows-msvc/msvc (Release) (push) Blocked by required conditions
JIT / aarch64-pc-windows-msvc/msvc (Debug) (push) Blocked by required conditions
JIT / i686-pc-windows-msvc/msvc (Release) (push) Blocked by required conditions
JIT / i686-pc-windows-msvc/msvc (Debug) (push) Blocked by required conditions
JIT / aarch64-apple-darwin/clang (Release) (push) Blocked by required conditions
JIT / aarch64-unknown-linux-gnu/gcc (Release) (push) Blocked by required conditions
JIT / aarch64-apple-darwin/clang (Debug) (push) Blocked by required conditions
JIT / aarch64-unknown-linux-gnu/gcc (Debug) (push) Blocked by required conditions
JIT / x86_64-pc-windows-msvc/msvc (Debug) (push) Blocked by required conditions
JIT / x86_64-apple-darwin/clang (Release) (push) Blocked by required conditions
JIT / x86_64-unknown-linux-gnu/gcc (Release) (push) Blocked by required conditions
JIT / x86_64-apple-darwin/clang (Debug) (push) Blocked by required conditions
JIT / x86_64-unknown-linux-gnu/gcc (Debug) (push) Blocked by required conditions
JIT / x86_64-pc-windows-msvc/msvc (Release) (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
2025-09-17 16:50:15 -05:00
Denis Sergeev
5a15e73789
gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814)
...
* gh-138813: Default `BaseProcess` `kwargs` to `None` (#138814 )
Set `BaseProcess.__init__(..., kwargs=None)` and initialize `kwargs` with
`dict(kwargs) if kwargs else {}`. This avoids a shared mutable default and
matches threading.Thread behavior.
Co-authored-by: Dmitrii Chuprov <cheese@altlinux.org>
* DummyProcess kwargs=None (which threading.Thread accepts properly)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-09-17 14:45:52 -07:00
Sergey Miryanov
b42af37ced
GH-138355: Remove trash_delete_later from _gc_runtime_state ( #138767 )
...
Remove trash_delete_later and trash_delete_nesting from _gc_runtime_state.
2025-09-17 21:25:24 +01:00
Donghee Na
d873fb42f3
gh-137838: Move _PyUOpInstruction buffer to PyInterpreterState (gh-138918)
2025-09-17 18:50:16 +01:00
Stefan Tatschner
a9b6b09141
gh-86819: Add ISO-TP CAN socket constants ( #23794 )
...
Co-authored-by: Stefan Tatschner <stefan@rumpelsepp.org>
Co-authored-by: Patrick Menschel <menschel.p@posteo.de>
2025-09-17 17:18:04 +00:00
Dino Viehland
e92599e677
gh-138714: Don't assume next block has instructions when propagating line numbers ( #138770 )
...
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2025-09-17 09:52:56 -07:00
Adam Turner
4b78fe9665
GH-137630: Convert `_interpqueues` to use Argument Clinic ( #137685 )
2025-09-17 17:35:00 +01:00
Moshe Kaplan
101fd33065
GH-139067: Add example for argparse's append action ( #131389 )
2025-09-17 17:24:20 +01:00
Victor Stinner
c72ffe71f1
gh-129813, PEP 782: Set invalid bytes in PyBytesWriter ( #139054 )
...
Initialize the buffer with 0xFF byte pattern when creating a writer
object, but also when resizing/growing the writer.
2025-09-17 17:58:32 +02:00
Victor Stinner
82e1920a01
gh-129813, PEP 782: Use PyBytesWriter in _testclinic ( #139048 )
...
Replace PyBytes_FromStringAndSize(NULL, size) with the new public
PyBytesWriter API.
2025-09-17 17:55:30 +02:00
chiri
8eb106240f
gh-138736: Fix sqlite3.Connection.blobopen 'row' parameter type and naming ( #138738 )
...
The 'row' parameter represents a ROWID. Clarify this in docs and docstrings.
2025-09-17 15:51:14 +00:00
Victor Stinner
77a22ef76a
gh-129813, PEP 782: Use PyBytesWriter in _multiprocessing ( #139047 )
...
Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize()
with the new public PyBytesWriter API.
Change also 'read' variable type from int to Py_ssize_t.
2025-09-17 17:44:13 +02:00
Victor Stinner
263242613f
gh-129813, PEP 782: Use PyBytesWriter in _Py_bytes_maketrans() ( #139044 )
...
Replace PyBytes_FromStringAndSize(NULL, size) with the new public
PyBytesWriter API.
2025-09-17 17:43:30 +02:00
Hans Then
dd0840bf67
gh-132558: Improve argparse docs on combining type and choices ( #133827 )
...
Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
2025-09-17 15:25:17 +00:00
Adam Turner
2212ae5557
GH-92266: Remove embedded tabs from `c-analyzer/cpython/_parser.py` ( #137622 )
2025-09-17 15:25:04 +00:00
Paul Ganssle
5560ab674b
Add pganssle to CODEOWNERS for `zoneinfo` ( #139032 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-17 16:17:27 +01:00
PrinceNaroliya
37425fe9fb
gh-137988: Fix const description in argparse.add_argument() docs ( #138315 )
...
Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
2025-09-17 15:15:57 +00:00
Peter Bierma
a64881363b
gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606)
...
This reapplies GH-128640.
2025-09-17 11:14:19 -04:00
Dino Viehland
299de38e61
gh-131776: Expose functions called from the interpreter loop via PyAPI_FUNC ( #134242 )
2025-09-17 08:04:02 -07:00
Aniket
dd15a2e11e
gh-138952: Document platform.machine() output casing inconsistency across platforms ( #138962 )
...
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-09-17 15:56:21 +01:00
Rajhans Jadhao
e1eca8b308
gh-129368: In PyRun C API docs, clarify what a "start token" is ( #129935 )
2025-09-17 14:51:20 +00:00
Hood Chatham
2629ee4eb0
gh-128627: Use __builtin_wasm_test_function_pointer_signature for Emscripten trampoline ( #137470 )
...
With https://github.com/llvm/llvm-project/pull/150201 being merged, there is
now a better way to generate the Emscripten trampoline, instead of including
hand-generated binary WASM content. Requires Emscripten 4.0.12.
2025-09-17 15:33:55 +01:00
PrinceNaroliya
81c975bcfc
gh-139006: Doc: Clarify html.escape function description ( #139016 )
...
Tests / Docs (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
Doc: Clarify html.escape function description (GH-139006)
2025-09-17 21:45:34 +08:00
Petr Viktorin
5df6a568e1
gh-107862: Add property-based round-trip tests for base64 ( #119406 )
...
* Add property-based tests to test_base64
* Allow multiple positional arguments in @hypothesis.example stub
* Simplify the altchars strategy
2025-09-17 13:40:35 +00:00
adang1345
76b22978bc
gh-138896: Fix error installing C runtime on non-updated Windows machines (GH-138932)
2025-09-17 14:32:52 +01:00
Bénédikt Tran
3a04be986a
gh-76760: test that uuid.uuid1() sets the version field ( #139033 )
2025-09-17 13:31:51 +00:00
Łukasz Langa
2fc7004d54
gh-134466: Don't run when termios is inaccessible (GH-138911)
...
Without the ability to set required capabilities, the REPL cannot
function properly (syntax highlighting and multiline editing can't
work).
We refuse to work in this degraded state.
2025-09-17 12:59:49 +02:00
Stan Ulbrych
64c876dd68
gh-138998: Upgrade vendored expat to 2.7.2 ( #138999 )
2025-09-17 13:46:35 +03:00
Gyeongjae Choi
218b8dbc78
gh-99948: Support ctypes.util.find_library in emscripten environment ( #138519 )
...
Adds support for ctypes loading .so files directly.
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-09-17 10:17:56 +00:00
Adam Turner
69a5ea5340
GH-123299: Copyedit 3.14 What's New: C API ( #138987 )
2025-09-17 11:14:57 +01:00
Donghoon Nam
c025576a8f
gh-138966: Add description for gi_suspended attribute (GH-139008)
2025-09-17 04:21:52 -04:00
Serhiy Storchaka
a1cf6e92b6
gh-71679: Share the repr implementation between bytes and bytearray (GH-138181)
...
This allows to use the smart quotes algorithm in the bytearray's repr.
2025-09-17 11:10:29 +03:00
Serhiy Storchaka
cf9ef73121
gh-134716: Support regular expressions in -W and PYTHONWARNINGS (GH-138149)
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
2025-09-16 17:06:44 +00:00
Alex Waygood
530ddd3e06
Revert "gh-118803: Remove ByteString from typing and collections.abc ( #118804 )" ( #138990 )
2025-09-16 16:48:19 +01:00
Jelle Zijlstra
6d6aba2523
gh-137226: Fix get_type_hints() on generic TypedDict with stringified annotations ( #138953 )
...
This issue appears specifically for TypedDicts because the TypedDict constructor
code converts string annotations to ForwardRef objects, and those are not evaluated
properly by the get_type_hints() stack because of other shenanigans with type
parameters.
This issue does not affect normal generic classes because their annotations are not
pre-converted to ForwardRefs.
The fix attempts to restore the pre- #137227 behavior in the narrow scenario where
the issue manifests. It mostly makes changes only in the paths accessible from get_type_hints(),
ensuring that newer APIs (such as evaluate_forward_ref() and annotationlib) are not affected
by get_type_hints()'s past odd choices. This PR does not fix issue #138949 , an older issue I
discovered while playing around with this one; we'll need a separate and perhaps more
invasive fix for that, but it should wait until after 3.14.0.
2025-09-16 07:28:39 -07:00
Benjamin Johnson
ab6893ab5c
gh-138514: getpass: restrict echo_char to a single ASCII character ( #138591 )
...
This amends commit bf8bbe9a81 by
restricting `echo_char` in `getpass.getpass` to single printable
ASCII characters as it would be uncommon to use long strings or
multi-byte characters for keyboard feedback.
---------
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-09-16 16:21:55 +02:00
Victor Stinner
9a8bc6d4a4
gh-129813, PEP 782: Add doc reference link ( #138986 )
2025-09-16 15:51:45 +02:00
Steve Dower
6920fa4bcd
Adds support for building with VisualStudioVersion = 18.0 (GH-138980)
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Tests / Address sanitizer (push) Blocked by required conditions
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
JIT / Interpreter (Debug) (push) Has been cancelled
JIT / aarch64-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / aarch64-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / i686-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / i686-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / aarch64-apple-darwin/clang (Release) (push) Has been cancelled
JIT / aarch64-unknown-linux-gnu/gcc (Release) (push) Has been cancelled
JIT / aarch64-apple-darwin/clang (Debug) (push) Has been cancelled
JIT / aarch64-unknown-linux-gnu/gcc (Debug) (push) Has been cancelled
JIT / x86_64-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / x86_64-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / x86_64-apple-darwin/clang (Release) (push) Has been cancelled
JIT / x86_64-unknown-linux-gnu/gcc (Release) (push) Has been cancelled
JIT / x86_64-apple-darwin/clang (Debug) (push) Has been cancelled
JIT / x86_64-unknown-linux-gnu/gcc (Debug) (push) Has been cancelled
2025-09-16 13:41:36 +00:00
AN Long
6393068bde
fix some typos ( #138977 )
2025-09-16 18:33:39 +05:30
Irit Katriel
a651ec9524
gh-135629: rewrite language reference section on except* to improve clarity ( #136150 )
2025-09-16 13:56:51 +01:00
ivan
01cc53295c
Synced docs and docstring for sysconfig.get_platform ( #135530 )
...
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Ned Deily <nad@python.org>
2025-09-16 12:16:48 +01:00
yihong
b9dbf6acb3
gh-135329: prevent infinite traceback loop on Ctrl-C for strace (GH-138133)
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: dura0ok <slpmcf@gmail.com>
Co-authored-by: graymon <greyschwinger@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-09-16 12:39:03 +02:00
Brandt Bucher
55e29a6100
GH-129805: Clean up some changes from GH-129806 (GH-133540)
2025-09-16 11:29:09 +01:00
Stan Ulbrych
fc3e22a06c
gh-88473: Implement fast path in date.today() for date types ( #130980 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-09-16 10:28:54 +01:00
Victor Stinner
d61dda52ba
gh-129813, PEP 782: Soft deprecate _PyBytes_Resize() ( #138964 )
...
Soft deprecate _PyBytes_Resize() and
PyBytes_FromStringAndSize(NULL, size).
2025-09-16 10:38:43 +02:00
Cody Maloney
ed75160b73
gh-138013: Remove load_tests in test_io.test_general ( #138771 )
...
Rely on default test discovery.
Validation:
```bash
# Run before commit
./python -m test test_io -uall,walltime,largefile,cpu,extralargefile -M25G -o --fail-env-changed -j0 --list-cases | sort > old_cases.txt
# Run after commit
./python -m test test_io -uall,walltime,largefile,cpu,extralargefile -M25G -o --fail-env-changed -j0 --list-cases | sort > new_cases.txt
diff new_cases.txt old_cases.
# <outputs no changes in case list>
```
2025-09-16 10:37:28 +02:00
Sam Gross
90fe3250f8
gh-137433: Fix deadlock with stop-the-world and daemon threads (gh-137735)
...
There was a deadlock originally seen by Memray when a daemon thread
enabled or disabled profiling while the interpreter was shutting down.
I think this could also happen with garbage collection, but I haven't
seen that in practice.
The daemon thread could be hung while trying acquire the global rwmutex
that prevents overlapping global and per-interpreter stop-the-world events.
Since it already held the main interpreter's stop-the-world lock, it
also deadlocked the main thread, which is trying to perform interpreter
finalization.
Swap the order of lock acquisition to prevent this deadlock.
Additionally, refactor `_PyParkingLot_Park` so that the global buckets
hashtable is left in a clean state if the thread is hung in
`PyEval_AcquireThread`.
2025-09-16 09:21:58 +01:00