[schema] drop old backward compat code
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 02 Jul 2015 11:46:57 +0200
changeset 10517 fa9a0c80556d
parent 10516 4c59409220b6
child 10518 d276e4b332ba
[schema] drop old backward compat code preventing yams to be itself fully cleaned
doc/book/devrepo/cubes/cc-newcube.rst
schema.py
--- a/doc/book/devrepo/cubes/cc-newcube.rst	Thu Jun 11 11:45:45 2015 +0200
+++ b/doc/book/devrepo/cubes/cc-newcube.rst	Thu Jul 02 11:46:57 2015 +0200
@@ -21,8 +21,7 @@
 ``__depends_cubes__`` which is defined in :file:`__pkginfo__.py`.
 This variable is used for the instance packaging (dependencies handled
 by system utility tools such as APT) and to find used cubes when the
-database for the instance is created (import_erschema('MyCube') will
-not properly work otherwise).
+database for the instance is created.
 
 On a Unix system, the available cubes are usually stored in the
 directory :file:`/usr/share/cubicweb/cubes`. If you are using the
--- a/schema.py	Thu Jun 11 11:45:45 2015 +0200
+++ b/schema.py	Thu Jul 02 11:46:57 2015 +0200
@@ -38,8 +38,7 @@
 from yams.constraints import (BaseConstraint, FormatConstraint, BoundaryConstraint,
                               IntervalBoundConstraint, StaticVocabularyConstraint)
 from yams.reader import (CONSTRAINTS, PyFileReader, SchemaLoader,
-                         obsolete as yobsolete, cleanup_sys_modules,
-                         fill_schema_from_namespace)
+                         cleanup_sys_modules, fill_schema_from_namespace)
 
 from rql import parse, nodes, RQLSyntaxError, TypeResolverException
 from rql.analyze import ETypeResolver
@@ -1403,13 +1402,6 @@
             return self.regular_formats + tuple(NEED_PERM_FORMATS)
     return self.regular_formats
 
-# XXX monkey patch PyFileReader.import_erschema until bw_normalize_etype is
-# necessary
-orig_import_erschema = PyFileReader.import_erschema
-def bw_import_erschema(self, ertype, schemamod=None, instantiate=True):
-    return orig_import_erschema(self, bw_normalize_etype(ertype), schemamod, instantiate)
-PyFileReader.import_erschema = bw_import_erschema
-
 # XXX itou for some Statement methods
 from rql import stmts
 orig_get_etype = stmts.ScopeNode.get_etype
@@ -1431,16 +1423,3 @@
 def bw_set_statement_type(self, etype):
     return orig_set_statement_type(self, bw_normalize_etype(etype))
 stmts.Select.set_statement_type = bw_set_statement_type
-
-# XXX deprecated
-
-from yams.constraints import StaticVocabularyConstraint
-
-RichString = moved('yams.buildobjs', 'RichString')
-
-StaticVocabularyConstraint = class_moved(StaticVocabularyConstraint)
-FormatConstraint = class_moved(FormatConstraint)
-
-PyFileReader.context['ERQLExpression'] = yobsolete(ERQLExpression)
-PyFileReader.context['RRQLExpression'] = yobsolete(RRQLExpression)
-PyFileReader.context['WorkflowableEntityType'] = WorkflowableEntityType