Change: use redash.utils.json_dumps instead of json.dumps in Python query runner#1419
Merged
arikfr merged 1 commit intogetredash:masterfrom Nov 22, 2016
ehfeng:master
Merged
Change: use redash.utils.json_dumps instead of json.dumps in Python query runner#1419arikfr merged 1 commit intogetredash:masterfrom ehfeng:master
arikfr merged 1 commit intogetredash:masterfrom
ehfeng:master
Conversation
Currently, python runner is returning datetime objects as unicode strings. `redash.utils.json_dumps` returns them as native python datetime objects.
Contributor
Author
|
Still figuring out how to set this up locally, so I made this change blind, based on our gitter discussion. |
Member
|
Ping me on the chat if you want a walkthrough of the setup. |
Contributor
Author
|
@arikfr realized this changes behavior—for hosted redash, it may be worth messaging your users, in case their old queries break. |
Member
|
It's only an extension of the previous behavior - the data types But anyway we don't have the Python query runner enabled in the hosted version, as it's a security risk. While it runs in a sandbox, I quite easily managed to by pass it. And I'm not some hacker... Thanks for the concern though :) |
Contributor
Author
|
Dang, lucky. Breaking changes and migrations are always a pain :P |
Member
|
True that 😱 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, python runner is returning datetime objects as unicode strings.
redash.utils.json_dumpsreturns them as native python datetime objects.