[issue6711] macurl2path has typos that raise AttributeError

2009-08-15 Thread Senthil
Senthil added the comment: Thanks for the patch. Fixed it and Committed revision 74469 - py3.2 Committed revision 74470 - py3.1 maint. I wonder how it got unnoticed so far. -- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed ___ Py

[issue6711] macurl2path has typos that raise AttributeError

2009-08-15 Thread Joe Amenta
New submission from Joe Amenta : In a few spots, "urllib.parse" misses a "." after the package name. e.g., "urllib.parse.quote" is spelled "urllib.parsequote", which generates an AttributeError when run. To reproduce, open up a python3.x interpreter and execute: from macurl2path import * url2pa

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Alex
Alex added the comment: Antoine, I hope to have some time to write a patch for this in the coming week. -- ___ Python tracker ___ ___

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I am also unable to reproduce the reported problem using the pastebin.ca/973578 code. The time to download 400mb from localhost remains the same regardless of buffering=False (default) or True. The problem still exists but it is better described in issue1542

[issue6704] better col_offset for AST in statements like "for a, b in ..."

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the patch! Commited in r74464. -- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed ___ Python tracker ___

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 15 août 2009 à 22:06 +, Raymond Hettinger a écrit : > Raymond Hettinger added the comment: > > > The reason is that users expect gc.collect() to make > > its best to diminish memory use. > > I thought GC was expected to eliminate reference cycl

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: trunk r74463 now forces the HTTPResponse with buffering=True to close afterwards using a HTTPResponse._must_close flag similar to what was suggested in buffered_socket.diff in this issue. -- ___ Python tracker

[issue4879] Allow buffering for HTTPResponse

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: trunk r74463 now forces the HTTPResponse to close afterwards when buffering=True to avoid the issue. -- ___ Python tracker ___ ___

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton
Jim Fulton added the comment: Fred might be interested. :) -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton
New submission from Jim Fulton : I've attached a script that demonstrates the problem. When run with Python 2.5, it outputs statistics. When run with Python 2.6.2 it generates a TypeError: python2.6 hotshotbug.py Traceback (most recent call last): File "hotshotbug.py", line 5, in stats.

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The reason is that users expect gc.collect() to make > its best to diminish memory use. I thought GC was expected to eliminate reference cycles. Perhaps there ought to be a separate API, such as sys.clear_freelists(), to eliminate other memory use when

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: Anything that adds a new parameter can not be backported to 2.6 as that counts as an API change / feature addition. -- ___ Python tracker ___

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Josiah Carlson
Josiah Carlson added the comment: I'm not a big fan of the names, but as long as the functionality exists, people can easily alias them as necessary. I've not actually looked at the patch, but as long as it does what it says it does, it looks good. My only question, does it makes sense to ba

[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces

2009-08-15 Thread Senthil
Senthil added the comment: Fixed and Committed revision 74462 -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ _

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's certainly possible to do so, do you have a patch? -- nosy: +pitrou, rhettinger priority: -> normal stage: -> needs patch type: -> performance ___ Python tracker ___

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The reason is that users expect gc.collect() to make its best to diminish memory use. Clearing free lists can allow deallocting some arenas which otherwise would still contain some used memory blocks. As the comment says: /* Clear all free lists * All free lis

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/8/15 STINNER Victor : > > STINNER Victor added the comment: > >> I agree that it's a bug. >> Letting Benjamin decide whether to put it in 3.1.1 :) > > And what about 3.0.x? Is this branch still alive or not? No, it's as dead as a doornail. --

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread STINNER Victor
STINNER Victor added the comment: > I agree that it's a bug. > Letting Benjamin decide whether to put it in 3.1.1 :) And what about 3.0.x? Is this branch still alive or not? -- ___ Python tracker _

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20090815.zip fixes the bugs found in msg91598 and msg91607. The regex engine currently lacks some of the optimisations that the re engine has, but I've concluded that even with them the extra work that the engine needs to do to make it ea

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Sounds ok to me. 2009/8/15 Georg Brandl : > > Georg Brandl added the comment: > > I agree that it's a bug.  Letting Benjamin decide whether to put it in > 3.1.1 :) > > -- > assignee: theller -> benjamin.peterson > nosy: +benjamin.peterson > > __

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Georg Brandl
Georg Brandl added the comment: I agree that it's a bug. Letting Benjamin decide whether to put it in 3.1.1 :) -- assignee: theller -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread John Machin
John Machin added the comment: Simplification of mark's first two problems: Problem 1: looks like regex's negative look-head assertion is broken >>> re.findall(r'(?!a)\w', 'abracadabra') ['b', 'r', 'c', 'd', 'b', 'r'] >>> regex.findall(r'(?!a)\w', 'abracadabra') [] Problem 2: in VERBOSE mode,

[issue6707] dir() on __new__'d module w/o dict crashes 2.6.2

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the report! Fixed in r74457. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue1424148] urllib.FancyURLopener.redirect_internal looses data on POST!

2009-08-15 Thread John J Lee
John J Lee added the comment: If you have a feature request, please open a separate ticket. This one is about an alleged bug. -- ___ Python tracker ___ _

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with the comments which were made on the following points: - please use consistent naming (`as_bytes` / `from_bytes`, or `asbytes` / `frombytes`; my preference goes to the former, especially now that we have `bit_length`) - default byteorder should be na

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Eric Eisner
Eric Eisner added the comment: Is there some pre-existing naming convention of as_X and fromX? It seems strange that two related functions would have a different use of underscores. -- nosy: +ede ___ Python tracker

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for this patch, Alexandre! I'm +1 on applying a version of this patch. I'm not convinced that the variable-length part (i.e., fixed_length=None) of int.as_bytes is all that useful; the choices that need to be made about how to represent integers seem

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: srid, I'm not sure why you added your comment; a couple of sentences explaining where the output you posted comes from (what machine, what version of Python, under what circumstances) would be really useful. If you're able to reproduce this failure and have

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Thomas Heller
Thomas Heller added the comment: > I agree that the C type 'char' is a byte, not a character. So Python3 > should creates a Python bytes object for the ctypes "c_char_p" type. > Since Python 3.1 is out, is it too late to change it in the 3.x branch? > :-) Maybe for Python 3.2? I think the curre

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Chris Withers
Chris Withers added the comment: Why not allow True or an integer as values for a buffer_size parameter to the HTTPConnection constructor. False would be the default, which would mean "no buffering" as currently is the case. True would mean use buffering of the default size and an integer val

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Mark Summerfield
Mark Summerfield added the comment: Hi, I've noticed 3 differences between the re and regex engines. I don't know if they are intended or not, but thought it best to mention them. (I used the issue2636-20090810#3.zip version.) Python 2.6.2 (r262:71600, Apr 20 2009, 09:25:38) [GCC 4.3.2 20081