[issue11606] maxlinelen exceeded by email module's body_encode() function

2011-03-24 Thread Michael Henry
Michael Henry pyt...@drmikehenry.com added the comment: David, Your patch looks fine to me. I like putting the logic is a separate class as you've done. I looked in itertools for something to perform the job of the each_last() generator I'd had in my patch, but I didn't see anything. I like

[issue11606] maxlinelen exceeded by email module's body_encode() function

2011-03-19 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The email module's body_encode() function (found in quoprimime.py) can generate oversized encoded lines that exceed the maximum line length specified by the maxlinelen parameter. The attached test case

[issue11589] Unit test extensions for email module

2011-03-17 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The attached patch includes additional unit tests for the email module, and splits pre-existing test_header_encode() and test_decode() functions into individual test functions. -- components: Library (Lib) files

[issue11590] email quoprimime.py patch for header_encode of empty string, decode with different eol

2011-03-17 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The attached patch adds unit tests and some minor fixes for the email module's quoprimime.py file. The header_encode() function did not properly return an empty string when given an empty string. The decode() function did not properly

[issue11578] Increase test coverage for timeit.py

2011-03-16 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The timeit.py module has no specific tests. The attached patch adds Lib/test/test_timeit.py for unit testing, along with slight modifications to timeit.py to support predictable unit testing. -- components: Library (Lib) files

[issue5633] fix for timeit when the statment is a string and the setup is not (and tests)

2011-03-16 Thread Michael Henry
Michael Henry pyt...@drmikehenry.com added the comment: Issue #11578 added unit tests for timeit.py. Because of this bug, two tests were omitted. In the attached patch are the previously withheld unit tests and an alternate method of fixing the bug (developed before Tim's fix was noticed

[issue11578] Increase test coverage for timeit.py

2011-03-16 Thread Michael Henry
Michael Henry pyt...@drmikehenry.com added the comment: Issue #5633 contains two additional unit tests that can't be added until that ticket's bug is fixed. -- nosy: +rhettinger resolution: accepted - status: closed - open ___ Python tracker rep

[issue11554] Port email module's test_email_codecs.py to Python 3

2011-03-15 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: test_email_codecs.py in the email module should be ported to Python 3. The attached patch ports test_email_codecs.py and hooks it into the email test suite. -- components: Library (Lib) files: port-test_email_codecs.py.patch

[issue11555] email.Message.as_string no longer mangles From (doc fix)

2011-03-15 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The function email.Message.as_string has an out-of-date comment: This is a convenience method and may not generate the message exactly as you intend because by default it mangles lines that begin with From . For more flexibility, use

[issue11556] email.Message.get_payload can handle bytes payloads (minor doc fix)

2011-03-15 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: In email.Message.get_payload, there is the following out-of-date comment: # payload can be bytes here, (I wonder if that is actually a bug?) The code can actually handle bytes payloads. -- components: Library (Lib) messages

[issue11558] Raise a more helpful exception in email.message.Message.attach after set_payload(some string)

2011-03-15 Thread Michael Henry
New submission from Michael Henry pyt...@drmikehenry.com: The attached test program, test_email_attach_to_string.py, demonstrates the desire for email.message.Message.attach to raise a more helpful exception when the user incorrectly invokes attach() after setting the payload to a string