Commit graph

31039 commits

Author SHA1 Message Date
Miss Islington (bot)
dcbcf09fe9
[3.15] Capitalize first word in unittest.mock.assert_* docs and docstrings (GH-151951) (#152059)
(cherry picked from commit a46db4f8ba)

Co-authored-by: Hans Yu <github@shauny.anonaddy.me>
2026-06-24 10:35:55 +00:00
Miss Islington (bot)
f84299087f
[3.15] gh-87904: Document curses classes (GH-151643) (GH-152048)
Add docstrings for the curses.window, curses.error, curses.panel.panel
and curses.panel.error classes.  Document the panel class and its error
exception in curses.panel.rst, using the real lowercase panel name.
(cherry picked from commit 560ff8e202)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 10:19:09 +03:00
Miss Islington (bot)
9bd0199e5b
[3.15] gh-84008: Document that the LC_NUMERIC locale affects tkinter numeric widgets (GH-152008) (GH-152049)
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:38:52 +00:00
Hugo van Kemenade
660d7928c4 Merge branch '3.15' of https://github.com/python/cpython into 3.15 2026-06-23 16:28:14 +03:00
Miss Islington (bot)
b34a86f282
[3.15] gh-151556: Show example CSV file content in the csv module docs (GH-151563)
(cherry picked from commit 7915c4a8dd)

Co-authored-by: Lucas <lucasefernandes333@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-23 12:09:29 +00:00
Hugo van Kemenade
cf16a33fad Python 3.15.0b3 2026-06-23 12:35:49 +03:00
Miss Islington (bot)
e187964a90
[3.15] gh-62480: De-personalize docs on using the C API (GH-151784) (#151936)
(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:09:28 +00:00
Miss Islington (bot)
59706a6d9a
[3.15] gh-86726: Document tkinter method-name conflicts (GH-151917) (GH-151926)
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, content 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: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 12:42:45 +00:00
Miss Islington (bot)
ef171b603d
[3.15] gh-144133: Add a warning to the encodings.punycode documentation (GH-151812) (#151922)
(cherry picked from commit 7ec70e1df3)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-22 12:02:32 +00:00
Stan Ulbrych
21f96ea807
[3.15] Remove 3.15 pending-removals from deprecations index (#151873) 2026-06-22 11:43:29 +03:00
Miss Islington (bot)
aa83ca3ec8
[3.15] gh-86726: Document tkinter.simpledialog query options and Dialog.result (GH-151851) (GH-151852)
(cherry picked from commit 8270ae560c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-21 18:10:43 +03:00
Miss Islington (bot)
37aa97330d
[3.15] gh-150831: docs: clarify generator, generator function, and generator iterator in glossary (GH-150905) (#151840)
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:35:52 -04:00
Miss Islington (bot)
7e368380f8
[3.15] gh-141510 Document and test frozendict class matching behaviour (GH-150799) (#151701)
gh-141510 Document and test frozendict class matching behaviour (GH-150799)

Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly
with the single-arg class matching. However it isn't documented
in the list of classes this works with and it isn't tested.

The test is some way below the other similar tests but anything
else would need a large renumbering.
(cherry picked from commit fd53ae1139)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2026-06-19 08:45:02 +00:00
Miss Islington (bot)
7a5f5f5b6e
[3.15] gh-151427: add 'not macOS' and 'not iOS' restrictions on availability state of some functions in os module. (GH-151537) (#151699)
(cherry picked from commit da69fcf98d)
Co-authored-by: Duprat <yduprat@gmail.com>
2026-06-19 08:18:49 +00:00
Miss Islington (bot)
3b38caf2fe
[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constants (GH-151301) (GH-151692)
(cherry picked from commit 9688d252d3)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-19 10:34:16 +03:00
Miss Islington (bot)
fd3c510827
[3.15] gh-146353: Document PyBytesWriter_GetData pointer validity (GH-151418) (GH-151664)
gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418)
(cherry picked from commit e99b319682)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2026-06-18 17:39:20 +00:00
Miss Islington (bot)
cafe39f78a
[3.15] gh-86726: Add few missing versionadded directives (GH-151662) (GH-151663)
Pack.pack_content, Place.place_content and Grid.grid_content were
added in 3.15.
(cherry picked from commit bfecfcc2a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 15:56:14 +00:00
Miss Islington (bot)
821e97b999
[3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151658)
It returns a sys.version_info-like named tuple, not a string.
(cherry picked from commit 3cd02a1c2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:44:51 +00:00
Miss Islington (bot)
0125168a81
[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)
(cherry picked from commit d47c27e47a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 13:44:12 +00:00
Miss Islington (bot)
82b757071e
[3.15] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151649)
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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.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 12:47:36 +00:00
Miss Islington (bot)
d9a1bff40b
[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632) (GH-151641)
(cherry picked from commit 12add3822f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 14:23:06 +03:00
Miss Islington (bot)
7170c951a1
[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-18 12:57:03 +03:00
Miss Islington (bot)
7aa41c406b
[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 08:48:56 +00:00
Miss Islington (bot)
e9c7cc1f0b
[3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252) (GH-151606)
gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252)

The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.

Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
(cherry picked from commit 16185e9fe2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-06-18 10:17:15 +02:00
Miss Islington (bot)
ff6e973c3b
[3.15] gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402) (#151552)
gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402)

PyConfig_Set() and sys.set_int_max_str_digits() now replace
sys.flags (create a new object), instead of modifying sys.flags in-place.

Modifying sys.flags in-place can lead to data races when multiple
threads are reading or writing sys.flags in parallel.

Use _Py_atomic functions to get and set max_str_digits members.
(cherry picked from commit b16d23fc9f)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-16 16:48:56 +00:00
Miss Islington (bot)
488a03bd2b
[3.15] gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters (GH-150053) (#151322)
Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
2026-06-16 14:52:39 +03:00
Miss Islington (bot)
03873bb5f0
[3.15] gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893) (GH-151472)
(cherry picked from commit 47b7dc788c)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-14 12:47:39 +00:00
Miss Islington (bot)
56ad6505e1
[3.15] gh-151443: Fix documented default of unittest.mock.mock_open's read_data parameter (GH-151444) (#151450)
(cherry picked from commit 9ad6ba0324)

Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
2026-06-13 18:39:44 +00:00
Miss Islington (bot)
8b291463e3
[3.15] Docs: Fix method directive signatures in enum docs (GH-151429) (#151434)
(cherry picked from commit 5b38519762)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-06-13 08:55:30 +00:00
Miss Islington (bot)
04973e705b
[3.15] Fix typos in the curses.ascii module documentation (GH-129300) (#151413)
(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:11:06 +00:00
Miss Islington (bot)
bdb53b5553
[3.15] Docs: avoid repetitions of class references in functions.rst (GH-150891) (#151405)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2026-06-12 15:01:30 +00:00
Miss Islington (bot)
f3632b47ce
[3.15] gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007) (#151372)
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:45:30 +00:00
Miss Islington (bot)
fdf0132e35
[3.15] gh-101100: Fix Sphinx nitpick in unittest.mock.rst (GH-151302) (#151355)
(cherry picked from commit b18168cb32)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-11 16:42:23 +01:00
Miss Islington (bot)
cedb4d65f1
[3.15] gh-139588: Fix nondeterministic make latex doc build under parallel make (GH-151343) (#151352)
(cherry picked from commit b9bffc09a6)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2026-06-11 15:21:26 +00:00
Miss Islington (bot)
a8ddc9a77a
[3.15] Drop historical :author:s from HOWTOs (GH-151091) (#151310)
(cherry picked from commit 9620f69cd4)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-11 08:55:01 +00:00
Miss Islington (bot)
f3316ca675
[3.15] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151299)
(cherry picked from commit 84630e2cb9)
2026-06-11 07:38:03 +01:00
Miss Islington (bot)
68d2372240
[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)
(cherry picked from commit 7bbb9607a2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-10 18:04:48 +02:00
Miss Islington (bot)
637746d6fc
[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)
add asyncio guide for Free-Threaded Python (GH-150456)
(cherry picked from commit e2bd50d2e1)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-06-10 14:11:26 +00:00
Miss Islington (bot)
9761ef9bb8
[3.15] Docs: Fix typos in the "Memory Management" section (GH-151243) (GH-151247)
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:21:48 +00:00
Miss Islington (bot)
de5da36c66
[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)
gh-89554: Document socket.SocketType as a class (GH-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.
(cherry picked from commit a621e8ad81)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-10 13:09:28 +00:00
Serhiy Storchaka
0b6adeb20f
[3.15] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146)
The type of the callback argument is not checked.
2026-06-10 13:41:19 +03:00
Miss Islington (bot)
ba8d0e37e7
[3.15] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151188)
GH-59633: Clarify dest collisions in argparse docs (GH-150987)
(cherry picked from commit 82cb7d4bf6)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-06-09 17:15:41 +00:00
Miss Islington (bot)
fda4f22d60
[3.15] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151168)
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:46:39 +00:00
Miss Islington (bot)
804be0a223
[3.15] GH-54732: Tweak wording around empty lines in argument files (GH-150980) (#151165)
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:45:23 +00:00
Miss Islington (bot)
22d32b6df0
[3.15] Docs: Only add profiling-sampling-visualization.{css,js} to files when necessary (GH-151150)
(cherry picked from commit 0a179e748b)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-09 13:24:28 +00:00
Miss Islington (bot)
19e4b8f559
[3.15] gh-109503: Fix document for shutil.move() on usage of os.rename() since it's inaccurate (GH-109507) (GH-150611)
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:30 +03:00
Pablo Galindo Salgado
83e26a43a7
[3.15] gh-149321: Remove lazy_imports=none startup mode (GH-149389) (#150129) 2026-06-08 22:55:57 +00:00
Miss Islington (bot)
fd252e80f5
[3.15] gh-148932: Fix profiling.sampling on Windows virtual environments (GH-150541) (#151097)
gh-148932: Fix `profiling.sampling` on Windows virtual environments (GH-150541)
(cherry picked from commit 5c13217314)

Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
2026-06-08 23:04:06 +01:00
Miss Islington (bot)
fd4f9fa186
[3.15] gh-151070: Fix class referencing typo in collections.abc docs (GH-151088) (GH-151110)
(cherry picked from commit 29a920e80e)

Co-authored-by: Arshal Aromal <arshalaromal19@gmail.com>
2026-06-08 19:47:05 +00:00
Miss Islington (bot)
86e291e662
[3.15] 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:59:46 +00:00