[issue2732] curses.textpad loses characters at the end of lines
Anthony Lenton <[EMAIL PROTECTED]> added the comment: This doesn't happen to me with 2.6 compiled from HEAD, or with 2.5.2 shipped with Ubuntu Hardy. In both cases the output is: Contents of text box: '123456789\n123456789\n' -- nosy: +elachuni ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2569] default_scheme in urlparse.urlparse() useless
Anthony Lenton <[EMAIL PROTECTED]> added the comment: In http://bugs.python.org/issue754016 there's already a discussion about this. The RFC that urlparse is following (rfc 1808) requires the net_loc component to start with // even if the scheme component is missing, which is why urlparse("www","http") puts the 'www' in to the path component instead of net_loc. It seems that this is indeed the intended behavior, and the patch for issue 754016 adds a docfix clarifying this. -- nosy: +elachuni ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2569> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2569] default_scheme in urlparse.urlparse() useless
Changes by Anthony Lenton <[EMAIL PROTECTED]>: -- nosy: +facundobatista ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2569> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue754016] urlparse goes wrong with IP:port without scheme
Anthony Lenton <[EMAIL PROTECTED]> added the comment: I agree with facundobatista that the patch is bad, but for a different reason: it now breaks with: >>> import urlparse >>> urlparse.urlparse ('http:') Traceback (most recent call last): File "", line 1, in File "/home/anthony/svn/python26/Lib/urlparse.py", line 108, in urlparse tuple = urlsplit(url, scheme, allow_fragments) File "/home/anthony/svn/python26/Lib/urlparse.py", line 148, in urlsplit if i > 0 and not url[i+1].isdigit(): IndexError: string index out of range I'm afraid that it it's not evident that the expected behavior isn't evident. Take for example: >>> import urlparse >>> urlparse.urlparse('some.com', 'http') ParseResult(scheme='http', netloc='', path='some.com', params='', query='', fragment='') Is the url referring to the some.com domain or to a windows executable file? If you're using urlparse to parse only absolute urls then probably you want the first component to be considered a net_loc, but not if you're thinking of accepting also relative urls. It would probably be better to be explicit and raise an exception if the url is invalid, so that the user can prepend a '//' and resubmit if needed. Also we'd probably stop seeing bugreports about this issue :) -- nosy: +elachuni ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue754016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1556] Failure when calling __str__ for MIMEBase(message, rfc822) objects
Anthony Lenton <[EMAIL PROTECTED]> added the comment: I don't really think the MIMEBase class is supposed to be used like this, or at all: it behaves more like a Multipart message in that it expects to carry a list of MIMEBase objects as a payload (not a string!) though it doesn't define a boundary by default. You can carry on using the MIMEBase class, but changing the line that says: attachment.set_payload(file(filename).read( )) for: attachment.set_payload([MIMEText(file(filename).read())]) I'd recommend you to use: attachment = Message() attachment.set_payload(file(filename).read()) or if you want a multipart message: attachment = MIMEMultipart() text = MIMEText(file(filename).read()) attachment.attach(text) -- nosy: +elachuni ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1556> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1441530] socket read() can cause MemoryError in Windows
Anthony Lenton <[EMAIL PROTECTED]> added the comment: I confirm that the bug occurs with Python 2.5.1 on Windows XP. Also, anglocelt's fix worked fine for me. -- nosy: +elachuni ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1441530> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1441530] socket read() can cause MemoryError in Windows
Anthony Lenton <[EMAIL PROTECTED]> added the comment: It's probably just a typo from copying from an editor, but there is a bug in the workaround. It should be: maxRead = 100 class MySSL (imaplib.IMAP4_SSL): def read (self, n): #print "..Attempting to read %d bytes" % n if n <= maxRead: return imaplib.IMAP4_SSL.read (self, n) else: soFar = 0 result = "" while soFar < n: thisFragmentSize = min(maxRead, n-soFar) #print "..Reading fragment size %s" % thisFragmentSize fragment =\ imaplib.IMAP4_SSL.read (self, thisFragmentSize) result += fragment soFar += thisFragmentSize # only a few, so not a tragic o/head return result (With one less level of indentation in the last line). Apart from that, the fix works wonderfully. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1441530> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue839159] iterators broken for weak dicts
Anthony Lenton added the comment: Probably old news, but this also affects 2.5.4. -- nosy: +elachuni versions: +Python 2.5 ___ Python tracker <http://bugs.python.org/issue839159> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1224] SimpleHTTPServer doesn't understand // at beginning of path anymore
Anthony Lenton added the comment: Attached is an diff against trunk that adds philfr's suggesitions. I've also added a test file for testing url parsing, so's these things stay fixed. Updated Misc/NEWS. No doc or functionallity modified. -- nosy: +elachuni, facundobatista Added file: http://bugs.python.org/file9451/1224.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1224> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com