summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjonathan vanasco <jonathan@2xlp.com>2019-11-04 16:59:41 -0500
committerjonathan vanasco <jonathan@2xlp.com>2019-11-05 16:51:10 -0500
commit1d2b4fd13edc972dd4076500b1ec4cb972bef1c9 (patch)
tree1ab8d633f8916a5190e33af62ca00aafacfef4ed /src
parentbbc82eac577d2e8a8758df02431cf42df3cae298 (diff)
downloadpyramid-1d2b4fd13edc972dd4076500b1ec4cb972bef1c9.tar.gz
pyramid-1d2b4fd13edc972dd4076500b1ec4cb972bef1c9.tar.bz2
pyramid-1d2b4fd13edc972dd4076500b1ec4cb972bef1c9.zip
deprecate PickleSerializer
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/session.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/pyramid/session.py b/src/pyramid/session.py
index 70ac4f55f..adfe28a39 100644
--- a/src/pyramid/session.py
+++ b/src/pyramid/session.py
@@ -44,10 +44,24 @@ def manage_changed(wrapped):
class PickleSerializer(object):
- """ A serializer that uses the pickle protocol to dump Python
- data to bytes.
+ """
+ .. deprecated:: 2.0
+
+ .. warning::
+
+ In :app:`Pyramid` 2.0 the default ``serializer`` option changed to
+ use :class:`pyramid.session.JSONSerializer`, and ``PickleSerializer`
+ has been been removed from active Pyramid code.
+
+ Pyramid will require JSON-serializable objects in :app:`Pyramid` 2.0.
+
+ Please see :ref:`pickle_session_deprecation`.
+
+ Also, please see: #2709, #3353, #3413
+
+ A serializer that uses the pickle protocol to dump Python data to bytes.
- This is the default serializer used by Pyramid.
+ This was the default serializer used by Pyramid, but has been deprecated.
``protocol`` may be specified to control the version of pickle used.
Defaults to :attr:`pickle.HIGHEST_PROTOCOL`.