[PATCH saem_ref] [bw compat] Drop no more necessary monkey-patch

Sylvain Thenault sylvain.thenault at logilab.fr
Mon Apr 10 17:52:02 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1491836174 -7200
#      Mon Apr 10 16:56:14 2017 +0200
# Node ID 5a6abf2ae92d7f565d42f2c23cdd61a6a26300cb
# Parent  e394c52e195e8528ed61bdd5f08c019413643a49
[bw compat] Drop no more necessary monkey-patch

this used to be there in case of erroneously serialized constraint, but it doesn't
seem to be necessary on our demo instance, so we can suppose it's not anymore necessary
at all.

diff --git a/cubicweb_saem_ref/site_cubicweb.py b/cubicweb_saem_ref/site_cubicweb.py
--- a/cubicweb_saem_ref/site_cubicweb.py
+++ b/cubicweb_saem_ref/site_cubicweb.py
@@ -161,29 +161,10 @@ seda.GRAPH_SKIP_RTYPES.add('new_version_
 
 ####################################################################################################
 # temporary monkey-patches #########################################################################
 ####################################################################################################
 
-from yams.constraints import Attribute, BoundaryConstraint, cstr_json_loads  # noqa
-
-
- at monkeypatch(BoundaryConstraint, methodname='deserialize')
- at classmethod
-def deserialize(cls, value):
-    """simple text deserialization"""
-    try:
-        values = cstr_json_loads(value)
-        return cls(**values)
-    except ValueError:
-        try:
-            value, msg = value.split('\n', 1)
-        except ValueError:
-            msg = None
-        op, boundary = value.split(' ', 1)
-        return cls(op, eval(boundary), msg or None)
-
-
 # proper behaviour of hooks control cm (https://www.cubicweb.org/ticket/17049333)
 
 from cubicweb.server import session  # noqa
 
 


More information about the saem-devel mailing list