pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/e188527c343c74574d481b77c30063db1436e62b

0fcd9af82350aeda.css" /> gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-… · python/cpython@e188527 · GitHub
Skip to content

Commit e188527

Browse files
gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-118784)
It was set to 2 in 65f5e58 (GH-98592).
1 parent 6b80a5b commit e188527

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,16 +2177,6 @@ Changes in the Python API
21772177
returned by :meth:`zipfile.ZipFile.open` was changed from ``'r'`` to ``'rb'``.
21782178
(Contributed by Serhiy Storchaka in :gh:`115961`.)
21792179

2180-
* Callbacks registered in the :mod:`tkinter` module now take arguments as
2181-
various Python objects (``int``, ``float``, ``bytes``, ``tuple``),
2182-
not just ``str``.
2183-
To restore the previous behavior set :mod:`!tkinter` module global
2184-
:data:`!wantobject` to ``1`` before creating the
2185-
:class:`!Tk` object or call the :meth:`!wantobject`
2186-
method of the :class:`!Tk` object with argument ``1``.
2187-
Calling it with argument ``2`` restores the current default behavior.
2188-
(Contributed by Serhiy Storchaka in :gh:`66410`.)
2189-
21902180

21912181
Changes in the C API
21922182
--------------------

Lib/tkinter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from tkinter.constants import *
4141
import re
4242

43-
wantobjects = 2
43+
wantobjects = 1
4444
_debug = False # set to True to print executed Tcl/Tk commands
4545

4646
TkVersion = float(_tkinter.TK_VERSION)

Misc/NEWS.d/3.13.0b1.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,13 +1346,13 @@ urllib.
13461346
.. nonce: du4UKW
13471347
.. section: Library
13481348
1349-
Callbacks registered in the :mod:`tkinter` module now take arguments as
1350-
various Python objects (``int``, ``float``, ``bytes``, ``tuple``), not just
1351-
``str``. To restore the previous behavior set :mod:`!tkinter` module global
1352-
:data:`~tkinter.wantobject` to ``1`` before creating the
1353-
:class:`~tkinter.Tk` object or call the :meth:`~tkinter.Tk.wantobject`
1354-
method of the :class:`!Tk` object with argument ``1``. Calling it with
1355-
argument ``2`` restores the current default behavior.
1349+
Setting the :mod:`!tkinter` module global :data:`~tkinter.wantobject` to ``2``
1350+
before creating the :class:`~tkinter.Tk` object or call the
1351+
:meth:`~tkinter.Tk.wantobject` method of the :class:`!Tk` object with argument
1352+
``2`` makes now arguments to callbacks registered in the :mod:`tkinter` module
1353+
to be passed as various Python objects (``int``, ``float``, ``bytes``, ``tuple``),
1354+
depending on their internal represenation in Tcl, instead of always ``str``.
1355+
:data:`!tkinter.wantobject` is now set to ``2`` by default.
13561356

13571357
..
13581358
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restore the default value of ``tkiter.wantobjects`` to ``1``.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy