From 62053261faf390d3c0e664d880584e062e1d7187 Mon Sep 17 00:00:00 2001 From: František Zatloukal Date: Jan 23 2020 12:05:10 +0000 Subject: Backport fix for flask >= 1.0 from upstream repo --- 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 new file mode 100644 index 0000000..c0f9619 --- /dev/null +++ b/0001-Make-flask_fas_openid-compatible-with-flask-1.0.patch @@ -0,0 +1,25 @@ +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/python-fedora-0.10.0/flask_fas_openid.py b/python-fedora-0.10.0/flask_fas_openid.py +index 074b5de..3e3f6f7 100644 +--- a/python-fedora-0.10.0/flask_fas_openid.py ++++ b/python-fedora-0.10.0/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/python-fedora.spec b/python-fedora.spec index 8ce5ec3..e36081a 100644 --- a/python-fedora.spec +++ b/python-fedora.spec @@ -15,7 +15,7 @@ and FAS2.\ Name: python-fedora Version: 0.10.0 -Release: 11%{?dist} +Release: 12%{?dist} BuildArch: noarch License: LGPLv2+ @@ -23,6 +23,8 @@ 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 + %if 0%{?with_python2} BuildRequires: python-lockfile BuildRequires: python-munch @@ -187,7 +189,7 @@ Account System. %endif %prep -%autosetup -c -n %{name}-%{version} +%autosetup -c -p1 -n %{name}-%{version} mv %{name}-%{version} python2 # no more python2-fedora-turbogears2 (#1634646) @@ -324,6 +326,9 @@ popd %endif %changelog +* Tue Jan 21 2020 Frantisek Zatloukal - 0.10.0-12 +- Backport https://github.com/fedora-infra/python-fedora/commit/4719f10b3af1cf068e969387eab7df7e935003cd + * Tue Sep 3 2019 Zbigniew Jędrzejewski-Szmek - 0.10.0-11 - Drop python2 subpackages: python2-fedora, python2-fedora-flask (#1748242)