[issue4879] Allow buffering for HTTPResponse

2009-08-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: I believe there will be a problem with the patch committed in r68532. If getresponse(buffering=True) is called, extra data on the socket may be consumed by the socket.makefile() buffer which will cause problems if the connection is not closed immediately afte

[issue6117] Fix O(n**2) performance problem in socket._fileobject

2009-08-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: backported to release26-maint in r74456. -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Pyth

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

2009-08-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Okay, I do not think this has been fixed yet. Anyone calling getresponse() can indeed use buffering=True, it can mess things up if the do not close the connection afterwards. The addition of the sockbuf parameter to HTTPConnection as proposed in buffered_soc

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

2009-08-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Note that http://bugs.python.org/issue4879 may have already fixed this problem in trunk r68532. -- nosy: +gregory.p.smith ___ Python tracker _

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Does anyone here know why GC calls the free_xxx functions? ISTM, they cannot be involved in cycles. Free lists are kept by container objects to speed-up allocation. Having GC call the free_xxx just slows down the GC process and all the subsequent set/list/

[issue1660179] functools.compose to chain functions together

2009-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Martin's reasons for closing the patch. -- ___ Python tracker ___ ___ Python-bug

[issue1660179] functools.compose to chain functions together

2009-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Martin's reasons for closing the patch. -- ___ Python tracker ___ ___ Python-bug

[issue6708] raw_input() calls generate compile errors.

2009-08-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: raw_input() has been renamed to input() in Python 3. -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue6708] raw_input() calls generate compile errors.

2009-08-14 Thread Skip Montanaro
Skip Montanaro added the comment: Try it at the help> prompt without the parens (you're not calling it here, just asking for the documentation on the name "raw_input". help> raw_input Help on built-in function raw_input in module __builtin__: raw_input(...) raw_input([prompt]) -> string

[issue6709] It's possible to create TryExcept with no handlers

2009-08-14 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue6709] It's possible to create TryExcept with no handlers

2009-08-14 Thread Benjamin Peterson
New submission from Benjamin Peterson : I think we might need to devise some way to add custom validation when AST is being compiled. For example, you can also pass a level to ImportFrom which is < -1. >>> x = ast.parse("try: x\nexcept y: pass") >>> del x.body[0].handlers[:] >>> compile(x, "", "

[issue6677] Place the term "delete" within the documentation for os.remove() and os.rmdir()

2009-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: If a change is make, 'remove (delete)' would be sufficient. -- nosy: +tjreedy ___ Python tracker ___ ___

[issue6626] show Python mimetypes module some love

2009-08-14 Thread Jacob Rus
Jacob Rus added the comment: And at Rietveld, patch version 5: http://codereview.appspot.com/107042 -- ___ Python tracker ___ ___ Pyth

[issue6708] raw_input() calls generate compile errors.

2009-08-14 Thread starz
New submission from starz : # -- SOURCE --- # cheerleading program word = raw_input("Who do you go for? ") for letter in word: call = "Gimme a " + letter + "!" print (call) print (letter) + "!" print( "What does that spell?") print( word + "!") # --- end source ---

[issue6626] show Python mimetypes module some love

2009-08-14 Thread Jacob Rus
Jacob Rus added the comment: Okay, here's a version of this patch which (a) adds deprecation warnings, and (b) doesn't bother with lazy init. It should still be nearly completely backwards compatible with the previous mimetypes module. -- Added file: http://bugs.python.org/file14731/m

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-14 Thread Nick Coghlan
Nick Coghlan added the comment: Reopening - this should be rejected by the compiler as a SyntaxError, since it is the comprehension equivalent of writing "return Value" inside a generator function. Specifically, in 3.x, the equivalent written out code is: while True: def _listcomp(

[issue6239] c_char_p return value returns string, not bytes

2009-08-14 Thread STINNER Victor
STINNER Victor 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? -- nosy: +haypo

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

2009-08-14 Thread Dino Viehland
New submission from Dino Viehland : from types import ModuleType as M m = M.__new__(M) dir(m) In 2.5 this raises an exception about not having __dict__, 2.6.2 crashes out right. -- components: Interpreter Core messages: 91580 nosy: DinoV severity: normal status: open title: dir() on __

[issue6706] asyncore's accept() is broken

2009-08-14 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : An old bad design choice in asyncore is how it forces the user to override handle_accept() and then call self.accept() to obtain a socket pair. def handle_accept(self): conn, addr = self.accept() The documentation itself shows the code above

[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2009-08-14 Thread R. David Murray
R. David Murray added the comment: Since 6584 is deemed (correctly, IMO) a feature request, this one must be as well. -- dependencies: +gzip module has no custom exception keywords: +easy nosy: +r.david.murray priority: -> normal stage: -> test needed type: behavior -> feature request

[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2009-08-14 Thread STINNER Victor
STINNER Victor added the comment: First, gzip should use its own errors: this issue depends on #6584. -- nosy: +haypo ___ Python tracker ___ _

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-14 Thread STINNER Victor
STINNER Victor added the comment: The error occurs in Py_Main(), on _PyUnicode_AsString(commandObj). The problem is that _PyUnicode_AsString() is not checked for error. Here is a patch fixing two errors: - display on error message instead of a crash on _PyUnicode_AsString(commandObj) failure -

[issue6681] email.parser clips trailing \n of multipart/mixed part if part ends in \r\n

2009-08-14 Thread R. David Murray
R. David Murray added the comment: The only way I can think of to fix this that won't fail in the case where the body ends with just '\r' (rather than '\r\n' the way the test body does) is to have feedparser keep track of what the overall line endings for the stream being parsed are. ie: to bas

[issue6705] '''3, 5'''.strip(r''', ''') does not strip comma, returns '3, 5'

2009-08-14 Thread Eric Smith
Eric Smith added the comment: Good advice from R. David. In addition, you'll find the help command useful: >>> help(''.strip) Help on built-in function strip: strip(...) S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace re

[issue6705] '''3, 5'''.strip(r''', ''') does not strip comma, returns '3, 5'

2009-08-14 Thread R. David Murray
R. David Murray added the comment: strip removes any of a set of characters from the beginning and end of a string, not the middle. Please refer questions such as this to python-list or python-tutor. There are many helpful people on those lists who will help you learn your way around python.

[issue6705] '''3, 5'''.strip(r''', ''') does not strip comma, returns '3, 5'

2009-08-14 Thread Michael Gruen
New submission from Michael Gruen : I am new, I apologize if this is a trivial or non-problem. I have researched for hours, tried every variant but cannot understand why this doesn't work. -- components: None messages: 91572 nosy: mgruen severity: normal status: open title: '''3,5'''.st

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

2009-08-14 Thread Giorgio
Giorgio added the comment: >I don't know what this is a workaround *for*. As you can see yourself, that code does a complete redirection, taking along the post_data too which is simply not possible by default (and that is obviously a pain in the neck). I never said it was "bug" nor that the co

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

2009-08-14 Thread John J Lee
John J Lee added the comment: This issue is not a bug, and should be closed. It was discussed at length many years ago (different bug tracker ticket), and resolved. Since then the same issue seems to come up every year or so, apparently raised by people who haven't checked the issue tracker

[issue6556] "HOME" is not a standard environment variable on Windows

2009-08-14 Thread Tarek Ziadé
Tarek Ziadé added the comment: The code works as expected because it uses os.path.expanduser('~'), which will look to the right values depending on the platform. So it's just the documentation that is wrong about how distutils behaves under Windows. I'll fix this doc asap, thanks for the feedb

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

2009-08-14 Thread Frank Wierzbicki
Frank Wierzbicki added the comment: Adding tests to test_ast.py for the three cases that exercise the "for a,b" scenario. Also fixed a small bug in the test code generator in test_ast.py -- Added file: http://bugs.python.org/file14728/ast.diff ___ P

[issue6703] cross platform failure and silly test in doctest

2009-08-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: How about removing it and seeing if tests fail? -- nosy: +benjamin.peterson ___ Python tracker ___ __

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

2009-08-14 Thread Frank Wierzbicki
New submission from Frank Wierzbicki : For statements like: for a,b in c: pass The Tuple node "a,b" ends up with a col_offset of 0 (the position of the "for"), but the col_offset should probably be 4 (the position of "a"). This is more consistent with other Tuple node col_offset results. --

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking the PyXXX_ClearFreeList version as approved. -- resolution: -> accepted ___ Python tracker ___ _

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

2009-08-14 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: [...] test_poll test_popen test_poplib stub-asunix.sh: line 238: 25474 Unknown signal 32 $PYTHON $installdir/lib/python?.?/test/regrtest.py -w -u all,-curses,-audio,- network -x $SKIPS stub: core Python test suite FAILED (retval: 160) -- nosy

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-14 Thread Guido van Rossum
Guido van Rossum added the comment: A slot in every type object for this purpose seems wasteful; the large majority of types won't have a free list. (Remember, each user-defined class allocates a full type structure on the heap.) -- assignee: gvanrossum -> ___

[issue6646] test_pickle fails on AIX -- 6.9999999999999994e-308 != 6.9999999999999984e-308

2009-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this as a won't fix: as far as I can tell, the test failure is due to a platform deficiency (string <-> float conversions provided by the C standard library aren't correctly rounded; moreover, they're not accurate enough that converting a C double to

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, do you want a slot assigned for this? -- assignee: -> gvanrossum nosy: +gvanrossum, rhettinger ___ Python tracker ___ ___

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

2009-08-14 Thread Giorgio
Giorgio added the comment: I am not sure where we stand with this issue. It seems to be an old one. urllib2 still claim (as of python 2.6) the following; # Strictly (according to RFC 2616), 301 or 302 in response # to a POST MUST NOT cause a redirection without confirmation # from the user (of

[issue1294959] Problems with /usr/lib64 builds.

2009-08-14 Thread jan matejek
jan matejek added the comment: for completenes, here's a patch that's in use in SUSE. it's advantage over Fedora's is that it works on both 32bit and 64bit installs -- Added file: http://bugs.python.org/file14726/Python-2.6.2-multilib.patch ___ Pytho

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-14 Thread Matthias Troffaes
Matthias Troffaes added the comment: Thanks for the feedback! Attaching a new patch which implements tp_free_list slot as suggested - I hope I did it correctly. I've only implemented the new slot for dict so far, but I'm happy to tp_free_list-ify the other freelist types as well, in a future pa

[issue6703] cross platform failure and silly test in doctest

2009-08-14 Thread Chris Withers
New submission from Chris Withers : Hi All, Line 355 of this code on the 2.6 branch and trunk: http://svn.python.org/view/python/branches/release26- maint/Lib/doctest.py?view=annotate http://svn.python.org/view/python/trunk/Lib/doctest.py?annotate=69012 ...contain a check that doesn't work cro

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: +1 from me too; I agree the current API of PyBytes_FromObject is ugly. Is there still a need for a separate C function for creating a zero- initialized bytes object from a Py_ssize_t or a Python integer? It's a fairly simple operation (PyBytes_FromStringAn

[issue3344] IDLE - use enumerate instead of zip(count(), ...)

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: > Committed on r74446, will merge into py3k. py3k: r74450 -- ___ Python tracker ___ ___ Python-bugs

[issue3926] Idle doesn't obey the new improved warnings arguements

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: > Committed on r74447, will merge into py3k. py3k: r74450 -- ___ Python tracker ___ ___ Python-bugs

[issue1135] xview/yview of Tix.Grid is broken

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: > This has been commited on r74448 now, will merge into py3k. py3k: r74450 -- ___ Python tracker ___ __

[issue6180] Tkinter.Entry: fix for xview and some doc clarifications

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: This is now obsolete since r74448 and r74449, closing. -- status: open -> closed ___ Python tracker ___

[issue1135] xview/yview of Tix.Grid is broken

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: This has been commited on r74448 now, will merge into py3k. -- resolution: -> accepted status: open -> closed versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker

[issue3926] Idle doesn't obey the new improved warnings arguements

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: Committed on r74447, will merge into py3k. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

[issue3344] IDLE - use enumerate instead of zip(count(), ...)

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: Committed on r74446, will merge into py3k. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Raghuram Devarakonda
Changes by Raghuram Devarakonda : -- nosy: +draghuram ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue6702] Tkinter: modify xview of entry widget

2009-08-14 Thread Guilherme Polo
Guilherme Polo added the comment: Please take a look on issue6180. Closing this as duplicate. Also consider checking the issue 1135, your comments are welcome on both issues and may help getting the fix committed. -- nosy: +gpolo resolution: -> duplicate status: open -> closed __

[issue6702] Tkinter: modify xview of entry widget

2009-08-14 Thread paolo
New submission from paolo : I wish to propose a useful and smart method modify in Tkinter Library: Previously to scroll this widget we had to write an external function (recalling xview_moveto and xview_scroll). With my method this operation is cleared and the same as all other widgets (just ha

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
Changes by Bogdan Opanchuk : Added file: http://bugs.python.org/file14724/xmlrpc_overload.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
Changes by Bogdan Opanchuk : Added file: http://bugs.python.org/file14723/test_xmlrpc.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
Changes by Bogdan Opanchuk : Added file: http://bugs.python.org/file14722/server.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
Changes by Bogdan Opanchuk : Added file: http://bugs.python.org/file14721/client.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
Changes by Bogdan Opanchuk : -- keywords: +patch Added file: http://bugs.python.org/file14720/patch.diff ___ Python tracker ___ ___ Pyt

[issue6701] Make custom xmlrpc extension easier

2009-08-14 Thread Bogdan Opanchuk
New submission from Bogdan Opanchuk : I am sorry if the same issue was already considered and rejected for some reason; quick search did not show any traces of it. What I am going to write here is just a proof of concept, but if the idea of the patch is acceptable, I am eager to prepare proper p

[issue6693] New functions in site.py to get user/global site packages paths

2009-08-14 Thread Tarek Ziadé
Changes by Tarek Ziadé : Removed file: http://bugs.python.org/file14707/site.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue6693] New functions in site.py to get user/global site packages paths

2009-08-14 Thread Tarek Ziadé
Tarek Ziadé added the comment: Done. I've put Christian in the loop since he implemented the PEP 370 feature, to make sure these changes are fine with him. -- nosy: +christian.heimes Added file: http://bugs.python.org/file14719/site.patch ___ Python

[issue6666] List of dirs to ignore in trace.py is applied only for the first file

2009-08-14 Thread Gabriel Genellina
Gabriel Genellina added the comment: That's exactly the change 2to3 would suggest for that line. The guy doing the conversion must have missed it. -- nosy: +gagenellina ___ Python tracker _

[issue6556] "HOME" is not a standard environment variable on Windows

2009-08-14 Thread Gabriel Genellina
Gabriel Genellina added the comment: %HOME% isn't set by Windows. %HOMEDRIVE%%HOMEPATH% points to the user's home directory. %USERPROFILE% is where the user's profile is stored, and may or may not be the same as his home directory. %HOMEDRIVE%%HOMEPATH% should be used then, defaulting to %USER

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2009-08-14 Thread David Fraser
Changes by David Fraser : Removed file: http://bugs.python.org/file14698/current-3.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2009-08-14 Thread David Fraser
Changes by David Fraser : Removed file: http://bugs.python.org/file14697/current-2.6.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2009-08-14 Thread David Fraser
David Fraser added the comment: Ah, upon closer inspection - the special parameters $0 $1 $2 etc mentioned in the sh docs refer to parameters within the command string, so that: sh -c 'echo $2 $0 $1' run for "the people" produces: the people run for So the correct patch would be to leave

[issue6682] Default traceback does not handle PEP302 loaded modules

2009-08-14 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

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

2009-08-14 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue4015] [patch] make installed scripts executable on windows

2009-08-14 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail