From 19554ba4a13f7e75ad5b4b338f8dbb80f9b9e50c Mon Sep 17 00:00:00 2001 From: Jimmy Date: Wed, 2 May 2018 20:51:02 +1200 Subject: [PATCH] Update PyPI api URL. Flask 1.0 is out, pip made breaking changes, warehouse is a thing, new requests soon. So much fun in python world lately. --- qutebrowser/misc/autoupdate.py | 2 +- tests/unit/misc/test_autoupdate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/misc/autoupdate.py b/qutebrowser/misc/autoupdate.py index d056d61b6..d223bd366 100644 --- a/qutebrowser/misc/autoupdate.py +++ b/qutebrowser/misc/autoupdate.py @@ -45,7 +45,7 @@ class PyPIVersionClient(QObject): arg: The error message, as string. """ - API_URL = 'https://pypi.python.org/pypi/{}/json' + API_URL = 'https://pypi.org/pypi/{}/json' success = pyqtSignal(str) error = pyqtSignal(str) diff --git a/tests/unit/misc/test_autoupdate.py b/tests/unit/misc/test_autoupdate.py index 4f5a9dc0e..d4a69a115 100644 --- a/tests/unit/misc/test_autoupdate.py +++ b/tests/unit/misc/test_autoupdate.py @@ -67,7 +67,7 @@ def test_get_version_success(qtbot): with qtbot.waitSignal(client.success): client.get_version('test') - assert http_stub.url == QUrl('https://pypi.python.org/pypi/test/json') + assert http_stub.url == QUrl(client.API_URL.format('test')) def test_get_version_error(qtbot):