Hide Forgot
python-cliff fails to build with Python 3.10.0a4. ====================================================================== FAIL: test_show_help_for_help (cliff.tests.test_help.TestHelp) cliff.tests.test_help.TestHelp.test_show_help_for_help ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: stderr stdout Traceback (most recent call last): File "/builddir/build/BUILD/cliff-3.5.0/cliff/tests/test_help.py", line 107, in test_show_help_for_help self.assertIn('optional arguments:\n --version', help_text) File "/usr/lib/python3.10/site-packages/testtools/testcase.py", line 397, in assertIn self.assertThat(haystack, Contains(needle), message) File "/usr/lib/python3.10/site-packages/testtools/testcase.py", line 478, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: 'optional arguments:\n --version' not in "usage: setup.py [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]\n\ntesting\n\noptions:\n --version show program's version number and exit\n -v, --verbose Increase verbosity of output. Can be repeated.\n -q, --quiet Suppress output except warnings and errors.\n --log-file LOG_FILE Specify a file to log output. Disabled by default.\n -h, --help Show help message and exit.\n --debug Show tracebacks on errors.\n\nCommands:\n complete print bash completion command\n help print detailed help for another command\n one Test command.\n three word command Test command.\n two words Test command.\n" ---------------------------------------------------------------------- Ran 204 tests in 0.451s FAILED (failures=1) Test failed: <unittest.runner.TextTestResult run=204 errors=0 failures=1> error: Test failed: <unittest.runner.TextTestResult run=204 errors=0 failures=1> For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01865080-python-cliff/ For all our attempts to build python-cliff with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-cliff/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Odd. I am not sure why this would be failing in 3.10. On 3.9, the 'optional arguments:\n --version' does seem to be there/pass. Did python 3.10 change something about optional arguments?
Yes indeed the output has changed from: optional arguments: to: options: I have only recently learned abut this change: https://bugs.python.org/issue9694 https://bugs.python.org/issue42870
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
I proposed a patch upstream https://review.opendev.org/c/openstack/cliff/+/775091