[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-03 Thread Peter Weseloh
Peter Weseloh added the comment: You are right. The format should be 'l'. I overlooked that. In my case the optional 'buf_size' parameter of 'decompress' is not used anyhow. Shall I change the patch accordingly? It work well for me and I now checked the code of PyArg_ParseTuple (Python/getargs.c

[issue1376] uu module catches a wrong exception type

2007-11-03 Thread Guido van Rossum
Guido van Rossum added the comment: You misunderstand. The try/except is there in case os.stat isn't defined or its result doesn't have a st_mode attribute. If the stat operation fails due to a problem with the file, there's not much point in proceeding since the subsequent open() call would f

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-03 Thread roudkerk
New submission from roudkerk: The patch adds support for _socket.fromfd() and _socket.socket.dup() on Windows. It uses the Win32 DuplicateHandle() function. The patch is to socketmodule.c an test_socket.py. -- files: socket_fromfd.patch messages: 57084 nosy: roudkerk severity: normal s

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-03 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

[issue1379] reloading imported modules sometimes fail with 'parent not in sys.modules' error

2007-11-03 Thread Paul Pogonyshev
New submission from Paul Pogonyshev: This is apparently because sys.modules contains Unicode (str) keys, while 'parentname' is an old-style string. Attached patch seems to fix it, but I have no idea if it is correct in principle -- components: Interpreter Core files: reloading-fix.diff

[issue1379] reloading imported modules sometimes fail with 'parent not in sys.modules' error

2007-11-03 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

[issue1380] fix for test_asynchat and test_asyncore on pep3137 branch

2007-11-03 Thread Adam Hupp
New submission from Adam Hupp: The attached patch resolves test failues in test_asynchat and test_asyncore. The asynchat failure was due to interpolating a byte string into a unicode string using %s. This resulted in a b'' byte representation in the final string. The fix is to use string const

[issue1380] fix for test_asynchat and test_asyncore on pep3137 branch

2007-11-03 Thread Christian Heimes
Christian Heimes added the comment: Applied in r58831 Thanks! -- keywords: +patch, py3k nosy: +tiran resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1381] cmath is numerically unsound

2007-11-03 Thread Andreas Kloeckner
New submission from Andreas Kloeckner: This here basically says it all: >>> import cmath;[cmath.asinh(i*1e-17).real for i in range(0,20)] [4.4408920985006257e-16, 4.4408920985006257e-16, 4.4408920985006257e-16, 4.4408920985006257e-16, 4.4408920985006257e-16, 4.4408920985006257e-16, 4.44089209850

[issue1381] cmath is numerically unsound

2007-11-03 Thread Martin v. Löwis
Martin v. Löwis added the comment: Can you propose a patch? -- nosy: +loewis __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1381] cmath is numerically unsound

2007-11-03 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: On Samstag 03 November 2007, Martin v. Löwis wrote: > Martin v. Löwis added the comment: > > Can you propose a patch? Other than point at how boost.math does things, I don't have the time to work on this right now, sorry. Andreas __

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-03 Thread Guido van Rossum
Changes by Guido van Rossum: Removed file: http://bugs.python.org/file8681/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-03 Thread Guido van Rossum
Guido van Rossum added the comment: The correct format for a Py_ssize_t is 'n' (at least in the trunk, I don't have the 2.5 branch handy but I imagine it's the same). We can figure out the patch from here. __ Tracker <[EMAIL PROTECTED]>

[issue1381] cmath is numerically unsound

2007-11-03 Thread Alan McIntyre
Alan McIntyre added the comment: I have to review a few complex math topics for some of my current course work, so I wouldn't mind taking a look into this. I can't promise I'll have the time required to make all of cmath correct (assuming it's as unsound as claimed), but I'll do what I can. ---