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

OrderedDict repr change causes doctest failures #1395

Closed
randomir opened this issue Dec 5, 2024 · 0 comments · Fixed by #1396
Closed

OrderedDict repr change causes doctest failures #1395

randomir opened this issue Dec 5, 2024 · 0 comments · Fixed by #1396
Assignees
Labels

Comments

@randomir
Copy link
Member

randomir commented Dec 5, 2024

In Python 3.12, OrderedDict has changed its repr to use regular dictionary formatting instead of pairs of keys and values. See python/cpython#101446 / python/cpython#101661.

As a result, we have a few doctests failing:

File "../env/lib/python3.12/site-packages/dimod/reference/composites/tracking.py", line ?, in default
Failed example:
    sampler.input
Expected:
    OrderedDict([('h', {'a': -1}), ('J', {('a', 'b'): 1}), ('num_reads', 5)])
Got:
    OrderedDict({'h': {'a': -1}, 'J': {('a', 'b'): 1}, 'num_reads': 5})
**********************************************************************
File "../env/lib/python3.12/site-packages/dimod/reference/composites/tracking.py", line ?, in default
Failed example:
    sampler.input
Expected:
    OrderedDict([('Q', {('a', 'b'): 1})])
Got:
    OrderedDict({'Q': {('a', 'b'): 1}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants