aio-libs / frozenlist

`FrozenList` is a `list`-like structure that implements `collections.abc.MutableSequence` and can be made immutable.

Home Page:https://frozenlist.aio-libs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3.13.0b1: TestFrozenList.test_iface fails with AssertionError: `False = hasattr(<class 'frozenlist._frozenlist.FrozenList'>, '__static_attributes__')`

befeleme opened this issue · comments

Long story short

TestFrozenList.test_iface fails when run with Python 3.13.0b1 in Fedora Linux.

Expected behaviour

Tests pass.

Actual behaviour

=================================== FAILURES ===================================
__________________________ TestFrozenList.test_iface ___________________________

self = <test_frozenlist.TestFrozenList object at 0x7f6291a679d0>

    def test_iface(self) -> None:
        for name in set(dir(MutableSequence)) - self.SKIP_METHODS:
            if name.startswith("_") and not name.endswith("_"):
                continue
>           assert hasattr(self.FrozenList, name)
E           AssertionError: assert False
E            +  where False = hasattr(<class 'frozenlist._frozenlist.FrozenList'>, '__static_attributes__')
E            +    where <class 'frozenlist._frozenlist.FrozenList'> = <test_frozenlist.TestFrozenList object at 0x7f6291a679d0>.FrozenList

name       = '__static_attributes__'
self       = <test_frozenlist.TestFrozenList object at 0x7f6291a679d0>

tests/test_frozenlist.py:23: AssertionError
=========================== short test summary info ============================
FAILED tests/test_frozenlist.py::TestFrozenList::test_iface - AssertionError:...
========================= 1 failed, 87 passed in 0.12s =========================

Your environment

Fedora Linux 41, see e.g. build logs

FTR this works around it, but I've got no idea whether is semantically correct:

-    SKIP_METHODS = {"__abstractmethods__", "__slots__"}
+    SKIP_METHODS = {"__abstractmethods__", "__slots__", "__static_attributes__", "__firstlineno__"}