TestFixture.test_get_hashes fails in Python 3.12
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.versionedobjects |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
Building the python-
=======
FAIL: oslo_versionedo
oslo_versionedo
-------
testtools.
File "/<<PKGBUILDDIR
self.
File "/usr/lib/
self.
File "/usr/lib/
raise mismatch_error
testtools.
reference = '1.6-fb5f537916
actual = '1.6-33df6764eb
Given the comment of the unit test:
# NOTE(danms): If this object's version or hash changes, this needs
# to change. Otherwise, leave it alone.
I'm blacklisting the unit test in the package. However, it'd be nice to fix it ASAP upstream too.
Cheers,
Thomas Goirand (zigo)
This is caused by a change in the representation of an OrderedDict @ Python 3.12:
< 3.12:
print(OrderedDi ct({1:2, 3:4}))
OrderedDict([(1, 2), (3, 4)])
>= 3.12:
print(OrderedDi ct({1:2, 3:4}))
OrderedDict({1: 2, 3: 4})
a subtle but important difference when calculating the signature of the objects.