BerkeleyLearnVerify / Scenic

A compiler and scenario generator for the Scenic scenario description language.
https://scenic-lang.org/
Other
271 stars 93 forks source link

Work around class attribute bug in dill 0.3.7 #165

Closed dfremont closed 1 year ago

dfremont commented 1 year ago

dill 0.3.7 doesn't completely preserve the __dict__ or __module__ of subclasses pickled by value: see https://github.com/uqfoundation/dill/issues/612. This broke our mechanism for detecting when subclasses of OrientedPoint2D have already been transformed, as well as the pickle tests asserting equivalence of Scenic objects and their unpickled versions. This PR fixes the former by working around the bug, and silences the latter by adding a special case to areEquivalent to ignore wrong __module__ values when using dill 0.3.7 (hopefully this will be fixed in subsequent versions).

(I've also updated the URL used to download OpenSCAD: their website is having issues and they recommend getting the releases from GitHub in the mean time.)