Skip to content

Commit 72c8907

Browse files
authored
tkinter: fix version availability (#4207)
Co-authored-by: hauntsaninja <>
1 parent 5f70d37 commit 72c8907

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

stdlib/3/tkinter/__init__.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ class Misc:
125125
def tk_strictMotif(self, boolean: Optional[Any] = ...): ...
126126
def tk_bisque(self): ...
127127
def tk_setPalette(self, *args, **kw): ...
128-
def tk_menuBar(self, *args): ...
128+
if sys.version_info < (3, 6):
129+
def tk_menuBar(self, *args): ...
129130
def wait_variable(self, name: Union[str, Variable] = ...): ...
130131
waitvar: Any
131132
def wait_window(self, window: Optional[Any] = ...): ...
@@ -537,7 +538,8 @@ class Listbox(Widget, XView, YView):
537538
class Menu(Widget):
538539
def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ...
539540
def tk_popup(self, x, y, entry: str = ...): ...
540-
def tk_bindForTraversal(self): ...
541+
if sys.version_info < (3, 6):
542+
def tk_bindForTraversal(self): ...
541543
def activate(self, index): ...
542544
def add(self, itemType, cnf=..., **kw): ...
543545
def add_cascade(self, cnf=..., **kw): ...

tests/stubtest_whitelists/py36.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ secrets.SystemRandom.getstate
3939
smtplib.SMTP.sendmail
4040
sre_compile.dis
4141
ssl.SSLSocket.__init__
42-
tkinter.Menu.tk_bindForTraversal
43-
tkinter.Misc.tk_menuBar
4442
typing.AbstractSet.isdisjoint
4543
typing.AsyncGenerator.ag_await
4644
typing.AsyncGenerator.ag_code

tests/stubtest_whitelists/py37.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ smtplib.SMTP.sendmail
5151
sre_constants.RANGE_IGNORE
5252
ssl.PROTOCOL_SSLv3
5353
ssl.RAND_egd
54-
tkinter.Menu.tk_bindForTraversal
55-
tkinter.Misc.tk_menuBar
5654
types.ClassMethodDescriptorType.__get__
5755
types.MethodDescriptorType.__get__
5856
types.WrapperDescriptorType.__get__

tests/stubtest_whitelists/py38.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ ssl.PROTOCOL_SSLv3
7979
ssl.RAND_egd
8080
sys.UnraisableHookArgs
8181
threading.ExceptHookArgs
82-
tkinter.Menu.tk_bindForTraversal
83-
tkinter.Misc.tk_menuBar
8482
types.ClassMethodDescriptorType.__get__
8583
types.CodeType.replace
8684
types.MethodDescriptorType.__get__

tests/stubtest_whitelists/py39.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ sys.UnraisableHookArgs
176176
threading.ExceptHookArgs
177177
time.CLOCK_PROF
178178
time.CLOCK_UPTIME
179-
tkinter.Menu.tk_bindForTraversal
180-
tkinter.Misc.tk_menuBar
181179
trace.Trace.runfunc
182180
types.ClassMethodDescriptorType.__get__
183181
types.CodeType.replace

0 commit comments

Comments
 (0)