##// END OF EJS Templates
don't ensure_ascii in JSON messages in Session
MinRK -
Show More
@@ -6,23 +6,10 b' Also defined here are utilities for working with Sessions:'
6 * A SessionFactory to be used as a base class for configurables that work with
6 * A SessionFactory to be used as a base class for configurables that work with
7 Sessions.
7 Sessions.
8 * A Message object for convenience that allows attribute-access to the msg dict.
8 * A Message object for convenience that allows attribute-access to the msg dict.
9
10 Authors:
11
12 * Min RK
13 * Brian Granger
14 * Fernando Perez
15 """
9 """
16 #-----------------------------------------------------------------------------
17 # Copyright (C) 2010-2011 The IPython Development Team
18 #
19 # Distributed under the terms of the BSD License. The full license is in
20 # the file COPYING, distributed as part of this software.
21 #-----------------------------------------------------------------------------
22
10
23 #-----------------------------------------------------------------------------
11 # Copyright (c) IPython Development Team.
24 # Imports
12 # Distributed under the terms of the Modified BSD License.
25 #-----------------------------------------------------------------------------
26
13
27 import hashlib
14 import hashlib
28 import hmac
15 import hmac
@@ -80,7 +67,7 b' def squash_unicode(obj):'
80 #-----------------------------------------------------------------------------
67 #-----------------------------------------------------------------------------
81
68
82 # ISO8601-ify datetime objects
69 # ISO8601-ify datetime objects
83 json_packer = lambda obj: jsonapi.dumps(obj, default=date_default)
70 json_packer = lambda obj: jsonapi.dumps(obj, default=date_default, ensure_ascii=False)
84 json_unpacker = lambda s: jsonapi.loads(s)
71 json_unpacker = lambda s: jsonapi.loads(s)
85
72
86 pickle_packer = lambda o: pickle.dumps(squash_dates(o),-1)
73 pickle_packer = lambda o: pickle.dumps(squash_dates(o),-1)
General Comments 0
You need to be logged in to leave comments. Login now