Bug 2280002 - python-sphinxcontrib-programoutput fails to build with pytest 8: AssertionError: 'Unexpected return code 1 from command' not found in "directive 'deprecated' is already registered, it will be overridden"
Summary: python-sphinxcontrib-programoutput fails to build with pytest 8: AssertionErr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinxcontrib-programoutput
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-05-10 13:21 UTC by Tomáš Hrnčiar
Modified: 2024-09-10 11:23 UTC (History)
4 users (show)

Fixed In Version: python-sphinxcontrib-programoutput-0.17-20.fc42
Clone Of:
Environment:
Last Closed: 2024-09-10 11:23:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github OpenNTI sphinxcontrib-programoutput issues 61 0 None open Compatibility with pytest 8 2024-05-16 09:31:38 UTC

Description Tomáš Hrnčiar 2024-05-10 13:21:00 UTC
python-sphinxcontrib-programoutput fails to build with pytest 8.


=================================== FAILURES ===================================
_____________ TestDirective.test_shell_with_unexpected_return_code _____________

self = <programoutput.tests.test_directive.TestDirective testMethod=test_shell_with_unexpected_return_code>

    @with_content("""\
    .. program-output:: python3 -c 'import sys; sys.exit("some output")'
       :shell:""",
                  ignore_warnings=False)
    def test_shell_with_unexpected_return_code(self):
        with self.assertRaises(SphinxWarning) as excinfo:
            self.app.build()
        msg = excinfo.exception.args[0]
>       self.assertIn('Unexpected return code 1 from command',
                      msg)
E       AssertionError: 'Unexpected return code 1 from command' not found in "directive 'deprecated' is already registered, it will be overridden"

../../BUILDROOT/python-sphinxcontrib-programoutput-0.17-13.fc41.x86_64/usr/lib/python3.12/site-packages/sphinxcontrib/programoutput/tests/test_directive.py:308: AssertionError
__________________ TestDirective.test_unexpected_return_code ___________________

self = <programoutput.tests.test_directive.TestDirective testMethod=test_unexpected_return_code>

    @with_content("""\
    .. program-output:: python3 -c 'import sys; sys.exit(1)'""",
                  ignore_warnings=False)
    def test_unexpected_return_code(self):
        with self.assertRaises(SphinxWarning) as excinfo:
            self.app.build()
>       self.assertIn('Unexpected return code 1 from command',
                      excinfo.exception.args[0])
E       AssertionError: 'Unexpected return code 1 from command' not found in "directive 'deprecated' is already registered, it will be overridden"

../../BUILDROOT/python-sphinxcontrib-programoutput-0.17-13.fc41.x86_64/usr/lib/python3.12/site-packages/sphinxcontrib/programoutput/tests/test_directive.py:293: AssertionError

=========================== short test summary info ============================
FAILED ../../BUILDROOT/python-sphinxcontrib-programoutput-0.17-13.fc41.x86_64/usr/lib/python3.12/site-packages/sphinxcontrib/programoutput/tests/test_directive.py::TestDirective::test_shell_with_unexpected_return_code
FAILED ../../BUILDROOT/python-sphinxcontrib-programoutput-0.17-13.fc41.x86_64/usr/lib/python3.12/site-packages/sphinxcontrib/programoutput/tests/test_directive.py::TestDirective::test_unexpected_return_code
=========== 2 failed, 60 passed, 1 deselected, 67 warnings in 4.18s ============

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07389739-python-sphinxcontrib-programoutput/

For all our attempts to build python-sphinxcontrib-programoutput with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-sphinxcontrib-programoutput/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

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 Fedora Update System 2024-09-10 11:20:19 UTC
FEDORA-2024-f6d16c14fe (python-sphinxcontrib-programoutput-0.17-20.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-f6d16c14fe

Comment 2 Fedora Update System 2024-09-10 11:23:46 UTC
FEDORA-2024-f6d16c14fe (python-sphinxcontrib-programoutput-0.17-20.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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