Bug 1914840 - python-osc-lib fails to build with Python 3.10: argparse output has changed
Summary: python-osc-lib fails to build with Python 3.10: argparse output has changed
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-osc-lib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alfredo Moralejo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-01-11 10:17 UTC by Tomáš Hrnčiar
Modified: 2021-02-09 16:23 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-01-11 10:17:55 UTC
python-osc-lib fails to build with Python 3.10.0a4.

osc_lib.tests.utils.test_tags.TestTagHelps.test_add_tag_option_to_parser_for_unset
----------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/builddir/build/BUILD/osc-lib-2.2.1/osc_lib/tests/utils/test_tags.py", line 288, in test_add_tag_option_to_parser_for_unset
        self._test_tag_method_help(
      File "/builddir/build/BUILD/osc-lib-2.2.1/osc_lib/tests/utils/test_tags.py", line 191, in _test_tag_method_help
        self.assertEqual(exp_normal, parser.format_help())
      File "/usr/lib/python3.10/site-packages/testtools/testcase.py", line 391, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/usr/lib/python3.10/site-packages/testtools/testcase.py", line 478, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = '''\
    usage: run.py [-h] [--tag <tag> | --all-tag]
    
    optional arguments:
      -h, --help   show this help message and exit
      --tag <tag>  Tag to be removed from the test (repeat option to remove
                   multiple tags)
      --all-tag    Clear all tags associated with the test
    '''
    actual    = '''\
    usage: run.py [-h] [--tag <tag> | --all-tag]
    
    options:
      -h, --help   show this help message and exit
      --tag <tag>  Tag to be removed from the test (repeat option to remove
                   multiple tags)
      --all-tag    Clear all tags associated with the test
    '''

Argparse output has changed from:


  optional arguments:


to:


  options:


https://bugs.python.org/issue9694
https://bugs.python.org/issue42870


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01871069-python-osc-lib/

For all our attempts to build python-osc-lib with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-osc-lib/

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.

Comment 1 Ben Cotton 2021-02-09 15:39:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.


Note You need to log in before you can comment on or make changes to this bug.