Commit graph

30939 commits

Author SHA1 Message Date
Stefanie Molin
0aa59ce2d4
gh-72088: clarify inspect.ismethod and inspect.isfunction (and related) usage with class-level access (GH-150013)
Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
2026-05-19 00:42:55 +02:00
Jeff Epler
806c997f55
gh-140344: ast: Add deprecation warnings (#140345)
These were all deprecated in 3.9 (bace59d8b8) but without
a runtime deprecation warning. Add it now, so that these
items can be removed in 3.21 per PEP 387.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-18 11:20:49 -07:00
Jan Brasna
dbd8985e82
gh-95816: Fix TLS version range example in docs (GH-148574)
docs(ssl): Fix TLS version range example
2026-05-18 18:01:56 +00:00
Maurycy Pawłowski-Wieroński
a2932e9c95
gh-149464: Add os.pidfd_getfd(pidfd, targetfd, flags=0) function (#149465)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-05-18 16:29:58 +02:00
Mani Salahmand
1bab6c9192
gh-149857: Clarify multiprocessing Process argument wording (GH-149919)
Use consistent 'picklable' wording
2026-05-16 23:01:50 -07:00
Savage Mechanic
5f8d9d3575
gh-67512: Document IMAP4.append() flags argument (#149907) 2026-05-16 11:24:41 -07:00
Stan Ulbrych
9ee9f58747
gh-149567: Remove deprecated shutil.ExecError (#149568) 2026-05-15 18:54:05 +01:00
sobolevn
8be3fb1b50
gh-142349: Add help("lazy") support (#149886) 2026-05-15 16:30:40 +00:00
Serhiy Storchaka
20438866ae
gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804)
Like IBM00858, CP00858, IBM01140, CP01140.
2026-05-15 14:34:48 +03:00
sobolevn
7e98debdf4
gh-149763: Improve availablity docs in select.rst (#149764) 2026-05-15 07:16:34 +00:00
Petr Viktorin
c37529293d
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.
2026-05-14 18:47:52 +02:00
scoder
94df62542c
gh-148829: Add PySentinel_CheckExact() (#149725) 2026-05-13 10:10:37 +00:00
sobolevn
31d1a7216c
gh-149720: Fix docs for mimetypes.MimeType.add_type method (#149731)
gh-149720: Fix docs for `mimetypes.MimeType.add_type` method`
2026-05-13 11:48:01 +03:00
Jelle Zijlstra
a4e51c8dac
gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (#149604) 2026-05-12 20:00:01 -07:00
Sergey B Kirpichev
9eb3b14668
gh-115119: Removed bundled copy of the libmpdec (GH-133964)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-12 21:34:37 +00:00
David Huggins-Daines
e667d62f11
gh-134837: Correct and improve base85 documentation for base64 and binascii modules (GH-145843) 2026-05-12 22:46:46 +03:00
sobolevn
e472f6d318
gh-149600: Remove deprecated asyncio.iscoroutinefunction function (#149601) 2026-05-12 22:59:46 +05:30
Stan Ulbrych
6a0be131c3
gh-149595: Remove the sys._enablelegacywindowsfsencoding() function (#149596)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-12 17:11:34 +01:00
sobolevn
0534774a47
gh-149720: Remove support for undotted ext in mimetypes.MimeType.add_type (#149721) 2026-05-12 13:40:21 +00:00
Victorien
54a5fd4126
gh-148669: Clarify __reduce__() module lookup behavior (#148670) 2026-05-11 19:45:51 -07:00
Manoj K M
374f9d3f5e
Fix incorrect sentence in stable.rst (GH-149684) 2026-05-11 17:27:16 +02:00
sobolevn
6a26b78c47
gh-149634: Fix removed docs from TarFile.tarfile to TarInfo.tarfile (#149680) 2026-05-11 18:03:57 +03:00
Sergey B Kirpichev
ef877318a0
gh-149402: Don't assume single-character type codes (struct/array/ctypes) (#149483)
In the struct docs, section "Format Characters" was renamed to "Type
Codes".

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-11 13:05:50 +00:00
Árni Már Jónsson
4956d2be9d
gh-149663: fix typo in unittest docs (#149670)
`hastattr` -> `hasattr`
2026-05-11 14:54:09 +03:00
Jonathan Dung
833dae7c1f
gh-146061: Clarify indent=None in json docs (GH-146095) 2026-05-11 11:14:54 +00:00
sobolevn
0108843451
gh-149634: Remove deprecated and unused tarfile.Tarfile.tarfile attr (GH-149635) 2026-05-11 12:54:49 +02:00
pengyu lee
53c3dd9a8d
Fix typos in C API documentation (GH-149588) 2026-05-11 10:28:19 +02:00
sobolevn
c1dbd51fac
gh-149598: Remove strm argument support from logging handlers (#149599)
gh-149598: Remove *strm* argument support from `logging` handlers
2026-05-11 03:05:56 +03:00
Omkar Kabde
a8e3247206
gh-149611: Explain return values for Path.write_text() and Path.write_bytes() (#149629)
specify return explanation

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-05-10 17:41:37 +00:00
Cody Maloney
cc5cf14ae0
gh-139871: Fix 3.15 bytearray.take_bytes example (#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')
```
2026-05-09 14:39:01 -07:00
Manoj K M
4e97ff3351
Fix minor typos in unicode.rst (#149587) 2026-05-09 21:31:55 +00:00
sobolevn
46a2c11eaa
gh-149530: Remove symtable.Class.get_methods deprecated method (#149531) 2026-05-09 08:33:09 +00:00
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