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 bugzilla.redhat.com.
Bug 1829708 - pytest fails to build with Python 3.9: test_getfslineno fails
Summary: pytest fails to build with Python 3.9: test_getfslineno fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pytest
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-04-30 07:22 UTC by Miro Hrončok
Modified: 2020-05-08 18:38 UTC (History)
5 users (show)

Fixed In Version: 4.6.10-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-08 18:38:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pytest-dev pytest issues 7161 0 None open New test failures with Python 3.9.0a6 2020-05-04 18:51:50 UTC
Github pytest-dev pytest pull 7181 0 None open 4.6: Fix test_getfslineno for Python 3.9 2020-05-07 13:35:27 UTC

Description Miro Hrončok 2020-04-30 07:22:51 UTC
pytest fails to build with Python 3.9.0a6.

_______________________________ test_getfslineno _______________________________

    def test_getfslineno():
        from _pytest._code import getfslineno
    
        def f(x):
            pass
    
        fspath, lineno = getfslineno(f)
    
        assert fspath.basename == "test_source.py"
        assert lineno == _pytest._code.getrawcode(f).co_firstlineno - 1  # see findsource
    
        class A(object):
            pass
    
        fspath, lineno = getfslineno(A)
    
        _, A_lineno = inspect.findsource(A)
        assert fspath.basename == "test_source.py"
        assert lineno == A_lineno
    
        assert getfslineno(3) == ("", -1)
    
        class B(object):
            pass
    
        B.__name__ = "B2"
>       assert getfslineno(B)[1] == -1
E       assert 500 == -1

/builddir/build/BUILD/pytest-4.6.9/testing/code/test_source.py:505: AssertionError

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01357229-pytest/

For all our attempts to build pytest with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/pytest/

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

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 Miro Hrončok 2020-05-07 13:35:27 UTC
A fix to backport: https://github.com/pytest-dev/pytest/pull/7181


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