Skip to content

Test failure with Python 3.8.0 #1946

Closed
Closed
@susilehtola

Description

@susilehtola

pybind11 version 2.4.2 fails to build from source in Fedora rawhide with Python 3.8.0rc1:

_____________________________ test_class_refcount ______________________________
    @pytest.unsupported_on_pypy
    def test_class_refcount():
        """Instances must correctly increase/decrease the reference count of their types (#1029)"""
        from sys import getrefcount
    
        class PyDog(m.Dog):
            pass
    
        for cls in m.Dog, PyDog:
            refcount_1 = getrefcount(cls)
            molly = [cls("Molly") for _ in range(10)]
            refcount_2 = getrefcount(cls)
    
            del molly
            pytest.gc_collect()
            refcount_3 = getrefcount(cls)
    
>           assert refcount_1 == refcount_3
E           assert 6 == 16
test_class.py:255: AssertionError

as reported in Fedora ticket https://bugzilla.redhat.com/show_bug.cgi?id=1758474

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions