-
Type: Bug
-
Status: Done (View Workflow)
-
Priority: Normal
-
Resolution: Done
-
Component/s: tron_actorcore
-
Labels:None
python 3.8 changes the way class _str methods are resolved. For class objects, obj.str now resolves to object.str; for instances obj.str resolves to obj.class.str_, which is what used to happen in both cases.
Because of the way metaclasses are used in opscore types, the basic opscore.protocol.types (Int, Float, etc) use the class _str under normal circumstances, which now resolves to object.str instead of, say float.str_. And which returns, say, "Float(1.23)" instead of the desired "1.23".
This is a problem when formatting MHS typed objects.
I think the answer is simply to instantiate the base object in _str_(), except for String (i.e. baseType=str) objects. Testing now.