[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2019-10-31 Thread Stephen Paul Chappell
Change by Stephen Paul Chappell : -- nosy: -Zero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e5c65719c12 by Serhiy Storchaka in branch '2.7': Issue #21402: tkinter.ttk now works when default root window is not set. http://hg.python.org/cpython/rev/8e5c65719c12 New changeset 4a0987b8f630 by Serhiy Storchaka in branch '3.4': Issue #21402:

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21402 ___

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Stephen. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21402 ___ ___

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, if we allow to change signature of theses functions, here is a patch which fixes _list_from_layouttuple and _val_or_dict and rewrites tests. Mocked TkApp is used because test_functions should run without the gui resource enabled. -- keywords:

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21402 ___ ___

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not so easy, because it does not work with wantobject=False and can not work with future versions of Tk. Actually we should use self.tk instead of _default_root, but this will change the signature of _list_from_layouttuple() and _val_or_dict(). Due

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: There is discussion of removing wantobjects in issue3015. If it gets removed, a better patch might be created for future versions of tkinter. However, accessing self.tk would probably be a good replacement for anywhere tkinter._default_root can be

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Due to the risk of breaking existing user code which uses these private functions, they should be left with old signature and new functions should be added. The reason we make things private is so we don't have to do this. Why would you make an exception

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because there are explicit tests for these private functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21402 ___

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: Because there are explicit tests for these private functions. Does that not mean that both the functions and their explicit tests should be changed? -- ___ Python tracker rep...@bugs.python.org

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-13 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: It seems that most functions and methods do not bother checking if _default_root exists before trying to access it. However, upon seeing line 366 in ttk (if tkinter._support_default_root:), my recommendation would be to change line 319 to if

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: A reference to a non-existent attribute fails no matter who calls the function. Stephen, can you suggest a patch, perhaps based on code in other functions that try to access _default_root? -- nosy: +terry.reedy ___

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-04-30 Thread Stephen Paul Chappell
New submission from Stephen Paul Chappell: If a call is made to tkinter.NoDefaultRoot, then calls to tkinter.ttk._val_or_dict may fail. NoDefaultRoot ends with del _default_root (line 174) and removes the variable from the module's namespace. _val_or_dict can try to access this variable but

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-04-30 Thread Zachary Ware
Zachary Ware added the comment: Can you provide an example of when this happens? Note that tkinter.ttk._val_or_dict is a private function and should not be called by user code. -- nosy: +gpolo, serhiy.storchaka, zach.ware stage: - test needed type: crash - behavior

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-04-30 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: I discovered the problem when trying to run the program listed at http://code.activestate.com/recipes/577633/ (Directory Pruner 2). -- ___ Python tracker rep...@bugs.python.org