##// END OF EJS Templates
py3: rewrite itervalues() as values() by importer...
Yuya Nishihara -
r31445:83e08014 default
parent child Browse files
Show More
@@ -310,10 +310,10 if sys.version_info[0] >= 3:
310 310 if argidx is not None:
311 311 _ensureunicode(argidx)
312 312
313 # It changes iteritems to items as iteritems is not
313 # It changes iteritems/values to items/values as they are not
314 314 # present in Python 3 world.
315 elif fn == 'iteritems':
316 yield t._replace(string='items')
315 elif fn in ('iteritems', 'itervalues'):
316 yield t._replace(string=fn[4:])
317 317 continue
318 318
319 319 # Emit unmodified token.
@@ -323,7 +323,7 if sys.version_info[0] >= 3:
323 323 # ``replacetoken`` or any mechanism that changes semantics of module
324 324 # loading is changed. Otherwise cached bytecode may get loaded without
325 325 # the new transformation mechanisms applied.
326 BYTECODEHEADER = b'HG\x00\x08'
326 BYTECODEHEADER = b'HG\x00\x09'
327 327
328 328 class hgloader(importlib.machinery.SourceFileLoader):
329 329 """Custom module loader that transforms source code.
General Comments 0
You need to be logged in to leave comments. Login now