equal
deleted
inserted
replaced
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """Official API to access the content of a repository |
18 """Official API to access the content of a repository |
19 """ |
19 """ |
|
20 from warnings import warn |
20 |
21 |
21 from logilab.common.deprecation import deprecated |
22 from logilab.common.deprecation import deprecated |
22 |
23 |
23 from cubicweb.utils import parse_repo_uri |
24 from cubicweb.utils import parse_repo_uri |
24 from cubicweb import ConnectionError, ProgrammingError, AuthenticationError |
25 from cubicweb import ConnectionError, ProgrammingError, AuthenticationError |
241 def get_option_value(self, option, foreid=None): |
242 def get_option_value(self, option, foreid=None): |
242 """Return the value for `option` in the configuration. If `foreid` is |
243 """Return the value for `option` in the configuration. If `foreid` is |
243 specified, the actual repository to which this entity belongs is |
244 specified, the actual repository to which this entity belongs is |
244 dereferenced and the option value retrieved from it. |
245 dereferenced and the option value retrieved from it. |
245 """ |
246 """ |
|
247 if foreid is not None: |
|
248 warn('[3.19] foreid argument is deprecated', DeprecationWarning, |
|
249 stacklevel=2) |
246 return self._session.repo.get_option_value(option, foreid) |
250 return self._session.repo.get_option_value(option, foreid) |
247 |
251 |
248 describe = _srv_cnx_func('describe') |
252 describe = _srv_cnx_func('describe') |
249 |
253 |
250 # undo support ############################################################ |
254 # undo support ############################################################ |