cpython/Lib/email
R David Murray 97f43c019f #15160: Extend the new email parser to handle MIME headers.
This code passes all the same tests that the existing RFC mime header
parser passes, plus a bunch of additional ones.

There are a couple of commented out tests where there are issues with the
folding.  The folding doesn't normally get invoked for headers parsed from
source, and the cases are marginal anyway (headers with invalid binary data)
so I'm not worried about them, but will fix them after the beta.

There are things that can be done to make this API even more convenient, but I
think this is a solid foundation worth having.  And the parser is a full RFC
parser, so it handles cases that the current parser doesn't.  (There are also
probably cases where it fails when the current parser doesn't, but I haven't
found them yet ;)

Oh, yeah, and there are some really ugly bits in the parser for handling some
'postel' cases that are unfortunately common.

I hope/plan to to eventually refactor a lot of the code in the parser which
should reduce the line count...but there is no escaping the fact that the
error recovery is welter of special cases.
2012-06-24 05:03:27 -04:00
..
mime #14380: Make actual default match docs, fix __init__ order. 2012-03-22 22:40:44 -04:00
__init__.py #11686: add missing entries to email __all__ lists. 2012-03-16 22:43:05 -04:00
_encoded_words.py Add '__all__' to _encoded_words and mark QByteMap as private. 2012-05-27 12:39:54 -04:00
_header_value_parser.py #15160: Extend the new email parser to handle MIME headers. 2012-06-24 05:03:27 -04:00
_parseaddr.py Issue #14653: email.utils.mktime_tz() no longer relies on system 2012-06-21 20:48:23 -04:00
_policybase.py Don't use metaclasses when class decorators can do the job. 2012-05-31 18:00:45 -04:00
architecture.rst #14731: refactor email policy framework. 2012-05-25 15:01:48 -04:00
base64mime.py
charset.py
encoders.py
errors.py Now that Defects are Exception subclasses, call super. 2012-06-08 22:45:46 -04:00
feedparser.py #12515: email now registers a defect if the MIME end boundary is missing. 2012-05-27 22:20:42 -04:00
generator.py #12586: add provisional email policy with new header parsing and folding. 2012-05-25 18:42:14 -04:00
header.py #1079: Fix parsing of encoded words. 2012-06-02 17:56:49 -04:00
headerregistry.py #15160: Extend the new email parser to handle MIME headers. 2012-06-24 05:03:27 -04:00
iterators.py
message.py Merge: Update out of date docstring. 2012-06-17 15:27:21 -04:00
parser.py #14731: refactor email policy framework. 2012-05-25 15:01:48 -04:00
policy.py Don't use metaclasses when class decorators can do the job. 2012-05-31 18:00:45 -04:00
quoprimime.py
utils.py #665194: Add a localtime function to email.utils. 2012-05-25 23:22:59 -04:00