Code

Ticket #21404: 21404.diff

File 21404.diff, 1.4 KB (added by timo, 5 months ago)
Line 
1diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
2index c72f1fb..ca0b00b 100644
3--- a/docs/releases/1.6.txt
4+++ b/docs/releases/1.6.txt
5@@ -807,10 +807,18 @@ For backwards compatibility, this setting defaulted to using :mod:`pickle`
6 in Django 1.5.3, but we've changed the default to JSON in 1.6. If you upgrade
7 and switch from pickle to JSON, sessions created before the upgrade will be
8 lost. While JSON serialization does not support all Python objects like
9-:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Also,
10-as JSON requires string keys, you will likely run into problems if you are
11-using non-string keys in ``request.session``. See the
12-:ref:`session_serialization` documentation for more details.
13+:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Be
14+aware of the following when checking your code to determine if JSON
15+serialization will work for your application:
16+
17+* JSON requires string keys, so you will likely run into problems if you are
18+  using non-string keys in ``request.session``.
19+* Setting session expiration by passing ``datetime`` values to
20+  :meth:`~django.contrib.sessions.backends.base.SessionBase.set_expiry` will
21+  not work as ``datetime`` values are not serializable in JSON. You can use
22+  integer values instead.
23+
24+See the :ref:`session_serialization` documentation for more details.
25 
26 Object Relational Mapper changes
27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~