** Description changed: + [Impact] + + Without this, users of the API will eventually be unable to search + commits in Phabricator, something that is essential to some programs. + + [Test Case] + + In the Python interactive console, first import the library: + + phab = Phabricator(host="https://phab.lubuntu.me/api/", token="API KEY") + + (for example) + + Then, with an example commit hash, run this: + + phab.diffusion.commit.search(constraints={"query": "a34837de8224"}) + + It should correctly return a result, rather than erroring out as shown + below. + + [Regression Potential] + + Very unlikely. If the interpretation of the JSON file somehow changes in + the underlying Python code, it could regress, but the more likely + scenario is that the API changes again in upstream Phabricator, which + will need another SRU to adjust. + + [Original Description] + 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']) + 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.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1786337 Title: diffusion.querycommits deprecated in favor of diffusion.commit.search which support hasn't been merged for yet To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-phabricator/+bug/1786337/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
