Bug 2291646
Summary: | python-cattrs FTBFS with Python 3.13 (and fails to install): AssertionError: assert HypDataclass(a=nan) == HypDataclass(a=nan), assert Counter({1: 2}) == immutables.Map({1: 2}) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Fedora Fails To Install <fti-bugs> |
Component: | python-cattrs | Assignee: | Ankur Sinha (FranciscoD) <sanjay.ankur> |
Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | fedora, gui1ty, hobbes1069, mhroncok, neuro-sig, sanjay.ankur |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-06-17 23:14:26 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2260875, 2260877, 2244836, 2291548, 2291689, 2291859, 2291881, 2291900, 2291910, 2292002, 2292005 |
Description
Fedora Fails To Install
2024-06-12 11:21:38 UTC
This is FTBFS rather than FTI: =================================== FAILURES =================================== _________________ test_collection_unstructure_override_mapping _________________ [gw7] linux -- Python 3.13.0 /usr/bin/python3 @pytest.mark.skipif(not is_py39_plus, reason="Requires Python 3.9+") def test_collection_unstructure_override_mapping(): """Test overriding unstructuring mappings.""" # Using Counter c = Converter(unstruct_collection_overrides={Counter: Map}) assert c.unstructure(Counter({1: 2})) == Map({1: 2}) > assert c.unstructure(Counter({1: 2}), unstructure_as=Counter[int]) == Map({1: 2}) E assert Counter({1: 2}) == immutables.Map({1: 2}) E Use -v to get more diff c = <cattrs.converters.Converter object at 0x7f2a06ebd120> tests/test_unstructure_collections.py:168: AssertionError ____________________ test_unmodified_generated_structuring _____________________ [gw4] linux -- Python 3.13.0 /usr/bin/python3 @given( > cl_and_vals=nested_typed_classes() | simple_typed_classes() | simple_typed_dataclasses(), dv=..., ) f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7ffa09898540> tests/test_gen_dict.py:166: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cl_and_vals = (<class 'tests.typed.HypDataclass'>, (nan,), {}), dv = False @given( cl_and_vals=nested_typed_classes() | simple_typed_classes() | simple_typed_dataclasses(), dv=..., ) def test_unmodified_generated_structuring(cl_and_vals, dv: bool): converter = Converter(detailed_validation=dv) cl, vals, kwargs = cl_and_vals fn = make_dict_structure_fn(cl, converter, _cattrs_detailed_validation=dv) inst = cl(*vals, **kwargs) unstructured = converter.unstructure(inst) assert "Hyp" not in repr(unstructured) converter.register_structure_hook(cl, fn) res = converter.structure(unstructured, cl) > assert inst == res E AssertionError: assert HypDataclass(a=nan) == HypDataclass(a=nan) E E Differing attributes: E ['a'] E E Drill down into differing attribute a: E a: nan != nan E Falsifying example: test_unmodified_generated_structuring( E cl_and_vals=(tests.typed.HypDataclass, (nan,), {}), # Saw 1 signaling NaN E dv=False, # or any other generated value E ) E Explanation: E These lines were always and only run by failing examples: E /usr/lib/python3.13/site-packages/_pytest/assertion/util.py:456 cl = <class 'tests.typed.HypDataclass'> cl_and_vals = (<class 'tests.typed.HypDataclass'>, (nan,), {}) converter = <cattrs.converters.Converter object at 0x7ffa0943e700> dv = False fn = <function structure_HypDataclass at 0x7ff9f7ef6840> inst = HypDataclass(a=nan) kwargs = {} res = HypDataclass(a=nan) unstructured = {'a': nan} vals = (nan,) tests/test_gen_dict.py:186: AssertionError *** Bug 2292049 has been marked as a duplicate of this bug. *** I suggest we skip the failing tests, with a link to upstream. (In reply to Miro Hrončok from comment #3) > I suggest we skip the failing tests, with a link to upstream. https://src.fedoraproject.org/rpms/python-cattrs/pull-request/7 Hello, Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/ All subpackages of a package against which this bug was filled are now installable or removed from Fedora 41. Thanks for taking care of it! |