Tony Nelson added the comment:
The email package does not follow the RFCs in anything to do with header
parsing or decoding. This is a known deficiency. So no, I am not
thinking of atoms at all -- and neither is email.header.decode_header()! :-(
Until email.header actually parses headers
Tony Nelson added the comment:
See patch in issue1079. I don't think email.header can require
whitespace until it decodes parsed headers, as whitespace is not always
required.
--
nosy: +barry, tony_nelson
versions: +Python 2.7
___
Python tr
Tony Nelson added the comment:
I think the problem is best viewed as headers are not being parsed
according to RFC2822 and decoded after that, so the recognition of
encoded words should be looser, and not require whitespace around them,
as it is not required in all contexts.
Patch and test
Changes by Tony Nelson :
--
versions: +Python 2.6, Python 2.7
___
Python tracker
<http://bugs.python.org/issue4487>
___
___
Python-bugs-list mailing list
Unsub
Tony Nelson added the comment:
This seems entirely reasonable, helpful, and in accord with the mapping
of ascii to us-ascii. I recommend accepting this patch or a slightly
fancier one that would also do "utf_8".
There are pobably other encoding names with the same issue of being
a
Changes by Tony Nelson :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue3169>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Tony Nelson added the comment:
Postel's law suggests that, as bad padding can be repaired,
decode_header ought to do so. The patch does that, adds a test for it,
and alters another test to still properly fail on really bad encoded data.
The test doesn't check a single character enco
Tony Nelson added the comment:
The OP's diagnosis of a buffer boundary problem is correct, but
incomplete. The problem can be reproduced by calling feedparser
FeedParser.feed() directly, or as my patch test does, by calling
BufferedSubFile.push() directly. The proper fix is for push
New submission from Tony Nelson :
test_httpservers fails the CGI tests if Python was built as a shared
library (./config --enable-shared) and not yet installed. To run such a
Python without installing it, the command line must define
LD_LIBRARY_PATH to point to the build directory. I see that
Tony Nelson added the comment:
make test still passes all tests except test_httpservers on my Python
2.6.1 build. The network resource was not enabled and tk is not available.
The new test for CRLFLF at the end of a message body is added to
Lib/email/test_email at the end of the TestParsers
New submission from Tony Nelson :
feedparser.py does not pares mixed newlines properly. NLCRE_eol, which
is used to search for the various newlines at End Of Line, uses $ to
match the end of string, but $ also matches \n$, due to a wise long-ago
patch by the Effbot. This causes feedparser to
Tony Nelson added the comment:
Thanks, Amaury. The new test works here on Python2.6.1, failing without
the fix and passing with it. (Passing MyLocal(a=1) and failing
MyLocal(1), as expected.) With the fix, _threading_local.py supports
positional arguments to subclass __init__, as well as
Tony Nelson added the comment:
If I understand RFC2822 3.2.2. Quoted characters (heh), unquoting must
be done in one pass, so the current replace().replace() is wrong. It
will change '\\"' to '"', but it should become '\"' when unquoted.
This se
13 matches
Mail list logo