summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-07-27 21:20:15 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-07-27 21:20:15 (GMT)
commitf1046ca8173380e2c320c56e1cdc911493371057 (patch)
treec3eabb51cc16a958e1fd1ca6700036d8b365d48b /Doc
parent4bf70686fab91dcc5603c11c36f77bd2131ff6ed (diff)
downloadcpython-f1046ca8173380e2c320c56e1cdc911493371057.zip
cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.gz
cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.bz2
Issue #4770: Restrict binascii module to accept only bytes (as specified).
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/binascii.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst
index 2f7851a..a34c843 100644
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -18,6 +18,11 @@ use these functions directly but use wrapper modules like :mod:`uu`,
low-level functions written in C for greater speed that are used by the
higher-level modules.
+.. note::
+
+ Encoding and decoding functions do not accept Unicode strings. Only bytestring
+ and bytearray objects can be processed.
+
The :mod:`binascii` module defines the following functions:
@@ -54,6 +59,9 @@ The :mod:`binascii` module defines the following functions:
data. More than one line may be passed at a time. If the optional argument
*header* is present and true, underscores will be decoded as spaces.
+ .. versionchanged:: 3.2
+ accept only bytestring or bytearray object as input.
+
.. function:: b2a_qp(data, quotetabs=False, istext=True, header=False)
@@ -83,6 +91,9 @@ The :mod:`binascii` module defines the following functions:
decompressed data, unless data input data ends in an orphaned repeat indicator,
in which case the :exc:`Incomplete` exception is raised.
+ .. versionchanged:: 3.2
+ accept only bytestring or bytearray object as input.
+
.. function:: rlecode_hqx(data)
@@ -139,6 +150,9 @@ The :mod:`binascii` module defines the following functions:
of hexadecimal digits (which can be upper or lower case), otherwise a
:exc:`TypeError` is raised.
+ .. versionchanged:: 3.2
+ accept only bytestring or bytearray object as input.
+
.. exception:: Error
@@ -164,4 +178,3 @@ The :mod:`binascii` module defines the following functions:
Module :mod:`quopri`
Support for quoted-printable encoding used in MIME email messages.
-