Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed #21404 -- Added session.set_expiry() note to 1.6 releas…

…e notes.

Thanks pwr for the suggestion.

Backport of ffdae5b from master
  • Loading branch information...
commit a776e3f42088a5a82bd0ec9c5353981a1a23e10c 1 parent e85baa8
Tim Graham authored November 18, 2013

Showing 1 changed file with 12 additions and 4 deletions. Show diff stats Hide diff stats

  1. 16  docs/releases/1.6.txt
16  docs/releases/1.6.txt
@@ -807,10 +807,18 @@ For backwards compatibility, this setting defaulted to using :mod:`pickle`
807 807
 in Django 1.5.3, but we've changed the default to JSON in 1.6. If you upgrade
808 808
 and switch from pickle to JSON, sessions created before the upgrade will be
809 809
 lost. While JSON serialization does not support all Python objects like
810  
-:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Also,
811  
-as JSON requires string keys, you will likely run into problems if you are
812  
-using non-string keys in ``request.session``. See the
813  
-:ref:`session_serialization` documentation for more details.
  810
+:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Be
  811
+aware of the following when checking your code to determine if JSON
  812
+serialization will work for your application:
  813
+
  814
+* JSON requires string keys, so you will likely run into problems if you are
  815
+  using non-string keys in ``request.session``.
  816
+* Setting session expiration by passing ``datetime`` values to
  817
+  :meth:`~django.contrib.sessions.backends.base.SessionBase.set_expiry` will
  818
+  not work as ``datetime`` values are not serializable in JSON. You can use
  819
+  integer values instead.
  820
+
  821
+See the :ref:`session_serialization` documentation for more details.
814 822
 
815 823
 Object Relational Mapper changes
816 824
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 notes on commit a776e3f

Please sign in to comment.
Something went wrong with that request. Please try again.