-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LazyProxy can't be encoded by Flask JSONEncoder #4
Comments
Good news, bad news:
Another thing to note is that the issue doesn't seem linked to the json library installed, nor its version, nor Werkzeug version. Just upgrading from Flask==0.12.2 to Flask==1.0.2 without touching any other dependency makes it happen. ping @trubesv, FYI |
I've just made a bisect and it broke between Flask==0.12.5 and Flask==1.0. |
Hey, looks like we found a bug in Python. This works: >>> dumps(LazyProxy(dict), indent=0)
'{}' But this does not: >>> dumps(LazyProxy(dict), indent=None)
... stacktrace ...
TypeError: <lazify.LazyProxy object at 0x7f71ee8e73b8> is not JSON serializable Before 1.0, Flask used to prettify JSON by default (with Therefore, one workaround is to set |
strange, because the default value for |
@matrixise I was just adding |
yep maybe, fill your issue on b.p.o and we will check it |
I forgot to update the issue here, but: it's already in Python's bug tracker. IRC copy-pasta from months ago:
|
This test case raises:
Versions in use:
The text was updated successfully, but these errors were encountered: