attrs icon indicating copy to clipboard operation
attrs copied to clipboard

cached_property tests fail on Python 3.14

Open hynek opened this issue 6 months ago • 0 comments

Currently two test fail on 3.14:

FAILED tests/test_make.py::TestClassBuilder::test_no_references_to_original_when_using_cached_property - AssertionError: assert [<class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>] == [<class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>, <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>]

  At index 0 diff: <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'> != <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>
  Right contains one more item: <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>

  Full diff:
    [
        <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>,
  -     <class 'tests.test_make.TestClassBuilder.test_no_references_to_original_when_using_cached_property.<locals>.C2'>,
    ]
FAILED tests/test_slots.py::test_slots_cached_property_infers_type - AssertionError: assert {'x': <class 'int'>} == {'x': <class 'int'>, 'f': <class 'int'>}

  Common items:
  {'x': <class 'int'>}
  Right contains 1 more item:
  {'f': <class 'int'>}

  Full diff:
    {
  -     'f': <class 'int'>,
        'x': <class 'int'>,
    }

Any chance yinz[^pit] could have a look @diabolo-dan @dlax @Tinche? It might be a CPython problem and if so it would be good to report it ASAP.

[^pit]: I'm in Pittsburgh right now.

hynek avatar May 20 '25 17:05 hynek