Commit graph

14506 commits

Author SHA1 Message Date
Adorilson Bezerra
4fb6a31bce
gh-106318: Add example for str.index() (#137023) 2026-01-06 23:42:11 +02:00
Andrii Hrimov
ff7d1cec41
gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (#143307) 2026-01-06 15:18:37 -05:00
Xiao Yuan
51227b6b1a
Doc: Fix missing closing parenthesis in argparse example (#143488) 2026-01-06 09:53:43 -08:00
ADITYA RAI
e79c9b7031
gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (#142338)
The documentation incorrectly stated that the file descriptor is not
inherited by child processes. In reality, the close-on-exec flag (when
available) only prevents inheritance across exec() calls, not fork().

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-06 17:08:25 +00:00
Adorilson Bezerra
7b0a372b20
gh-106318: Add examples for str.isprintable() (#140043)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-06 17:43:44 +01:00
Clay Dugo
d745b60ef2
gh-143474: Add os.RWF_ATOMIC constant (GH-143475) 2026-01-06 09:35:51 -05:00
Emma Smith
12d363bb66
gh-134740: Document distribution discovery in importlib.metadata (#134751)
Document the following items listed in `__all__` but missing from
documentation:

- `distributions()`: mentioned in doc strings as well
- `DistributionFinder`: mentioned but didn't have it's own :class:
  entry
- `DistributionFinder.Context`: mentioned but didn't have it's own :class:
  entry)
- `Distribution.discover()`: mentioned in doc strings

Closes #134740
Partially addresses #110937

---------

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2026-01-06 01:25:30 +00:00
Ritam Pal
240a6c3262
gh-143434: Fix typo in zstd documentation (#143437) 2026-01-05 11:55:11 -08:00
László Kiss Kollár
ef3b8829e4
gh-142927: Clarify pstats file output in docs and CLI (#143388)
When running the `profiling.sampling` module in pstats mode, the output
can be emitted in two different ways: text to stdout or a binary file
when the `--output` argument is set.

The current documentation and help text is confusing as it does not
distinguish between these two output formats so it may be surprising to
the user to get different formats depending whether `--output` is set or not.
2026-01-03 21:16:29 +00:00
Tomas R.
136f6d8355
gh-76187: Document the c typecode for multiprocessing.Array. (#132504)
* Document the `c` typecode for `multiprocessing.Array`.

* Add quotes

* Mention that 'w' is not supported
2026-01-02 20:18:32 +01:00
ivonastojanovic
5d133351c6
gh-142927: Auto-open HTML output in browser after generation (#143178) 2026-01-01 19:05:45 +00:00
Lakshya Upadhyaya
c5215978eb
gh-140920: remove incorrect mentions to concurrent.futures.interpreter.ExecutionFailed (#141723)
Remove documentation for inexistant `concurrent.futures.interpreter.ExecutionFailed`
and replace its occurrences by `concurrent.interpreters.ExecutionFailed` since this
is the documented exception.
2025-12-31 21:45:41 +01:00
Gregory P. Smith
04899b8539
gh-115634: document ProcessPoolExecutor max_tasks_per_child bug (GH-140897) 2025-12-30 15:24:32 -08:00
Adam Turner
7e3a5a7e79
gh-130167: Add a What's New entry for changes to `textwrap.{de,in}dent` (#131924)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
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>
2025-12-30 14:57:28 +02:00
Sebastian Rittau
ef834dee89
gh-128546: Document that getaddrinfo() can return raw data (#128547)
Document that getaddrinfo() can return raw data

This is the case for IPv6 addresses if Python was compiled with
--disable-ipv6.
2025-12-29 21:23:30 -08:00
wangxiaolei
0efbad60e1
gh-142994, gh-142996: document missing async generator and coroutine field entries in inspect (#142997) 2025-12-28 19:03:30 +01:00
Fatih Çelik
3ca1f2a370
gh-143241: Fix infinite loop in zoneinfo._common.load_data (#143243)
Correctly reject truncated TZif files in `ZoneInfo.from_file`.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-28 15:48:43 +01:00
Rafael Fontenelle
f5e11facf2
no-issue: Fix override value in os.rst (gh-123522) 2025-12-27 19:48:01 +09:00
AN Long
1af21ea320
gh-63016: Add flags parameter on mmap.flush (#139553)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-27 10:33:56 +00:00
SYan212
57d569942c
Fix typos in docs (#143193) 2025-12-27 09:52:28 +02:00
László Kiss Kollár
888d101445
gh-138122: Remove default duration for statistical profiling (#143174)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-25 19:21:16 +00:00
Hauke D
8d46f961c3
gh-143103: Added pad parameter to base64.z85encode() (GH-143106)
This makes it analogous to a85encode() and b85encode() and allows the
user to more easily meet the Z85 specification, which requires input
lengths to be a multiple of 4.
2025-12-25 13:34:44 +02:00
Tom Kuson
84b7e6970f
gh-140717: Add exc_text to LogRecord attributes table (GH-140718) 2025-12-24 17:30:20 +00:00
László Kiss Kollár
d4dc3dd9aa
gh-138122: Replace --interval with --sampling-rate (#143085) 2025-12-24 13:46:33 +00:00
Victor Stinner
6536fab194
gh-130796: Undeprecate locale.getdefaultlocale() (#143069) 2025-12-23 16:31:10 +01:00
Pablo Galindo Salgado
81c8eb85e1
gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Pablo Galindo Salgado
9e51301234
gh-138122: Allow tachyon to write and read binary output (#142730) 2025-12-22 23:57:20 +00:00
Stan Ulbrych
3c0888b25b
gh-89152: Note truth testing exception in stdtypes.rst (#137640)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-12-22 11:36:44 -08:00
Gregory P. Smith
b8d3fddba6
gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179)
* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.

* Update to match the error message.

* remove no longer referenced footnote

* ignore the warning in the doctest

* use Petr's suggestion for the docs to hide the warning processing

* cover date.strptime (3.14) as well
2025-12-20 22:47:40 -08:00
Hai Zhu
3cc57505e5
gh-142834: pdb commands command should use last available breakpoint (#142835) 2025-12-20 09:27:34 -08:00
Andrej
610aabfef2
gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (#142483)
If *a* is an integer, the sign of *a* is discarded in the C source code. Clarify this behavior to prevent foot guns, where a common use case might naively assume that flipping the sign will produce different sequences (e.g. for a train/test split of a synthetic data generator in machine learning).

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-19 00:29:35 -08:00
Ethan Furman
e79c39101a
gh-118342: [Enum] update docs (GH-137290)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-18 18:31:37 +00:00
Donghee Na
14f0b5191a
gh-142419: Add mmap.set_name method for user custom annotation (gh-142480) 2025-12-18 23:33:49 +09:00
James
fc80096a07
gh-137063: Document that ast node types replaced by Constant are no longer available (#137064) 2025-12-18 13:17:42 +01:00
Damian Birchler
77c8e6a2b8
gh-142876: remove reference to thread in documentation of asyncio.Queue.shutdown (#142888) 2025-12-17 16:40:03 +00:00
Hugo van Kemenade
f1eb0c0b0c Python 3.15.0a3 2025-12-16 14:26:12 +02:00
1nftf
e27f76b6fe
gh-142019: Add description about the exponent of result formatted with presentation type 'e' (#142084) 2025-12-16 13:56:12 +02:00
Cody Maloney
e12c744b0a
gh-83926: BlockingIOError characters_written is byte count (#141215) 2025-12-16 13:53:56 +02:00
Mohsin Mehmood
b372bd7295
gh-141218: Fix inaccurate object comparison documentation (#141221)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-16 13:46:42 +02:00
Owain Davies
a15bd217b2
Remove duplicate content in Mapping types - dict documentation (#141036) 2025-12-16 13:46:13 +02:00
Sergey B Kirpichev
2450be607c
decimal docs: specification link and examples (#128698)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-16 11:41:59 +00:00
Adorilson Bezerra
ec2619c080
gh-106318: Add examples for str.ljust() method (#142719)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 13:39:20 +02:00
Arthur Wigo
ba587ed8f3
gh-130536: Add details to os.path documentation (#130557) 2025-12-16 13:29:52 +02:00
Stan Ulbrych
c24e238417
gh-85204: Improve locale.setlocale example (#132683) 2025-12-16 13:26:33 +02:00
Patrick R
58027999bf
gh-124864: Extends smtplib documentation on ESMTP options format (#132547) 2025-12-16 13:21:38 +02:00
Bartosz Sławecki
a44509ea87
gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) 2025-12-16 11:15:37 +01:00
AN Long
0978b9a7d5
gh-85222: Document the global start method side effect in multiprocessing (GH-136426)
* Document the ctx parameter in some types in multiprocessing.
* Reduce duplication while still linking to the central explanation from API points with the side effect.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com>
2025-12-15 14:12:52 -08:00
Petr Viktorin
e4d32a3ef9
gh-142020: ctypes docs: Note that find_library relies on the programs it runs (GH-142134) 2025-12-15 15:15:22 +01:00
Pablo Galindo Salgado
6658e2cb07
gh-138122: Add --subprocesses flag to profile child processes in tachyon (#142636) 2025-12-15 12:11:40 +00:00
Adorilson Bezerra
3596dba691
gh-106318: Add examples for str.isnumeric() (#142680)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-14 20:12:12 +02:00