Description of problem: I'm trying to get python-click to build for python3 on epel7, but running into the following issue with the python3 tests: _________________________________ test_prompts _________________________________ runner = <click.testing.CliRunner object at 0x3fffa7c7be10> def test_prompts(runner): @click.command() def test(): if click.confirm('Foo'): click.echo('yes!') else: click.echo('no :(') result = runner.invoke(test, input='y\n') > assert not result.exception E assert not RuntimeError('Click will abort further execution because Python 3 was configured to use ASCII as encoding for the envi...SN.utf8, xh_ZA.utf8, yi_US.utf8, yo_NG.utf8, yue_HK.utf8, zh_CN.utf8, zh_HK.utf8, zh_SG.utf8, zh_TW.utf8, zu_ZA.utf8',) E + where RuntimeError('Click will abort further execution because Python 3 was configured to use ASCII as encoding for the envi...SN.utf8, xh_ZA.utf8, yi_US.utf8, yo_NG.utf8, yue_HK.utf8, zh_CN.utf8, zh_HK.utf8, zh_SG.utf8, zh_TW.utf8, zu_ZA.utf8',) = <Result RuntimeError('Click will abort further execution because Python 3 was configured to use ASCII as encoding for ...N.utf8, xh_ZA.utf8, yi_US.utf8, yo_NG.utf8, yue_HK.utf8, zh_CN.utf8, zh_HK.utf8, zh_SG.utf8, zh_TW.utf8, zu_ZA.utf8',)>.exception tests/test_utils.py:102: AssertionError https://koji.fedoraproject.org/koji/taskinfo?taskID=18415208 It appears that click has various issues with python3, but the builds seem to work on Fedora. Is this an issue with python3.4 in EPEL7?
See http://click.pocoo.org/5/python3/#python-3-surrogate-handling Run the tests with LANG=C.utf8
Or in case that's not yet in EPEL (I'm not sure), use en_US.utf8.
I thought I had tried that, but apparently not. Any objection to updating it to 6.7 as well?
Leaving that up to Robert.
https://github.com/pallets/click/blob/master/CHANGES changes seem minor: Version 6.7 ----------- (bugfix release; released on January 6th 2017) - Make `click.progressbar` work with `codecs.open` files. See #637. - Fix bug in bash completion with nested subcommands. See #639. - Fix test runner not saving caller env correctly. See #644. - Fix handling of SIGPIPE. See #626 - Deal with broken Windows environments such as Google App Engine's. See #711. Version 6.6 ----------- (bugfix release; released on April 4th 2016) - Fix bug in `click.Path` where it would crash when passed a `-`. See #551. Version 6.4 ----------- (bugfix release; released on March 24th 2016) - Fix bug in bash completion where click would discard one or more trailing arguments. See #471.
I implemented the spec files changes for this in https://src.fedoraproject.org/rpms/python-click/pull-request/1. It would still need to be merged back to the epel7 branch after being merged into master of course. Looking forward to getting this merged so more command line tools can be switched to the python34 stack.
python-click-6.7-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a36ba75c3f
python-click-6.7-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a36ba75c3f
python-click-6.7-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.