[issue3488] Provide compress/uncompress functions on the gzip module

2008-08-02 Thread Anand B Pillai
Anand B Pillai <[EMAIL PROTECTED]> added the comment: Thanks. The file I uploaded was not an actual patch but just how the functions would appear in the gzip module, to illustrate the code. I can make an actual patch to gzip.py with docstrings, unit-tests and taking care of your other comments.

[issue3424] imghdr test order makes it slow

2008-08-02 Thread Ilpo Nyyssönen
Ilpo Nyyssönen <[EMAIL PROTECTED]> added the comment: jpeg exif png gif tiff and then the rest ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Py

[issue3474] Using functools.reduce() does not stop DeprecationWarning when using -3

2008-08-02 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- priority: critical -> release blocker ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Pyt

[issue2396] Backport memoryview object to Python 2.6

2008-08-02 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: But the warning in 2.6 for buffer() says to use memoryview(), which does not exist. So either the backport needs to happen in 2.6 or the warning needs to go away for generic buffer() usage and instead be changed to only occur when the 2to3 fixer

[issue3495] site module doc typo

2008-08-02 Thread Ian Stokes-Rees
New submission from Ian Stokes-Rees <[EMAIL PROTECTED]>: http://docs.python.org/lib/module-site.html | sed -e "s/2.3/2.5/g" -- assignee: georg.brandl components: Documentation messages: 70647 nosy: georg.brandl, ijstokes severity: normal status: open title: site module doc typo versions:

[issue3488] Provide compress/uncompress functions on the gzip module

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think the functionality is useful, although it may be too late to make it into 2.6/3.0. Some comments: - the functions should have docstrings - there should be unit tests - style nit: named parameters in function calls (and default values in

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11033/getargs.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11032/codecs.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a new patch wrapping up Martin's patch with the following additions: - getargs.c fixes - codecs module fixes - multiprocessing module fix - fileobject readinto fix - in bytearray deallocator, print out a SystemError if there are existi

[issue2538] memoryview of bytes is not readonly

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r65420, with a test. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue2275] urllib2 header capitalization

2008-08-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: I'm ok with these patchs, Senthil. John, what do you think about this? ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3459] optimize bytes.join()

2008-08-02 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: >bl = [b'a']*2 gives a 2% slowdown: >bl = [b'', b'a'] gives a 20% speedup: If the second case is less than 9% of cases, which I expect is true, the change would cause an average slowdown ;-) >I encountered this when trying to optimize io.Buf

[issue2819] Full precision summation

2008-08-02 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: > I'm pretty sure it *was* merged: math.sum should be the full-precision > summation in both recent betas (2.6b2 and 3.0b2). Try comparing > sum([1e100, 1, -1e100, -1]) and math.sum([1e100, 1, -1e100, -1])---they > should produce -1.0 and

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-08-02 16:49, Antoine Pitrou wrote: > Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > > You've missed the preceding line that says: > > +consumed = pbuf.len; > > If final is NULL, consumed isn't updated by the call to

[issue1187] pipe fd handling issues in subprocess.py on POSIX

2008-08-02 Thread Dustin J. Mitchell
Dustin J. Mitchell <[EMAIL PROTECTED]> added the comment: Thoughts on this patch? ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue3494] "[Errno 11] Resource temporarily unavailable" while using tracing facility/threads (in linux listdir with unicode path)

2008-08-02 Thread Fabio Zadrozny
New submission from Fabio Zadrozny <[EMAIL PROTECTED]>: A bug has been reported against pydev complaining about os.listdir() failing while debugging (with a unicode path). The link for that is: http://sourceforge.net/tracker/index.php?func=detail&aid=2012138&group_id=85796&atid=577329 After try

[issue3493] No Backslash (\) in IDLE 1.2.2

2008-08-02 Thread Marc Rambert
Changes by Marc Rambert <[EMAIL PROTECTED]>: -- type: -> feature request ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue3493] No Backslash (\) in IDLE 1.2.2

2008-08-02 Thread Marc Rambert
New submission from Marc Rambert <[EMAIL PROTECTED]>: With my MacBook, on IDLE application, I can't type any character like this one \. -- components: IDLE messages: 70637 nosy: Marc67 severity: normal status: open title: No Backslash (\) in IDLE 1.2.2 versions: Python 2.5

[issue3459] optimize bytes.join()

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well as I said it occurred to me when doing some measurements of BufferedReader performance, but I agree that the gain may not justify the complexity. If nobody objects, feel free to close the issue. ___ Py

[issue3459] optimize bytes.join()

2008-08-02 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I dislike this change, not because of the potential slowdown, but because of the added code complexity. How plausible is it that you want to join a list of bytes objects, and the list has more than one item, yet all but one item are empty? I

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You've missed the preceding line that says: +consumed = pbuf.len; If final is NULL, consumed isn't updated by the call to PyUnicode_DecodeMBCSStateful and keeps its original value of pbuf.len. (in all honesty, I didn't test under Window

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Two comments: * I like the new *-getarg parameters, but it would be better to test for '#' first since this is still by far the most used getarg parameter. * Antoine, I think your codecs.c patch has a glitch: +decoded = PyUn

[issue3419] multiprocessing module is racy

2008-08-02 Thread Jesse Noller
Jesse Noller <[EMAIL PROTECTED]> added the comment: On Aug 2, 2008, at 9:44 AM, Mark Dickinson <[EMAIL PROTECTED]> wrote: > > Mark Dickinson <[EMAIL PROTECTED]> added the comment: > >> Are you looking at the conn refused or the incref error? > > The connection refused error. > > The attached p

[issue3419] multiprocessing module is racy

2008-08-02 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > Are you looking at the conn refused or the incref error? The connection refused error. The attached patch fixes the problem, for me. On my machine, the connection refused error code was 61 rather than 10061. With this patch, I'm no lon

[issue3352] Deficiencies in multiprocessing/threading API

2008-08-02 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Sorry, I'm not going to be able to work on this soon. -- assignee: benjamin.peterson -> ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3228] mailbox.mbox creates files with execute bit set

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: It would be nice if the patch came with a test. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3490] Example Code Error in Tutorial Documentation

2008-08-02 Thread Adam
Adam <[EMAIL PROTECTED]> added the comment: You know what, you're absolutely right. My apologies for sending the bad submission. =\ ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3039] tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError

2008-08-02 Thread Lars Gustäbel
Lars Gustäbel <[EMAIL PROTECTED]> added the comment: Thank you very much for your patch, I applied it to the trunk as r65402. However, I decided to remove the TarFileCompat class from the Python 3.0 branch, see http://mail.python.org/pipermail/python-3000/2008-July/014448.html for details. -

[issue3492] Zlib compress/decompress functions returning bytearray

2008-08-02 Thread Anand B Pillai
New submission from Anand B Pillai <[EMAIL PROTECTED]>: >>> import zlib >>> s='This is a string' >>> sc=zlib.compress(s) >>> sc bytearray(b'x\x9c\x0b\xc9\xc8,V\x00\xa2D\x85\xe2\x92\xa2\xcc\xbct\x00/\xc2\x05\xcd') >>> zlib.decompress(sc) bytearray(b'This is a string') >>> This is wrong behavior a

[issue3228] mailbox.mbox creates files with execute bit set

2008-08-02 Thread Niels Gustäbel
Niels Gustäbel <[EMAIL PROTECTED]> added the comment: The problem is not limited to mboxes but also applies to maildirs. Any message file created inside a maildir has execute permissions set as well because the same function _create_carefully() is used. Changing the umask is not an option becaus

[issue2819] Full precision summation

2008-08-02 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > Question: I see "math module patch committed, r63542" in May 22. But in > 3.0b2, there is no math.fsum and math.sum seems to be a wrapper for > builtin sum. Has this not been forward ported (merged) yet? I'm pretty sure it *was* merged:

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2008-08-02 Thread Josiah Carlson
Josiah Carlson <[EMAIL PROTECTED]> added the comment: Sounds good. I look forward to seeing the patch :) . ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue799428] tk_focusNext() fails

2008-08-02 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: -- resolution: -> fixed status: open -> closed versions: +Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue799428] tk_focusNext() fails

2008-08-02 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Thanks for the patch, committed as r65399, r65400, and r65401. ___ Python tracker <[EMAIL PROTECTED]> ___ __