[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: Martin v. Löwis wrote: > Martin v. Löwis added the comment: > > Ok. This is not a bug, but by design. unicode(X)==unicode(str(X)) for > most things, and str(X)==repr(X) for most things. repr(None)=='None', > hence the result you see. Closing as invalid. >

[issue1310] tempfile breaks on Windows

2007-10-21 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1309] windows build fix

2007-10-21 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1308] unicode(None) anomaly

2007-10-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: Ok. This is not a bug, but by design. unicode(X)==unicode(str(X)) for most things, and str(X)==repr(X) for most things. repr(None)=='None', hence the result you see. Closing as invalid. P.S. To respond via email, you have to add your email address to Your Detai

[issue708374] add offset to mmap

2007-10-21 Thread Travis Oliphant
Travis Oliphant added the comment: I think this patch can be committed to SVN. Paul Moore has tested it on Windows and I (Travis Oliphant) have tested it on UNIX (Mac OS X). The patch also includes documentation updates and tests. -- nosy: +teoliphant _

[issue1310] tempfile breaks on Windows

2007-10-21 Thread Christian Heimes
New submission from Christian Heimes: tempfile breaks on Windows because exception objectss no longer support e[0]. The fix is simple and short: Index: Lib/tempfile.py === --- Lib/tempfile.py (Revision 58587) +++ Lib/tempfile.py

[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol

2007-10-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Do you have a use-case for this? In Py3k, I don't think adding support for the 'with' statement to StringIO makes any sense, since the close() method does nothing. -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL P

[issue1302] Fixes for profile/cprofile

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Alexandre Vassalotti wrote: > I don't think it's possible to add shortcuts in PyUnicode_Decode for > UTF-16 and UTF-32 because the byte-order can be different depending of > the platform. So, these two need to pass through the codecs module. utf-16 and utf-32

[issue1302] Fixes for profile/cprofile

2007-10-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I don't think it's possible to add shortcuts in PyUnicode_Decode for UTF-16 and UTF-32 because the byte-order can be different depending of the platform. So, these two need to pass through the codecs module. I am sure if it's better, but I factored out the

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: Here's more: >>> unicode(object) u"" There seems to be an call to repr() somewhere in the process. This seems, at least to me, to violate the principle of least surprise, and I'm thinking that unicode(x) ought to return UnicodeDecodeError if x is not a

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > You might want to compare what I checked in to your patch; I did a few > style cleanups. I also moved the lseek() call into import.c, where it > seems more appropriate. Ah I see that you prefer to keep assignment and check against NU

[issue1309] windows build fix

2007-10-21 Thread Christian Heimes
New submission from Christian Heimes: bytes_methods.c isn't in PCbuild/pythoncore.vcproj -- components: Windows files: py3k_pcbuild_bytes.patch messages: 56632 nosy: tiran severity: normal status: open title: windows build fix type: compile error versions: Python 3.0 Added file: http://b

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Guido van Rossum
Guido van Rossum added the comment: OK, checked in. You might want to compare what I checked in to your patch; I did a few style cleanups. I also moved the lseek() call into import.c, where it seems more appropriate. Committed revision 58587. -- resolution: -> accepted status: open -

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: accepted -> status: closed -> open __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing l

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: (aside: Wow! that was a fast response to my posting!) I'm not really sure what makes the most sense, possibly: - an exception - u'' - None but not u'None'; not a string of length 4. That's quite unexpected! Regards, ..jim PS: I don't understand why I

[issue1308] unicode(None) anomaly

2007-10-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: What answer did you expect instead? -- nosy: +loewis __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list m

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
New submission from James G. sack (jim): '2.5 (r25:51908, Apr 10 2007, 10:27:40) \n[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)]' unicode(None) u'None' This doesn't seem right, ;-) Regards, ,,jim -- components: Unicode messages: 56628 nosy: jgsack severity: normal status: open title: unicod

[issue1745035] DoS smtpd vulnerability

2007-10-21 Thread billiejoex
Changes by billiejoex: Added file: http://bugs.python.org/file8587/smtpd.diff _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing li

[issue1745035] DoS smtpd vulnerability

2007-10-21 Thread billiejoex
billiejoex added the comment: > What does this do when a line longer than 4096 bytes > is found? Does it report an error to the SMTP client? > That's my only concern. Sorry for replying so late. No, it does not report the error and this is bad. I've searched through RFCs and I found that RF

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Guido van Rossum
Guido van Rossum added the comment: > > Do you have access to Windows? I believe it doesn't have dup(). :-( > > I've an old laptop with Win2k at my disposal but it has no VS yet. Can > you point me to a set of instruction how to install VS 2003? I've just > VS .NET 2005 available. Sorry, I'm as

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > Do you have access to Windows? I believe it doesn't have dup(). :-( I've an old laptop with Win2k at my disposal but it has no VS yet. Can you point me to a set of instruction how to install VS

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-21 Thread Guido van Rossum
Guido van Rossum added the comment: > Guido, what do you want to do about the struct module for the various > string formats (i.e., c, s, p)? Should they return str8 or Unicode? Oh, tough call. I think they should return str8 (i.e. bytes after the rename) because the encoding isn't known. Even

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Guido van Rossum
Guido van Rossum added the comment: Do you have access to Windows? I believe it doesn't have dup(). :-( __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs

[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-21 Thread Georg Brandl
Changes by Georg Brandl: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth