Hello community,

here is the log from the commit of package python-Flask-RESTful for 
openSUSE:Factory checked in at 2020-02-10 21:53:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Flask-RESTful (Old)
 and      /work/SRC/openSUSE:Factory/.python-Flask-RESTful.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Flask-RESTful"

Mon Feb 10 21:53:22 2020 rev:5 rq:772537 version:0.3.8

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-Flask-RESTful/python-Flask-RESTful.changes    
    2019-09-16 10:52:50.179153317 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-Flask-RESTful.new.26092/python-Flask-RESTful.changes
     2020-02-10 21:53:30.398193751 +0100
@@ -1,0 +2,12 @@
+Sat Feb  8 20:59:41 UTC 2020 - Arun Persaud <a...@gmx.de>
+
+- specfile:
+  * update copyright year
+
+- update to version 0.3.8:
+  * Add Python 3.8 support (#835)
+  * Fix wrongly parsed Decimal fields (#855)
+  * Fix overridden response when calling abort with Response (#817)
+  * Various small fixes and updates to documentation
+
+-------------------------------------------------------------------

Old:
----
  Flask-RESTful-0.3.7.tar.gz

New:
----
  Flask-RESTful-0.3.8.tar.gz

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

Other differences:
------------------
++++++ python-Flask-RESTful.spec ++++++
--- /var/tmp/diff_new_pack.9QBcwf/_old  2020-02-10 21:53:30.838193995 +0100
+++ /var/tmp/diff_new_pack.9QBcwf/_new  2020-02-10 21:53:30.838193995 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Flask-RESTful
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Flask-RESTful
-Version:        0.3.7
+Version:        0.3.8
 Release:        0
 Summary:        Framework for creating REST APIs
 License:        BSD-3-Clause

++++++ Flask-RESTful-0.3.7.tar.gz -> Flask-RESTful-0.3.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/Flask_RESTful.egg-info/PKG-INFO 
new/Flask-RESTful-0.3.8/Flask_RESTful.egg-info/PKG-INFO
--- old/Flask-RESTful-0.3.7/Flask_RESTful.egg-info/PKG-INFO     2018-12-18 
14:02:12.000000000 +0100
+++ new/Flask-RESTful-0.3.8/Flask_RESTful.egg-info/PKG-INFO     2020-02-06 
14:49:36.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Flask-RESTful
-Version: 0.3.7
+Version: 0.3.8
 Summary: Simple framework for creating REST APIs
 Home-page: https://www.github.com/flask-restful/flask-restful/
 Author: Twilio API Team
@@ -16,5 +16,6 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: License :: OSI Approved :: BSD License
 Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/Makefile 
new/Flask-RESTful-0.3.8/Makefile
--- old/Flask-RESTful-0.3.7/Makefile    2018-12-18 13:49:18.000000000 +0100
+++ new/Flask-RESTful-0.3.8/Makefile    2020-02-06 14:45:04.000000000 +0100
@@ -1,10 +1,10 @@
 # Python settings
 ifndef TRAVIS
        ifndef PYTHON_MAJOR
-               PYTHON_MAJOR := 2
+               PYTHON_MAJOR := 3
        endif
        ifndef PYTHON_MINOR
-               PYTHON_MINOR := 7
+               PYTHON_MINOR := 8
        endif
        ENV := env/py$(PYTHON_MAJOR)$(PYTHON_MINOR)
 else
@@ -139,7 +139,7 @@
 test: .depends-test .clean-test
        $(NOSE) tests --with-coverage --cover-package=$(PACKAGE)
 
-test-all: test-py27 test-py34 test-py35 test-py36 test-py37
+test-all: test-py27 test-py34 test-py35 test-py36 test-py37 test-py38
 test-py27:
        PYTHON_MAJOR=2 PYTHON_MINOR=7 $(MAKE) test
 test-py34:
@@ -150,6 +150,8 @@
        PYTHON_MAJOR=3 PYTHON_MINOR=6 $(MAKE) test
 test-py37:
        PYTHON_MAJOR=3 PYTHON_MINOR=7 $(MAKE) test
+test-py38:
+       PYTHON_MAJOR=3 PYTHON_MINOR=8 $(MAKE) test
 
 .PHONY: htmlcov
 htmlcov: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/PKG-INFO 
new/Flask-RESTful-0.3.8/PKG-INFO
--- old/Flask-RESTful-0.3.7/PKG-INFO    2018-12-18 14:02:12.000000000 +0100
+++ new/Flask-RESTful-0.3.8/PKG-INFO    2020-02-06 14:49:36.111480000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Flask-RESTful
-Version: 0.3.7
+Version: 0.3.8
 Summary: Simple framework for creating REST APIs
 Home-page: https://www.github.com/flask-restful/flask-restful/
 Author: Twilio API Team
@@ -16,5 +16,6 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: License :: OSI Approved :: BSD License
 Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/docs/extending.rst 
new/Flask-RESTful-0.3.8/docs/extending.rst
--- old/Flask-RESTful-0.3.7/docs/extending.rst  2018-03-29 20:45:50.000000000 
+0200
+++ new/Flask-RESTful-0.3.8/docs/extending.rst  2020-02-06 14:42:49.000000000 
+0100
@@ -271,3 +271,5 @@
 
     app = Flask(__name__)
     api = flask_restful.Api(app, errors=errors)
+
+Note: Custom `Exceptions` must have  
:class:`~werkzeug.exceptions.HTTPException` as the base Exception.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/docs/fields.rst 
new/Flask-RESTful-0.3.8/docs/fields.rst
--- old/Flask-RESTful-0.3.7/docs/fields.rst     2017-11-01 13:46:26.000000000 
+0100
+++ new/Flask-RESTful-0.3.8/docs/fields.rst     2020-02-06 14:42:49.000000000 
+0100
@@ -153,7 +153,7 @@
 pass the ``scheme`` keyword argument::
 
     fields = {
-        'uri': fields.Url('todo_resource', absolute=True)
+        'uri': fields.Url('todo_resource', absolute=True),
         'https_uri': fields.Url('todo_resource', absolute=True, scheme='https')
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/docs/intermediate-usage.rst 
new/Flask-RESTful-0.3.8/docs/intermediate-usage.rst
--- old/Flask-RESTful-0.3.7/docs/intermediate-usage.rst 2017-04-02 
23:29:53.000000000 +0200
+++ new/Flask-RESTful-0.3.8/docs/intermediate-usage.rst 2020-02-06 
14:42:49.000000000 +0100
@@ -61,9 +61,9 @@
     app = Flask(__name__)
     api = Api(app)
 
-    api.add_resource(Foo, '/Foo', '/Foo/<str:id>')
-    api.add_resource(Bar, '/Bar', '/Bar/<str:id>')
-    api.add_resource(Baz, '/Baz', '/Baz/<str:id>')
+    api.add_resource(Foo, '/Foo', '/Foo/<string:id>')
+    api.add_resource(Bar, '/Bar', '/Bar/<string:id>')
+    api.add_resource(Baz, '/Baz', '/Baz/<string:id>')
 
 As you can imagine with a particularly large or complex API, this file ends up
 being very valuable as a comprehensive list of all the routes and resources in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/docs/testing.rst 
new/Flask-RESTful-0.3.8/docs/testing.rst
--- old/Flask-RESTful-0.3.7/docs/testing.rst    2018-12-18 13:49:18.000000000 
+0100
+++ new/Flask-RESTful-0.3.8/docs/testing.rst    2020-02-06 14:42:49.000000000 
+0100
@@ -13,7 +13,7 @@
 
     $ make test-all
 
-Individual tests can be run using using a command with the format::
+Individual tests can be run using a command with the format::
 
     nosetests <filename>:ClassName.func_name
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/flask_restful/__init__.py 
new/Flask-RESTful-0.3.8/flask_restful/__init__.py
--- old/Flask-RESTful-0.3.7/flask_restful/__init__.py   2018-12-18 
13:49:18.000000000 +0100
+++ new/Flask-RESTful-0.3.8/flask_restful/__init__.py   2020-02-06 
14:42:49.000000000 +0100
@@ -14,7 +14,10 @@
 from flask.helpers import _endpoint_from_view_func
 from types import MethodType
 import operator
-from collections import Mapping
+try:
+    from collections.abc import Mapping
+except ImportError:
+    from collections import Mapping
 
 
 __all__ = ('Api', 'Resource', 'marshal', 'marshal_with', 'marshal_with_field', 
'abort')
@@ -58,7 +61,7 @@
         to handle 404 errors throughout your app
     :param serve_challenge_on_401: Whether to serve a challenge response to
         clients on receiving 401. This usually leads to a username/password
-        popup in web browers.
+        popup in web browsers.
     :param url_part_order: A string that controls the order that the pieces
         of the url are concatenated when the full url is constructed.  'b'
         is the blueprint (or blueprint registration) prefix, 'a' is the api
@@ -287,6 +290,13 @@
 
         headers = Headers()
         if isinstance(e, HTTPException):
+            if e.response is not None:
+                # If HTTPException is initialized with a response, then return 
e.get_response().
+                # This prevents specified error response from being overridden.
+                # eg. HTTPException(response=Response("Hello World"))
+                resp = e.get_response()
+                return resp
+
             code = e.code
             default_data = {
                 'message': getattr(e, 'description', http_status_message(code))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/flask_restful/__version__.py 
new/Flask-RESTful-0.3.8/flask_restful/__version__.py
--- old/Flask-RESTful-0.3.7/flask_restful/__version__.py        2018-12-18 
13:58:51.000000000 +0100
+++ new/Flask-RESTful-0.3.8/flask_restful/__version__.py        2020-02-06 
14:47:56.000000000 +0100
@@ -1,3 +1,3 @@
 #!/usr/bin/env python
 
-__version__ = '0.3.7'
+__version__ = '0.3.8'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/flask_restful/reqparse.py 
new/Flask-RESTful-0.3.8/flask_restful/reqparse.py
--- old/Flask-RESTful-0.3.7/flask_restful/reqparse.py   2018-12-18 
13:49:18.000000000 +0100
+++ new/Flask-RESTful-0.3.8/flask_restful/reqparse.py   2020-02-06 
14:42:49.000000000 +0100
@@ -1,6 +1,9 @@
 from copy import deepcopy
 
-import collections
+try:
+    from collections.abc import MutableSequence
+except ImportError:
+    from collections import MutableSequence
 from flask import current_app, request
 from werkzeug.datastructures import MultiDict, FileStorage
 from werkzeug import exceptions
@@ -146,7 +149,7 @@
         except TypeError:
             try:
                 if self.type is decimal.Decimal:
-                    return self.type(str(value), self.name)
+                    return self.type(str(value))
                 else:
                     return self.type(value, self.name)
             except TypeError:
@@ -194,7 +197,7 @@
                     values = source.getlist(name)
                 else:
                     values = source.get(name)
-                    if not (isinstance(values, collections.MutableSequence) 
and self.action == 'append'):
+                    if not (isinstance(values, MutableSequence) and 
self.action == 'append'):
                         values = [values]
 
                 for value in values:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/flask_restful/utils/__init__.py 
new/Flask-RESTful-0.3.8/flask_restful/utils/__init__.py
--- old/Flask-RESTful-0.3.7/flask_restful/utils/__init__.py     2017-05-31 
13:48:12.000000000 +0200
+++ new/Flask-RESTful-0.3.8/flask_restful/utils/__init__.py     2020-02-06 
14:42:49.000000000 +0100
@@ -1,9 +1,9 @@
 import sys
 
 try:
-    from collections import OrderedDict
+    from collections.abc import OrderedDict
 except ImportError:
-    from ordereddict import OrderedDict
+    from collections import OrderedDict
 
 from werkzeug.http import HTTP_STATUS_CODES
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/setup.py 
new/Flask-RESTful-0.3.8/setup.py
--- old/Flask-RESTful-0.3.7/setup.py    2018-12-18 13:49:18.000000000 +0100
+++ new/Flask-RESTful-0.3.8/setup.py    2020-02-06 14:42:49.000000000 +0100
@@ -46,6 +46,7 @@
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
         'License :: OSI Approved :: BSD License',
     ],
     zip_safe=False,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/tests/test_api.py 
new/Flask-RESTful-0.3.8/tests/test_api.py
--- old/Flask-RESTful-0.3.7/tests/test_api.py   2018-12-18 13:49:18.000000000 
+0100
+++ new/Flask-RESTful-0.3.8/tests/test_api.py   2020-02-06 14:42:49.000000000 
+0100
@@ -84,15 +84,6 @@
             response = api.unauthorized(response)
         self.assertEquals(response.headers['WWW-Authenticate'], 'Basic 
realm="Foo"')
 
-    def test_handle_error_401_no_challenge_by_default(self):
-        app = Flask(__name__)
-        api = flask_restful.Api(app)
-
-        with app.test_request_context('/foo'):
-            resp = api.handle_error(Unauthorized())
-            self.assertEquals(resp.status_code, 401)
-            assert_false('WWW-Authenticate' in resp.headers)
-
     def test_handle_error_401_sends_challege_default_realm(self):
         app = Flask(__name__)
         api = flask_restful.Api(app, serve_challenge_on_401=True)
@@ -142,6 +133,24 @@
         self.assertEqual(resp_dict.get('status'), 409)
         self.assertEqual(resp_dict.get('message'), 'go away')
 
+    def test_handle_error_does_not_swallow_abort_response(self):
+
+        class HelloBombAbort(flask_restful.Resource):
+            def get(self):
+                raise HTTPException(response=flask.make_response("{}", 403))
+
+        app = Flask(__name__)
+        api = flask_restful.Api(app)
+        api.add_resource(HelloBombAbort, '/bomb')
+
+        app = app.test_client()
+        resp = app.get('/bomb')
+
+        resp_dict = json.loads(resp.data.decode())
+
+        self.assertEquals(resp.status_code, 403)
+        self.assertDictEqual(resp_dict, {})
+
     def test_marshal(self):
         fields = OrderedDict([('foo', flask_restful.fields.Raw)])
         marshal_dict = OrderedDict([('foo', 'bar'), ('bat', 'baz')])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-RESTful-0.3.7/tests/test_reqparse.py 
new/Flask-RESTful-0.3.8/tests/test_reqparse.py
--- old/Flask-RESTful-0.3.7/tests/test_reqparse.py      2018-12-18 
13:49:18.000000000 +0100
+++ new/Flask-RESTful-0.3.8/tests/test_reqparse.py      2020-02-06 
14:42:49.000000000 +0100
@@ -662,6 +662,19 @@
             args = parser.parse_args()
             self.assertEquals(args['foo'], decimal.Decimal("1.0025"))
 
+
+    def test_type_hard_decimal(self):
+        app = Flask(__name__)
+
+        parser = RequestParser()
+        parser.add_argument("foo", type=decimal.Decimal, location="json")
+
+        with app.test_request_context('/bubble', method='post',
+                                      data=json.dumps({"foo": 89.92}),
+                                      content_type='application/json'):
+            args = parser.parse_args()
+            self.assertEquals(args['foo'], decimal.Decimal("89.92"))
+
     def test_type_filestorage(self):
         app = Flask(__name__)
 


Reply via email to