[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Some thoughts: - is it ok to call replacenl multiple times on the same string? \r\r\n and other combinations like this. - I wonder if it is possible to correctly handle \r\n at the CHUNK_SIZE limit without an incremental decoder. it seems that we need at

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Christian Heimes
New submission from Christian Heimes: Hi Yhg1s! svn praise shows your name for Lib/mailbox.py more often then other names. Can you look at my patch and see if it's correct? It fixes most of the errors in test_mailbox.py and all tests in test_old_mailbox. I'm unsure about the patch. Crys

[issue1384] Windows fix for inspect tests

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Applied to py3k in r58875. I'm doing a svnmerge later. Thanks again for your help, pal! -- components: +Windows resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1384

[issue1392] py3k-pep3137: issue warnings / errors on str(bytes()) and similar operations

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Applied to py3k-pep3137 in r 58876 -- resolution: - fixed status: - closed title: py3k-pep3137: str(bytes()) and str(buffer()) should raise TypeError patch - py3k-pep3137: issue warnings / errors on str(bytes()) and similar operations

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Correction: The unit test isn't marked as failing but the failing assertion don't look good. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1397 __

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Christian Heimes
New submission from Christian Heimes: Exception in thread writer 2: Traceback (most recent call last): File /home/heimes/dev/python/py3k-pep3137/Lib/threading.py, line 485, in _bootstrap_inner self.run() File /home/heimes/dev/python/py3k-pep3137/Lib/threading.py, line 445, in run

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This patch goes in the right direction, but has several problems IMO: - it reads a complete chunk for just one more byte - the re-read should be disabled when lineends are not translated these two are minor annoyance and can be easily corrected, but: -

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: IMO you shouldn't read another chunk when the last character you've seen is \r; instead, you should set a flag so that on the next read, you'll ignore an initial \n. The flag should be made of the tell/seek state as well. (The problem with reading another

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: I've seen this too occasionally. Greg, can you look at this? -- assignee: - gregory.p.smith nosy: +gregory.p.smith __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1397 __

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: On 11/6/07, Amaury Forgeot d'Arc [EMAIL PROTECTED] wrote: - it reads a complete chunk for just one more byte - the re-read should be disabled when lineends are not translated these two are minor annoyance and can be easily corrected, but: - there is

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: If Yhgls is twouters, I think he's on vacation. Possibly Thomas appears on the blame list because he did some big integrations. Is he on the blame list for the trunk as well? Anyway I want this over with so I'll look into it. -- nosy: +gvanrossum

[issue1394] simple patch, improving unreachable bytecode removing

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1394 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1393] function comparing lacks NotImplemented error

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: Odd. I'll look into it. -- assignee: - gvanrossum nosy: +gvanrossum priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1393 __

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Yes, Yhg1s is Thomas nick on #python. On the trunk svn annotate shows Andrew as the author of most lines. Maybe he can shed some light on the problem. I'm not familiar with the details of the mailbox format. -- assignee: twouters - akuchling nosy:

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: I'm not following Py3K development at all, but the patch is pretty short and seems reasonable. I think mailboxes should be 7-bit clean in theory, but have no idea if things are that tidy in practice. __ Tracker [EMAIL PROTECTED]

[issue737648] Error on handling nan

2007-11-06 Thread Mike Verdone
Mike Verdone added the comment: For the benefit of those who stumble here through Google, here's a workaround I've discovered for NaN testing. This is BAD: value == float('NaN') But this seems to work ok: str(value) == str(float('NaN')) -- nosy: +mike.verdone title: Error on handling

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your insight, Andrew! Applied in r58881. I agree with you but I'm not able to test it with real data. I've no longer access to our old server at my old dormitory. I had a Qmail system with maildir there. Two tests are still failing with the same

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: I see several problems with this, but there's light at the end of the tunnel. (1) Don't use s#; it will allow null bytes in the string, which we don't want. (2) Put the entire trailing slash removal inside #ifdef MS_WINDOWS. (3) Careful! It seems the code

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: accepted - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1293 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: In my opinion the check for \r should only happen when os.linesep or newline starts with \r. On Unix with standard newline the \r should be treated as every other char. No: it is not dependent on os.linesep but on the newline parameter passed to open().

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: How do you like #ifdef MS_WINDOWS /* Remove trailing / and \ - Windows' stat doesn't like them - but * keep the trailing slash of C:/ */ Py_ssize_t i; char

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- keywords: +64bit resolution: accepted - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1372 __ ___ Python-bugs-list mailing list

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Brett Cannon
Brett Cannon added the comment: On 11/6/07, Guido van Rossum [EMAIL PROTECTED] wrote: Guido van Rossum added the comment: Another patch that uses os.path.normpath. Sorry, I really don't like to be importing os.path in order to be able to process the path used for an import.

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Thomas Conway
Thomas Conway added the comment: The W3 guys had some information that helps. The DOM3 Core specification contains the following No lexical check is done on the content of a comment and it is therefore possible to have the character sequence -- (double-hyphen) in the content, which is

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: Another patch that uses os.path.normpath. Sorry, I really don't like to be importing os.path in order to be able to process the path used for an import. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1293

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: Another patch that uses os.path.normpath. Added file: http://bugs.python.org/file8704/trailing_slash3.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1293 __Index: Python/import.c

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Christian Heimes
Christian Heimes added the comment: I've mentioned the platform and db version in the last line. You surely have missed it: Ubuntu Linux 7.10, i386, db 4.4.20 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1397 __

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: yeah i've seen this at random times as well. I don't believe its related to py3k or the pep3137 branch at all, i believe seen it on trunk but its rare. For reference, what platform (OS) and BerkeleyDB version did you build python with when this happened?

[issue1742669] %d format handling for long values

2007-11-06 Thread Facundo Batista
Facundo Batista added the comment: I'm positive that this shouldn't happen. There should NOT be any difference between longs and ints in nowadays Python, so you never should say to an user to call that long() before the %d. And, you have some strange behaviours... for example: %d % 9e8

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Looks like bad design on W3 part: postponing an error happening, though it wouldn't be difficult to check right in createComment(). But I guess minidom should still be changed to conform to standard. -- nosy: +_doublep

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Martin v. Löwis
Martin v. Löwis added the comment: Would anybody want to provide a patch, then? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1390 __ ___ Python-bugs-list mailing list

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Well, it seems that allows createComment() in minidom to raise something implementation/language specific. I personally would prefer this (e.g. a ValueError) instead of raising on serialization step, as I prefer early error checks, when these checks obviously

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Thomas Conway
Thomas Conway added the comment: FWIW, the DOM guys considered mandating a check in createComment, but decided that the performance penalty was too great. I'm not sure I agree with them, but there you have it. Here are links to my query about the issue:

[issue1705170] contextmanager eats StopIteration

2007-11-06 Thread Neal Norwitz
Neal Norwitz added the comment: Nick, can you backport this and add a NEWS entry? Thanks. -- nosy: +nnorwitz _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1705170 _