Bug 2352551 - rebase-helper fails to build with Python 3.14: AssertionError in TestCLI.test_cli_unit and TestConfig.test_merge
Summary: rebase-helper fails to build with Python 3.14: AssertionError in TestCLI.test...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: rebase-helper
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Forró
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-03-14 13:17 UTC by Karolina Surma
Modified: 2025-03-18 12:42 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-03-14 13:17:18 UTC
rebase-helper fails to build with Python 3.14.0a5.

____________________________ TestCLI.test_cli_unit _____________________________

self = <tests.test_cli.TestCLI object at 0x7f6570b75450>

    def test_cli_unit(self):
        """Function tests cli class with all arguments"""
        conf = {
            'verbose': True,
            'srpm_buildtool': 'mock',
            'buildtool': 'rpmbuild',
            'outputtool': 'json',
            'keep_workspace': True,
            'not_download_sources': True,
            'non_interactive': True,
            'builds_nowait': True,
            'build_tasks': ['123456', '654321'],
            'results_dir': '/tmp/rebase-helper',
            'srpm_builder_options': '\"-r fedora-26-x86_64\"',
            'builder_options': '\"-v\"',
            'changelog_entry': 'Update to %{version}',
            'sources': 'test-1.0.3.tar.gz',
            'version': False,
            'versioneer': None,
            'disable_inapplicable_patches': False,
            'get_old_build_from_koji': False,
            'color': 'auto',
        }
        arguments = [
            '--verbose',
            '--srpm-buildtool', 'mock',
            '--buildtool', 'rpmbuild',
            '--outputtool', 'json',
            '--keep-workspace',
            '--not-download-sources',
            '--non-interactive',
            '--builds-nowait',
            '--build-tasks', '123456,654321',
            '--results-dir', '/tmp/rebase-helper',
            '--srpm-builder-options=\"-r fedora-26-x86_64\"',
            '--builder-options=\"-v\"',
            '--changelog-entry', 'Update to %{version}',
            'test-1.0.3.tar.gz',
        ]
        cli = CLI(arguments)
        for key, value in cli.args.__dict__.items():
>           assert value == conf[key]
E           KeyError: 'help'

/builddir/build/BUILD/rebase-helper-0.29.3-build/rebasehelper-0.29.3/tests/test_cli.py:70: KeyError
____________________ TestConfig.test_merge[CLI with config] ____________________

self = <tests.test_config.TestConfig object at 0x7f6570b59350>
cli_args = ['--changelog-entry', 'Version set to', '--buildtool', 'rpmbuild']
merged = {'buildtool': 'rpmbuild', 'changelog-entry': 'Version set to', 'color': 'auto', 'versioneer': 'pypi'}
config_file = '/tmp/pytest-of-mockbuild/pytest-0/workdir72/test_config.cfg'

    @pytest.mark.parametrize('cli_args, config_args, merged', [
        (
            [
                '--changelog-entry', 'Version set to',
                '--buildtool', 'rpmbuild',
            ],
            {
                'changelog-entry': 'Updated to ',
                'versioneer': 'pypi',
            },
            {
                'changelog-entry': 'Version set to',
                'versioneer': 'pypi',
                'buildtool': 'rpmbuild',
                'color': 'auto',
            },
        ),
    ], ids=[
            'CLI with config',
    ])
    def test_merge(self, cli_args, merged, config_file):
        expected_result = {k.replace('-', '_'): v for k, v in merged.items()}
        cli = CLI(cli_args)
        config = Config(config_file)
        config.merge(cli)
        # True if expected_result is a subset of conf.config
>       assert expected_result.items() <= config.config.items()
E       AssertionError: assert dict_items([('changelog_entry', 'Version set to'), ('versioneer', 'pypi'), ('buildtool', 'rpmbuild'), ('color', 'auto')]) <= dict_items([('changelog_entry', 'Version set to'), ('versioneer', None), ('help', None), ('version', False), ('verbose...r_chroots', ['fedora-rawhide-x86_64']), ('get_old_build_from_koji', False), ('replace_old_version_with_macro', False)])
E        +  where dict_items([('changelog_entry', 'Version set to'), ('versioneer', 'pypi'), ('buildtool', 'rpmbuild'), ('color', 'auto')]) = <built-in method items of dict object at 0x7f657096e040>()
E        +    where <built-in method items of dict object at 0x7f657096e040> = {'buildtool': 'rpmbuild', 'changelog_entry': 'Version set to', 'color': 'auto', 'versioneer': 'pypi'}.items
E        +  and   dict_items([('changelog_entry', 'Version set to'), ('versioneer', None), ('help', None), ('version', False), ('verbose...r_chroots', ['fedora-rawhide-x86_64']), ('get_old_build_from_koji', False), ('replace_old_version_with_macro', False)]) = <built-in method items of dict object at 0x7f657095df00>()
E        +    where <built-in method items of dict object at 0x7f657095df00> = {'apply_changes': False, 'background': 'auto', 'bugzilla_id': None, 'build_log_hook_blacklist': [''], ...}.items
E        +      where {'apply_changes': False, 'background': 'auto', 'bugzilla_id': None, 'build_log_hook_blacklist': [''], ...} = <rebasehelper.config.Config object at 0x7f6570b5b5c0>.config


https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08768265-rebase-helper/

For all our attempts to build rebase-helper with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/rebase-helper/

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.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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.


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