summaryrefslogtreecommitdiffstats
path: root/Lib/email/generator.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix TestBytesGeneratorIdempotent tests and a couple bugs they revealed.R. David Murray2010-11-211-2/+2
| | | | | | | | | The tests that were failing on (some) windows machines, where the msg_XX.txt files used native \r\n lineseps are now also run on machines that use \n natively, and conversely the \n tests are run on Windows. The failing tests revealed one place where linesep needed to be added to a flatten call in generator. There was also another that the tests didn't catch, so I added a test for that case as well.
* #1349106: add linesep argument to generator.flatten and header.encode.R. David Murray2010-10-231-31/+43
|
* #4661: add bytes parsing and generation to email (email version bump to 5.1.0)R. David Murray2010-10-081-43/+143
| | | | | | | | The work on this is not 100% complete, but everything is present to allow real-world testing of the code. The only remaining major todo item is to (hopefully!) enhance the handling of non-ASCII bytes in headers converted to unicode by RFC2047 encoding them rather than replacing them with '?'s.
* Fix docstring typo.R. David Murray2010-10-011-1/+1
|
* Merged revisions 78274 via svnmerge fromR. David Murray2010-02-211-2/+10
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78274 | r.david.murray | 2010-02-20 23:23:00 -0500 (Sat, 20 Feb 2010) | 9 lines Issue 7970: When email.Parser.Parser parses a MIME message of type message/rfc822 it turns it into an object whose body consists of a list containing a single Message object. HeaderParser, on the other hand, just copies the body as a string. Generator.flatten has a special handler for the message mime type that expected the body to be the one item list. This fails if the message was parsed by HeaderParser. So we now check to see if the body is a string first, and if so just we just emit it. ........
* Merged revisions 77517,77525 via svnmerge fromR. David Murray2010-01-161-0/+11
| | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk Merge adds an additional test for as_string with a maxheaderlen specified. ........ r77517 | r.david.murray | 2010-01-16 00:15:17 -0500 (Sat, 16 Jan 2010) | 6 lines Issue #1670765: Prevent email.generator.Generator from re-wrapping headers in multipart/signed MIME parts, which fixes one of the sources of invalid modifications to such parts by Generator. Patch and tests by Martin von Gagern. ........ r77525 | r.david.murray | 2010-01-16 11:08:32 -0500 (Sat, 16 Jan 2010) | 2 lines Fix issue number in comment. ........
* Merged revisions 77209,77229,77359-77360,77371 via svnmerge fromBenjamin Peterson2010-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77209 | georg.brandl | 2010-01-01 07:07:05 -0600 (Fri, 01 Jan 2010) | 1 line More yearly updates. ........ r77229 | georg.brandl | 2010-01-02 06:35:01 -0600 (Sat, 02 Jan 2010) | 1 line Fix casing. ........ r77359 | georg.brandl | 2010-01-07 14:54:45 -0600 (Thu, 07 Jan 2010) | 1 line Fix description for Py_GetPath(); it sounded like it always returned sys.path. ........ r77360 | georg.brandl | 2010-01-07 15:48:47 -0600 (Thu, 07 Jan 2010) | 1 line #7653: clarify how the PythonPath registry key should look like. ........ r77371 | senthil.kumaran | 2010-01-08 13:20:25 -0600 (Fri, 08 Jan 2010) | 3 lines Fix for Issue7026. For the Error - RuntimeError: dictionary changed size during iteration ........
* "Port" the fix for issue 1974 from the trunk (2.7). Because Python 3.x does ↵Barry Warsaw2009-03-301-1/+1
| | | | | | things much better, less changes are necessary. This also shoves test_email_codecs_rename.py onto test_email_codecs.py even though the test needs to be ported to Python 3.
* Removed PyInt_GetMax and sys.maxintChristian Heimes2007-12-041-2/+2
| | | | | I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform. Also added docs for sys.maxsize.
* Patch# 1258 by Christian Heimes: kill basestring.Guido van Rossum2007-10-161-3/+3
| | | | I like this because it makes the code shorter! :-)
* Oops. I copied a slightly older version of the email package from the sandbox.Guido van Rossum2007-08-301-6/+2
| | | | | | | This should restore the email package in the py3k branch to exactly what's in the sandbox. This wipes out 1-2 fixes made post-copy, which I'll re-apply shortly.
* Copying the email package back, despite its failings.Guido van Rossum2007-08-301-0/+332
|
* Remove the email package for now.Guido van Rossum2007-08-251-354/+0
| | | | | | Once Barry and the email-sig have a working new version we'll add it back. If it doesn't make the 3.0a deadline (release August 31), too bad.
* SF patch# 1770008 by Christian Heimes (plus some extras).Guido van Rossum2007-08-091-1/+1
| | | | | | | | | | Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files.
* SF patch# 1757839 by Alexandre Vassalotti -- make test_mailbox andGuido van Rossum2007-07-211-2/+8
| | | | test_old_mailbox pass.
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-021-1/+1
|
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-15/+15
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Killed the <> operator. You must now use !=.Guido van Rossum2006-08-241-1/+1
| | | | | Opportunistically also fixed one or two places where '<> None' should be 'is not None' and where 'type(x) <> y' should be 'not isinstance(x, y)'.
* Merge p3yk branch with the trunk up to revision 45595. This breaks a fairThomas Wouters2006-04-211-0/+348
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.