equal
deleted
inserted
replaced
20 SchemaLoader) |
20 SchemaLoader) |
21 |
21 |
22 from rql import parse, nodes, RQLSyntaxError, TypeResolverException |
22 from rql import parse, nodes, RQLSyntaxError, TypeResolverException |
23 |
23 |
24 from cubicweb import ETYPE_NAME_MAP, ValidationError, Unauthorized |
24 from cubicweb import ETYPE_NAME_MAP, ValidationError, Unauthorized |
|
25 from cubicweb import set_log_methods |
25 |
26 |
26 # XXX <3.2 bw compat |
27 # XXX <3.2 bw compat |
27 from yams import schema |
28 from yams import schema |
28 schema.use_py_datetime() |
29 schema.use_py_datetime() |
29 nodes.use_py_datetime() |
30 nodes.use_py_datetime() |
979 |
980 |
980 format_constraint = FormatConstraint() |
981 format_constraint = FormatConstraint() |
981 CONSTRAINTS['FormatConstraint'] = FormatConstraint |
982 CONSTRAINTS['FormatConstraint'] = FormatConstraint |
982 PyFileReader.context['format_constraint'] = format_constraint |
983 PyFileReader.context['format_constraint'] = format_constraint |
983 |
984 |
984 from logging import getLogger |
|
985 from cubicweb import set_log_methods |
|
986 set_log_methods(CubicWebSchemaLoader, getLogger('cubicweb.schemaloader')) |
985 set_log_methods(CubicWebSchemaLoader, getLogger('cubicweb.schemaloader')) |
987 set_log_methods(BootstrapSchemaLoader, getLogger('cubicweb.bootstrapschemaloader')) |
986 set_log_methods(BootstrapSchemaLoader, getLogger('cubicweb.bootstrapschemaloader')) |
988 set_log_methods(RQLExpression, getLogger('cubicweb.schema')) |
987 set_log_methods(RQLExpression, getLogger('cubicweb.schema')) |
989 |
988 |
990 # XXX monkey patch PyFileReader.import_erschema until bw_normalize_etype is |
989 # XXX monkey patch PyFileReader.import_erschema until bw_normalize_etype is |