Submitter | phabricator |
---|---|
Date | Aug. 9, 2017, 2:24 p.m. |
Message ID | <differential-rev-PHID-DREV-szt3njc4p57mvslqjvao-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/22793/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -186,7 +186,11 @@ try: extsetup(ui) except TypeError: - if inspect.getargspec(extsetup).args: + # Try to use getfullargspec (Python 3) first, and fall + # back to getargspec only if it doesn't exist so as to + # avoid warnings. + if getattr(inspect, 'getfullargspec', + getattr(inspect, 'getargspec'))(extsetup).args: raise extsetup() # old extsetup with no ui argument except Exception as inst: