[issue6596] urllib2 bug on CentOS

2009-07-31 Thread Senthil
Senthil orsent...@gmail.com added the comment: I would also suggest run the following command: $python /usr/local/lib/python2.6/test/regrtest.py -v test_urllib2 test_urllib test_socket output-of-tests.txt And attach output-of-tests.txt. It might help in getting to the root cause of the issue.

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6550 ___

[issue6611] HTMLParser cannot deal with mixture of arbitrary data and character reference

2009-07-31 Thread Liu DongMiao
New submission from Liu DongMiao liudongm...@gmail.com: HTMLParser (Python 2.6.2) Cannot deal with mixture of arbitrary data and character reference. In line 365-373, replaceEntities(s) returns unichr(charref) in unicode, which cannot be a mixture with arbitrary data in str. A fix way:

[issue6612] 'import site' fails when called from an unlinked directory

2009-07-31 Thread W. Trevor King
New submission from W. Trevor King wk...@drexel.edu: I don't imagine this comes up very often, but: $ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; python -c 'import site'; rmdir: removing directory, /tmp/a 'import site' failed; use -v for traceback Traceback (most recent call last): File string,

[issue5093] 2to3 with a pipe on non-ASCII script

2009-07-31 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: I'd like to suggest that it the output could/should be encoded in UTF-8. -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5093

[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-07-31 Thread Tiago Coutinho
New submission from Tiago Coutinho coutinhoti...@gmail.com: Hello, It seems that the ctypes.PyThreadState_SetAsyncExc is not working in Linux 64bits machines I have tried the code in attachment in python 2.5 and 2.6 in both 32bits and 64bits machines with the following return: | linux

[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I have no time to figure out what the attached script is supposed to do. Please provide a standalone test-script and describe exactly how it should be used to reproduce the bug. However, I guess the problem is that the signature of

[issue6595] Make Decimal constructor accept all unicode decimal digits in input.

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I like the str(int(...)) approach because it guarantees handling that is consistent with other types. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6595

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Joshua Bronson
New submission from Joshua Bronson jabron...@gmail.com: From http://docs.python.org/library/heapq.html: The latter two functions (nlargest and nsmallest) perform best for smaller values of n. For larger values, it is more efficient to use the sorted() function. Also, when n==1, it is more

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, 2.7 and 3.1 already have automatic selection of sort()/min()/max() alternatives. They use pure python to dispatch to the underlying C functions:

[issue5093] 2to3 with a pipe on non-ASCII script

2009-07-31 Thread James Abbatiello
James Abbatiello abb...@gmail.com added the comment: In what case(s) do you propose the output to be encoded in UTF-8? If output is to a terminal and that terminal is set to Latin-1 or cp437 or whatever then outputting UTF-8 in that case will only show garbage characters to the user. If output

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Joshua Bronson
Joshua Bronson jabron...@gmail.com added the comment: Oh, that's great! (I also noticed that the previously inutile line _heappushpop = heappushpop is now doing something in the heapq.py you linked to, nice.) It looks like the docs haven't been updated yet though. For instance,

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I prefer the docs the way they are. They help the reader understand the relationship between min, max, nsmallest, nlargest, and sorted. I'm not sure where you got the n * 10 = len(iterable) switch-over point. That is

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: One other thought: When memory is tight, the programmer needs to be able to select the heap algorithm in favor of sorted() even for relatively large values of n. I do not want an automatic switchover point that takes away a

[issue5093] 2to3 with a pipe on non-ASCII script

2009-07-31 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: I was thinking that if you're converting a Python 2.x script to Python 3.x using 2to3 then also encoding the new script in UTF-8 might be a good idea. -- ___ Python tracker

[issue3493] No Backslash (\) in IDLE 1.2.2

2009-07-31 Thread François HOUNDONOUGBO
François HOUNDONOUGBO funnyfranc...@gmail.com added the comment: Same probleme here with Idle 2.6.2, with a french keyboard. I finally thought that it was due to a default binding recorded as OptionSlash or OptionShift:, something like that, which is identical to the binding of Backslash

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Joshua Bronson
Joshua Bronson jabron...@gmail.com added the comment: I prefer the docs the way they are. They help the reader understand the relationship between min, max, nsmallest, nlargest, and sorted. Except that it's no longer true that when n==1, it is more efficient to use the builtin min() and

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-07-31 Thread Thomas W. Barr
Thomas W. Barr t...@rice.edu added the comment: Patch uploaded to rietveld: http://codereview.appspot.com/96202/show -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6606 ___

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Andrew McNabb schrieb: I just looked at ConvParam in a little more detail, and it seems that the problem is caused because setting pa-value.i to 0 only works for the lower-order bits. Apparently the higher order bits in pa-value are

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Python 3.0 is dead ;-). -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4606 ___

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Joshua Bronson
Joshua Bronson jabron...@gmail.com added the comment: One more thing: I prefer the docs the way they are. They help the reader understand the relationship between min, max, nsmallest, nlargest, and sorted. The docs still use the unspecific language for smaller values of n and for larger

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Except that it's no longer true that when n==1, it is more efficient to use the builtin min() and max() functions. There's still the dispatch overhead. If someone needs a n==1 case, they *should* use min/max for both speed

[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2009-07-31 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- title: Documentation Clarity - Tutorial clarity: section 4.7.2, parameters and arguments ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570

[issue6574] List the __future__ features in a table

2009-07-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: For Python3, the table should start empty as of 3.0/3.1 -- nosy: +tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6574 ___

[issue6239] c_char_p return value returns string, not bytes

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file14615/c_char_p.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6239

[issue6580] No deprecation warning for list comprehension leak conflict

2009-07-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 2.5 is closed to fixes other than security fixes. So this needs to be checked with the latest 2.6. The implementation of new features does not always exactly follow the PEP. So if there is also no warning in 2.6, the question remains whether

[issue6584] gzip module has no custom exception

2009-07-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Unless something in the docs claims that there is/should be such a thing, this is a feature request, not a bug ('behavior') report, and only applicable to future x.y versions. -- nosy: +tjreedy type: behavior - feature request versions:

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Joshua Bronson
Joshua Bronson jabron...@gmail.com added the comment: That is in the pure python version of nsmallest() and that code is not used (it is overriden by the C version). So just because it isn't used by CPython it should remain in there even though as you said yourself it's completely without

[issue1115] Minor Change For Better cross compile

2009-07-31 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: loewis - gregory.p.smith nosy: +gregory.p.smith priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1115 ___

[issue3718] environment variable MACHDEP and python build system

2009-07-31 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: - gregory.p.smith nosy: +gregory.p.smith priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3718 ___

[issue1006238] cross compile patch

2009-07-31 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: - gregory.p.smith nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1006238 ___

[issue1597850] Cross compiling patches for MINGW

2009-07-31 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1597850 ___ ___

[issue5404] Cross-compiling Python

2009-07-31 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5404 ___ ___ Python-bugs-list

[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

2009-07-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: There is a basis for the pure python version to switch to bisect. There is not a basis for having the final wrapped C function switch to using sorted(). That is a programmer decision. The pure python version is there to

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2009-07-31 Thread Martin
Martin famar...@gmail.com added the comment: Looks like python needs eof() or something for file objects, just like any other languages. Since read() is using the system call, that's the right behavior: read() blocks until EOF, and returns whatever was buffered. EOF character is consumed, but

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-31 Thread Nir Soffer
Nir Soffer nir...@gmail.com added the comment: I tested asyncore_fix_refused-3.patch on Mac OS X 10.5 - all asyncore and asynchat tests pass. There is one minor issue - _exception calls the non existing handle_close_event instead of handle_close. However, looking again at the code I think

[issue5737] add Solaris errnos

2009-07-31 Thread Christopher Dolan
Christopher Dolan shyboys...@gmail.com added the comment: This is a patch against the latest subversion revision that adds the addition errno names, numbers, and messages available in Solaris. -- keywords: +patch nosy: +cdolan Added file: http://bugs.python.org/file14616/issue5737.diff

[issue6608] asctime causing python to crash

2009-07-31 Thread James Abbatiello
James Abbatiello abb...@gmail.com added the comment: Since there's no good way to disable the assertion (see issue4804), checking the validity of the argument beforehand looks like an option. The checking that's currently being done in the strftime() implementation looks useful but it is not