equal
deleted
inserted
replaced
59 """ |
59 """ |
60 import inspect |
60 import inspect |
61 from datetime import datetime |
61 from datetime import datetime |
62 from copy import copy |
62 from copy import copy |
63 from itertools import count |
63 from itertools import count |
64 |
|
65 from six import add_metaclass |
|
66 |
64 |
67 import pytz |
65 import pytz |
68 |
66 |
69 from logilab.common.decorators import cached |
67 from logilab.common.decorators import cached |
70 from logilab.common.deprecation import class_deprecated |
68 from logilab.common.deprecation import class_deprecated |
360 self._mdgen.init_entity_attrs(entity.cw_etype, entity.eid, attrs) |
358 self._mdgen.init_entity_attrs(entity.cw_etype, entity.eid, attrs) |
361 entity.cw_edited.update(attrs, skipsec=False) |
359 entity.cw_edited.update(attrs, skipsec=False) |
362 return self._mdgen.source |
360 return self._mdgen.source |
363 |
361 |
364 |
362 |
365 @add_metaclass(class_deprecated) |
363 class MetaGenerator(object, metaclass=class_deprecated): |
366 class MetaGenerator(object): |
|
367 """Class responsible for generating standard metadata for imported entities. You may want to |
364 """Class responsible for generating standard metadata for imported entities. You may want to |
368 derive it to add application specific's metadata. |
365 derive it to add application specific's metadata. |
369 |
366 |
370 Parameters: |
367 Parameters: |
371 * `cnx`: connection to the repository |
368 * `cnx`: connection to the repository |