Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1908278 - python-sybil fails to build with Python 3.10
Summary: python-sybil fails to build with Python 3.10
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sybil
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
: 1969151 (view as bug list)
Depends On:
Blocks: PYTHON3.10 F35FTBFS, RAWHIDEFTBFS F35FailsToInstall, RAWHIDEFailsToInstall 1969110
TreeView+ depends on / blocked
Reported: 2020-12-16 10:03 UTC by Tomáš Hrnčiar
Modified: 2021-06-09 09:23 UTC (History)
5 users (show)

Fixed In Version: python-sybil-2.0.1-3.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-06-09 09:23:35 UTC
Type: Bug

Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-12-16 10:03:32 UTC
python-sybil fails to build with Python 3.10.0a3.

=================================== FAILURES ===================================
_____________________________ test_future_imports ______________________________

    def test_future_imports():
        document = document_from_sample('codeblock_future_imports.txt')
        regions = list(CodeBlockParser(['print_function'])(document))
        assert len(regions) == 2
        buffer = StringIO()
        namespace = {'buffer': buffer}
        assert evaluate_region(regions[0], namespace) is None
        assert buffer.getvalue() == (
            'pathalogical worst case for line numbers\n'
        # the future import line drops the firstlineno by 1
        code = compile_codeblock(regions[0].parsed, document.path)
>       assert code.co_firstlineno == 2
E       assert 1 == 2
E         +1
E         -2

tests/ AssertionError
_________________________________ test_pytest __________________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f14488a47f0>

    def test_pytest(capsys):
        class CollectResults:
            def pytest_sessionfinish(self, session):
                self.session = session
        results = CollectResults()
        return_code = pytest_main(['-vvs', join(functional_test_dir, 'pytest')],
        assert return_code == 1
        assert results.session.testsfailed == 4
        assert results.session.testscollected == 10
        out, err = capsys.readouterr()
        # check we're trimming tracebacks:
        index = out.find('sybil/')
        if index > -1:  # pragma: no cover
            raise AssertionError('\n'+out[index-500:index+500])
        out = Finder(out)
        out.then_find('fail.rst::line:1,column:1 sybil setup session_fixture setup\n'
                      'module_fixture setup\n'
                      'class_fixture setup\n'
                      'function_fixture setup\n'
                      'x is currently: 0\n'
                      'FAILED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('fail.rst::line:6,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '0smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('fail.rst::line:8,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '1smcf FAILED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('fail.rst::line:10,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '2smcf FAILED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('fail.rst::line:12,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '3smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('fail.rst::line:14,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      'FAILED function_fixture teardown\n'
                      'class_fixture teardown\n'
                      'module_fixture teardown\n'
                      'sybil teardown 5')
        out.then_find('pass.rst::line:1,column:1 sybil setup module_fixture setup\n'
                      'class_fixture setup\n'
                      'function_fixture setup\n'
                      '0smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('pass.rst::line:3,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '1smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('pass.rst::line:5,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '2smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown')
        out.then_find('pass.rst::line:7,column:1 class_fixture setup\n'
                      'function_fixture setup\n'
                      '3smcf PASSED function_fixture teardown\n'
                      'class_fixture teardown\n'
                      'module_fixture teardown\n'
                      'sybil teardown 4\n'
                      'session_fixture teardown')
        out.then_find('_ fail.rst line=1 column=1 _')
>       out.then_find(  ">   raise Exception('the start!')")

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_functional.Finder object at 0x7f14486290d0>
substring = ">   raise Exception('the start!')"

    def then_find(self, substring):
>       assert substring in self.text[self.index:]
E       assert ">   raise Exception('the start!')" in '_ fail.rst line=1 column=1 ___________________________\n\nexample = <Example path=/builddir/build/BUILD/sybil-2.0.1/t...ine:14,column:1 - Exception: boom!\n========================= 4 failed, 6 passed in 0.03s ==========================\n'

tests/ AssertionError
=========================== short test summary info ============================
FAILED tests/ - assert 1 == 2
FAILED tests/ - assert ">   raise Exception('t...
========================= 2 failed, 46 passed in 0.41s =========================

For the build logs, see:

For all our attempts to build python-sybil with Python 3.10, see:

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:

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:34:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 2 Miro Hrončok 2021-06-04 20:14:35 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.

The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.


See also

If you have general questions about the rebuild, please use this mailing list thread:

Comment 3 Miro Hrončok 2021-06-07 22:59:11 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 4 Miro Hrončok 2021-06-08 11:34:21 UTC
*** Bug 1969151 has been marked as a duplicate of this bug. ***

Comment 5 Zbigniew Jędrzejewski-Szmek 2021-06-09 09:23:35 UTC
"Fixed" by silencing the failing tests.

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