changeset 42335:38b7b45627a2

extensions: drop support for extsetup() without `ui` argument (API)
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 18 May 2019 19:33:48 -0400
parents bcb1a2b6cd00
children fa4b13e81f60
files mercurial/extensions.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/extensions.py	Fri May 17 11:11:40 2019 -0700
+++ b/mercurial/extensions.py	Sat May 18 19:33:48 2019 -0400
@@ -221,14 +221,7 @@
     extsetup = getattr(_extensions[name], 'extsetup', None)
     if extsetup:
         try:
-            try:
-                extsetup(ui)
-            except TypeError:
-                if pycompat.getargspec(extsetup).args:
-                    raise
-                ui.deprecwarn("extsetup for '%s' must take a ui argument"
-                              % name, "4.9")
-                extsetup() # old extsetup with no ui argument
+            extsetup(ui)
         except Exception as inst:
             ui.traceback(force=True)
             msg = stringutil.forcebytestr(inst)