jsonutils check the "Circular reference" as below:
if markers is not None: markerid = id(o)
if markerid in markers: raise ValueError("Circular reference detected") markers[markerid] = o
..................
if markers is not None:
del markers[markerid]
Seems oslo_db.sqlalchemy.enginefacade._Default instances's id() may not collision each other.
But according to jsonutils.dump source code, it seems only the oslo_db.sqlalchemy.enginefacade._Default instances'id may collision each other and cause "Circular reference".
jsonutils check the "Circular reference" as below:
markerid = id(o)
raise ValueError( "Circular reference detected")
markers[ markerid] = o
if markers is not None:
if markerid in markers:
..................
if markers is not None:
del markers[markerid]
Did some simple tests as below: sqlalchemy. enginefacade import _Default
>>> from oslo_db.
>>>
>>>
>>> d1 = _Default()
>>> d2 = _Default()
>>> id(d1)
140398845648296
>>> id(d2)
44938024
>>> d2 = _Default(5)
>>> d1 = _Default(5)
>>> id(d2)
44938080
>>> id(d1)
44938136
Seems oslo_db. sqlalchemy. enginefacade. _Default instances's id() may not collision each other.
But according to jsonutils.dump source code, it seems only the oslo_db. sqlalchemy. enginefacade. _Default instances'id may collision each other and cause "Circular reference".
Maybe #5 can solve this bug.