Commit graph

29611 commits

Author SHA1 Message Date
sobolevn
f74dbc82fe
[3.13] gh-105895: Add match and case doc to help() (GH-152113) (#152128)
(cherry picked from commit 1d55b3778c)

Co-authored-by: dzherb <zherbin.dima@yandex.ru>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-24 22:05:05 +00:00
Serhiy Storchaka
c2bc0e3ac8
[3.13] gh-86726: Improve the structure of the tkinter reference (GH-152109 (GH-152111) (GH-152119)
Add short group intros before each cluster of Misc methods.
Group the Tk and Toplevel classes in a new "Toplevel widgets" section, move
the Tcl() function to the module-level functions, and move the "File
handlers" section into the reference.
(cherry picked from commit c7faa6936e)
(cherry picked from commit 2d5187116b)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 19:36:14 +00:00
Miss Islington (bot)
43c188d0d2
[3.13] gh-84008: Document that the LC_NUMERIC locale affects tkinter numeric widgets (GH-152008) (GH-152051)
Spinbox, Scale and ttk.Spinbox format floating-point values according to
the LC_NUMERIC locale, but such values are always parsed with a period, so
a comma-decimal locale breaks DoubleVar.get().
(cherry picked from commit ee78d4323c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 06:36:53 +00:00
Miss Islington (bot)
82e023fc3c
[3.13] gh-151556: Show example CSV file content in the csv module docs (GH-151563) (#151986)
(cherry picked from commit 7915c4a8dd)

Co-authored-by: Lucas <lucasefernandes333@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-23 12:08:09 +00:00
Miss Islington (bot)
da45740756
[3.13] gh-62480: De-personalize docs on using the C API (GH-151784) (#151938)
(cherry picked from commit 1c5a11018a)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-22 20:08:29 +00:00
Serhiy Storchaka
d4a953acc0
[3.13] gh-86726: Document tkinter method-name conflicts (GH-151917) (GH-151934)
Document where widget methods shadow inherited Misc, geometry-manager and
Wm methods, correct the inaccurate "size/bbox is an alias of
grid_size/grid_bbox" claims, and add "# overrides X" comments at the
definitions.

Also document the geometry-manager ambiguity: the short names forget, info,
slaves and propagate are defined by Pack, Place and Grid but
resolve to the pack variant.

Cross-reference the window-manager methods grid, forget and state with the
same-named grid geometry manager, Pack.forget and ttk.Widget.state.

(cherry picked from commit 4de5683f21)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 19:44:03 +00:00
Miss Islington (bot)
3e256401c0
[3.13] gh-144133: Add a warning to the encodings.punycode documentation (GH-151812) (#151924)
(cherry picked from commit 7ec70e1df3)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-22 12:02:09 +00:00
Miss Islington (bot)
426e21d290
[3.13] gh-86726: Document tkinter.simpledialog query options and Dialog.result (GH-151851) (GH-151854)
(cherry picked from commit 8270ae560c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-21 18:10:08 +03:00
Miss Islington (bot)
2a77ef79f8
[3.13] gh-150831: docs: clarify generator, generator function, and generator iterator in glossary (GH-150905) (#151841)
gh-150831: docs: clarify generator, generator function, and generator iterator in glossary (GH-150905)
(cherry picked from commit 1de86e1492)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
2026-06-21 07:34:58 -04:00
Miss Islington (bot)
423f620f31
[3.13] gh-101100: Document os.uname_result and os.statvfs_result with related constants (GH-151301) (GH-151691)
(cherry picked from commit 9688d252d3)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-19 08:42:41 +00:00
Miss Islington (bot)
e87e0ad27d
[3.13] gh-151427: add 'not macOS' and 'not iOS' restrictions on availability state of some functions in os module. (GH-151537) (#151697)
(cherry picked from commit da69fcf98d)
Co-authored-by: Duprat <yduprat@gmail.com>
2026-06-19 08:17:02 +00:00
Serhiy Storchaka
aae671d484
[3.13] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151660)
It returns a sys.version_info-like named tuple, not a string.
(cherry picked from commit 3cd02a1c2d)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:44:23 +00:00
Serhiy Storchaka
33b9f75c58
[3.13] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151650) (GH-151653)
Replace the previously sparse reference documentation with full coverage of
the public API of the tkinter package, written from the Tcl/Tk manual pages,
the existing documentation and the module docstrings.

* Doc/library/tkinter.rst gains a "Reference" section documenting every public
  class, method, function and constant of the core module -- the widgets, the
  Misc, Wm, Pack, Place, Grid, XView and YView mix-ins, the Variable and image
  classes, the module-level functions and the symbolic constants.
* Doc/library/tkinter.ttk.rst, dialog.rst, tkinter.font.rst and the other
  module pages document their remaining classes, methods and functions.

The descriptions are Python-oriented (correct return types -- tuples rather
than Tcl lists, booleans, integers, None on cancellation, and so on) and were
checked against the Tcl/Tk 9.1 manual pages and the implementation.

versionadded, versionchanged and deprecated directives are added for the
public API, determined from the git history relative to Python 3.0: the
tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5
features (3.3); and the many later additions and behavior changes up to 3.15.
The Tk version required by features added after Tk 8.6 is noted as well.  The
bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at
the tcl9.0 reference.

--------
(cherry picked from commit 8b270b72a2)





* gh-86726: Adjust tkinter docs for the 3.14 backport

Remove documentation of API added only in 3.15 (the grid_content/
pack_content/place_content aliases, Text.search_all, the search
nolinestop/strictlimits parameters and Event.user_data/detail), date the
wm_attributes positional-argument deprecation to 3.13, and update the
bundled Tcl/Tk version to 8.6.



---------
(cherry picked from commit 1141d294ee)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-18 13:32:37 +00:00
Hugo van Kemenade
f57b80cd2e
[3.13] gh-151623: Improve curses documentation style (GH-151635) (#151638) 2026-06-18 10:10:37 +00:00
Serhiy Storchaka
805830831f
[3.13] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151629) (GH-151630)
(cherry picked from commit 015cc42bc2)

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd8df)
2026-06-18 09:51:51 +00:00
Miss Islington (bot)
fa8bf7df09
[3.13] gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893) (GH-151473) (#151494)
[3.14] gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893) (GH-151473)

* gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893)
(cherry picked from commit 47b7dc788c)




* Apply suggestions from code review



---------
(cherry picked from commit eb612f4571)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-15 09:30:46 +00:00
Hugo van Kemenade
6971e05978
[3.13] Add a new Sphinx soft-deprecated directive (GH-148630) (#148715)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-14 19:08:04 +03:00
Miss Islington (bot)
348622a96d
[3.13] gh-151443: Fix documented default of unittest.mock.mock_open's read_data parameter (GH-151444)
(cherry picked from commit 9ad6ba0324)

Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
2026-06-13 18:37:47 +00:00
Miss Islington (bot)
52ee4d8e8d
[3.13] Docs: Fix method directive signatures in enum docs (GH-151429) (#151433)
(cherry picked from commit 5b38519762)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-06-13 08:55:39 +00:00
Miss Islington (bot)
a1d247f357
[3.13] Fix typos in the curses.ascii module documentation (GH-129300) (#151415)
(cherry picked from commit f4f102027a)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-12 16:09:38 +00:00
Hugo van Kemenade
ebc2a625ad
[3.13] Docs: avoid repetitions of class references in functions.rst (GH-150891) (#151407)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2026-06-12 18:04:54 +03:00
Miss Islington (bot)
5bc20725e2
[3.13] gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007) (#151374)
gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007)

And add tests.
(cherry picked from commit 402668b2b1)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-11 17:39:04 +00:00
Miss Islington (bot)
bba688665f
[3.13] gh-101100: Fix Sphinx nitpick in unittest.mock.rst (GH-151302)
(cherry picked from commit b18168cb32)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-11 16:38:41 +01:00
Hugo van Kemenade
06dce35b5a
[3.13] gh-130796: Undeprecate locale.getdefaultlocale() (GH-143069) (#151318)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-11 14:34:40 +03:00
Miss Islington (bot)
d5468ba70b
[3.13] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151298)
(cherry picked from commit 84630e2cb9)
2026-06-11 07:38:47 +01:00
Victor Stinner
a1f43ef9d9
[3.13][3.14] gh-89554: Document socket.SocketType as a class (#150683) (#151245) (#151254)
[3.14] gh-89554: Document socket.SocketType as a class (#150683) (#151245)

gh-89554: Document socket.SocketType as a class (#150683)

socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), but was documented with
the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.

Backport to 3.13: Replace ":platform: Windows" with
".. availability:: Windows" in ioctl() method.

(cherry picked from commit a621e8ad81)


(cherry picked from commit 4ef6a375a1)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-10 19:02:34 +02:00
Thomas Wouters
3a04c62e38 Merge branch '3.13' of https://github.com/python/cpython into 3.13 2026-06-10 18:01:42 +02:00
Miss Islington (bot)
60123e619a
[3.13] Docs: Fix typos in the "Memory Management" section (GH-151243)
(cherry picked from commit 8c0e2515bb)

Co-authored-by: Manoj K M <manojkm24dev@gmail.com>
2026-06-10 13:20:03 +00:00
Thomas Wouters
fd17997c38 Python 3.13.14 2026-06-10 14:24:04 +02:00
Miss Islington (bot)
52ee56a88e
[3.13] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146) (GH-151233)
The type of the callback argument is not checked.
(cherry picked from commit 0b6adeb20f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-10 10:48:23 +00:00
Abduaziz π
99dc88db09
[3.13] gh-132467: Document and test that generic aliases are not classes (GH-133504) (#151117)
(cherry picked from commit 5915a1fb9d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-06-09 22:24:02 +02:00
Miss Islington (bot)
fc600e4178
[3.13] gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (GH-151058) (#151071)
(cherry picked from commit a1873300ee)

Co-authored-by: Christian Zinck <christian.zinck@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-09 22:21:51 +02:00
Savannah Ostrowski
848b9823bc
[3.13] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151196)
(cherry picked from commit 82cb7d4bf6)
2026-06-09 17:26:45 +00:00
Miss Islington (bot)
b032f3fa17
[3.13] GH-54732: Tweak wording around empty lines in argument files (GH-150980) (#151167)
GH-54732: Tweak wording around empty lines in argument files (GH-150980)
(cherry picked from commit 528550e0e7)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-06-09 15:44:18 +00:00
Miss Islington (bot)
558764600f
[3.13] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151170)
GH-61082: Clarify nargs='*' positional default behavior (GH-150989)
(cherry picked from commit bc37a227b2)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-06-09 15:44:07 +00:00
Stan Ulbrych
19bc39127e
[3.13] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368)
Expose the XML Expat 2.7.2 APIs to tune protections against
"billion laughs" [1] attacks.

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetBillionLaughsAttackProtectionActivationThreshold(threshold)`, and
- `parser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor)`.

This completes the work in f04bea44c3,
and improves the existing related documentation.

[1]: https://en.wikipedia.org/wiki/Billion_laughs_attack
(cherry picked from commit 666112376d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-09 15:23:22 +01:00
Miss Islington (bot)
c68571c4bf
[3.13] gh-109503: Fix document for shutil.move() on usage of os.rename() since it's inaccurate (GH-109507) (GH-150613)
Nonatomic move might be used even if the files are
on the same filesystem in some cases.
(cherry picked from commit 6ecd197c03)

Co-authored-by: Fang Li <fangli@users.noreply.github.com>
2026-06-09 16:06:55 +03:00
Miss Islington (bot)
de9ed78486
[3.13] gh-151070: Fix class referencing typo in collections.abc docs (GH-151088) (GH-151108)
(cherry picked from commit 29a920e80e)

Co-authored-by: Arshal Aromal <arshalaromal19@gmail.com>
2026-06-08 19:45:16 +00:00
Miss Islington (bot)
4e2285cf52
[3.13] gh-106318: Add examples to the str.isdigit() method docs (GH-144721)
(cherry picked from commit f051c68923)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-08 12:58:26 +00:00
Miss Islington (bot)
45d1ba7bb8
[3.13] gh-141623: operator.rst: don't use term "bitwise" (GH-141846) (GH-151080)
(cherry picked from commit bd5fa31c5f)

Co-authored-by: Doron Behar <doron.behar@gmail.com>
2026-06-08 12:19:22 +00:00
Miss Islington (bot)
6e5c4c0c52
[3.13] Docs: Fix missing colon in bisect example function (GH-151061) (GH-151069)
Docs: Fix missing colon in `bisect` example function (GH-151061)
(cherry picked from commit 16ede813eb)

Co-authored-by: Sergio López Gómez <sergiolopezgmz.dam@gmail.com>
2026-06-08 09:45:49 +00:00
Miss Islington (bot)
5ca5a0af2c
[3.13] Update an error message in the 'Functional Programming HOWTO' (GH-151047)
(cherry picked from commit 81965c1683)

Co-authored-by: saber-bit <bryanventura0324@gmail.com>
2026-06-07 18:26:30 +01:00
Miss Islington (bot)
8a69d89600
[3.13] Delete mention encoding and errors for importlib.resources.path() (GH-143111) (GH-151016)
(cherry picked from commit fded34d6fe)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
2026-06-06 11:58:49 +00:00
Miss Islington (bot)
b9ea60c38e
[3.13] Use time.monotonic in OrderedDict LRU cache example (GH-150986) (#150993)
Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c85552b)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
2026-06-06 01:59:53 +03:00
Miss Islington (bot)
0918ad4b0f
[3.13] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150959)
gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328)

Update `RawIOBase` and `FileIO` documentation to match implementation
behavior around `.read`, `.readinto`, `.readall` and `.write`.

In particular:

 - They may make more than one system call (PEP-475)
 - Add warnings if `.write()` requires a wrapping retry loop (see: gh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"
(cherry picked from commit e4db68b9c9)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-05 12:07:39 +00:00
Miss Islington (bot)
d7beb9c06d
[3.13] gh-106318: Add doctest role and a 'See also' to the str.split() docs (GH-144367)
(cherry picked from commit a96cba5c4a)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-06-04 14:23:07 +01:00
Miss Islington (bot)
a6f3b6144d
[3.13] Correct Stable ABI documentation for METH_FASTCALL (GH-149593) (GH-150851)
The current documentation says:

>
> METH_FASTCALL
>    Part of the Stable ABI since version 3.7.
>
> [...]
>
>   Added in version 3.7.
>
>    Changed in version 3.10: METH_FASTCALL is now part of the stable ABI.

so is contradictory about when it was added to the Stable ABI.  Looking at the header it seems like 3.10 is right.
(cherry picked from commit 58beae7319)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2026-06-04 11:50:19 +02:00
Miss Islington (bot)
64b982071b
[3.13] gh-140553: Mark *gettext parameters as positionaly only in documentation (GH-140598)
(cherry picked from commit 1837c17bc7)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-04 09:19:56 +01:00
Hugo van Kemenade
26e3ca4160
[3.13] Docs: Replace hardcoded SOURCE_URI with patchlevel check (GH-150850) (#150857) 2026-06-03 16:50:07 +03:00
Miss Islington (bot)
d229764d1e
[3.13] Fix a typo in SSLSocket docs (GH-150839) (GH-150847)
Fix a typo in `SSLSocket` docs (GH-150839)
(cherry picked from commit 5553e003ca)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
2026-06-03 12:26:03 +00:00