Christian Heimes [EMAIL PROTECTED] added the comment:
Patch applied in r67109
--
nosy: +christian.heimes
resolution: accepted - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11813/poplib-bytes-2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
STINNER Victor [EMAIL PROTECTED] added the comment:
Le Tuesday 04 November 2008 01:03:42 Barry A. Warsaw, vous avez écrit :
Benjamin's reviewed this and the only thing that jumps out at me is some
funky indentation at about line 331
It's not related to my patch (I did'nt change POP3_SSL
Barry A. Warsaw [EMAIL PROTECTED] added the comment:
Benjamin's reviewed this and the only thing that jumps out at me is some
funky indentation at about line 331. If you fix that, you can land this
patch.
--
keywords: -needs review
nosy: +barry
resolution: - accepted
Changes by Benjamin Peterson [EMAIL PROTECTED]:
--
assignee: - benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
___
Benjamin Peterson [EMAIL PROTECTED] added the comment:
I'm happy with Victor's patch.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
___
STINNER Victor [EMAIL PROTECTED] added the comment:
Can anyone review my last patch (poplib-bytes-2.patch)?
--
keywords: +needs review
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
Benjamin Peterson [EMAIL PROTECTED] added the comment:
I like this patch.
--
nosy: +benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
Changes by STINNER Victor [EMAIL PROTECTED]:
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor [EMAIL PROTECTED] added the comment:
Oooops, I removed the message74562 from giampaolo.rodola, sorry:
As for issue #3911 this is another module for which an actual test
suite would be very necessary.
___
Python tracker [EMAIL PROTECTED]
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11782/poplib_unicode-5.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
STINNER Victor [EMAIL PROTECTED] added the comment:
After testing real world message, my patch using pure unicode doesn't
work. The problem comes with message encoding with 8-bit encoding. If
the email charset is different than POP3.encoding, the message in not
decoded correctly.
STINNER Victor [EMAIL PROTECTED] added the comment:
New patch: resp() returns bytes
- self.file is now a binary file
- encode commands using POP3.encoding charset, default is UTF-8
- use md5.hexdigest()
- factorize POP3_SSL code: code specific for SSL is just the creation
of the socket
The
STINNER Victor [EMAIL PROTECTED] added the comment:
About apop(): the second argument is the user password, not a shared
password which is the local variable timestamp read from welcome
attribute.
___
Python tracker [EMAIL PROTECTED]
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11812/poplib-bytes.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
STINNER Victor [EMAIL PROTECTED] added the comment:
I forgot the new unit tests. New patch:
- port python trunk unit tests
Added file: http://bugs.python.org/file11813/poplib-bytes-2.patch
___
Python tracker [EMAIL PROTECTED]
STINNER Victor [EMAIL PROTECTED] added the comment:
Here is a patch proposition:
- a socket uses bytes
- makefile() creates an unicode file using 'r' mode
- default encoding ISO-8859-1 because I guess that most servers use
this encoding, but you can change the encoding using encoding
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11775/poplib_unicode.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
STINNER Victor [EMAIL PROTECTED] added the comment:
Ooops, my previous patch was wrong (startswith = not startswith).
I tested python trunk test for poplib: with minor changes, all tests
are ok except tests using SSL. I get a select.error: (9, 'Bad file
descriptor') from asyncore. So I tried
STINNER Victor [EMAIL PROTECTED] added the comment:
New version:
- fix SSL: self.file contains the SSL socket and not the raw socket!
- upgrade test_poplib.py from Python trunk
poplib should be refactored to reuse the new IO library. But I don't
know how to build a TextIO wrapper for a
Giampaolo Rodola' [EMAIL PROTECTED] added the comment:
I haven't tried the patch but I think that encoding should be a class
attribute as it is in ftplib and similar py3k network related modules.
___
Python tracker [EMAIL PROTECTED]
STINNER Victor [EMAIL PROTECTED] added the comment:
New version:
- remove duplicate methods of POP3_SSL()
- use makefile('r', encoding=self.encoding) to get a nice text
wrapper with universal newline
- remove newline conversion (done by TextIOWrapper)
Finally my patch removes more code in
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11778/poplib_unicode-2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11780/poplib_unicode-3.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
STINNER Victor [EMAIL PROTECTED] added the comment:
@giampaolo.rodola: Right, I also prefer encoding as a class attribute.
So I wrote a new patch:
- encoding is now a class attribute
- continue SSL code factorization: SSL code is now around 10 lines
instead of 70 lines!
Added file:
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11781/poplib_unicode-4.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
___
Giampaolo Rodola' [EMAIL PROTECTED] added the comment:
As for issue #3911 this is another module for which an actual test suite
would be very necessary.
--
nosy: +giampaolo.rodola
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3727
Changes by Benjamin Peterson [EMAIL PROTECTED]:
--
title: poplib module broken by str to unicode
conversionhttp://bugs.python.org/issue3727 - poplib module broken by str to
unicode conversion
___
Python tracker [EMAIL PROTECTED]
http
New submission from Dmitry Vasiliev [EMAIL PROTECTED]:
Example:
from poplib import POP3
p = POP3(localhost)
p.user(user)
Traceback (most recent call last):
File stdin, line 1, in module
File /py3k/Lib/poplib.py, line 179, in user
return self._shortcmd('USER %s' % user)
File
29 matches
Mail list logo