Commit graph

14581 commits

Author SHA1 Message Date
Guo Ci
d73634935c
For enum.bin, update versionadded directive from 3.10 to 3.11 (#144574) 2026-02-07 23:35:02 -08:00
Bénédikt Tran
934997218e
gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value (#144568) 2026-02-07 23:36:42 +01:00
Guo Ci
6665115679
gh-84116: Add missing backslash to _SubParsersAction.add_parser signature (#144572) 2026-02-07 19:02:01 +01:00
kovan
0e7c06a858
gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout (#144449) 2026-02-07 12:22:51 +00:00
kovan
16efaa225c
gh-140490: Document changes for PurePath.stem in Python 3.14 (#144450) 2026-02-07 13:19:20 +01:00
Krishna-web-hub
74db4404ea
gh-84116: Docs: Document help and aliases for argparse.add_parser() (#140574)
* gh-140281: Doc: Update free-threading how-to

* gh-140281: Doc: Update free-threading how-to

* Fix trailing whitespace

* doc fixing of the cpython fixes#84116

* Docs: Document help and aliases for argparse.add_parser() (gh-84116)

* Docs: Document help and aliases for argparse.add_parser() (gh-84116)

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing errors

* Fix trailing errors and spaces

* Fix docutils formatting, NEWS ref, and trailing whitespace

* Docs: Update argparse.rst and add NEWS entry

* Delete Doc/howto/free-threading-python.rst

* Delete Misc/NEWS.d/next/Documentation/2025-10-25-00-49-43.gh-issue-140281.tuMQUe.rst

* adding the depreceated tag

* The error indexing was fixed

* Fix trailing whitespace

* Restore missing free-threading documentation

* fixing some minor error

* fixing some minor error part 2

* fixing some minor error part 3

* Fix NEWS entry format

* Final cleanup of NEWS entry format 2

* changes in the argparse.rst

* Remove unnecessary NEWS entry

* Fixing the issue as requested

* Added the Changes done before.

* done the changes

* done the changes#1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Done the changes

* Done the new changes

* The versionadded is rectified

* Update Doc/library/argparse.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Docs editing

* Docs fixing whitespace

* Docs rectifiying

* little bit rectification

* Indentation rectification

* Indentation rectification 1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* deprecated rectification

* Remove mistakenly added NEWS entry

* Update Doc/library/argparse.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changes #1

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Doc/library/argparse.rst 2

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* removed useless thing

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changed according to the request

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Updated the test part

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-06 13:26:44 -08:00
Stan Ulbrych
fb196c6f32
gh-140715: Update datetime.*.str*time format code tables (GH-140716) 2026-02-06 17:08:26 +01:00
kangtastic
45d4a34720
gh-101178: Add Ascii85, Base85, and Z85 support to binascii (GH-102753)
Add Ascii85, Base85, and Z85 encoders and decoders to binascii,
replacing the existing pure Python implementations in base64.

This makes the codecs two orders of magnitude faster and consume
two orders of magnitude less memory.

Note that attempting to decode Ascii85 or Base85 data of length 1 mod 5
(after accounting for Ascii85 quirks) now produces an error, as no
encoder would emit such data. This should be the only significant
externally visible difference compared to the old implementation.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-06 16:43:16 +02:00
Ned Batchelder
638d22c6e7
Docs: module pages should not link to themselves (#144505)
* Docs: module pages should not link to themselves

* fix header punctuation
2026-02-06 06:48:27 -05:00
Seth Michael Larson
957f9fe162
gh-74453: Deprecate os.path.commonprefix (#144436)
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-02-05 22:37:05 +02:00
Serhiy Storchaka
4644fed819
gh-144001: Support ignoring the invalid pad character in Base64 decoding (GH-144306) 2026-02-05 21:14:49 +02:00
Raymond Hettinger
50e107f149
More realistic lru_cache example (gh-144517) 2026-02-05 12:04:12 -06:00
NewUserHa
d9a2e587fc
gh-142407: Clarify copy performance on Windows in shutil docs (GH-142408) 2026-02-05 17:45:14 +00:00
Seth Michael Larson
7e777c587f
gh-144484: Warn users not to use wsgiref in production 2026-02-05 15:43:39 +00:00
Serhiy Storchaka
67ddba9aa9
gh-144148: Update the urllib.parse documentation (GH-144497)
Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
2026-02-05 16:32:17 +02:00
Raymond Hettinger
b6d8aa436b
Itertools recipes: Replace the tabulate() example with running_mean() (gh-144483) 2026-02-04 14:21:20 -06:00
Adorilson Bezerra
1b6d737ee0
gh-106318: Add examples for str.startswith() method (#144369)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-04 18:17:42 +01:00
Petr Viktorin
e423e0c2cc
gh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-04 16:08:23 +00:00
Serhiy Storchaka
f73d2e7003
gh-144386: Add support for descriptors in ExitStack and AsyncExitStack (#144420)
__enter__(), __exit__(), __aenter__(), and __aexit__() can now be
arbitrary descriptors, not only normal methods, for consistency with the
"with" and "async with" statements.
2026-02-04 13:20:18 +02:00
kovan
34e5a63f14
gh-141444: Replace dead URL in urllib.robotparser example (GH-144443)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:45:15 +02:00
Sam Gross
7e2c9bdc98
gh-120321: Add gi_state, cr_state, and ag_state attributes (gh-144409)
Add `gi_state`, `cr_state`, and `ag_state` attributes to generators,
coroutines, and async generators respectively. These attributes return the
current state as a string (e.g., `GEN_RUNNING`, `CORO_SUSPENDED`).

The `inspect.getgeneratorstate()`, `inspect.getcoroutinestate()`, and
`inspect.getasyncgenstate()` functions now return these attributes directly.

This is in preparation for making `gi_frame` thread-safe, which may involve
stop-the-world synchronization. The new state attributes avoid potential
performance cliffs in `inspect.getgeneratorstate()` and similar functions by
not requiring frame access.

Also removes unused `FRAME_COMPLETED` state and renumbers the frame state enum
to start at 0 instead of -1.
2026-02-03 13:06:32 -05:00
Seth Michael Larson
4e15b8d95d
gh-74453: Add stronger security warning to os.path.commonprefix (GH-144401) 2026-02-03 15:07:59 +01:00
Adorilson Bezerra
45d00a0791
gh-106318: Add examples for str.rindex() method (#143887)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-03 13:29:05 +00:00
Taneli Hukkinen
bb917d83b1
gh-142956: Update tomllib to parse TOML 1.1.0 (#144243)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-03 13:41:57 +01:00
Serhiy Storchaka
c3b61ef73d
gh-144001: Simplify Base64 decoding with altchars and ignorechars specified (GH-144324)
Treat "+" and "/" like other characters not in the alternative Base64
alphabet when both altchars and ignorechars are specified.
E.g. discard them if they are not in altchars but are in ignorechars,
and set error if they are not in altchars and not in ignorechars.
Only emit warnings if ignorechars is not specified.
2026-02-02 13:38:32 +02:00
Guilherme Leobas
092ef634f5
docs: update dangling reference to LOAD_METHOD in dis.rst (#144358) 2026-02-02 16:00:17 +05:30
Peter Bierma
3a0e183556
gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333) 2026-02-01 20:39:26 -05:00
Giampaolo Rodola
9b154aba7d
gh-83069: Use efficient event-driven subprocess.Popen.wait() on Linux / macOS / BSD (#144047) 2026-01-28 15:04:40 +01:00
Bartosz Sławecki
487bd2dea5
gh-142119: Clarify that one contextvars.Token can only reset once in a lifetime (GH-143693) 2026-01-27 10:49:05 +01:00
Serhiy Storchaka
7febbe6b60
gh-144001: Support ignorechars in binascii.a2b_base64() and base64.b64decode() (GH-144024) 2026-01-26 20:11:40 +02:00
Bartosz Sławecki
04d497c284
gh-142119: Clarify context manager protocol documentation on ContextVar.set and Token (GH-143694) 2026-01-26 16:50:27 +01:00
Yashraj
923d9d2ac2
gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (#144025) 2026-01-26 14:38:23 +01:00
Solomon Ritzow
9982147433
gh-144233: Fix typo in os.eventfd documentation (#144234) 2026-01-26 10:07:56 +02:00
Yashraj
a51bf70f95
gh-143504: Expose CELL status of a symbol in symtable (#143549) 2026-01-25 15:21:27 +00:00
Serhiy Storchaka
25a10b60b0
gh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028)
It does not support an ASCII string.

Also add more tests.
2026-01-23 20:55:48 +02:00
Yongtao Huang
f3dd0cae6c
Doc: fix incorrect reference in isasyncgenfunction docs (GH-144099)
Fix incorrect reference in isasyncgenfunction docs
2026-01-23 09:06:47 +01:00
Alex Willmer
f8262b84f5
gh-143513: Remove importlib.abc documentation for removed ABCs (#143605)
In 3.11 ResourceReader, Traversable, & TraversableResources moved from importlib.abc to importlib.resources.abc (commit e712a5b277).

In 3.12 old import locations were deprecated (commit 71848c9609).

In 3.14 backwards-compat support was removed (commit 0751511d24).

Co-authored-by: Brett Cannon <brett@python.org>
2026-01-22 14:00:37 -08:00
Dimma Don't
5b2d49b7da
Add source links to documentation for Windows-specific modules (GH-130244) 2026-01-22 21:30:13 +00:00
Serhiy Storchaka
c5cfcdf16a
gh-67041: Allow to distinguish between empty and not defined URI components (GH-123305)
Changes in the urllib.parse module:

* Add option missing_as_none in urlparse(), urlsplit() and urldefrag(). If
  it is true, represent not defined components as None instead of an
  empty string.
* Add option keep_empty in urlunparse() and urlunsplit(). If it is
  true, keep empty non-None components in the resulting string.
2026-01-22 14:29:13 +02:00
Rafael Weingartner-Ortner
0b5f8359c5
gh-143993: Document ways to disable remote debugging support (#143994)
Although PEP 768 mentions how to disable the mechanism of
remote debugging, it is not documented in the Python docs.

This change adds a note on how to disable remote debugging support
in a Python interpreter to the remote debugging how-to.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-22 11:41:20 +01:00
Serhiy Storchaka
9060b4abbe
gh-125346: Deprecate accepting standard Base64 alphabet when alternative alphabet is used (GH-141128)
Emit a warning in base64.urlsafe_b64decode() and base64.b64decode() when
the "+" or "/" characters occur in the Base64 data with alternative
alphabet if they are not the part of the alternative alphabet.

It is a DeprecationWarning in the strict mode (will be error) and
a FutureWarning in non-strict mode (will be ignored).
2026-01-21 09:41:58 +02:00
Seth Michael Larson
95746b3a13
gh-143919: Reject control characters in http cookies
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-20 21:23:42 +00:00
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