Remove outdated TkVersion checks.
Minimal supported Tcl/Tk version is 8.4, and this is checked in _tkinter.c.
This commit is contained in:
parent
81e7f94076
commit
159e5359d9
@ -1887,9 +1887,6 @@ class Tk(Misc, Wm):
|
|||||||
if tcl_version != _tkinter.TCL_VERSION:
|
if tcl_version != _tkinter.TCL_VERSION:
|
||||||
raise RuntimeError("tcl.h version (%s) doesn't match libtcl.a version (%s)" \
|
raise RuntimeError("tcl.h version (%s) doesn't match libtcl.a version (%s)" \
|
||||||
% (_tkinter.TCL_VERSION, tcl_version))
|
% (_tkinter.TCL_VERSION, tcl_version))
|
||||||
if TkVersion < 4.0:
|
|
||||||
raise RuntimeError("Tk 4.0 or higher is required; found Tk %s"
|
|
||||||
% str(TkVersion))
|
|
||||||
# Create and register the tkerror and exit commands
|
# Create and register the tkerror and exit commands
|
||||||
# We need to inline parts of _register here, _ register
|
# We need to inline parts of _register here, _ register
|
||||||
# would register differently-named commands.
|
# would register differently-named commands.
|
||||||
|
@ -15,11 +15,6 @@ class Dialog:
|
|||||||
command = None
|
command = None
|
||||||
|
|
||||||
def __init__(self, master=None, **options):
|
def __init__(self, master=None, **options):
|
||||||
|
|
||||||
# FIXME: should this be placed on the module level instead?
|
|
||||||
if TkVersion < 4.2:
|
|
||||||
raise TclError("this module requires Tk 4.2 or newer")
|
|
||||||
|
|
||||||
self.master = master
|
self.master = master
|
||||||
self.options = options
|
self.options = options
|
||||||
if not master and options.get('parent'):
|
if not master and options.get('parent'):
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
from tkinter import *
|
from tkinter import *
|
||||||
from tkinter import _cnfmerge
|
from tkinter import _cnfmerge
|
||||||
|
|
||||||
if TkVersion <= 3.6:
|
DIALOG_ICON = 'questhead'
|
||||||
DIALOG_ICON = 'warning'
|
|
||||||
else:
|
|
||||||
DIALOG_ICON = 'questhead'
|
|
||||||
|
|
||||||
|
|
||||||
class Dialog(Widget):
|
class Dialog(Widget):
|
||||||
|
@ -29,10 +29,6 @@
|
|||||||
from tkinter import *
|
from tkinter import *
|
||||||
from tkinter import _cnfmerge, _default_root
|
from tkinter import _cnfmerge, _default_root
|
||||||
|
|
||||||
# WARNING - TkVersion is a limited precision floating point number
|
|
||||||
if TkVersion < 3.999:
|
|
||||||
raise ImportError("This version of Tix.py requires Tk 4.0 or higher")
|
|
||||||
|
|
||||||
import _tkinter # If this fails your Python may not be configured for Tk
|
import _tkinter # If this fails your Python may not be configured for Tk
|
||||||
|
|
||||||
# Some more constants (for consistency with Tkinter)
|
# Some more constants (for consistency with Tkinter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user