New submission from Yves Dorfsman y...@zioup.com:
The basic time format in the logging module uses a comma instead of a dot to
separate the seconds from the tenth of seconds:
import logging
logging.basicConfig(format='%(asctime)s %(message)s')
logging.warning('hello')
2011-09-23
Yves Dorfsman y...@zioup.com added the comment:
Added a test case:
http://hg.zioup.org/cpython/rev/4accd3181061
If you set the loop 128 then the test passes (set at 1000 right now).
--
hgrepos: +65
___
Python tracker rep...@bugs.python.org
http
New submission from Yves Dorfsman y...@zioup.com:
html.parser.HTMLParser.unescape works only with the first 128 entities, it
leaves the other ones as they are.
--
components: None
messages: 143434
nosy: y...@zioup.com
priority: normal
severity: normal
status: open
title
Changes by Yves Dorfsman y...@zioup.com:
Removed file: http://bugs.python.org/file20742/issue9298-test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9298
Changes by Yves Dorfsman y...@zioup.com:
Removed file: http://bugs.python.org/file20743/issue9298.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9298
Yves Dorfsman y...@zioup.com added the comment:
encoders.py:
Fixes the issue of base64'ed being 76 chars
test_email.py:
-test that base64'ed binary is split into 76 chars lines
-WARRNING: Changes the test for MIMEApplication.test_body:
-it changes the name of the variable 'bytes
Yves Dorfsman y...@zioup.com added the comment:
I will. Please don't use my patch yet, it breaks something else in the
test_email:
./python Lib/test/regrtest.py test_email
[1/1] test_email
test test_email failed -- Traceback (most recent call last):
File /export/incoming/python/py3k/Lib
Yves Dorfsman y...@zioup.com added the comment:
I've got two issues with this code (Lib/email/test/test_email.py):
1128 def test_body(self):
1129 eq = self.assertEqual
1130 bytes = b'\xfa\xfb\xfc\xfd\xfe\xff'
1131 msg = MIMEApplication(bytes)
1132 eq
Yves Dorfsman y...@zioup.com added the comment:
Test if email.encoders.encode_base64 returns a single line string, or a string
broken up in 76 chars line, as per RFC.
--
Added file: http://bugs.python.org/file20742/issue9298-test.py
___
Python
Yves Dorfsman y...@zioup.com added the comment:
Replaces b64encode by encodebytes.
--
keywords: +patch
Added file: http://bugs.python.org/file20743/issue9298.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9298
Yves Dorfsman y...@zioup.com added the comment:
In case this does not get fixed for a long time, here is a work around
(re-implement the encoder yourself):
.
.
.
def myencoder(msg):
from base64 import encodebytes as _bencode
orig = msg.get_payload()
encdata = str(_bencode(orig), 'ascii
Yves Dorfsman y...@zioup.com added the comment:
Solution:
In /usr/lib/python3.1/email/encoders.py, use encodebytes instead of b64encode:
--- encoders.py 2011-02-08 09:37:21.025030051 -0700
+++ encoders.py.yves2011-02-08 09:38:04.945608365 -0700
@@ -12,7 +12,7 @@
]
-from base64
Yves Dorfsman y...@zioup.com added the comment:
#!/usr/bin/python3.1
import unittest
import email.mime.image
class emailEncoderTestCase(unittest.TestCase):
def setUp(self):
# point to an image
binaryfile =
'/usr/share/openclipart/png/animals/mammals/happy_monkey_benji_park_01.png
Yves Dorfsman y...@zioup.com added the comment:
Here's a better version (sorry I don't know how to remove msg128255:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9298
Yves Dorfsman y...@zioup.com added the comment:
#!/usr/bin/python3.1
import unittest
import email.mime.image
class emailEncoderTestCase(unittest.TestCase):
def setUp(self):
# point to an image
binaryfile = ''
#binaryfile =
'/usr/share/openclipart/png/animals/mammals
New submission from Yves Dorfsman y...@zioup.com:
email.encoders.encode_base64 returns a str of a single long line instead of
breaking it up into 76 chars line as per RFC 2045, and as implemented by
email.base64mime.
Solution:
In /usr/lib/python3.1/email/encoders.py, use encodebytes instead
16 matches
Mail list logo