diff mercurial/policy.py @ 43103:c95b2f40db7c

py3: stop normalizing 2nd argument of *attr() to unicode Now that we don't byteify strings, we can stop normalizing the 2nd string argument to getattr() and remove explicit overrides we were using in the code base. We no longer use some helper functions in the source transformer, so we remove those as well. Differential Revision: https://phab.mercurial-scm.org/D7012
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Oct 2019 17:45:05 -0400
parents c59eb1560c44
children 313e3a279828
line wrap: on
line diff
--- a/mercurial/policy.py	Sun Oct 06 14:58:41 2019 -0400
+++ b/mercurial/policy.py	Sun Oct 06 17:45:05 2019 -0400
@@ -70,7 +70,7 @@
     except AttributeError:
         raise ImportError(r'cannot import name %s' % modname)
     # force import; fakelocals[modname] may be replaced with the real module
-    getattr(mod, r'__doc__', None)
+    getattr(mod, '__doc__', None)
     return fakelocals[modname]
 
 
@@ -94,7 +94,7 @@
 
 def _checkmod(pkgname, modname, mod):
     expected = _cextversions.get((pkgname, modname))
-    actual = getattr(mod, r'version', None)
+    actual = getattr(mod, 'version', None)
     if actual != expected:
         raise ImportError(
             r'cannot import module %s.%s '