Skip to content

Commit 00b0aa3

Browse files
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. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 203fd48 commit 00b0aa3

1 file changed

Lines changed: 9 additions & 95 deletions

File tree

Doc/library/tkinter.rst

Lines changed: 9 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ installed, so you can read the Tcl/Tk documentation specific to that version.
2222
Tkinter supports a range of Tcl/Tk versions, built either with or without
2323
thread support.
2424
Tcl/Tk 8.5.12 is the minimum supported version; the official Python binary
25-
release bundles Tcl/Tk 9.0.
25+
release bundles Tcl/Tk 8.6.
2626
See the source code for the :mod:`_tkinter` module for more information about
2727
supported versions.
2828

@@ -581,9 +581,9 @@ interpreter will fail.
581581

582582
A number of special cases exist:
583583

584-
* Tcl/Tk libraries built without thread support are now rare: Tcl/Tk 9.0 (the
585-
bundled version) is always thread-aware, so this case only arises with some
586-
older 8.x builds. When the library is not thread-aware,
584+
* Tcl/Tk libraries built without thread support are now rare: the bundled
585+
Tcl/Tk 8.6 is built with thread support, so this case only arises with some
586+
older non-threaded builds. When the library is not thread-aware,
587587
:mod:`!tkinter` calls the library from the originating Python thread, even
588588
if this is different than the thread that created the Tcl interpreter. A global
589589
lock ensures only one call occurs at a time.
@@ -1389,14 +1389,6 @@ Base and mixin classes
13891389
If *row* or *column* is given, only the children in that row or column
13901390
are returned.
13911391

1392-
.. method:: grid_content(row=None, column=None)
1393-
1394-
Same as :meth:`grid_slaves`: return the child widgets managed in this
1395-
container's grid, optionally restricted to a given *row* or *column*.
1396-
1397-
.. versionadded:: 3.15
1398-
1399-
14001392
.. method:: propagate()
14011393
propagate(flag)
14021394
:no-typesetting:
@@ -1423,31 +1415,11 @@ Base and mixin classes
14231415

14241416
:meth:`slaves` is an alias of :meth:`!pack_slaves`.
14251417

1426-
.. method:: content()
1427-
:no-typesetting:
1428-
1429-
.. method:: pack_content()
1430-
1431-
Same as :meth:`pack_slaves`: return the child widgets managed by this
1432-
container with the pack geometry manager, in packing order.
1433-
1434-
:meth:`content` is an alias of :meth:`!pack_content`.
1435-
1436-
.. versionadded:: 3.15
1437-
1438-
14391418
.. method:: place_slaves()
14401419

14411420
Return a list of the child widgets managed by this container with the
14421421
place geometry manager.
14431422

1444-
.. method:: place_content()
1445-
1446-
Same as :meth:`place_slaves`: return the child widgets managed by this
1447-
container with the place geometry manager.
1448-
1449-
.. versionadded:: 3.15
1450-
14511423
.. method:: bind(sequence=None, func=None, add=None)
14521424

14531425
Bind the event pattern *sequence* on this widget to the callable *func*.
@@ -2335,7 +2307,7 @@ Base and mixin classes
23352307

23362308
.. method:: info_patchlevel()
23372309

2338-
Return the Tcl/Tk patch level as a string, for example ``'9.1.0'``.
2310+
Return the Tcl/Tk patch level as a string, for example ``'8.6.15'``.
23392311

23402312
.. versionadded:: 3.11
23412313

@@ -2460,7 +2432,7 @@ Base and mixin classes
24602432
``-``, and attributes may be set using keyword arguments.
24612433
The *return_python_dict* parameter was added.
24622434

2463-
.. deprecated:: next
2435+
.. deprecated:: 3.13
24642436
Setting an attribute by passing the option name (with a leading
24652437
``-``) and its value as two positional arguments, as in
24662438
``w.attributes('-alpha', 0.5)``, is deprecated; use keyword arguments
@@ -2967,14 +2939,6 @@ Base and mixin classes
29672939
this widget.
29682940
:meth:`slaves` is an alias of :meth:`!pack_slaves`.
29692941

2970-
.. method:: content()
2971-
:no-typesetting:
2972-
2973-
.. method:: pack_content()
2974-
2975-
Same as :meth:`Misc.pack_content`.
2976-
:meth:`content` is an alias of :meth:`!pack_content`.
2977-
29782942

29792943
.. class:: Place()
29802944

@@ -3061,14 +3025,6 @@ Base and mixin classes
30613025
this widget.
30623026
:meth:`slaves` is an alias of :meth:`!place_slaves`.
30633027

3064-
.. method:: content()
3065-
:no-typesetting:
3066-
3067-
.. method:: place_content()
3068-
3069-
Same as :meth:`Misc.place_content`.
3070-
:meth:`content` is an alias of :meth:`!place_content`.
3071-
30723028

30733029
.. class:: Grid()
30743030

@@ -3209,14 +3165,6 @@ Base and mixin classes
32093165
optionally restricted to a *row* and/or *column*.
32103166
:meth:`slaves` is an alias of :meth:`!grid_slaves`.
32113167

3212-
.. method:: content(row=None, column=None)
3213-
:no-typesetting:
3214-
3215-
.. method:: grid_content(row=None, column=None)
3216-
3217-
Same as :meth:`Misc.grid_content`.
3218-
:meth:`content` is an alias of :meth:`!grid_content`.
3219-
32203168

32213169
.. class:: XView()
32223170

@@ -5496,7 +5444,7 @@ Widget classes
54965444
Separators are inserted automatically when the *autoseparators* option is
54975445
true.
54985446

5499-
.. method:: search(pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None, *, nolinestop=None, strictlimits=None)
5447+
.. method:: search(pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None)
55005448

55015449
Search for *pattern* starting at *index* and return the index of the
55025450
first character of the first match, or an empty string if there is no
@@ -5506,29 +5454,11 @@ Widget classes
55065454
The following boolean keyword flags control the search: *forwards* or
55075455
*backwards* select the direction (forward is the default); *exact* (the
55085456
default) or *regexp* select literal or regular-expression matching;
5509-
*nocase* makes the match case-insensitive; *elide* causes hidden text to
5510-
be searched as well; *nolinestop* (regexp only) lets ``.`` and ``[^``
5511-
match newlines; and *strictlimits* requires the whole match to lie within
5512-
*index* and *stopindex*.
5457+
*nocase* makes the match case-insensitive; and *elide* causes hidden text
5458+
to be searched as well.
55135459
If *count* is a :class:`Variable`, the number of index positions in the
55145460
match is stored in it.
55155461

5516-
.. versionchanged:: 3.15
5517-
Added the *nolinestop* and *strictlimits* parameters.
5518-
5519-
5520-
.. method:: search_all(pattern, index, stopindex=None, *, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None, nolinestop=None, overlap=None, strictlimits=None)
5521-
5522-
Like :meth:`search`, but find every match in the searched range and
5523-
return a tuple of the starting indices of all matches (empty if there are
5524-
none).
5525-
By default overlapping matches are not reported; passing a true *overlap*
5526-
returns every match that is not wholly contained in another.
5527-
If *count* is a :class:`Variable`, it receives a list with one element
5528-
per match.
5529-
5530-
.. versionadded:: 3.15
5531-
55325462

55335463
.. method:: scan_mark(x, y)
55345464

@@ -6129,22 +6059,6 @@ Other classes
61296059

61306060
The amount the mouse wheel was rotated (for ``MouseWheel`` events).
61316061

6132-
.. attribute:: user_data
6133-
6134-
The data string of a virtual event, as passed to the *data* option of
6135-
:meth:`Misc.event_generate`.
6136-
It is ``'??'`` for non-virtual events.
6137-
6138-
.. versionadded:: 3.15
6139-
6140-
.. attribute:: detail
6141-
6142-
A fixed detail string for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``
6143-
and ``ConfigureRequest`` events (see the Tcl/Tk documentation).
6144-
It is ``'??'`` for other events.
6145-
6146-
.. versionadded:: 3.15
6147-
61486062

61496063
.. class:: EventType(*values)
61506064

0 commit comments

Comments
 (0)