[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
New submission from Bill Fenner fen...@gmail.com: In python 2.5, shlex handled unicode input fine: Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type help, copyright, credits or license for more information. import shlex shlex.split

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
Bill Fenner fen...@gmail.com added the comment: A colleague pointed out that the bad behavior was introduced in 2.5.2: Python 2.5.2 (r252:60911, Sep 30 2008, 15:42:03) [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2 Type help, copyright, credits or license for more information. import shlex

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
Bill Fenner fen...@gmail.com added the comment: so, just to be clear, your position is that the output of shlex.split( u'Hello, World!' ) is *supposed* to be ['H\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00,\x00\x00\x00', '\x00\x00\x00W\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l

[issue6988] shlex.split() converts unicode input to UCS-4 output

2009-09-24 Thread Bill Fenner
Bill Fenner fen...@gmail.com added the comment: Sorry, I didn't read the web documentation, only the module documentation, which doesn't mention Unicode. I'd agree that since it's a documented behavior, this bug can become: - an RFE for shlex to handle Unicode - meanwhile, if there will be any

[issue1339] smtplib starttls() should ehlo() if it needs to

2008-01-16 Thread Bill Fenner
Bill Fenner added the comment: jamesh, I attached the patch for that to the already-existing bug, filed in 2003: http://bugs.python.org/issue829951 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1339

[issue1511] csv input converts \r\n to \n but csv output does not when a field has internal line breaks

2007-11-27 Thread Bill Fenner
New submission from Bill Fenner: When a field has internal line breaks, e.g., foo,bar baz biff,boo that is actually 3 lines, but one csv-file row. csv.reader() converts this to ['foo', 'bar\nbaz\nbiff', 'boo']. This is a reasonable behavior. Unfortunately, csv.writer() does not use

[issue1511] csv input converts \r\n to \n but csv output does not when a field has internal line breaks

2007-11-27 Thread Bill Fenner
Changes by Bill Fenner: -- components: +Library (Lib) __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1511 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1511] csv input converts \r\n to \n but csv output does not when a field has internal line breaks

2007-11-27 Thread Bill Fenner
Bill Fenner added the comment: I realized that my description was not crystal clear - the file being read has \r\n line terminators - in the format that I used later, the input file is foo,bar\r\n baz\r\n biff,boo\r\n __ Tracker [EMAIL PROTECTED] http

[issue829951] Fixes smtplib starttls HELO errors

2007-10-30 Thread Bill Fenner
Bill Fenner added the comment: I've attached an updated diff, against the 2.4.3 smtplib.py, which forgets all of the relevant pieces of information. The line numbers are offset from the standard lib because the original file has my patch for issue 1339 applied, but there is no overlap so

[issue1339] smtplib starttls() should ehlo() if it needs to

2007-10-26 Thread Bill Fenner
New submission from Bill Fenner: smtplib's complex methods, login and sendmail, try to EHLO or HELO if it hasn't been done yet. login also checks to see if the EHLO response included the ability to do authorization. starttls seems to me to be similar in nature: why should it not try to EHLO

[issue829951] Fixes smtplib starttls HELO errors

2007-10-26 Thread Bill Fenner
Bill Fenner added the comment: Yes, the state that should be reset includes helo_resp, ehlo_resp, esmtp_features, and does_esmtp. The workaround commonly proposed is to always call ehlo() after starttls() . While this works (most of the time?), it seems arbitrary to require an explicit ehlo