Commit graph

30981 commits

Author SHA1 Message Date
sobolevn
90c1d86f34
gh-149609: Raise deprecation warnings for abc.{abstractclassmethod,abstractstaticmethod,abstractproperty} (#149636) 2026-05-31 07:26:52 +00:00
Patrick Rauscher
73d8e9a47c
gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) 2026-05-31 10:20:49 +03:00
Paper Moon
0f1f7c7889
gh-141444:fix broken URLs and examples in urllib.request.rst (#144863)
* Doc: fix broken URLs and examples in urllib.request.rst (gh-141444)

* Doc: update urllib.request examples to handle gzip compression

---------

Co-authored-by: Senthil Kumaran <senthil@python.org>
2026-05-30 19:08:18 -07:00
Joshix-1
af10734907
gh-150524: Remove outdated note in binascii.a2b_hex() documentation (GH-150525)
bytes.fromhex() accepts ASCII bytes and bytes-like objects as input since 3.14
2026-05-30 19:18:39 +00:00
Gustaf
2c20f9ce17
gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450) 2026-05-30 20:59:42 +03:00
Dhruv Singla
9baa7c63be
gh-129851: Fix the documentation for -m command (GH-129862) 2026-05-30 15:47:14 +00:00
Jean-François B.
25a5d874f2
Remove unneeded LaTeX code from latex_elements['preamble'] (GH-124630)
It was a workaround for Sphinx < 1.5.
2026-05-30 15:19:56 +00:00
Fang Li
6ecd197c03
gh-109503: Fix document for shutil.move() on usage of os.rename() since it's inaccurate (GH-109507)
Nonatomic move might be used even if the files are
on the same filesystem in some cases.
2026-05-30 14:26:03 +00:00
Neil Schemenauer
62a45fa91c
gh-135898: Add section to free-threading howto about memory usage (#143279)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-05-30 10:41:33 +00:00
Jonathan Dung
678fd8452c
gh-150501: Correct inspect.getattr_static docs signature (#150504) 2026-05-30 11:18:25 +02:00
Oral Ersoy Dokumacı
779694faba
gh-150403: Document frozendict in language reference Mappings section (GH-150404) 2026-05-29 22:40:22 +03:00
Stan Ulbrych
5535c1f9c0
Add a security warning about pydoc's HTTP server (#150409) 2026-05-29 13:29:59 +01:00
Rafael Weingartner-Ortner
baf11a4e9a
gh-139398: [Enum] Add supported sunder names to __dir__ for REPL completions (GH-139985)
* Add supported sunder names to Enum `__dir__`

This change adds the sunder names `_generate_next_value_`
and `_missing_` to the `__dir__` method of `EnumType` and `Enum`.
In Addition, The instance level sunder names
`_add_alias_` and `_add_value_alias_` are added to `Enum.__dir__`.

With the sunder names exposed in the `dir()` method,
the REPL autocomplete will also show them.

---------

Co-authored-by: SimonGPrs <107691772+SimonGPrs@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2026-05-28 12:55:38 -07:00
Chien Wong
cf2cd0be82
gh-115988: Add ARM64 and RISCV BCJ filters constants in lzma module (GH-115989)
---------

Signed-off-by: Chien Wong <m@xv97.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-28 08:05:03 -07:00
manoj-marimuthu
8a22450ac6
Fix docs for PyThreadState_GetDict() in threads.rst (#150401) 2026-05-28 12:13:58 +00:00
Stan Ulbrych
b53f6ca850
Add prominent crash warning to ctypes docs (GH-150410)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-28 10:13:14 +02:00
Petr Viktorin
d8ff4f8e56
gh-141984: Remove accidental merge markers (GH-150517) 2026-05-27 14:20:50 +00:00
Petr Viktorin
55f2518326
gh-141984: Reword docs on "enclosed" atom grammar (GH-148622)
Reorganize and reword the docs on atoms in parentheses, brackets and braces:
parenthesized groups, list/set/dict/tuple displays, and comprehensions.
(Generator expressions and yield atoms are left for later.)

In the spirit of better matching the underlying grammar, *comprehensions* are
covered separately from non-comprehension displays. Also, parenthesized forms
(with a single expression) and tuple displays are separated.
All sections are rewritten to start with simple cases and build up to the full
formal grammar.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-05-27 14:32:33 +02:00
Ivy Xu
99c254e2f7
gh-149861: Fix rule in match statement case_block PEG grammar (GH-149908) 2026-05-27 12:25:21 +02:00
Serhiy Storchaka
8ab7b43a14
gh-62259: Add support of multi-byte encodings in the XML parser (GH-149860)
Supported encodings: "cp932", "cp949", "cp950", "Big5","EUC-JP",
"GB2312", "GBK", "johab", and "Shift_JIS".

Partially supported encodings (only BMP characters): "Big5-HKSCS",
"EUC_JIS-2004", "EUC_JISX0213", "Shift_JIS-2004", "Shift_JISX0213",
"utf-8-sig" and non-standard aliases like "UTF8" (without hyphen).

The parser now raises ValueError for known unsupported
multi-byte encodings such us "ISO-2022-JP" or "raw-unicode-escape"
instead of failing later, when encounter non-ASCII data.
2026-05-26 19:40:25 +00:00
Stefano Rivera
9c23f3452d
gh-131372: Configurable build-details.json name (#150098)
* Configurable build-details.json name

Linux distributions that co-install multiple Python versions in the same
path (e.g. multiarch on Debian, debug builds, and free-threading) need a
way to place multiple build-details.jsons side-by-side.

PEP-739 is being updated [0] to recommend renaming in this situation. To
ensure some standardization, this PR generates appropriate names for
distributions that need to use this feature.

[0]: https://github.com/python/peps/pull/4889

* NEWS entry

* Document configure option and add to whatsnew
2026-05-25 13:37:50 +01:00
devdanzin
832afeddce
gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) 2026-05-25 12:45:02 +03:00
Eduardo Villalpando Mello
0f32750fe2
gh-148932: Docs / profiling.sampling Windows limitations (#150272) 2026-05-24 12:54:36 +01:00
siliconforks
a38804bb98
gh-148444: Use "zero of any numeric type" instead of "numeric zero of all types" (#148455) 2026-05-24 12:52:13 +05:30
My-ABC
82191c6d2c
gh-150232: update Thread group parameter doc (#150283) 2026-05-23 13:52:44 +05:30
Omkar Kabde
9df2b6ccc7
gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269) 2026-05-22 21:02:56 +00:00
Hugo van Kemenade
de7c3bfd5b
gh-149189: Revert "Modern defaults for pprint (#149190)" (#150249) 2026-05-22 23:22:03 +03:00
Marin Misur
cf5c8c5698
gh-91372: Add mtime to gzip.open() (GH-32310) 2026-05-22 15:14:25 +03:00
Mia Albert
9604fa8c00
gh-149902: Remove dead packaging docs link and add a new section for external resources (#150030)
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 14:32:14 +03:00
adang1345
1daad8a163
gh-133998: Fix gzip file creation when time is out of range (GH-134278)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-22 10:20:08 +03:00
Jelle Zijlstra
f159419ae2
gh-149995: Update typing.py docstrings and documentation (#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.
2026-05-21 21:06:42 -07:00
Jason R. Coombs
cb3b4b98d8
gh-143387: Add news blurb for importlib.metadata highlighting the change. (#150169) 2026-05-20 12:40:15 -07:00
Stan Ulbrych
87a879f4d0
Add summary table to the unicodedata doc (#149957) 2026-05-20 16:04:10 +01:00
Pablo Galindo Salgado
1f3c2679f1
gh-149321: Remove lazy_imports=none startup mode (#149389) 2026-05-19 16:01:15 -07:00
Stefanie Molin
47723af4e7
gh-134887: Add references to locale module for locale-aware number formatting references in string module docs (GH-134888) 2026-05-19 23:10:39 +02:00
Jason R. Coombs
192796cfd4
gh-143387: Update docs to reflect the behavior and note the changed version. (#150095) 2026-05-19 12:38:27 -07:00
Victor Stinner
29415c071f
gh-149473: Emit audit event on calling os.environ.clear() (#149768)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-05-19 18:38:12 +02:00
Jelle Zijlstra
08218030a5
gh-148829: Make sentinels' repr and module customizable (#149654)
Implementation of python/peps#4968; still needs SC approval.
2026-05-19 09:18:56 -07:00
Serhiy Storchaka
ba0aca3bff
gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2026-05-19 11:36:12 +03:00
Daniil
17eb17d43f
gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) 2026-05-19 03:10:50 +02:00
Dan Shernicoff
398d7e1d13
gh-79413: Add qualname parameter to dataclass.make_dataclass. (GH-150026)
Added `qualname` parameter to `dataclasses.make_dataclass` in order to allow user to set `__qualname__` for the generated class.
2026-05-18 19:55:47 -04:00
nessita
9770e32ce0
gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011)
bpo-42367: Restore os.makedirs() and pathlib.mkdir() ability to apply *mode* recursively via a new parent_mode= keyword argument.

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-18 23:00:27 +00:00
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