openSUSE / py2pack

Generate distribution packages from PyPI
Apache License 2.0
69 stars 40 forks source link

py2pack fails with deprecated API fault #95

Closed kbabioch closed 6 years ago

kbabioch commented 6 years ago

This software no longer works:

kbabioch@aquarius /home/kbabioch/home:kbabioch/python-fido2                                                                                                                                                        
⚡ py2pack generate fido2 -f python-fido2.spec                                                                                                           
generating spec file for fido2...
Traceback (most recent call last):
  File "/usr/bin/py2pack", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/py2pack/__init__.py", line 341, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/py2pack/__init__.py", line 223, in generate
    url = newest_download_url(args)
  File "/usr/lib/python2.7/site-packages/py2pack/__init__.py", line 271, in newest_download_url
    for url in pypi.package_urls(args.name, args.version):                  # Fetch all download URLs
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1493, in parse_response
    return u.close()
  File "/usr/lib64/python2.7/xmlrpclib.py", line 800, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -32500: 'RuntimeError: This API has been deprecated. Use https://pypi.org/fido2/0.3.0/json instead. The XMLRPC method release_urls can be used in the interim, but will be deprecated in the future.'>

kbabioch@aquarius /home/kbabioch/home:kbabioch/python-fido2                                                                                                                                                        
⚡ py2pack --version
py2pack 0.8.2

References: https://bugzilla.suse.com/show_bug.cgi?id=1089613

kbabioch commented 6 years ago

There was a change of backend software, which took place a few days ago:

Details: https://pythoninsider.blogspot.de/2018/04/new-pypi-launched-legacy-pypi-shutting.html https://wiki.python.org/psf/WarehouseRoadmap

Most interestingly to us: https://pyfound.blogspot.de/2018/03/warehouse-all-new-pypi-is-now-in-beta.html#deprecations https://github.com/pypa/warehouse/issues?q=is:open+is:issue+label:APIs/feeds

JordanStopford commented 6 years ago

I've manually patched this in on my build system and can confirm it fixes the issue.

Thanks!

toabctl commented 6 years ago

https://github.com/openSUSE/py2pack/pull/96 got merged.

toabctl commented 6 years ago

Thanks!