Comment 0 for bug 1786337

Revision history for this message
Simon Quigley (tsimonq2) wrote :

I'm looking to improve some Phabricator code for Lugito (Lubuntu's Python script which acts as a hook for commits such as IRC notifications), and I can't use diffusion.commit.search because there's no support for it yet.

>>> phab.diffusion.commit.search(constraints={"query": "a34837de8224"})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/phabricator/__init__.py", line 248, in __call__
    return self._request(**kwargs)
  File "/usr/lib/python3/dist-packages/phabricator/__init__.py", line 323, in _request
    data = self._parse_response(response)
  File "/usr/lib/python3/dist-packages/phabricator/__init__.py", line 333, in _parse_response
    raise APIError(parsed['error_code'], parsed['error_info'])
phabricator.APIError: ERR-CONDUIT-CALL: Conduit API method "commit.search" does not exist.

However, my Phabricator instance (last updated about a week ago) says this under diffusions.querycommits:

Frozen Method: This method is frozen and will eventually be deprecated. New code should use "diffusion.commit.search" instead.

A patch adding support for this is available upstream: https://github.com/disqus/python-phabricator/commit/a52c0e1357532f9ef8b26321d3728a0edead6ed4

This needs to be backported, or functionality will be lost.