File fix-api-package-urls.patch of Package python-py2pack.8003
From d6c8e1e6434a063da50d4879e9e58ed1c8d99292 Mon Sep 17 00:00:00 2001
From: Karol Babioch <kbabioch@suse.de>
Date: Tue, 17 Apr 2018 11:10:24 +0200
Subject: [PATCH] Use release_urls() XMLRPC method for the time being
This replaces the `package_urls()` XMLRPC method by the `release_urls()`
method, since the former was deprecated and no longer works. Invoking the
endpoint results in an error:
This API has been deprecated. Use https://pypi.org/xxx/yyy/json instead.
The XMLRPC method release_urls can be used in the interim, but will be
deprecated in the future.
This addresses issue #95. However, this is only a quick-fix, since the
`package_urls()` method will also be deprecated in the future.
---
py2pack/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: py2pack-0.6.3/py2pack/__init__.py
===================================================================
--- py2pack-0.6.3.orig/py2pack/__init__.py
+++ py2pack-0.6.3/py2pack/__init__.py
@@ -232,7 +232,7 @@ def check_or_set_version(args):
def newest_download_url(args):
- for url in pypi.package_urls(args.name, args.version): # Fetch all download URLs
+ for url in pypi.release_urls(args.name, args.version): # Fetch all download URLs
if url['packagetype'] == 'sdist': # Found the source URL we care for
return url
# No PyPI tarball release, let's see if an upstream download URL is provided: