astraw / stdeb

produce Debian packages from Python packages
https://pypi.python.org/pypi/stdeb
MIT License
493 stars 102 forks source link

PyPI XML-RPC API that `pypi-download` uses has been removed #194

Open WilliamDEdwards opened 1 year ago

WilliamDEdwards commented 1 year ago

pypi-download now fails with the following error. I ran it successfully on June 26.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/stdeb/transport.py", line 62, in request
    resp.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org//RPC2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/bin/pypi-download", line 35, in <module>
    main()
  File "/usr/bin/pypi-download", line 27, in main
    tarball_fname = get_source_tarball(
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/downloader.py", line 109, in get_source_tarball
    download_url, expected_md5_digest = find_tar_gz(package_name,
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/downloader.py", line 39, in find_tar_gz
    all_releases = _call(pypi.package_releases, package_name, show_hidden)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/downloader.py", line 89, in _call
    return callable_(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/transport.py", line 64, in request
    raise xmlrpc.ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for https://pypi.org//RPC2: 404 404 Client Error: Not Found for url: https://pypi.org//RPC2>

The PyPI API documentation at https://warehouse.pypa.io/api-reference/xml-rpc.html says:

The XML-RPC API will be deprecated in the future. [...] Users of this API are strongly encouraged to subscribe to the pypi-announce mailing list for notices as we begin the process of removing XML-RPC from PyPI.

The pypi-announce mailing list is empty though.

nuclearsandwich commented 2 months ago

This was resolved by #201 and will be included in the 0.10.1 release.