From 21f90a7fcf3698bf3988d7ad384fec4de1bd3bc1 Mon Sep 17 00:00:00 2001 From: "Kyle James Walker (he/him)" Date: Wed, 23 Mar 2022 15:20:54 -0700 Subject: [PATCH 1/2] Skip static rules When using Flask 2x the send_static_file function is a lambda and crashes the extraction of the rules_by_endpoint function. There is currently a PR that has a fix but it's been stale so I'm adding this as a possible alternate fix. The other fix is: https://github.com/jmcarp/flask-apispec/pull/230 --- flask_apispec/extension.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flask_apispec/extension.py b/flask_apispec/extension.py index c1ef648..6fa4e27 100644 --- a/flask_apispec/extension.py +++ b/flask_apispec/extension.py @@ -103,6 +103,10 @@ def register_existing_resources(self): except ValueError: blueprint_name = None + # Skip static rules + if name == 'static': + continue + try: self.register(rule, blueprint=blueprint_name) except TypeError: From ac5da678bdfce8a11af492f297f7774770adb97b Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Tue, 29 Mar 2022 22:44:54 -0400 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4af3336..76086a6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Changelog --------- +0.11.1 (unreleased) +******************* + +Bug fixes: + +* Fix Flask 2.x support (:issue:`229`). Thanks :user:`KyleJamesWalker` for the PR. + + 0.11.0 (2020-10-25) *******************