Bug 2325447 - python-pytest-split fails to build with Python 3.14: TestRaisesUsageErrors.test_returns_nonzero_when_invalid_algorithm_name: AssertionError
Summary: python-pytest-split fails to build with Python 3.14: TestRaisesUsageErrors.te...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pytest-split
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Doğukan Çağatay
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-12 12:17 UTC by Karolina Surma
Modified: 2024-12-14 22:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-12-14 22:11:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-11-12 12:17:05 UTC
python-pytest-split fails to build with Python 3.14.0a1.

=================================== FAILURES ===================================
____ TestRaisesUsageErrors.test_returns_nonzero_when_invalid_algorithm_name ____

self = <tests.test_plugin.TestRaisesUsageErrors object at 0x7fdeb81cb020>
example_suite = <Testdir local('/tmp/pytest-of-mockbuild/pytest-0/test_returns_nonzero_when_invalid_algorithm_name0')>
capsys = <_pytest.capture.CaptureFixture object at 0x7fdeb7b42f90>

    def test_returns_nonzero_when_invalid_algorithm_name(self, example_suite, capsys):
        result = example_suite.inline_run(
            "--splits", "0", "--group", "1", "--splitting-algorithm", "NON_EXISTENT"
        )
        assert result.ret == ExitCode.USAGE_ERROR
    
        outerr = capsys.readouterr()
>       assert (
            "argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' "
            "(choose from 'duration_based_chunks', 'least_duration')"
        ) in outerr.err
E       assert "argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' (choose from 'duration_based_chunks', 'least_duration')" in "ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]\npytest: error: argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' (choose from duration_based_chunks, least_duration)\n\n"
E        +  where "ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]\npytest: error: argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' (choose from duration_based_chunks, least_duration)\n\n" = CaptureResult(out='', err="ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]\npytest: error: argument --splitting-algorithm: invalid choice: 'NON_EXISTENT' (choose from duration_based_chunks, least_duration)\n\n").err

/builddir/build/BUILD/python-pytest-split-0.10.0-build/pytest-split-0.10.0/tests/test_plugin.py:356: AssertionError

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/08225136-python-pytest-split/

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

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.

Comment 1 Doğukan Çağatay 2024-11-13 11:12:09 UTC
I was able to reproduce the issue, but it requires a fix in the upstream.

Comment 2 Doğukan Çağatay 2024-12-14 22:11:41 UTC
The problem with Python 3.14 was on the test code. I applied a patch with the upstream fix and updated the Bodhi build for rawhide (f42).

Upstream fix: https://github.com/jerry-git/pytest-split/pull/107
Bodhi build: https://bodhi.fedoraproject.org/updates/FEDORA-2024-302358bbea


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