Commit graph

14806 commits

Author SHA1 Message Date
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)
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)
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)
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)
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
Hugo van Kemenade
f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Neil Schemenauer
13188dbf85
gh-148937: revert process RSS based GC deferral (#149475) 2026-05-07 14:32:14 +03: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
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
Guo Ci
70e365c0ca
Replace use of Python keyword in issubclass function documentation (#142357) 2026-05-06 15:08:13 +03:00
Hugo van Kemenade
426f99cb71
gh-149189: Modern defaults for pprint (#149190) 2026-05-05 15:04:05 +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
Jelle Zijlstra
5dd2161716
gh-137840: Document PEP 728 (#149207) 2026-05-04 20:30:03 -07: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
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
Victor Stinner
5dd5c8b5a6
gh-148675: Remove F and D formats from array and memoryview (GH-149368) 2026-05-04 17:26:30 +02: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
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
Eric Mark Martin
a65611e7f5
gh-149171: Make TypeAliasType __module__ writable (#149172)
closes #149171.
2026-05-02 17:28:08 +00:00
Anuj Nitin Bharambe
3a1df787e1
gh-149267: Document ast.Constant.kind attribute (#149268)
The kind attribute of ast.Constant was not mentioned in the
documentation. It is set to 'u' for u-prefixed string literals
and None for all other constants.

---------

Co-authored-by: Anuj Bharambe <anujnitinb@gmail.com>
2026-05-02 09:55:29 -07:00
Hunter Hogan
7b0244dbc7
gh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpers" (#147954) 2026-05-02 19:54:26 +03:00
Brian Schubert
bdedc4a20e
gh-116021: Deprecate support for instantiating abstract AST nodes (#137865)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-02 09:50:06 -07:00
Raymond Hettinger
bb5e41efdb
gh-149244 Document statistics functions that require sequence inputs. (gh-149264) 2026-05-01 22:58:23 -05:00