diff --git a/implementations/python/preserves/schema.py b/implementations/python/preserves/schema.py index 6bc0885..828d637 100644 --- a/implementations/python/preserves/schema.py +++ b/implementations/python/preserves/schema.py @@ -297,7 +297,7 @@ def encode(p, v): if p.key == DICTOF: return dict((encode(p[0], k), encode(p[1], w)) for (k, w) in v.items()) if p.key == REF: - return v.__preserve__() + return preserve(v) if p.key == REC: return Record(encode(p[0], v), encode(p[1], v)) if p.key == TUPLE: @@ -433,8 +433,8 @@ if __name__ == '__main__': with open(__metaschema_filename, 'rb') as f: x = Decoder(f.read()).next() print(meta.Schema.decode(x)) - print(meta.Schema.decode(x).__preserve__()) - assert meta.Schema.decode(x).__preserve__() == x + print(preserve(meta.Schema.decode(x))) + assert preserve(meta.Schema.decode(x)) == x @extend(meta.Schema) def f(self, x): @@ -450,7 +450,7 @@ if __name__ == '__main__': x = Decoder(f.read()).next() print(meta.Schema.decode(x)) assert meta.Schema.decode(x) == meta.Schema.decode(x) - assert meta.Schema.decode(x).__preserve__() == x + assert preserve(meta.Schema.decode(x)) == x print() print(path) diff --git a/implementations/python/setup.py b/implementations/python/setup.py index cd61497..c09f390 100644 --- a/implementations/python/setup.py +++ b/implementations/python/setup.py @@ -5,7 +5,7 @@ except ImportError: setup( name="preserves", - version="0.10.0", + version="0.10.1", author="Tony Garnock-Jones", author_email="tonyg@leastfixedpoint.com", license="Apache Software License",