Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flask-restplus for 
openSUSE:Factory checked in at 2021-08-16 10:11:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flask-restplus (Old)
 and      /work/SRC/openSUSE:Factory/.python-flask-restplus.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flask-restplus"

Mon Aug 16 10:11:50 2021 rev:6 rq:912199 version:0.13.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-flask-restplus/python-flask-restplus.changes  
    2020-04-25 20:35:36.894924085 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-flask-restplus.new.1899/python-flask-restplus.changes
    2021-08-16 10:17:59.350622812 +0200
@@ -1,0 +2,6 @@
+Sat Aug 14 02:31:30 UTC 2021 - Fusion Future <qydwhotm...@gmail.com>
+
+- Add 003-Import-from-flask-scaffold.patch to fix build with
+  Flask >= 2.0.0.
+
+-------------------------------------------------------------------

New:
----
  003-Import-from-flask-scaffold.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-flask-restplus.spec ++++++
--- /var/tmp/diff_new_pack.zhboZZ/_old  2021-08-16 10:17:59.950621850 +0200
+++ /var/tmp/diff_new_pack.zhboZZ/_new  2021-08-16 10:17:59.954621844 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-flask-restplus
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,8 @@
 Patch0:         pytest4.patch
 Patch1:         001-Fix-content-type-assertion-for-werkzeug-1.0.patch
 Patch2:         002-Update-cached_property-import-for-werkzeug-1.0.patch
+# PATCH-FIX-UPSTREAM 003-Import-from-flask-scaffold.patch 
https://github.com/pallets/flask/commit/9f7c602a84faa8371be4ece23e4405282d1283d2
+Patch3:         003-Import-from-flask-scaffold.patch
 BuildRequires:  %{python_module Flask >= 0.8}
 BuildRequires:  %{python_module aniso8601 >= 0.82}
 BuildRequires:  %{python_module jsonschema}
@@ -74,6 +76,8 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+# _endpoint_from_view_func moved to flask.scaffold after flask 2.0.0
+%patch3 -p1
 
 %build
 %python_build

++++++ 003-Import-from-flask-scaffold.patch ++++++
--- a/flask_restplus/api.py
+++ b/flask_restplus/api.py
@@ -16,7 +16,10 @@ from types import MethodType
 
 from flask import url_for, request, current_app
 from flask import make_response as original_flask_make_response
-from flask.helpers import _endpoint_from_view_func
+try:
+    from flask.helpers import _endpoint_from_view_func
+except ImportError:
+    from flask.scaffold import _endpoint_from_view_func
 from flask.signals import got_request_exception
 
 from jsonschema import RefResolver

Reply via email to