summaryrefslogtreecommitdiffstats
path: root/Lib/email/__init__.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2006-07-17 23:07:51 (GMT)
committerBarry Warsaw <barry@python.org>2006-07-17 23:07:51 (GMT)
commit18d2f39af71608162b28fe1f41aa3e76efd83410 (patch)
treea60572e1b4f8cb549c2d1f1a467dc181695e3334 /Lib/email/__init__.py
parenta2f60a47b5e5138f8a7c46226183f372174166c9 (diff)
downloadcpython-18d2f39af71608162b28fe1f41aa3e76efd83410.zip
cpython-18d2f39af71608162b28fe1f41aa3e76efd83410.tar.gz
cpython-18d2f39af71608162b28fe1f41aa3e76efd83410.tar.bz2
decode_rfc2231(): Be more robust against buggy RFC 2231 encodings.
Specifically, instead of raising a ValueError when there is a single tick in the parameter, simply return that the entire string unquoted, with None for both the charset and the language. Also, if there are more than 2 ticks in the parameter, interpret the first three parts as the standard RFC 2231 parts, then the rest of the parts as the encoded string. Test cases added. Original fewer-than-3-parts fix by Tokio Kikuchi. Resolves SF bug # 1218081. I will back port the fix and tests to Python 2.4 (email 3.0) and Python 2.3 (email 2.5). Also, bump the version number to email 4.0.1, removing the 'alpha' moniker.
Diffstat (limited to 'Lib/email/__init__.py')
-rw-r--r--Lib/email/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py
index f01260f..8d230fd 100644
--- a/Lib/email/__init__.py
+++ b/Lib/email/__init__.py
@@ -4,7 +4,7 @@
"""A package for parsing, handling, and generating email messages."""
-__version__ = '4.0a2'
+__version__ = '4.0.1'
__all__ = [
# Old names