Skip to content

PyDict_GetItem warnings on Python 3.13 #1817

Closed
@mdickinson

Description

@mdickinson

On Python 3.13, running the test suite results in a couple of new warning messages about PyDict_GetItem from the Python core:

Exception ignored in PyDict_GetItem(); consider using PyDict_GetItemRef() or PyDict_GetItemWithError():
Traceback (most recent call last):
  File "/Users/mdickinson/Enthought/ETS/traits/traits/tests/test_map.py", line 64, in test_assignment
    person.married = []
TypeError: unhashable type: 'list'
Exception ignored in PyDict_GetItem(); consider using PyDict_GetItemRef() or PyDict_GetItemWithError():
Traceback (most recent call last):
  File "/Users/mdickinson/Enthought/ETS/traits/traits/tests/test_traits.py", line 43, in assign
    self.obj.value = value
TypeError: unhashable type: 'list'
Exception ignored in PyDict_GetItem(); consider using PyDict_GetItemRef() or PyDict_GetItemWithError():
Traceback (most recent call last):
  File "/Users/mdickinson/Enthought/ETS/traits/traits/tests/test_traits.py", line 43, in assign
    self.obj.value = value
TypeError: unhashable type: 'dict'

These warnings relate to validation of mapped traits. The fix should be straightforward.

Related upstream change: python/cpython#106672

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions