Commit graph

30934 commits

Author SHA1 Message Date
Miss Islington (bot)
c3d21e5a11
[3.15] gh-148932: Docs / profiling.sampling Windows limitations (GH-150272) (#150330)
gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272)
(cherry picked from commit 0f32750fe2)

Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
2026-05-24 12:02:45 +00:00
Miss Islington (bot)
d9d8ee503a
[3.15] gh-150232: update Thread group parameter doc (GH-150283) (#150297)
gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2c)

Co-authored-by: My-ABC <569817555@qq.com>
2026-05-23 14:04:48 +05:30
Miss Islington (bot)
081187f169
[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269) (GH-150271)
(cherry picked from commit 9df2b6ccc7)

Co-authored-by: Omkar Kabde <omkarkabde@gmail.com>
2026-05-23 00:17:51 +03:00
Miss Islington (bot)
3daf1fad7a
[3.15] gh-149189: Revert "Modern defaults for pprint (GH-149190)" (GH-150249) (#150268)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 20:49:36 +00:00
Miss Islington (bot)
f5231469b5
[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)
Implementation of python/peps#4968.
(cherry picked from commit 08218030a5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-22 07:44:34 -07:00
Miss Islington (bot)
50c5c07d2f
[3.15] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150241)
Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 11:40:49 +00:00
Miss Islington (bot)
b039d1bd97
[3.15] gh-133998: Fix gzip file creation when time is out of range (GH-134278) (GH-150221)
(cherry picked from commit 1daad8a163)

Co-authored-by: adang1345 <adang1345@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-22 07:48:42 +00:00
Miss Islington (bot)
591c4ffdd9
[3.15] gh-149995: Update typing.py docstrings and documentation (GH-149996) (#150215)
gh-149995: Update typing.py docstrings and documentation (GH-149996)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-22 06:41:43 +00:00
Miss Islington (bot)
dea552c1b6
[3.15] Add summary table to the unicodedata doc (GH-149957) (#150161)
(cherry picked from commit 87a879f4d0)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-20 21:10:21 +01:00
Miss Islington (bot)
fb6984f305
[3.15] gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169) (#150171)
gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169)
(cherry picked from commit cb3b4b98d8)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-05-20 19:48:04 +00:00
Miss Islington (bot)
653f12b2bf
[3.15] gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095) (#150106)
gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095)
(cherry picked from commit 192796cfd4)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-05-19 18:03:47 -07:00
Miss Islington (bot)
eb7be9ab52
[3.15] gh-72088: clarify inspect.ismethod and inspect.isfunction (and related) usage with class-level access (GH-150013) (GH-150119)
(cherry picked from commit 0aa59ce2d4)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
2026-05-20 03:00:54 +02:00
Miss Islington (bot)
4baf3e5b0d
[3.15] gh-134887: Add references to locale module for locale-aware number formatting references in string module docs (GH-134888) (GH-150120)
(cherry picked from commit 47723af4e7)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
2026-05-20 02:54:59 +02:00
Miss Islington (bot)
bec4336bad
[3.15] gh-69619: Clarify whitespace definition in str.strip docs (#150049)
(cherry picked from commit 17eb17d43f)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
2026-05-19 18:48:48 +01:00
Miss Islington (bot)
65b255416a
[3.15] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150064)
gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)
(cherry picked from commit ba0aca3bff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2026-05-19 08:44:35 +00:00
Miss Islington (bot)
28f275f713
[3.15] gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011) (#150036)
bpo-42367: Restore os.makedirs() and pathlib.mkdir() ability to apply *mode* recursively via a new parent_mode= keyword argument.
(cherry picked from commit 9770e32ce0)

+ Make Path.mkdir parent_mode tests umask-independent

test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask.  On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions.  Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.

---------

Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-18 22:10:01 -07:00
Miss Islington (bot)
16f8ed5a82
[3.15] gh-95816: Fix TLS version range example in docs (GH-148574) (#150008)
gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e82)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2026-05-18 14:47:19 -07:00
Miss Islington (bot)
6136ad6801
[3.15] gh-142349: Add help("lazy") support (GH-149886) (#149889)
gh-142349: Add `help("lazy")` support (GH-149886)
(cherry picked from commit 8be3fb1b50)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-15 16:57:59 +00:00
Miss Islington (bot)
176d0f51cf
[3.15] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149870)
Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866ae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-15 15:08:15 +03:00
Miss Islington (bot)
168a3c85be
[3.15] gh-149763: Improve availablity docs in select.rst (GH-149764) (#149854)
gh-149763: Improve availablity docs in `select.rst` (GH-149764)
(cherry picked from commit 7e98debdf4)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-15 07:24:43 +00:00
Miss Islington (bot)
451f06b02e
[3.15] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149836)
Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c37529293d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-14 19:09:05 +02:00
Miss Islington (bot)
894ec10b56
[3.15] Fix incorrect sentence in stable.rst (GH-149684) (GH-149814)
(cherry picked from commit 374f9d3f5e)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
2026-05-14 01:34:59 +02:00
Miss Islington (bot)
a5f77a13fd
[3.15] gh-148829: Add PySentinel_CheckExact() (GH-149725) (#149766)
gh-148829: Add PySentinel_CheckExact() (GH-149725)
(cherry picked from commit 94df62542c)

Co-authored-by: scoder <stefan_ml@behnel.de>
2026-05-13 10:39:38 +00:00
Miss Islington (bot)
bc20c2b146
[3.15] gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604) (#149750)
gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604)
(cherry picked from commit a4e51c8dac)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-13 03:08:49 +00:00
Miss Islington (bot)
670f982fbd
[3.15] gh-134837: Correct and improve base85 documentation for base64 and binascii modules (GH-145843) (GH-149742)
(cherry picked from commit e667d62f11)

Co-authored-by: David Huggins-Daines <dhd@ecolingui.ca>
2026-05-12 20:25:28 +00:00
Miss Islington (bot)
9138bf2612
[3.15] gh-148669: Clarify __reduce__() module lookup behavior (GH-148670) (#149703)
gh-148669: Clarify `__reduce__()` module lookup behavior (GH-148670)
(cherry picked from commit 54a5fd4126)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2026-05-12 02:54:10 +00:00
Miss Islington (bot)
592a356fb5
[3.15] gh-149663: fix typo in unittest docs (GH-149670) (#149672)
gh-149663: fix typo in `unittest` docs (GH-149670)

`hastattr` -> `hasattr`
(cherry picked from commit 4956d2be9d)

Co-authored-by: Árni Már Jónsson <arnimarj@gmail.com>
2026-05-11 12:02:28 +00:00
Miss Islington (bot)
4277df2421
[3.15] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149667)
(cherry picked from commit 833dae7c1f)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-05-11 11:44:11 +00:00
Miss Islington (bot)
6ba3ea43a0
[3.15] gh-139871: Fix 3.15 bytearray.take_bytes example (GH-149520) (#149622)
gh-139871: Fix 3.15 bytearray.take_bytes example (GH-149520)

Currently:
```python
buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = bytes(buffer[:n + 1])
del buffer[:n + 1]
assert data == b'abc'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    assert data == b'abc'
           ^^^^^^^^^^^^^^
AssertionError
```

Adding in the `\n` makes the two match:

```python
buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = bytes(buffer[:n + 1])
del buffer[:n + 1]
assert data == b'abc\n'
assert buffer == bytearray(b'def')

buffer = bytearray(b'abc\ndef')
n = buffer.find(b'\n')
data = buffer.take_bytes(n + 1)
assert data == b'abc\n'
assert buffer == bytearray(b'def')
```
(cherry picked from commit cc5cf14ae0)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-05-09 21:47:21 +00:00
Miss Islington (bot)
f488c7d45f
[3.15] Fix minor typos in unicode.rst (GH-149587) (#149620)
Fix minor typos in unicode.rst (GH-149587)
(cherry picked from commit 4e97ff3351)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
2026-05-09 21:39:35 +00:00
Miss Islington (bot)
333b7c54c0
[3.15] Add Diego as author of PEP 831 (GH-149551) (#149561) 2026-05-08 13:06:08 +00:00
Miss Islington (bot)
20e298bc37
[3.15] docs: Clarify docs for error case of PyDict_GetItemRef (GH-149506) (#149546)
docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31690)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
2026-05-08 16:36:52 +05:30
Zachary Ware
4caee143d2
[3.15] Forward-port 'check-abi' CI job from 3.14 (GH-149517)
Also add the python3.15.abi file as generated by the new job and remove
the 'main branch only' entry from .gitignore.

(adapted from commit 0eb2291a7e)
2026-05-07 22:15:06 +00: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