Commit graph

130703 commits

Author SHA1 Message Date
Ken Jin
966fc81531
gh-146058: Fix _GUARD_CODE_VERSION_* (GH-146060) 2026-03-18 01:19:44 +08:00
Michiel W. Beijen
ff287a72de
gh-144975: Fix wave.Wave_write.setframerate() validation order (GH-144976)
Validate the frame rate after rounding to an integer, not before.
This prevents values like 0.5 from passing validation (0.5 > 0)
but then rounding to 0, which would cause a confusing delayed error
"sampling rate not specified" when writing frames.

With this fix, setframerate(0.5) immediately raises "bad frame rate",
providing clear feedback at the point of the error.
2026-03-17 18:01:18 +01:00
Ramin Farajpour Cami
dc24b8a6d4
gh-145966: Fix _csv DIALECT_GETATTR macro silently masking non-AttributeError exceptions (GH-145974)
The DIALECT_GETATTR macro in dialect_new() unconditionally called
PyErr_Clear() when PyObject_GetAttrString() failed, which suppressed
all exceptions including MemoryError, KeyboardInterrupt, and
RuntimeError. Now only AttributeError is cleared; other exceptions
propagate via the existing error handling path.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-17 16:08:53 +01:00
Sacul
1efd9939c8
gh-131798: Optimize _ITER_CHECK_RANGE and _ITER_CHECK_LIST in the JIT (GH-144583) 2026-03-17 22:07:17 +08:00
Stan Ulbrych
9d7621b75b
gh-146054: Limit the growth of encodings.search_function cache (GH-146055) 2026-03-17 15:02:59 +01:00
Serhiy Storchaka
99e2c5eccd
gh-144545: Improve handling of default values in Argument Clinic (GH-146016)
* Add the c_init_default attribute which is used to initialize the C variable
  if the default is not explicitly provided.
* Add the c_default_init() method which is used to derive c_default from
  default if c_default is not explicitly provided.
* Explicit c_default and py_default are now almost always have precedence
  over the generated value.
* Add support for bytes literals as default values.
* Improve support for str literals as default values (support non-ASCII
  and non-printable characters and special characters like backslash or quotes).
* Fix support for str and bytes literals containing trigraphs, "/*" and "*/".
* Improve support for default values in converters "char" and "int(accept={str})".
* Converter "int(accept={str})" now requires 1-character string instead of
  integer as default value.
* Add support for non-None default values in converter "Py_buffer": NULL,
  str and bytes literals.
* Improve error handling for invalid default values.
* Rename Null to NullType for consistency.
2026-03-17 12:16:35 +02:00
Ned Batchelder
4f5e79805e
Docs: a brief note in the sets tutorial about order (#145984)
Docs: a brief note in the sets tut about order
2026-03-17 05:03:11 -04:00
Hood Chatham
1b118353bb
gh-145176 Move Emscripten files into Platforms/emscripten (#145806)
Moves Emscripten build files into Platforms/emscripten.
2026-03-17 09:39:45 +08:00
Hugo van Kemenade
104cae039a
gh-142927: Move hotspots up flamegraph sidebar (#145428) 2026-03-16 23:01:41 +00:00
trag1c
4e96282ee4
Docs: remove unmatched parenthesis for asyncio.TaskGroup note (#146035) 2026-03-16 20:55:29 +01:00
wavebyrd
2a0fa500f8
gh-145870: Fix Format.SOURCE reference in get_annotations docstring (#145889)
The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.

Co-authored-by: Carson Jones <carson@Carsons-MacBook-Pro.local>
2026-03-16 12:25:31 -07:00
dependabot[bot]
ae1b307433
build(deps): bump hypothesis from 6.135.26 to 6.151.9 in /Tools (#145948)
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.135.26 to 6.151.9.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.135.26...hypothesis-python-6.151.9)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-version: 6.151.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 19:07:07 +01:00
Ken Jin
3d0824aef2
gh-127958: Trace from RESUME in the JIT (GH-145905) 2026-03-17 00:18:59 +08:00
Hai Zhu
81ef1b7317
gh-144888: Replace bloom filter linked lists with continuous arrays to optimize executor invalidating performance (GH-145873) 2026-03-16 15:58:18 +00:00
Sam Gross
e18abc6a1f
gh-135329: Remove flaky test_repl_eio test (gh-145932)
The test doesn't actually test any pyrepl code (it runs Python with -S)
and has a race condition that causes intermittent timeouts on CI.
2026-03-16 11:08:07 -04:00
Ken Jin
182aea2f57
gh-146018: Disable over-aggressive optimization for _GUARD_CODE_VERSION (GH-145923) 2026-03-16 13:52:56 +00:00
Sergey Miryanov
fd50b41aa9
GH-145247: Use _PyTuple_FromPair in exceptions.c (GH-145910) 2026-03-16 13:50:26 +00:00
Stan Ulbrych
57e88c1cf9
gh-145599, CVE 2026-3644: Reject control characters in http.cookies.Morsel.update() (#145600)
Reject control characters in `http.cookies.Morsel.update()` and `http.cookies.BaseCookie.js_output`.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
2026-03-16 14:43:43 +01:00
Victor Stinner
77632f085d
gh-141510: Avoid critical section on frozendict copy (#145920) 2026-03-16 14:19:00 +01:00
Ramin Farajpour Cami
e6b9a14069
gh-144984: Fix crash in Expat's ExternalEntityParserCreate error paths (#144992)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-16 12:30:13 +00:00
Sacul
37121ef77e
gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP. (GH-145964) 2026-03-16 11:58:12 +00:00
Matt Van Horn
36b5284f04
gh-145649: Fix man page text wrapping for -X option (#145656)
Replace hardcoded space indentation with proper troff macros
(.TP, .RS/.RE, .IP) for -X sub-options so text wraps correctly
at any terminal width.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 11:55:00 +01:00
Ken Jin
e2e62033aa
gh-139038: Link to Savannah's webpage for JIT results (#146013) 2026-03-16 11:10:34 +01:00
Pieter Eendebak
3a24856447
gh-123471: make concurrent iteration over itertools.accumulate thread-safe (#144486) 2026-03-16 08:53:37 +00:00
AN Long
6f8867a676
gh-129849: Add tests for Py_tp_bases (#143208) 2026-03-16 13:59:55 +05:30
RayXu
70397fd103
Docs: fix a form error and a grammatical error in float.rst (#140989) 2026-03-16 13:51:49 +05:30
Gregory P. Smith
ee5318025b
gh-140814: Fix freeze_support() setting start method as side effect (GH-144608)
freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-15 22:50:19 -07:00
Stan Ulbrych
40095d526b
Expand fuzz_pycompile.dict for new syntax 2026-03-15 18:54:20 -05:00
Gregory P. Smith
83edae33a5
gh-145990: sort --help-env sections by environment variable name (GH-145997)
* sort --help-env alphabetically by name.
* add a sorting regression test in test_help_env.
2026-03-15 15:22:57 -07:00
Gregory P. Smith
b062f391cf
gh-145990: Sort python --help-xoptions by option name (GH-145991)
* Sort --help-xoptions alphabetically by name.
* add a sorting regression test in test_help_xoptions
2026-03-15 22:02:14 +00:00
Shahar Naveh
f7cb789dc5
gh-145998: Remove duplicated "What's New in 3.15" entry (#145994) 2026-03-15 22:54:19 +01:00
Stan Ulbrych
eb0e8be3a7
gh-145986: Avoid unbound C recursion in conv_content_model in pyexpat.c (CVE 2026-4224) (#145987)
Fix C stack overflow (CVE-2026-4224) when an Expat parser
with a registered `ElementDeclHandler` parses inline DTD
containing deeply nested content model.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-15 22:46:06 +01:00
Stan Ulbrych
33044b015b
gh-145976: Remove Misc/indent.pro (#145992)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-15 22:29:12 +01:00
Gregory P. Smith
4a71946b8f
gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) (GH-145988)
the lazy imports PEP initial implementation (3.15 alpha) inadvertently incremented the length of the sys.flags tuple. In a way that did not do anything useful or related to the lazy imports setting (it exposed sys.flags.gil in the tuple). This fixes that to hard code the length to the 3.13 & 3.14 released length of 18 and have our tests and code comments make it clear that we've since stopped making new sys.flags attributes available via sequence index.
2026-03-15 20:30:01 +00:00
Matthieu Darbois
ec5e3a5a07
gh-145968: Fix base64.b64decode altchars translation in specific cases (GH-145969)
When altchars overlaps with the standard ones, the translation does not
always yield to the expected outcome.
2026-03-15 19:46:44 +02:00
Stan Ulbrych
757e2ff9d9
gh-145976: Remove Misc/{Porting,vgrindefs} (#145973)
Cleanup outdated files under Misc/
2026-03-15 10:14:27 -07:00
Lysandros Nikolaou
2f4e4ec2e7
gh-142518: Document thread-safety guarantees of bytearray objects (#145226) 2026-03-15 15:57:05 +01:00
Brian Schubert
e167e06f8c
Bump mypy to 1.19.1 (#145956) 2026-03-15 12:48:56 +03:00
Peter Bierma
1dfe99ae3b
gh-141004: Document PyDTrace* (GH-141856) 2026-03-14 22:58:35 -04:00
Guido van Rossum
788c329117
gh-123720: When closing an asyncio server, stop the handlers (#124689) 2026-03-14 11:28:49 -07:00
Stan Ulbrych
31c41a61f1
Fix fuzz_builtin_int fuzzer reproducibility (#145890) 2026-03-14 11:11:29 -07:00
dependabot[bot]
0575ce936d
build(deps): bump the actions group with 4 updates (#145952)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 16:30:26 +00:00
Stan Ulbrych
9a83c02a0f
gh-137650: Group dependabot actions updates (#145947) 2026-03-14 18:00:15 +02:00
Sacul
798070d8ca
gh-134584: Eliminate redundant refcounting in JIT for MATCH_CLASS (GH-144821) 2026-03-14 12:00:18 +00:00
Bénédikt Tran
97968564b6
gh-143636: fix a crash when calling `__replace__ on invalid SimpleNamespace` instances (#143655) 2026-03-14 09:58:15 +00:00
Connor Gibson
51e8acf8de
Docs: fix missing period in Doc/library/stdtypes.rst (#145935) 2026-03-14 10:19:00 +01:00
Konstantin Vlasov
77c06f3da6
gh-145703: Fix asyncio.BaseEventLoop low clock resolution (#145706) 2026-03-14 11:07:30 +05:30
Victor Stinner
3c38feb2a2
gh-129813: Document that PyBytesWriter_GetData() cannot fail (#145900)
Document that PyBytesWriter_GetData() and PyBytesWriter_GetSize()
getter functions cannot fail
2026-03-13 19:44:51 +01:00
Petr Viktorin
747ef70faa
GH-60729: Revert "Add IEEE format wave audio support (GH-145384)" (GH-145928)
Revert "GH-60729: Add IEEE format wave audio support (GH-145384)"

This reverts commit 61f2a1a599 for now;
as tests fail on big-endian machines.
2026-03-13 17:51:23 +00:00
Pieter Eendebak
00a25859a9
gh-145376: Fix GC tracking in structseq.__replace__ (#145820) 2026-03-13 15:42:19 +00:00