Read about our upcoming Code of Conduct on this issue

Commit 1e9e3528 authored by Ian Moody's avatar Ian Moody
Browse files

py3: remove smartquotes from README

They break running with py3 but only in tests, because in the test
environment `locale.getpreferredencoding()` is ANSI_X3.4-1968, so the file is
`open()`ed with that as the encoding.  An alternative for fixing this would be
to make the `open()` call with `encoding='utf-8'` under py3, which would be
safe against any future non-ascii in README.

branch : stable
parent 1a47cc2728ff
...@@ -14,7 +14,7 @@ date with changes. ...@@ -14,7 +14,7 @@ date with changes.
This extension: This extension:
* enables the changeset evolution feature of Mercurial core, * enables the "changeset evolution" feature of Mercurial core,
* provides a set of commands to mutate your history, * provides a set of commands to mutate your history,
...@@ -18,18 +18,36 @@ Test outputting version number ...@@ -18,18 +18,36 @@ Test outputting version number
evolve external * (glob) evolve external * (glob)
Test install Test install
TODO: fix warning
#if py3 #if py3
BROKEN: unicode errors opening the README BROKEN: unicode errors on version number on install
$ "$PYTHON" "$TESTDIR/../" install --root "$TESTTMP/installtest" > /dev/null $ "$PYTHON" "$TESTDIR/../" install --root "$TESTTMP/installtest" > /dev/null
*/distutils/*: UserWarning: Unknown distribution option: 'python_requires' (glob)
Traceback (most recent call last): Traceback (most recent call last):
File "*/../", line *, in <module> (glob) File "*/../", line *, in <module> (glob)
long_description=open(join(dirname(__file__), 'README')).read(), python_requires=py_versions
File "*/encodings/", line *, in decode (glob) File "*/distutils/", line *, in setup (glob)
return codecs.ascii_decode(input, self.errors)[0] dist.run_commands()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 460: ordinal not in range(128) File "*/distutils/", line *, in run_commands (glob)
File "*/distutils/", line *, in run_command (glob)
File "*/distutils/command/", line *, in run (glob)
File "*/distutils/", line *, in run_command (glob)
File "*/distutils/", line *, in run_command (glob)
File "*/distutils/", line *, in ensure_finalized (glob)
File "*/distutils/command/", line *, in finalize_options (glob)
File "*/distutils/command/", line *, in safe_version (glob)
version = version.replace(' ','.')
TypeError: a bytes-like object is required, not 'str'
[1] [1]
#else #else
TODO: fix warning
$ "$PYTHON" "$TESTDIR/../" install --root "$TESTTMP/installtest" > /dev/null $ "$PYTHON" "$TESTDIR/../" install --root "$TESTTMP/installtest" > /dev/null
*/distutils/*: UserWarning: Unknown distribution option: 'python_requires' (glob) */distutils/*: UserWarning: Unknown distribution option: 'python_requires' (glob)
warnings.warn(msg) warnings.warn(msg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment