[Distutils] Warehouse XMLRPC
Marius Gedminas
marius at pov.lt
Fri Mar 7 13:45:24 CET 2014
On Fri, Mar 07, 2014 at 01:03:23AM -0500, Donald Stufft wrote:
> The JSON API is functional again and is available for testing!
Excellent!
I can observe two differences with the current PyPI code:
First, the Content-Type of the response differs:
$ curl -sI https://pypi.python.org/pypi/setuptools/json | grep Content-Type
Content-Type: application/json; charset="UTF-8"
$ curl -sI https://pypi-preview.a.ssl.fastly.net/pypi/setuptools/json | grep Content-Type
Content-Type: application/json
(I don't know which is correct, or whether the difference actually
matters.)
Second, the current PyPI codebase returns absolute URLs, while Warehouse
returns paths relative to the site root:
$ curl -s https://pypi.python.org/pypi/setuptools/json | grep '"url":'
"url": "https://pypi.python.org/packages/3.4/s/setuptools/setuptools-2.2-py2.py3-none-any.whl",
"url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-2.2.tar.gz",
$ curl -s https://pypi-preview.a.ssl.fastly.net/pypi/setuptools/json | python -m json.tool | grep '"url":'
"url": "/packages/3.4/s/setuptools/setuptools-2.2-py2.py3-none-any.whl"
"url": "/packages/source/s/setuptools/setuptools-2.2.tar.gz"
I can adapt my script to cope.
Marius Gedminas
--
Key emulation:
[ ] Intuitive
[*] Emacs (Seen in an MCEdit dialog)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140307/a7c50482/attachment.sig>
More information about the Distutils-SIG
mailing list