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 1928054 - python-pytest-toolbox: FTBFS in Fedora rawhide
Summary: python-pytest-toolbox: FTBFS in Fedora rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pytest-toolbox
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
: 1969111 (view as bug list)
Depends On:
Blocks: PYTHON3.10 F35FTBFS F35FailsToInstall 1968953 1969168
TreeView+ depends on / blocked
 
Reported: 2021-02-12 09:33 UTC by Tomáš Hrnčiar
Modified: 2021-06-10 17:57 UTC (History)
3 users (show)

Fixed In Version: python-pytest-toolbox-0.4-8.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-10 17:57:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-02-12 09:33:04 UTC
Description of problem:
Package python-pytest-toolbox fails to build from source in Fedora rawhide.

Version-Release number of selected component (if applicable):
0.4-6.fc34

Steps to Reproduce:
koji build --scratch f34 python-pytest-toolbox-0.4-6.fc34.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-pytest-toolbox

+ pytest-3.9 -v tests -k 'not test_any_int_false and not test_is_uuid_false'
============================= test session starts ==============================
platform linux -- Python 3.9.1, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /builddir/build/BUILD/pytest-toolbox-0.4, configfile: setup.cfg, testpaths: tests
plugins: toolbox-0.4, isort-1.2.0
collecting ... collected 24 items / 2 deselected / 22 selected
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/main.py", line 322, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1210, in pytest_collection
INTERNALERROR>     self._validate_config_options()
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1233, in _validate_config_options
INTERNALERROR>     self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1269, in _warn_or_fail_if_strict
INTERNALERROR>     self.issue_config_time_warning(PytestConfigWarning(message), stacklevel=3)
INTERNALERROR>   File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1321, in issue_config_time_warning
INTERNALERROR>     warnings.warn(warning, stacklevel=stacklevel)
INTERNALERROR> pytest.PytestConfigWarning: Unknown config option: timeout

Comment 1 Miro Hrončok 2021-02-12 11:17:01 UTC
This is related to pytest 6.2.

See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/4FCRHTHT2IZNA6SOF37HNDLY23ALNARF/

Adding BR: python3-pytest-timeout or patching/sedding the --timeout option out should fix it.

Comment 2 Miro Hrončok 2021-06-04 20:13:13 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.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 3 Miro Hrončok 2021-06-07 22:58:05 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:31:45 UTC
*** Bug 1969111 has been marked as a duplicate of this bug. ***

Comment 5 Ben Beasley 2021-06-08 19:21:41 UTC
I added BR: python3-pytest-timeout as Miro Hrončok suggested, and got:

> =================================== FAILURES ===================================
> ____________________________ test_close_to_now_true ____________________________
> 
>     def test_close_to_now_true():
>         c2n = CloseToNow()
>         dt = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S')
> >       assert dt == c2n
> 
> tests/test_comparison.py:12: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> ../../BUILDROOT/python-pytest-toolbox-0.4-8.fc35.x86_64/usr/lib/python3.10/site-packages/pytest_toolbox/comparison.py:19: in __eq__
>     from pydantic.datetime_parse import parse_datetime
> /usr/lib/python3.10/site-packages/pydantic/__init__.py:2: in <module>
>     from . import dataclasses
> /usr/lib/python3.10/site-packages/pydantic/dataclasses.py:7: in <module>
>     from .main import create_model, validate_model
> /usr/lib/python3.10/site-packages/pydantic/main.py:333: in <module>
>     class BaseModel(Representation, metaclass=ModelMetaclass):
> /usr/lib/python3.10/site-packages/pydantic/main.py:326: in __new__
>     cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
> /usr/lib/python3.10/site-packages/pydantic/utils.py:229: in generate_model_signature
>     if config.extra is config.extra.allow:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> self = <enum.property object at 0x7fbb94517df0>, instance = Extra.ignore
> ownerclass = <enum 'Extra'>
> 
>     def __get__(self, instance, ownerclass=None):
>         if instance is None:
>             try:
>                 return ownerclass._member_map_[self.name]
>             except KeyError:
>                 raise AttributeError(
>                         '%s: no class attribute %r' % (ownerclass.__name__, self.name)
>                         )
>         else:
>             if self.fget is None:
>                 # check for member
>                 if self.name in ownerclass._member_map_:
>                     import warnings
> >                   warnings.warn(
>                             "accessing one member from another is not supported, "
>                             " and will be disabled in 3.12",
>                             DeprecationWarning,
>                             stacklevel=2,
>                             )
> E                   DeprecationWarning: accessing one member from another is not supported,  and will be disabled in 3.12
> 
> /usr/lib64/python3.10/enum.py:151: DeprecationWarning
> =========================== short test summary info ============================
> FAILED tests/test_comparison.py::test_close_to_now_true - DeprecationWarning:...

which looks pretty bad at a glance, but is really just a DeprecationWarning coming out of python-pydantic due to https://github.com/samuelcolvin/pydantic/issues/2786. So I just passed “-W default::DeprecationWarning” to pytest in the spec file so the DeprecationWarning would still appear in the console output but would no longer fail the build.

The result is the following PR to fix this FTBFS: https://src.fedoraproject.org/rpms/python-pytest-toolbox/pull-request/1

Comment 6 Fedora Update System 2021-06-10 17:55:54 UTC
FEDORA-2021-3cee9897cf has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3cee9897cf

Comment 7 Fedora Update System 2021-06-10 17:57:41 UTC
FEDORA-2021-3cee9897cf has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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