Skip to content

TestStructuredObjectRefcounting tests failing on Python 3.12b2 #23986

@rgommers

Description

@rgommers

Example 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>]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions