GeezerVison is showing github.com — `TestStructuredObjectRefcounting` tests failing on Python 3.12b2 · Issue #23986 · numpy/numpy
TestStructuredObjectRefcounting tests failing on Python 3.12b2 #23986
DescriptionExample failure:
# Test item getting:
part = arr[index]
after_val0 = sys.getrefcount(val0)
> assert after_val0 - before_val0 == count * items_changed
E assert (4294967295 - 4294967295) == (6 * 2)
after_val0 = 4294967295
arr = array([(-4, [[-4, -4, -4], [-4, -4, -4]]),
(-4, [[-4, -4, -4], [-4, -4, -4]]),
(-4, [[-4, -4, -4], [-4, -4, -4]])],
dtype=[('a', '<i4'), ('b', 'O', (2, 3))])
before_val0 = 4294967295
before_val1 = 4294967295
count = 6
dt = dtype([('a', '<i4'), ('b', 'O', (2, 3))])
index = [True, False, True]
items_changed = 2
part = array([(-4, [[-4, -4, -4], [-4, -4, -4]]),
(-4, [[-4, -4, -4], [-4, -4, -4]])],
dtype=[('a', '<i4'), ('b', 'O', (2, 3))])
pat = (0, [[<object object at 0x7fdf636fdd90>, <object object at 0x7fdf636fdd90>, <object object at 0x7fdf636fdd90>], [<object object at 0x7fdf636fdd90>, <object object at 0x7fdf636fdd90>, <object object at 0x7fdf636fdd90>]])
self = <numpy.core.tests.test_dtype.TestStructuredObjectRefcounting object at 0x7fdf55a9be60>
shape = (3,)
singleton = <object object at 0x7fdf636fdd90>
val0 = -4
val1 = -5
../venv/lib/python3.12/site-packages/numpy/core/tests/test_dtype.py:831: AssertionError
Full list of failures:
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[ones-1-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[ones-1-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[ones-1-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[ones-1-<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[zeros-0-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[zeros-0-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[zeros-0-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_create_delete[zeros-0-<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_item_setting[<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_item_setting[<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_item_setting[<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_item_setting[<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape0-index0-2-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape0-index0-2-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape0-index0-2-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape0-index0-2-<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape1-index1-4-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape1-index1-4-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape1-index1-4-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape1-index1-4-<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape2-index2-2-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape2-index2-2-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape2-index2-2-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape2-index2-2-<structured subarray 2>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape3-index3-2-<subarray>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape3-index3-2-<subarray in field>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape3-index3-2-<structured subarray 1>]
FAILED core/tests/test_dtype.py::TestStructuredObjectRefcounting::test_structured_object_indexing[shape3-index3-2-<structured subarray 2>]
Activityrgommers commented on Jun 19, 2023 I'm going to skip these for now in an attempt to get 3.12 wheels up seberg commented on Jun 19, 2023 Skip it for good, Python 3.12 has immortal refcounts, I am not even sure its possible to test the refcounting for ones and zeros explicitly anymore. (I suppose pytest-leaks will still work, although I wouldn't be surprised if even that would just test no-ops)
4294967295 is the "immortal object" marker.
added 3 commits that reference this issue on Jun 19, 2023This issue will close once commit 5ac6b32 is merged into the 'main' branch.5ac6b32 This issue will close once commit b799a60 is merged into the 'main' branch.b799a60 This issue will close once commit b0872b8 is merged into the 'main' branch.b0872b8 added a commit that references this issue on Jun 30, 2023This issue will close once commit 125f1dc is merged into the 'main' branch.125f1dc
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|