Bug 1734775 - python-dateutil fails to build with in Fedora 31 (rawhide)
Summary: python-dateutil fails to build with in Fedora 31 (rawhide)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-dateutil
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Haïkel Guémar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31FTBFS PYTHON38 1732841
TreeView+ depends on / blocked
 
Reported: 2019-07-31 12:10 UTC by Miro Hrončok
Modified: 2019-08-12 23:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-12 23:29:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-07-31 12:10:17 UTC
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.

Comment 1 Petr Viktorin (pviktori) 2019-07-31 13:22:38 UTC
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.

Comment 2 Miro Hrončok 2019-07-31 13:35:29 UTC
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).

Comment 3 Miro Hrončok 2019-07-31 13:41:12 UTC
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.

Comment 4 Miro Hrončok 2019-07-31 13:44:12 UTC
Adding this to %prep workarounds the issue:

cat > pytest.ini << EOF
[pytest]
markers =
    no_cover
EOF

Comment 5 Miro Hrončok 2019-07-31 13:51:58 UTC
pytest RFE https://github.com/pytest-dev/pytest/issues/5678

Comment 6 Miro Hrončok 2019-07-31 14:12:49 UTC
This also workarounds the issue:

%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning

Comment 7 Miro Hrončok 2019-08-12 23:29:54 UTC
I've pushed the workaround:

%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning


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