diff mercurial/localrepo.py @ 36216:646002338365

py3: introduce and use pycompat.getargspec This is getfullargspec on py3, which means we can't use namedtuple named accessors for all fields (eg keywords from getargspec is varkw from getfullargspec, with the same meaning). Solves some warning issues on Python 3. I didn't clean up httpclient because that's vendored code I think we should probably discard, and I didn't touch the manpage generator for now either. Differential Revision: https://phab.mercurial-scm.org/D2251
author Augie Fackler <augie@google.com>
date Tue, 13 Feb 2018 23:00:01 -0700
parents 55e8efa2451a
children 0147a4730420
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Feb 13 23:37:58 2018 -0500
+++ b/mercurial/localrepo.py	Tue Feb 13 23:00:01 2018 -0700
@@ -9,7 +9,6 @@
 
 import errno
 import hashlib
-import inspect
 import os
 import random
 import time
@@ -1068,7 +1067,7 @@
                 if not fn:
                     fn = lambda s, c, **kwargs: util.filter(s, c)
                 # Wrap old filters not supporting keyword arguments
-                if not inspect.getargspec(fn)[2]:
+                if not pycompat.getargspec(fn)[2]:
                     oldfn = fn
                     fn = lambda s, c, **kwargs: oldfn(s, c)
                 l.append((mf, fn, params))