Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
## for id in cls.root.tk.call('after', 'info'):
## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_codecontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_del_with_timer(self):
timer = self.cc.t1 = self.text.after(10000, lambda: None)
self.cc.__del__()
with self.assertRaises(TclError) as cm:
self.root.tk.call('after', 'info', timer)
self.root.after_info(timer)
self.assertIn("doesn't exist", str(cm.exception))

def test_reload(self):
Expand All @@ -151,7 +151,7 @@ def test_toggle_code_context_event(self):
eq(cc.context['bg'], self.highlight_cfg['background'])
eq(cc.context.get('1.0', 'end-1c'), '')
eq(cc.editwin.label, 'Hide Code Context')
eq(self.root.tk.call('after', 'info', self.cc.t1)[1], 'timer')
eq(self.root.after_info(self.cc.t1)[1], 'timer')

# Toggle off.
toggle()
Expand Down
10 changes: 5 additions & 5 deletions Lib/idlelib/idle_test/test_colorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_notify_range(self):

# Colorizing already scheduled.
save_id = color.after_id
eq(self.root.tk.call('after', 'info', save_id)[1], 'timer')
eq(self.root.after_info(save_id)[1], 'timer')
self.assertFalse(color.colorizing)
self.assertFalse(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
Expand All @@ -277,7 +277,7 @@ def test_notify_range(self):
color.notify_range('1.0', '1.0+3c')
self.assertTrue(color.stop_colorizing)
self.assertIsNotNone(color.after_id)
eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
eq(self.root.after_info(color.after_id)[1], 'timer')
# New event scheduled.
self.assertNotEqual(color.after_id, save_id)

Expand All @@ -297,7 +297,7 @@ def test_toggle_colorize_event(self):
self.assertFalse(color.colorizing)
self.assertFalse(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
eq(self.root.after_info(color.after_id)[1], 'timer')

# Toggle colorizing off.
color.toggle_colorize_event()
Expand All @@ -324,7 +324,7 @@ def test_toggle_colorize_event(self):
# Toggle on while colorizing not in progress.
color.colorizing = False
color.toggle_colorize_event()
eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
eq(self.root.after_info(color.after_id)[1], 'timer')
self.assertFalse(color.colorizing)
self.assertTrue(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
Expand Down Expand Up @@ -363,7 +363,7 @@ def test_recolorize(self, mock_recmain):
mock_recmain.assert_called()
eq(mock_recmain.call_count, 1)
# Rescheduled when TODO tag still exists.
eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
eq(self.root.after_info(color.after_id)[1], 'timer')

# No changes to text, so no scheduling added.
text.tag_remove('TODO', '1.0', 'end')
Expand Down
6 changes: 3 additions & 3 deletions Lib/idlelib/idle_test/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
Expand Down Expand Up @@ -114,7 +114,7 @@ def tearDownClass(cls):
cls.window._close()
del cls.window
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
Expand Down Expand Up @@ -225,7 +225,7 @@ def tearDownClass(cls):
cls.window._close()
del cls.window
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_filelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_iomenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def tearDownClass(cls):
cls.editwin._close()
del cls.editwin
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_multicall.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUpClass(cls):
def tearDownClass(cls):
del cls.mc
cls.root.update_idletasks()
## for id in cls.root.tk.call('after', 'info'):
## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
#cls.root.update_idletasks()
## for id in cls.root.tk.call('after', 'info'):
## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_runscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_stackviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUpClass(cls):
def tearDownClass(cls):

cls.root.update_idletasks()
## for id in cls.root.tk.call('after', 'info'):
## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUpClass(cls):
def tearDownClass(cls):
window.registry = window.WindowList()
cls.root.update_idletasks()
## for id in cls.root.tk.call('after', 'info'):
## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_zoomheight.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.editwin._close()
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_zzdummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def tearDownClass(cls):
zzdummy.idleConf.userCfg = usercfg
del cls.editor, cls.text
cls.root.update_idletasks()
for id in cls.root.tk.call('after', 'info'):
for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/macosx.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _init_tk_type():
_tk_type = "xquartz"
elif 'aqua' not in ws:
_tk_type = "other"
elif 'AppKit' in root.tk.call('winfo', 'server', '.'):
elif 'AppKit' in root.winfo_server():
_tk_type = "cocoa"
else:
_tk_type = "carbon"
Expand Down
4 changes: 2 additions & 2 deletions Lib/turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,8 @@ def __init__(self, cv, mode=_CFG["mode"],
# the Turtle window will show behind the Terminal window when you
# start the demo from the command line.
rootwindow = cv.winfo_toplevel()
rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
rootwindow.call('wm', 'attributes', '.', '-topmost', '0')
rootwindow.wm_attributes(topmost=True)
rootwindow.wm_attributes(topmost=False)

def clear(self):
"""Delete all drawings and all turtles from the TurtleScreen.
Expand Down
Loading