Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyDict_GetItem warnings on Python 3.13 #1817

Closed
mdickinson opened this issue Jan 3, 2025 · 0 comments · Fixed by #1818
Closed

PyDict_GetItem warnings on Python 3.13 #1817

mdickinson opened this issue Jan 3, 2025 · 0 comments · Fixed by #1818

Comments

@mdickinson
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant