NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 62 forks source link

VarDictionary doctests broken for python3.12 #557

Closed peverwhee closed 1 day ago

peverwhee commented 2 months ago

Description

The VarDictionary doctests are failing because of this change in python3.12:

gh-101446: Change repr of collections.OrderedDict to use regular dictionary formating instead of pairs of keys and values

Steps to Reproduce

Run the doctests overall or for only metavar.py

Additional Context

Here is the difference:

Expected: VarDictionary(baz, [('hi_mom', <metavar.Var hi_mom: foo at 0x...>)]) Got: VarDictionary(baz, {'hi_mom': <metavar.Var hi_mom: foo at 0x7f6c73e92990>})

Need to decide whether to move away from using the string representations of the base python classes (OrderedDict, etc) so we're unaffected by this. Or if we need to update the doctests themselves.