summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2013-05-22 02:06:01 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2013-05-22 02:06:01 +0100
commit6185966b1b5bff7b2d09af705e5637bc95126958 (patch)
treef71dd8f61d5d9194da2534213d97bf3ffa84f04b /docs
parent5a15d437122cd6b980b74b8a05cbd32753a4d4c3 (diff)
downloaditsdangerous-6185966b1b5bff7b2d09af705e5637bc95126958.tar.gz
Fundamentally changed unicode/byte dumping behavior for Python 3
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 9309211..986e75b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -231,11 +231,14 @@ signature was correct.
Python 3 Notes
--------------
-On Python 3 the return serialized versions are represented as bytes.
-However in many cases (for instance when using the URL safe serializers)
-the data fits into ASCII so it can trivially be converted into unicode
-strings by adding an ``.encode('ascii')``. It also assumes that custom
-serializers operate on bytes as well.
+On Python 3 the interface that itsdangerous provides can be confusing at
+first. Depending on the internal serializer it wraps the return value of
+the functions can alter between unicode strings or bytes objects. The
+internal signer is always byte based.
+
+This is done to allow the module to operate on different serializers
+independent of how they are implemented. The module decides on the
+type of the serializer by doing a test serialization of an empty object.
.. include:: ../CHANGES