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.
A fix to backport: https://github.com/pytest-dev/pytest/pull/7181