[Python-modules-commits] [flask-restless] 01/01: Add patch to fix upstream tests.

Dominik George natureshadow-guest at moszumanska.debian.org
Fri Sep 16 16:41: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 7ab0d1eba6385cf1755b6bb9d67f379f717f7d61
Author: Dominik George <nik at naturalnet.de>
Date:   Fri Sep 16 18:41:22 2016 +0200

    Add patch to fix upstream tests.
---
 debian/patches/fix-tests-json-import.patch | 22 ++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 23 insertions(+)

diff --git a/debian/patches/fix-tests-json-import.patch b/debian/patches/fix-tests-json-import.patch
new file mode 100644
index 0000000..6211030
--- /dev/null
+++ b/debian/patches/fix-tests-json-import.patch
@@ -0,0 +1,22 @@
+Description: Fix the JSONEncoder derivative to use the same JSONEncoder as Flask.
+Bug- https://github.com/jfinkels/flask-restless/issues/583
+Author: Dominik George <nik at naturalnet.de>
+--- 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.
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..605cd42
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-tests-json-import.patch

-- 
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