Mercurial > hg-stable
changeset 38825:fb9121ea38c4
py3: stop rewriting xrange() to pycompat.xrange()
We now require the use of pycompat.xrange() in source.
One less feature in the module importer gets us one step closer
to Python 3 native source code.
Differential Revision: https://phab.mercurial-scm.org/D4034
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 01 Aug 2018 13:10:07 -0700 |
parents | 882ef6949bdc |
children | 28d8b5f49b4d |
files | mercurial/__init__.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/__init__.py Wed Aug 01 13:08:00 2018 -0700 +++ b/mercurial/__init__.py Wed Aug 01 13:10:07 2018 -0700 @@ -182,7 +182,7 @@ continue r, c = t.start l = (b'; from mercurial.pycompat import ' - b'delattr, getattr, hasattr, setattr, xrange, ' + b'delattr, getattr, hasattr, setattr, ' b'open, unicode\n') for u in tokenize.tokenize(io.BytesIO(l).readline): if u.type in (tokenize.ENCODING, token.ENDMARKER): @@ -223,7 +223,7 @@ # ``replacetoken`` or any mechanism that changes semantics of module # loading is changed. Otherwise cached bytecode may get loaded without # the new transformation mechanisms applied. - BYTECODEHEADER = b'HG\x00\x0a' + BYTECODEHEADER = b'HG\x00\x0b' class hgloader(importlib.machinery.SourceFileLoader): """Custom module loader that transforms source code.