##// END OF EJS Templates
policy: try and always have a bytes for module policy...
Augie Fackler -
r31308:62939e01 default
parent child Browse files
Show More
@@ -39,7 +39,7 b" if '__pypy__' in sys.builtin_module_name"
39 # Our C extensions aren't yet compatible with Python 3. So use pure Python
39 # Our C extensions aren't yet compatible with Python 3. So use pure Python
40 # on Python 3 for now.
40 # on Python 3 for now.
41 if sys.version_info[0] >= 3:
41 if sys.version_info[0] >= 3:
42 policy = 'py'
42 policy = b'py'
43
43
44 # Environment variable can always force settings.
44 # Environment variable can always force settings.
45 policy = os.environ.get('HGMODULEPOLICY', policy)
45 policy = os.environ.get('HGMODULEPOLICY', policy)
@@ -370,7 +370,7 b' class hgbuildpy(build_py):'
370 modulepolicy = 'c'
370 modulepolicy = 'c'
371 with open("mercurial/__modulepolicy__.py", "w") as f:
371 with open("mercurial/__modulepolicy__.py", "w") as f:
372 f.write('# this file is autogenerated by setup.py\n')
372 f.write('# this file is autogenerated by setup.py\n')
373 f.write('modulepolicy = "%s"\n' % modulepolicy)
373 f.write('modulepolicy = b"%s"\n' % modulepolicy)
374
374
375 build_py.run(self)
375 build_py.run(self)
376
376
@@ -11,7 +11,7 b' The full traceback is hidden to have a s'
11 version
11 version
12 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 debuginstall
13 debuginstall
14 TypeError: Can't convert 'bytes' object to str implicitly
14 no problems detected
15
15
16 $ cat > included-hgrc <<EOF
16 $ cat > included-hgrc <<EOF
17 > [extensions]
17 > [extensions]
General Comments 0
You need to be logged in to leave comments. Login now