Commit graph

14539 commits

Author SHA1 Message Date
Terry Jan Reedy
fa3abf5a51
gh-143774 - Improve IDLE Format Paragraph doc (#143775)
Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.

(Also fix a couple case errors in cross references.)
2026-01-20 04:07:29 -05:00
Adorilson Bezerra
3c9c3d33cb
gh-106318: Add examples for str.rpartition() method (#143891) 2026-01-19 15:15:55 +01:00
Serhiy Storchaka
813fc7a291
gh-143754: Modernize Tkinter docs (GH-143841)
Use more relevant terminology instead of "master"/"slave" widgets where possible.
2026-01-19 14:01:29 +02:00
Gregory P. Smith
c879b2a7a5
gh-141860: Add on_error= keyword arg to multiprocessing.set_forkserver_preload (GH-141859)
Add a keyword-only `on_error` parameter to `multiprocessing.set_forkserver_preload()`. This allows the user to have exceptions during optional `forkserver` start method module preloading cause the forkserver subprocess to warn (generally to stderr) or exit with an error (preventing use of the forkserver) instead of being silently ignored.

This _also_ fixes an oversight, errors when preloading a `__main__` module are now treated the similarly. Those would always raise unlike other modules in preload, but that had gone unnoticed as up until bug fix PR GH-135295 in 3.14.1 and 3.13.8, the `__main__` module was never actually preloaded.

Based on original work by Nick Neumann @aggieNick02 in GH-99515.
2026-01-18 14:04:18 -08:00
Hugo van Kemenade
3199cfcf76
gh-138122: Default highlight to sh (#143782) 2026-01-16 21:40:28 +02:00
Victor Stinner
3514ba2175
gh-142434: Use ppoll() if available in select.poll (#143529) 2026-01-15 13:49:46 +01:00
Hugo van Kemenade
d51cc01c19 Python 3.15.0a5 2026-01-14 16:41:32 +02:00
Serhiy Storchaka
bab1d7a561
gh-74902: Add Unicode Grapheme Cluster Break algorithm (GH-143076)
Add the unicodedata.iter_graphemes() function to iterate over grapheme
clusters according to rules defined in Unicode Standard Annex #29.

Add unicodedata.grapheme_cluster_break(), unicodedata.indic_conjunct_break()
and unicodedata.extended_pictographic() functions to get the properties
of the character which are related to the above algorithm.

Co-authored-by: Guillaume "Vermeille" Sanchez <guillaume.v.sanchez@gmail.com>
2026-01-14 14:37:57 +00:00
Serhiy Storchaka
a471a32f4b
gh-143214: Add the wrapcol parameter in binascii.b2a_base64() and base64.b64encode() (GH-143216) 2026-01-14 14:44:53 +02:00
Hugo van Kemenade
dfc66e5c8d Merge branch 'main' of https://github.com/python/cpython 2026-01-13 20:44:19 +02:00
Bartosz Sławecki
865eb12e07
gh-143728: Keep TypedDict and NamedTuple in class role in docs (#143702) 2026-01-13 13:52:29 +00:00
Lakshya Upadhyaya
95a17b4a85
gh-141045: Document that shutil.Error is a subclass of OSError (#141152) 2026-01-13 19:08:26 +05:30
Hugo van Kemenade
43cd277ae9 Python 3.15.0a4 2026-01-13 12:26:56 +02:00
Raymond Hettinger
a6bc60da02
Update random combinatoric recipes and add tests (gh-143762) 2026-01-12 17:55:02 -06:00
Raymond Hettinger
66e1399311
Minor readability/usability improvement to the recipes section (gh-143753) 2026-01-12 14:12:23 -06:00
Lysandros Nikolaou
1de46715ec
gh-142518: Document thread-safety guarantees of list operations (#142519)
* Add everything to code blocks
* Improve wording around atomicity; specify exact types
* Better explain lock-free and atomicity
2026-01-12 17:43:05 +01:00
Kuang Yu Heng
971f387bbb
gh-137113 docs: note readline no longer supported in REPL after 3.13 (GH-137142)
Add a note to the readline module documentation stating that
Python 3.13 and later no longer supports readline in the default REPL,
as per gh-118840. Includes workaround using PYTHON_BASIC_REPL.

Update tutorial to remove the reference, and use a different key to
test things out.

Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
2026-01-12 15:30:35 +00:00
Guo Ci
7f50a5febd
gh-140806: add docs for enum.bin function (#140807)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-01-12 13:34:18 +02:00
Bartosz Sławecki
9d13ca97c1
gh-142972: Document arbitrary ordering in Path.glob and Path.rglob (GH-143025) 2026-01-11 14:36:47 -05:00
Sergey B Kirpichev
23b93770f6
gh-143420: Clarify sequence behavior for slice indexes (#143422) 2026-01-11 19:17:47 +02:00
AN Long
e22b68568a
gh-86139: Correct NamedTuple and TypedDict's type in typing.rst (#143692)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2026-01-11 15:53:25 +00:00
Raymond Hettinger
75d73c3674
Sync the batched() example with the grouper() example. (gh-143676) 2026-01-10 22:00:13 -06:00
Raymond Hettinger
718c15fa95
Add derangements() recipe (gh-143671) 2026-01-10 19:47:27 -06:00
Adorilson Bezerra
c696f33d9e
gh-106318: Add examples for str.rfind() method (#143582) 2026-01-09 16:24:31 +01:00
Adorilson Bezerra
6d6c7ed737
gh-106318: Improve str.removeprefix() and str.removesuffix() docs (#143580)
Add doctest role and 'See also'.
2026-01-09 16:22:50 +01:00
AN Long
a9ca49d9c6
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (#143288) 2026-01-09 17:48:32 +05:30
Adorilson Bezerra
af9f783a7e
gh-106318: Add examples for str.replace() method (GH-143581) 2026-01-09 09:01:00 +01:00
Brett Cannon
dfeefbe8ea
GH-139686: Revert "gh-139686: Make reloading a lazy module no-op (GH-139857)" (#143584)
This reverts commits 57db12514a and 0a97941245.
2026-01-08 22:08:03 +00:00
Alex Willmer
5462002bbe
gh-143513: Clarify changed argument name of ResourceReader.is_resource (GH-143523) 2026-01-08 08:40:17 -05:00
Serhiy Storchaka
c07e5ec0a9
gh-143553: Add support for parametrized resources in regrtests (GH-143554)
For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.
2026-01-08 13:51:38 +02:00
Tomas R.
228d95582e
Fix a typo in STORE_SLICE docs (#143500) 2026-01-07 23:36:22 +01:00
Adorilson Bezerra
51a56a3a7b
gh-106318: Add examples for str.casefold() and str.lower() methods (#142154)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-07 16:16:25 +00:00
Giampaolo Rodola
a1eedaee98
gh-94172: delete mention of ssl_version from ftplib doc (#143515)
`FTP_TLS.ssl_version` class attribute was removed in ef0e72b31d.
2026-01-07 15:11:50 +01:00
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