Repository navigation
Renderer classes - #1092
Renderer classes#1092mpuhacz wants to merge 9 commits into
Conversation
|
Hello, this is an interesting work, I like where you are heading. One concern of mine is backward compatibility. People who have Are you planning to address this? Or are you just counting on breakage warning in release notes instead? |
|
Good point. Both ways have their pros and cons, but I would go for breakage warning (or even throwing |
|
I was going to suggest we issued deprecation warnings, but I see you went ahead and added the implementation already, excellent. |
|
Please, go ahead with documentation updates. |
|
@nicolaiarocci The docs are updated - hopefully I didn't miss anything. 😃 |
|
Rebased and merged: 80ded9d Thank you! |
* upstream/master: (28 commits) Changelog for pyeve#1114 and pyeve#1115. docs: Use correct name for form-data mime type Olof Johansson docs: Refer to example resources (contacts) consistently kreynen Fixed typo Bump Flask requirement to <=0.13 Fix broken links in documentation/configuration page. Bump version to 0.7.8 Fix breaking syntax error in v0.7.7 Bump version to 0.7.7 Add $geometry and $maxDistance to mongo operators Changelog for pyeve#1092 Updated authors Updated docs Updated docstrings Checking for deprecated features proposal - typo fix Checking for deprecated features proposal PEP8 compliance Updated py2.6 dependencies ...
Hello,
Recently I was working on API which handles a lot of float values in responses. One of the issues I encountered was having NaN values unquoted in the JSON response.
simplejsonallows changing those NaNs to null values in the fly using theignore_nan=Trueargument. Eve has already this nice feature that allows using customapp.data.json_encoder_classbut even if the custom JSON encoder class has ignore_nan set toTrue, that is still ignored and falls back to the default value which isFalse.My idea is to have new key in the settings called
RENDERERS. This is a tuple containing module path to Renderer classes. This way developer is allowed to simply extend the default Eve's functionality to new renderers. For example - using ujson, pyYaml.This change is rather big, so I would love to get your feedback on this. If you feel like it's a good idea, I will continue working on it, updating docs and extending docstrings.
Best,
Marcin