# HG changeset patch # User Ian Moody # Date 1570142377 -3600 # Node ID 77e5c733200a906dcecf56826de08f2508b0cdc8 # Parent 1a47cc2728ff83b1cf0e7e9705f9e9c5608234ea py3: remove smartquotes from README They break running setup.py 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. diff -r 1a47cc2728ff -r 77e5c733200a README --- a/README Thu Oct 03 23:20:47 2019 +0100 +++ b/README Thu Oct 03 23:39:37 2019 +0100 @@ -14,7 +14,7 @@ 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, diff -r 1a47cc2728ff -r 77e5c733200a tests/test-version-install.t --- a/tests/test-version-install.t Thu Oct 03 23:20:47 2019 +0100 +++ b/tests/test-version-install.t Thu Oct 03 23:39:37 2019 +0100 @@ -18,18 +18,36 @@ evolve external * (glob) Test install +TODO: fix warning #if py3 -BROKEN: unicode errors opening the README +BROKEN: unicode errors on version number on install $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null + */distutils/dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) + warnings.warn(msg) Traceback (most recent call last): File "*/../setup.py", line *, in (glob) - long_description=open(join(dirname(__file__), 'README')).read(), - File "*/encodings/ascii.py", line *, in decode (glob) - return codecs.ascii_decode(input, self.errors)[0] - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 460: ordinal not in range(128) + python_requires=py_versions + File "*/distutils/core.py", line *, in setup (glob) + dist.run_commands() + File "*/distutils/dist.py", line *, in run_commands (glob) + self.run_command(cmd) + File "*/distutils/dist.py", line *, in run_command (glob) + cmd_obj.run() + File "*/distutils/command/install.py", line *, in run (glob) + self.run_command(cmd_name) + File "*/distutils/cmd.py", line *, in run_command (glob) + self.distribution.run_command(command) + File "*/distutils/dist.py", line *, in run_command (glob) + cmd_obj.ensure_finalized() + File "*/distutils/cmd.py", line *, in ensure_finalized (glob) + self.finalize_options() + File "*/distutils/command/install_egg_info.py", line *, in finalize_options (glob) + to_filename(safe_version(self.distribution.get_version())) + File "*/distutils/command/install_egg_info.py", line *, in safe_version (glob) + version = version.replace(' ','.') + TypeError: a bytes-like object is required, not 'str' [1] #else -TODO: fix warning $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null */distutils/dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) warnings.warn(msg)