equal
deleted
inserted
replaced
56 .. autoclass:: cubicweb.dataimport.stores.RQLObjectStore |
56 .. autoclass:: cubicweb.dataimport.stores.RQLObjectStore |
57 .. autoclass:: cubicweb.dataimport.stores.NoHookRQLObjectStore |
57 .. autoclass:: cubicweb.dataimport.stores.NoHookRQLObjectStore |
58 .. autoclass:: cubicweb.dataimport.stores.MetadataGenerator |
58 .. autoclass:: cubicweb.dataimport.stores.MetadataGenerator |
59 """ |
59 """ |
60 import inspect |
60 import inspect |
61 import warnings |
|
62 from datetime import datetime |
61 from datetime import datetime |
63 from copy import copy |
62 from copy import copy |
64 from itertools import count |
63 from itertools import count |
65 |
64 |
66 from six import add_metaclass |
65 from six import add_metaclass |
113 |
112 |
114 class RQLObjectStore(NullStore): |
113 class RQLObjectStore(NullStore): |
115 """Store that works by making RQL queries, hence with all the cubicweb's machinery activated. |
114 """Store that works by making RQL queries, hence with all the cubicweb's machinery activated. |
116 """ |
115 """ |
117 |
116 |
118 def __init__(self, cnx, commit=None): |
117 def __init__(self, cnx): |
119 if commit is not None: |
|
120 warnings.warn('[3.19] commit argument should not be specified ' |
|
121 'as the cnx object already provides it.', |
|
122 DeprecationWarning, stacklevel=2) |
|
123 self._cnx = cnx |
118 self._cnx = cnx |
124 self._commit = commit or cnx.commit |
119 self._commit = cnx.commit |
125 # XXX 3.21 deprecated attributes |
120 # XXX 3.21 deprecated attributes |
126 self.eids = {} |
121 self.eids = {} |
127 self.types = {} |
122 self.types = {} |
128 |
123 |
129 def rql(self, *args): |
124 def rql(self, *args): |