[Python-modules-commits] [flask-restless] 01/02: Fix the JSONEncoder derivative to use the same JSONEncoder as Flask.
Dominik George
natureshadow-guest at moszumanska.debian.org
Thu Sep 29 11:34:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
natureshadow-guest pushed a commit to branch master
in repository flask-restless.
commit c5a40b202729044dd56633333fb4e51e67ae185a
Author: Dominik George <nik at naturalnet.de>
Date: Thu Sep 29 13:23:32 2016 +0200
Fix the JSONEncoder derivative to use the same JSONEncoder as Flask.
Bug- https://github.com/jfinkels/flask-restless/issues/583
---
tests/helpers.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/helpers.py b/tests/helpers.py
index b445161..0f86271 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -15,7 +15,6 @@ from datetime import datetime
from datetime import time
from datetime import timedelta
from functools import wraps
-from json import JSONEncoder
import sys
import types
import uuid
@@ -256,7 +255,7 @@ class GUID(TypeDecorator):
# serializable by default so we need to create a custom JSON encoder class.
#
# TODO When Flask 1.0 is required, remove this.
-class BetterJSONEncoder(JSONEncoder):
+class BetterJSONEncoder(json.JSONEncoder):
"""Extends the default JSON encoder to serialize objects from the
:mod:`datetime` module.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/flask-restless.git
More information about the Python-modules-commits
mailing list