From a4b8eb75d49c11866a55f6a5c76a0e9389ba507a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sep 27 2020 23:04:27 +0000 Subject: Update to 1.0.0. Fixes #1796367 --- diff --git a/.gitignore b/.gitignore index 2a8d93a..003cda7 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /python-fedora-0.8.0.tar.gz /python-fedora-0.9.0.tar.gz /python-fedora-0.10.0.tar.gz +/1.0.0.tar.gz diff --git a/0001-Make-flask_fas_openid-compatible-with-flask-1.0.patch b/0001-Make-flask_fas_openid-compatible-with-flask-1.0.patch deleted file mode 100644 index fa82b94..0000000 --- a/0001-Make-flask_fas_openid-compatible-with-flask-1.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4719f10b3af1cf068e969387eab7df7e935003cd Mon Sep 17 00:00:00 2001 -From: Amitosh Swain Mahapatra -Date: Mon, 16 Jul 2018 20:39:36 +0530 -Subject: [PATCH] Make flask_fas_openid compatible with flask >= 1.0 - ---- - flask_fas_openid.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/flask_fas_openid.py b/flask_fas_openid.py -index 074b5de..3e3f6f7 100644 ---- a/flask_fas_openid.py -+++ b/flask_fas_openid.py -@@ -112,7 +112,7 @@ class FAS(object): - # of old versions used sane version numbers. - assume_recent = True - -- if assume_recent or (major >= 0 and minor >= 10): -+ if assume_recent or (major > 0 or minor >= 10): - self.app.json_encoder = FASJSONEncoder - - @app.route('/_flask_fas_openid_handler/', methods=['GET', 'POST']) --- -2.24.1 - diff --git a/0002-The-encoding-arg-of-json.loads-is-ignored-and-deprecated.patch b/0002-The-encoding-arg-of-json.loads-is-ignored-and-deprecated.patch deleted file mode 100644 index 16d12ca..0000000 --- a/0002-The-encoding-arg-of-json.loads-is-ignored-and-deprecated.patch +++ /dev/null @@ -1,52 +0,0 @@ -From ba67c3487990edc66f1f48d689e32a0992bd2f15 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= -Date: Tue, 31 Jul 2018 14:40:28 +0200 -Subject: [PATCH] The encoding arg of json.loads() is ignored and deprecated - ---- - fedora/client/openidbaseclient.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fedora/client/openidbaseclient.py b/fedora/client/openidbaseclient.py -index 22346dc..08374be 100644 ---- a/fedora/client/openidbaseclient.py -+++ b/fedora/client/openidbaseclient.py -@@ -330,7 +330,7 @@ class OpenIdBaseClient(OpenIdProxyClient): - try: - with self.cache_lock: - with open(b_SESSION_FILE, 'rb') as f: -- data = json.loads(f.read(), encoding='utf-8') -+ data = json.loads(f.read().decode('utf-8')) - for key, value in data[self.session_key]: - self._session.cookies[key] = value - except KeyError: --- -2.26.2 - -From e14c2b163a3601e1c362b0c22daae0ce35bcf4b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Sat, 9 May 2020 12:53:44 +0200 -Subject: [PATCH] The encoding arg of json.loads() is ignored and deprecated - (fixup) - -Fixup of ba67c3487990edc66f1f48d689e32a0992bd2f15 ---- - fedora/client/openidbaseclient.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fedora/client/openidbaseclient.py b/fedora/client/openidbaseclient.py -index 08374be..263b437 100644 ---- a/fedora/client/openidbaseclient.py -+++ b/fedora/client/openidbaseclient.py -@@ -351,7 +351,7 @@ class OpenIdBaseClient(OpenIdProxyClient): - try: - check_file_permissions(b_SESSION_FILE, True) - with open(b_SESSION_FILE, 'rb') as f: -- data = json.loads(f.read(), encoding='utf-8') -+ data = json.loads(f.read().decode('utf-8')) - except UnsafeFileError as e: - log.debug('Clearing sessions: {}'.format(str(e))) - os.unlink(b_SESSION_FILE) --- -2.26.2 - diff --git a/python-fedora.spec b/python-fedora.spec index 7738e11..35bad6e 100644 --- a/python-fedora.spec +++ b/python-fedora.spec @@ -14,19 +14,14 @@ and FAS2.\ Name: python-fedora -Version: 0.10.0 -Release: 15%{?dist} +Version: 1.0.0 +Release: 1%{?dist} BuildArch: noarch License: LGPLv2+ Summary: Python modules for talking to Fedora Infrastructure Services URL: https://github.com/fedora-infra/python-fedora -Source0: https://github.com/fedora-infra/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz - -Patch01: 0001-Make-flask_fas_openid-compatible-with-flask-1.0.patch - -# https://github.com/fedora-infra/python-fedora/pull/226 -Patch02: 0002-The-encoding-arg-of-json.loads-is-ignored-and-deprecated.patch +Source0: https://github.com/fedora-infra/%{name}/archive/%{version}.tar.gz %if 0%{?with_python2} BuildRequires: python-lockfile @@ -198,10 +193,6 @@ pushd %{name}-%{version} popd mv %{name}-%{version} python2 -# no more python2-fedora-turbogears2 (#1634646) -rm -r python2/fedora/wsgi -rm -r python2/fedora/tg2 - # https://bugzilla.redhat.com/show_bug.cgi?id=1329549 grep "PO-Revision-Date: \\\\n" python2/translations/*.po -l | xargs rm -f @@ -332,6 +323,9 @@ popd %endif %changelog +* Sun Sep 27 2020 Kevin Fenzi - 1.0.0-1 +- Update to 1.0.0. Fixes #1796367 + * Wed Jul 29 2020 Fedora Release Engineering - 0.10.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index fa2acb4..2d611de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-fedora-0.10.0.tar.gz) = 850d7181af3835a7933bee006207e1decb7fc2c7148ab24aed052db3f2415007f9fd4817f9ee56b2839c98c4253c5394f1726f6ed64b6cfb12f251280cf86ab1 +SHA512 (1.0.0.tar.gz) = b317b62ec839bf078a3435c8c7d567cb1f85b73728f273c3399ddff82427783a8a56147221045c9aa37830d19b6866be41ccff69bf27953c945192c18c060ce9