You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently JSONEncoder is used here in flasgger, leading to this import error:
my_api/__init__.py:9: in <module>
from flasgger import Swagger
/usr/local/lib/python3.10/site-packages/flasgger/__init__.py:10: in <module>
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
/usr/local/lib/python3.10/site-packages/flasgger/base.py:28: in <module>
from flask.json import JSONEncoder
E ImportError: cannot import name 'JSONEncoder' from 'flask.json' (/usr/local/lib/python3.10/site-packages/flask/json/__init__.py)
I think the fix would be to port the serialization behavior to JSONProvider.
The relase notes for flask 2.3 contain this:
There is some more information in the docs for 2.2 about
JSONEncoder
.Currently
JSONEncoder
is used here in flasgger, leading to this import error:I think the fix would be to port the serialization behavior to JSONProvider.
There is some information in the PR that introduced JSONProvider about why they changed this.
The text was updated successfully, but these errors were encountered: