changeset: 104056:94a26aa1b1e0 branch: 2.7 parent: 104044:f4cc6a62bd0d user: Serhiy Storchaka date: Sun Sep 25 16:44:32 2016 +0300 files: Lib/lib-tk/Tix.py Misc/NEWS description: Issue #27611: Fixed support of default root window in the Tix module. diff -r f4cc6a62bd0d -r 94a26aa1b1e0 Lib/lib-tk/Tix.py --- a/Lib/lib-tk/Tix.py Sat Sep 24 05:38:14 2016 +0000 +++ b/Lib/lib-tk/Tix.py Sun Sep 25 16:44:32 2016 +0300 @@ -477,10 +477,14 @@ (multiple) Display Items""" def __init__(self, itemtype, cnf={}, **kw): - master = Tkinter._default_root - if not master and 'refwindow' in cnf: master=cnf['refwindow'] - elif not master and 'refwindow' in kw: master= kw['refwindow'] - elif not master: raise RuntimeError, "Too early to create display style: no root window" + if 'refwindow' in kw: + master = kw['refwindow'] + elif 'refwindow' in cnf: + master = cnf['refwindow'] + else: + master = Tkinter._default_root + if not master: + raise RuntimeError("Too early to create display style: no root window") self.tk = master.tk self.stylename = self.tk.call('tixDisplayStyle', itemtype, *self._options(cnf,kw) ) diff -r f4cc6a62bd0d -r 94a26aa1b1e0 Misc/NEWS --- a/Misc/NEWS Sat Sep 24 05:38:14 2016 +0000 +++ b/Misc/NEWS Sun Sep 25 16:44:32 2016 +0300 @@ -42,6 +42,8 @@ Library ------- +- Issue #27611: Fixed support of default root window in the Tix module. + - Issue #24363: When parsing HTTP header fields, if an invalid line is encountered, skip it and continue parsing. Previously, no more header fields were parsed, which could lead to fields for HTTP framing like