python-dateutil fails to build with Python 3.8.0b3. + /usr/bin/python3 -m pytest error: Bad exit status from /var/tmp/rpm-tmp.pPDDgv (%check) ============================= test session starts ============================== platform linux -- Python 3.8.0b3, pytest-4.6.4, py-1.8.0, pluggy-0.12.0 hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/builddir/build/BUILD/python-dateutil-2.8.0/.hypothesis/examples') rootdir: /builddir/build/BUILD/python-dateutil-2.8.0, inifile: setup.cfg plugins: hypothesis-4.23.8 collected 1043 items / 6 errors / 1037 selected INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 206, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 249, in _main INTERNALERROR> config.hook.pytest_collection(session=session) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 91, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 82, in <lambda> INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 259, in pytest_collection INTERNALERROR> return session.perform_collect() INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 497, in perform_collect INTERNALERROR> hook.pytest_collection_modifyitems( INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 91, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 82, in <lambda> INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/builddir/build/BUILD/python-dateutil-2.8.0/dateutil/test/conftest.py", line 20, in pytest_collection_modifyitems INTERNALERROR> item.add_marker(pytest.mark.no_cover) INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/mark/structures.py", line 330, in __getattr__ INTERNALERROR> warnings.warn( INTERNALERROR> _pytest.warning_types.PytestUnknownMarkWarning: Unknown pytest.mark.no_cover - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html =========================== 6 error in 0.92 seconds ============================ The failure is unrelated to Python 3.8, but most likely to pytest 4.6. Here is a Koji rawhide build w/Python 3.7: https://koji.fedoraproject.org/koji/taskinfo?taskID=36637105 Yet this blocks the Python 3.8 rebuild. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00989687-python-dateutil/ For all our attempts to build python-dateutil with Python 3.8, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-dateutil/ 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.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/ Let us know here if you have any questions.
BuildRequiring python3-pytest-cov should solve the symptoms, but I don't like the underlying issue: it seems that Pytest will now complain if tests contain coverage markers, but the coverage plugin is not available. We generally don't want want to run coverage and linters in %check of distro packages. We might need a more systematic solution to this problem.
https://docs.pytest.org/en/latest/changelog.html pytest 4.5.0 added: #5023: New flag --strict-markers that triggers an error when unknown markers (e.g. those not registered using the markers option in the configuration file) are used in the test suite. I'm searching when this became the default (or if dateutil uses this or --scrict that implies it).
https://docs.pytest.org/en/latest/mark.html "Unregistered marks applied with the @pytest.mark.name_of_the_mark decorator will always emit a warning..." This is indeed a warning: _pytest.warning_types.PytestUnknownMarkWarning Something is turning it into an error.
Adding this to %prep workarounds the issue: cat > pytest.ini << EOF [pytest] markers = no_cover EOF
pytest RFE https://github.com/pytest-dev/pytest/issues/5678
This also workarounds the issue: %{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning
I've pushed the workaround: %{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning