]> granicus.if.org Git - python/commitdiff
[3.6] bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (GH-3839) (...
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 30 Sep 2017 22:45:53 +0000 (18:45 -0400)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2017 22:45:53 +0000 (18:45 -0400)
(cherry picked from commit bfebfd8)

Lib/idlelib/browser.py
Lib/idlelib/config_key.py
Lib/idlelib/configdialog.py
Lib/idlelib/help_about.py
Lib/idlelib/pathbrowser.py
Lib/idlelib/textview.py
Misc/NEWS.d/next/IDLE/2017-09-30-13-59-18.bpo-31649.LxN4Vb.rst [new file with mode: 0644]

index 145ecd1b525f2d2bfb16450767e62a8a92dde0bd..010d8c3498263cd45f51cb219cb422a73eb25f35 100644 (file)
@@ -61,7 +61,7 @@ class ModuleBrowser:
     # This class is the base class for pathbrowser.PathBrowser.
     # Init and close are inherited, other methods are overriden.
 
-    def __init__(self, flist, name, path, _htest=False, _utest=False):
+    def __init__(self, flist, name, path, *, _htest=False, _utest=False):
         # XXX This API should change, if the file doesn't end in ".py"
         # XXX the code here is bogus!
         """Create a window for browsing a module's structure.
index 5556b767964739edbf609a824604be0200610d92..3a865f869a06c4d9f6d78881f354bf402e97919e 100644 (file)
@@ -14,7 +14,7 @@ class GetKeysDialog(Toplevel):
     keyerror_title = 'Key Sequence Error'
 
     def __init__(self, parent, title, action, currentKeySequences,
-                 _htest=False, _utest=False):
+                 *, _htest=False, _utest=False):
         """
         action - string, the name of the virtual event these keys will be
                  mapped to
index a05f3b957afc6c44a28c0439782cbe7a77ee84b7..d27b0727d3d4a9759ebce0f20b2b7054c961fe28 100644 (file)
@@ -41,7 +41,7 @@ class ConfigDialog(Toplevel):
     """Config dialog for IDLE.
     """
 
-    def __init__(self, parent, title='', _htest=False, _utest=False):
+    def __init__(self, parent, title='', *, _htest=False, _utest=False):
         """Show the tabbed dialog for user configuration.
 
         Args:
index 679ac78d32db9584f5f3129102091387f66dbe7c..77b4b18962066ca25a77b7606159c98e16c8fa10 100644 (file)
@@ -23,7 +23,7 @@ class AboutDialog(Toplevel):
     """Modal about dialog for idle
 
     """
-    def __init__(self, parent, title=None, _htest=False, _utest=False):
+    def __init__(self, parent, title=None, *, _htest=False, _utest=False):
         """Create popup, do not return until tk widget destroyed.
 
         parent - parent of this dialog
index b0c8c6d30552fb3d5af7bed8d6cbf395328d0359..c0aa2a1590916cba0cdf71a2de93875bb4259d6a 100644 (file)
@@ -9,7 +9,7 @@ from idlelib.tree import TreeItem
 
 class PathBrowser(ModuleBrowser):
 
-    def __init__(self, flist, _htest=False, _utest=False):
+    def __init__(self, flist, *, _htest=False, _utest=False):
         """
         _htest - bool, change box location when running htest
         """
index de4b190ff2e4de613d2da5fe4e3e14c948e317f3..e3b55065c6d9cceb246652f941cc01d3cb6994f2 100644 (file)
@@ -57,7 +57,7 @@ class ViewWindow(Toplevel):
     "A simple text viewer dialog for IDLE."
 
     def __init__(self, parent, title, text, modal=True,
-                 _htest=False, _utest=False):
+                 *, _htest=False, _utest=False):
         """Show the given text in a scrollable window with a 'close' button.
 
         If modal is left True, users cannot interact with other windows
diff --git a/Misc/NEWS.d/next/IDLE/2017-09-30-13-59-18.bpo-31649.LxN4Vb.rst b/Misc/NEWS.d/next/IDLE/2017-09-30-13-59-18.bpo-31649.LxN4Vb.rst
new file mode 100644 (file)
index 0000000..cc99586
--- /dev/null
@@ -0,0 +1 @@
+IDLE - Make _htest, _utest parameters keyword only.