urlgrabber is not available on Windows machines; urllib3 is MIT licensed so can
safely be bundled.
Details
Details
- Reviewers
ikostia - Group Reviewers
Restricted Project - Commits
- rFBHGX9e01e91c5dd8: phabricator: use urllib3 to handle conduit HTTP
Run the tests, run hg ssl against a repository with valid arcanist config.
Diff Detail
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Comment Actions
I would suggest separating these concerns:
- making conduit API dependent on urllib3
- adding urllib3 to the repo
The reasons are:
- most platforms (including windows without a custom-built python) have better ways of resolving a urllib3 dependency
- for FB, we usually put checked-in libs in the parent repo, facebook-hg-rpms
phabricator/conduit.py | ||
---|---|---|
73–74 | This comment need to be removed/changed as well. |
Comment Actions
Also, just applying this patch and building a Windows version does not work: the build is successful, but ssl output shows "Error" in place of a phabricator status.
Comment Actions
Can you share the traceback? You can disable the try...except urllib3.exceptions.HTTPError handling to see it. Perhaps we need to distribute certificates to Windows.
Comment Actions
It is failing to decode JSON, since the response.data seems to be an HTML piece.
Here's the tail of the traceback:
File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\hgext3rd\phabstatus.py", line 140, in showphabstatus populateresponseforphab(repo, diffnum) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\hgext3rd\phabstatus.py", line 129, in populateresponseforphab getdiffstatus(repo, *okdiffnumbers) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\hgext3rd\phabstatus.py", line 50, in helper u = f(*args) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\hgext3rd\phabstatus.py", line 78, in getdiffstatus timeout=timeout) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\phabricator\conduit.py", line 183, in call_conduit return client.call(method, args, timeout=timeout) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\site-packages\phabricator\conduit.py", line 94, in call response = json.loads(response.data) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\json\__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Code\fb-hg-rpms2\build\hg\hg-python\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
This comment need to be removed/changed as well.