summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt3
-rw-r--r--pyramid/compat/__init__.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ea0ac448..b8c3a847f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,9 @@ Features
- ``pyramid.testig.DummyRequest`` now has a class variable, ``query_string``,
which defaults to the empty string.
+- Add support for json on GAE by catching NotImplementedError and importing
+ simplejson from django.utils.
+
Bug Fixes
---------
diff --git a/pyramid/compat/__init__.py b/pyramid/compat/__init__.py
index 205175132..8bbf79703 100644
--- a/pyramid/compat/__init__.py
+++ b/pyramid/compat/__init__.py
@@ -133,7 +133,12 @@ except NameError: # pragma: no cover
try:
import json
except ImportError: # pragma: no cover
- import simplejson as json
+ try:
+ import simplejson as json
+ except NotImplementedError:
+ from django.utils import simplejson as json # GAE
+
+
try:
from hashlib import md5