diff MoinMoin/support/werkzeug/contrib/testtools.py @ 5801:8de563c487be

upgrade werkzeug to 0.8.1, document current bundled version and current minimum requirement (0.6, for py 2.7 compatibility)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 01 Dec 2011 01:34:45 +0100
parents 246ba4eecab2
children 9f12f41504fc
line wrap: on
line diff
--- a/MoinMoin/support/werkzeug/contrib/testtools.py	Sat Mar 12 23:48:11 2011 +0100
+++ b/MoinMoin/support/werkzeug/contrib/testtools.py	Thu Dec 01 01:34:45 2011 +0100
@@ -9,10 +9,15 @@
         A response wrapper which adds various cached attributes for
         simplified assertions on various content types.
 
-    :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
+    :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
     :license: BSD, see LICENSE for more details.
 """
-from werkzeug import Response, cached_property, import_string
+from werkzeug.utils import cached_property, import_string
+from werkzeug.wrappers import Response
+
+from warnings import warn
+warn(DeprecationWarning('werkzeug.contrib.testtools is deprecated and '
+                        'will be removed with Werkzeug 1.0'))
 
 
 class ContentAccessors(object):
@@ -56,7 +61,7 @@
             raise AttributeError('Not a JSON response')
         try:
             from simplejson import loads
-        except:
+        except ImportError:
             from json import loads
         return loads(self.data)
     json = cached_property(json)