30907 Commits

Author SHA1 Message Date
sobolevn 3a62c8f13a gh-149537: Remove kw parameters from python version of reduce (#149538) 2026-05-08 18:34:48 +03:00
Diego Russo 2f6b3800e6 Add Diego as author of PEP 831 (#149551) 2026-05-08 12:58:48 +01:00
Nathan Goldbaum 3565d31690 docs: Clarify docs for error case of PyDict_GetItemRef (#149506) 2026-05-08 10:53:44 +00:00
sobolevn 4ae1a260c7 gh-149528: Remove annotationlib.ForwardRef._evaluate for 3.16 (#149529) 2026-05-08 07:48:15 +03:00
Stan Ulbrych 9d07159cda gh-149499: Fixes for 3.16 bump (GH-149500)
Also fixes gh-149507, regenerating `configure` for 3.16.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-07 19:06:37 +00:00
Hugo van Kemenade f5c75351de Python 3.16.0a0 2026-05-07 19:05:52 +03:00
Hugo van Kemenade f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Diego Russo 299cf3c497 gh-126910: Update 3.15 what's new to include GDB/backtrace integration (#149494)
Update 3.15 what's new to include GDB/backtrace intergration
2026-05-07 16:05:29 +03:00
Neil Schemenauer 13188dbf85 gh-148937: revert process RSS based GC deferral (#149475) 2026-05-07 14:32:14 +03:00
Victor Stinner b3cfd36ba4 gh-149202: Don't use -fno-omit-frame-pointer on ppc64le (#149485)
The power ABI specification requires that compilers maintain a back
chain by default, so unwinding already works without a dedicated
frame pointer. Don't use -fno-omit-frame-pointer on ppc64le.
2026-05-07 11:47:08 +02:00
Petr Viktorin 612140e7dd gh-149202: Fix frame pointer unwinding on ppc64le and armv7/clang (#149409)
- ppc64's backchain format is also different from x86
- On 32-bit ARM, clang needs `-mno-thumb`, not `-marm` like GCC
2026-05-07 10:37:00 +02:00
Peter Bierma 2b7c28a440 gh-149101: Implement PEP 788 (GH-149116)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-05-06 17:39:30 -04:00
Ned Batchelder b2582a6cf2 Update Doc/pylock.toml (#149467)
update Doc/pylock.toml
2026-05-06 16:05:30 -04:00
Jelle Zijlstra ff422bd1c1 gh-141560: Add annotation_format parameter to getfullargspec (#149457) 2026-05-06 12:00:56 -07:00
Hugo van Kemenade 9514dd750c gh-133879: Copyedit "What's new in Python 3.15" (#149451) 2026-05-06 20:33:08 +03:00
Pablo Galindo Salgado 4ed40146f1 gh-149202: Fix frame pointer unwinding on s390x and ARM (GH-149362)
-fno-omit-frame-pointer is not enough to make every target walkable by the
simple manual frame pointer unwinder.

The helper used by test_frame_pointer_unwind used to assume the frame pointer
named a two-word record where fp[0] was the previous frame pointer and fp[1]
was the return address. That is only the generic layout used by some targets.
This patch keeps that default, but moves the slots behind named offsets so
architecture-specific layouts can describe where the backchain and return
address really live.

On s390x, GCC and Clang do not emit a usable backchain unless -mbackchain is
enabled. Without it, the unwinder stops at the current C frame and the test
reports no Python frames. Once backchains are present, the helper must also
stop at the current thread's known C stack bounds; otherwise it can follow the
final backchain far enough to dereference an invalid frame and segfault.
For Linux s390x backchain frames, the documented z/Architecture stack-frame
layout saves r14, the return-address register, at byte offset 112 from the
frame pointer, so read the return address from that named slot instead of fp[1].

The 112-byte offset comes from Linux's s390 debugging documentation: its Stack
Frame Layout table shows z/Architecture backchain frames with the backchain at
offset 0 and saved r14 of the caller function at offset 112:
https://www.kernel.org/doc/html/v5.3/s390/debugging390.html#stack-frame-layout

This helper remains scoped to Linux s390x backchain frames. GNU SFrame's s390x
notes state that the s390x ELF ABI does not generally mandate where RA and FP
are saved, or whether they are saved at all:
https://sourceware.org/binutils/docs/sframe-spec.html#s390x

As Jens Remus noted, -fno-omit-frame-pointer is not needed when -mbackchain is
present.

On 32-bit ARM, GCC defaults to Thumb mode on common armhf toolchains. The Thumb
prologue keeps the saved frame pointer and link register at offsets that depend
on the generated frame, which breaks the fp[0]/fp[1] walk used by the helper.
Use -marm when it is supported for frame-pointer builds, and teach the helper
the GCC ARM-mode slots where the previous frame pointer is at fp[-1] and the
saved LR return address is at fp[0].


Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:03:37 +00:00
Alex Malyshev 646853df13 gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() (#148145)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:01:12 +00:00
Bénédikt Tran 7b6c248d61 gh-142307: deprecate legacy support for altering IMAP4.file (#142335)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-06 17:41:26 +03:00
Serhiy Storchaka a5c7a74418 gh-139489: Add xml.is_valid_text() (GH-149412) 2026-05-06 14:40:10 +00:00
Jeff Lyon aeb02ac42b gh-137586: Replace 'osascript' with 'open' on macOS in webbrowser (#146439)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-06 16:56:17 +03:00
Hugo van Kemenade e7613f2735 gh-148766: Add colour to Python help (#148767) 2026-05-06 16:48:04 +03:00
Guo Ci 70e365c0ca Replace use of Python keyword in issubclass function documentation (#142357) 2026-05-06 15:08:13 +03:00
Barry Warsaw 762c9f95ae gh-148641: Flesh out PEP 829 for What's New (#149347)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-06 11:22:54 +00:00
Hugo van Kemenade 426f99cb71 gh-149189: Modern defaults for pprint (#149190) 2026-05-05 15:04:05 +03:00
Anuj Nitin Bharambe f6d16a0d70 gh-149216: Notify type watchers on heap type deallocation (GH-149236)
Authored-by: Anuj Bharambe <anujnitinb@gmail.com>
2026-05-05 11:24:07 +01:00
Hugo van Kemenade 586c97a67b gh-148726: Add gc changes to What's New (#149398) 2026-05-05 12:05:48 +03:00
Serhiy Storchaka a76d9573e4 gh-139489: Add xml.is_valid_name() (GH-139768)
It allows to check whether a string can be used as an element or attribute
name in XML.
2026-05-05 11:25:22 +03:00
Petr Viktorin 02d02f44fe gh-140550: Single What's New highlight for PEPs 793, 803 and 820 (GH-149397)
Also: a section in New Features for 793
2026-05-05 09:50:00 +02:00
Petr Viktorin 508b49845d gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-05-05 09:18:04 +02:00
Jelle Zijlstra 5dd2161716 gh-137840: Document PEP 728 (#149207) 2026-05-04 20:30:03 -07:00
Pablo Galindo Salgado 88844d2135 gh-149202: Highlight PEP 831 in What's New for Python 3.15 (#149390) 2026-05-05 00:51:28 +00:00
Hugo van Kemenade ffe050ad9b gh-142389: Add support for backtick colorisation in argparse help text (#149375)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-05-04 22:58:04 +00:00
Matt Van Horn 7acee984e8 gh-146406: Add cross-language method suggestions for builtin AttributeError (#146407)
When Levenshtein-based suggestions find no match for an AttributeError
on list, str, or dict, check a static table of common method names from
JavaScript, Java, C#, and Ruby.

For example, [].push() now suggests .append(), "".toUpperCase() suggests
.upper(), and {}.keySet() suggests .keys().

The list.add() case suggests using a set instead of suggesting .append(),
since .add() is a set method and the user may have passed a list where
a set was expected (per discussion with Serhiy Storchaka, Terry Reedy,
and Paul Moore).

Design: flat (type, attr) -> suggestion text table, no runtime
introspection. Only exact builtin types are matched to avoid false
positives on subclasses.

Discussion: https://discuss.python.org/t/106632

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-04 21:38:07 +00:00
Serhiy Storchaka bc285e5832 gh-138907: Support RFC 9309 in robotparser (GH-138908)
* empty lines are always ignored instead of separating groups
* the "user-agent" line after a rule starts a new group
* groups matching the same user agent are now merged
* the rule with the longest match wins instead of the first matching rule
* in case of equal matches, the “Allow” rule wins over “Disallow”
* special characters “$” and “*” are now supported in rules
* prefer full match for user agent
2026-05-04 18:03:11 +00:00
Charlie Lin c74cba16a3 gh-145917: Add MIME types for TTC and Haptics formats (#145918)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-05-04 21:02:50 +03:00
Petr Viktorin 6ca5cdba18 gh-149225: Expose Py_CriticalSection in Stable ABI (GH-149227) 2026-05-04 17:32:17 +02:00
Victor Stinner 5dd5c8b5a6 gh-148675: Remove F and D formats from array and memoryview (GH-149368) 2026-05-04 17:26:30 +02:00
Kit Dallege b8ebd078f9 gh-137337: Clarify import statement namespace binding (GH-144607)
It is not always in the local namespace.
2026-05-04 17:45:00 +03:00
Victor Stinner 6e6f9053e3 gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct (#148676)
* Add Zd/Zf format support to array, memoryview and struct.
* ctypes: Replace F/D/G complex format with Zf/Zd/Zg.
* Modify array, ctypes and struct modules to support format strings
  longer than 1 character (such as "Zd").
* Change array.typecodes type from str to tuple.
2026-05-04 16:14:23 +02:00
Alyssa Coghlan 5235467b91 gh-149010: Improve reliability of inspect CLI (#149357)
* Handle non-source modules more gracefully (and consistently)
* Improve handling of frozen modules (which may or may not have source)
* Avoid reporting misleading info when looking up objects via aliases
* Refactor CLI implementation to improve testability
* Add several more test cases

Closes #149010
2026-05-04 23:42:20 +10:00
Victor Stinner ce51c18818 gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API (#146172)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-04 15:37:45 +02:00
wouter bolsterlee 7aedd0a6c6 gh-87245: Improve IPv6Address.ipv4_mapped documentation (#92572)
Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes #87245.
2026-05-04 23:03:20 +10:00
Hugo van Kemenade 2ba0a81c91 gh-148352: Add more colour to calendar CLI output (#148354)
Co-authored-by: Rihaan Meher <sharktidedev@gmail.com>
2026-05-04 15:14:57 +03:00
kishorhange111 246fe14e7c gh-148849: Deprecate http.cookies.BaseCookie.js_output() (GH-148978) 2026-05-04 12:51:17 +03:00
Pablo Galindo Salgado 3efd2f4db6 gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots (#149297)
Adds `python -m profiling.sampling dump <pid>`, which prints a single
traceback-style snapshot of a running process's Python stack via the
existing `_remote_debugging` unwinder. Supports per-thread status,
source line highlighting, optional bytecode opcodes, and async-aware
task reconstruction (`--async-aware`, default `--async-mode=all`).
2026-05-04 01:02:33 +01:00
Kai (Kazuya Ito) 2e94f14310 gh-145521: Add 'infer_variance' parameter to ParamSpec class (#145522) 2026-05-03 23:08:38 +00:00
Barry Warsaw 24c4aecc16 gh-148641: Implement PEP 829 - startup configuration files (#149109)
Implement PEP 829 - startup configuration files
Also add `pkgutil.resolve_name(..., strict=True)` 

Co-authored-by: Brett Cannon <brett@python.org>
2026-05-03 17:17:29 +00:00
Anton Ian Sipos 836fbdaaf3 gh-135056: Add a --header CLI option to http.server (#135057)
Support custom headers in `python -m http.server` and `http.server.SimpleHTTPRequestHandler`.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-03 13:01:37 +02:00
Serhiy Storchaka a3435d5ccc gh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229)
unittest.TestCase methods assertWarns() and assertWarnsRegex() no longer
swallow warnings that do not match the specified category or regex.
Nested context managers are now supported.
2026-05-03 10:24:57 +00:00
dr-carlos c1940bcfc8 gh-141388: Improve docs/tests for non-function callables as annotate functions (#142327) 2026-05-02 18:21:59 -07:00