Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22ba01e

Browse files
committed
Issue #27611: Don't import volatile attribute.
1 parent 76aa1fb commit 22ba01e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/tkinter/tix.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
# appreciate the advantages.
2727
#
2828

29+
import os
30+
import tkinter
2931
from tkinter import *
30-
from tkinter import _cnfmerge, _default_root
32+
from tkinter import _cnfmerge
3133

3234
# WARNING - TkVersion is a limited precision floating point number
3335
if TkVersion < 3.999:
@@ -72,7 +74,6 @@
7274
# BEWARE - this is implemented by copying some code from the Widget class
7375
# in Tkinter (to override Widget initialization) and is therefore
7476
# liable to break.
75-
import tkinter, os
7677

7778
# Could probably add this to Tkinter.Misc
7879
class tixCommand:
@@ -476,7 +477,7 @@ class DisplayStyle:
476477
(multiple) Display Items"""
477478

478479
def __init__(self, itemtype, cnf={}, **kw):
479-
master = _default_root # global from Tkinter
480+
master = tkinter._default_root # global from Tkinter
480481
if not master and 'refwindow' in cnf: master=cnf['refwindow']
481482
elif not master and 'refwindow' in kw: master= kw['refwindow']
482483
elif not master: raise RuntimeError("Too early to create display style: no root window")

0 commit comments

Comments
 (0)