[issue1733184] slice type is unhashable

2008-03-07 Thread Guido van Rossum
Guido van Rossum added the comment: Alexander nailed my motivation. Have the proponents for this change really thought through that making slices hashable means that henceforth this code will work? d = {} d[:] = [1, 2, 3] # surprise here print d # prints {slice(None, None, No

[issue2256] Install failure of 2.6a1 on Windows XP without VS8 installed

2008-03-07 Thread Michael Urman
Michael Urman added the comment: The failure is signaled by the return code from the call to compileall.py: MSI (s) (FC:D0) [16:38:27:394]: Note: 1: 1722 2: CompilePyc 3: C:\Python26\python.exe 4: -Wi "C:\Python26\Lib\compileall.py" -f -x bad_coding|badsyntax|site-packages "C:\Python26\Lib" The

[issue2249] To document "assertTrue" in unittest

2008-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I prefer that this remain undocumented. The published API is already too fat. This would make it fatter without adding functionality. -- nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]>

[issue1733184] slice type is unhashable

2008-03-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Slice objects are really meant to be internal structures and not passed around in the user's code. I don't know what they're "meant" to be, but they're certainly not internal. If you implement __getitem__, __setitem__, or __delitem__, then chances are P

[issue1733184] slice type is unhashable

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In case I did not make my position clear in my previous post, I am -1 on this RFE. x[:] should mean slicing, not getitem. _ Tracker <[EMAIL PROTECTED]>

[issue1733184] slice type is unhashable

2008-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, any thoughts? I'm +0 on making slices hashable -- no real harm from doing it -- not much benefit either. -- assignee: -> gvanrossum nosy: +gvanrossum _ Tracker <[EMAIL PROTECTED]>

[issue1741218] string formatter %x problem with indirectly given long

2008-03-07 Thread Facundo Batista
Facundo Batista added the comment: Already fixed. Thanks Kenji for the report, Gabriel for the patch in the other issue, and Alexander for noticing this "duplicateness". -- resolution: -> duplicate status: open -> closed _ Tracker <[EMAIL PROTECTED]>

[issue2257] typo in tutorial section 4.4 - final break statement is missing

2008-03-07 Thread Raymond Hettinger
Changes by Raymond Hettinger: -- assignee: georg.brandl -> rhettinger nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list m

[issue1741218] string formatter %x problem with indirectly given long

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This issue has been resolved in issue1742669 . $ ./python.exe Python 2.6a1+ (trunk:61230M, Mar 4 2008, 10:56:31) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class X:

[issue1617161] Instance methods compare equal when their self's are equal

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > the change was meant to unify > the behavior of built-in and > user method objects I don't think it achieved that. Consider: >>> [].index == [].index False but >>> UserList().index == UserList().index True -- nosy: +belopolsky _

[issue1733184] slice type is unhashable

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Patch # 408326 was designed to make assignment to d[:] an error where d is a dictionary. See discussion starting at http://mail.python.org/pipermail/python-list/2001-March/072078.html . I think the only reason slice objects need to be comparable is only

[issue2257] typo in tutorial section 4.4 - final break statement is missing

2008-03-07 Thread k-e-n
New submission from k-e-n: The code from section 4.4 of the tutorial follows. This code does not produce the output shown. Adding a final break statement will fix this. >>> for n in range(2, 10): ... for x in range(2, n): ... if n % x == 0: ... print n, 'equals', x, '*',

[issue2218] Enhanced hotshot profiler with high-resolution timer

2008-03-07 Thread Jean Brouwers
Jean Brouwers added the comment: Here is another version of the profiler files with 7 minor changes in the _hotshot.c file. Use this hires_version3 set, if any. Added file: http://bugs.python.org/file9635/hires_hotshot3.tgz __ Tracker <[EMAIL PROTECTED]>

[issue2179] with should be as fast as try/finally

2008-03-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión: -- nosy: +jcea __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue2255] Change Mandrake by Mandriva for platform.dist()

2008-03-07 Thread Facundo Batista
Facundo Batista added the comment: Assigning as the platform.py file says. The patch is straightforward, I'm only concerned with backward compatibility... -- assignee: -> lemburg nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]>

[issue2256] Install failure of 2.6a1 on Windows XP without VS8 installed

2008-03-07 Thread Jim Kleckner
New submission from Jim Kleckner: When I install 2.6a1 onto a Windoze machine I get a dialog: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Note that it didn't have VS

[issue2255] Change Mandrake by Mandriva for platform.dist()

2008-03-07 Thread Benjamin Peterson
Changes by Benjamin Peterson: -- nosy: +lemburg __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue2249] To document "assertTrue" in unittest

2008-03-07 Thread Benjamin Peterson
Changes by Benjamin Peterson: -- nosy: +purcell __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue2255] Change Mandrake by Mandriva for platform.dist()

2008-03-07 Thread Nicolas Lécureuil
New submission from Nicolas Lécureuil: here is a patch fixing the issue by changing mandrake to mandriva -- components: Library (Lib) files: python-2.5-change-mandrake.patch keywords: patch messages: 63370 nosy: neoclust severity: normal status: open title: Change Mandrake by Mandriva fo

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here are my comments on the other parts of the patch: Python/structmember.c The existing code is safe, but would silently produce wrong result if T_CHAR attribute is assigned a non-ascii character. With the patch this situation will be detected and an ex

[issue2254] Python CGIHTTPServer information disclosure

2008-03-07 Thread Guilherme Polo
Guilherme Polo added the comment: This corrects is_cgi docstring (maybe this should be done in a new issue?). It also removes a part of it that I believe to not be necessary, someone correct me if I'm wrong. Added file: http://bugs.python.org/file9632/CGIHTTPServer_is_cgi_doc_fix.diff _

[issue2196] Fix hasattr's exception problems

2008-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: That last patch is malformed. Added file: http://bugs.python.org/file9631/hasattr_fixes2-real.diff __ Tracker <[EMAIL PROTECTED]> __ __

[issue2196] Fix hasattr's exception problems

2008-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's a patch for that. Personally, I'm +1 on either option; I just want it fixed. :) I suppose the only (minor) problem with propagate things which are not Exception is libraries where the exceptions don't extend Exception. However, the ability to do this is

[issue2254] Python CGIHTTPServer information disclosure

2008-03-07 Thread Guilherme Polo
Guilherme Polo added the comment: oops, I was doing some tests in the last patch and left a bug in it. I'm attaching a new one. Added file: http://bugs.python.org/file9629/CGIHTTPServer_is_cgi_fix2.diff __ Tracker <[EMAIL PROTECTED]>

[issue2254] Python CGIHTTPServer information disclosure

2008-03-07 Thread Guilherme Polo
Guilherme Polo added the comment: I'm attaching a patch that fixes this, it was done for rev 61179 (trunk). Note that is_cgi method is incorrectly documented, even more now. Only the first line in its docstring is correct now, before this patch, last paragraph was correct too. -- keywor

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I tried to produce a buffer overflow in get_parent (import.c), but an attempt to import a module with non-ascii characters is aborted in getargs.c before get_parent is reached: >>> __import__("\u0080xyz") Traceback (most recent call last): File "", line

[issue771479] pyconfig.h duplicates common defines

2008-03-07 Thread Martin v. Löwis
Martin v. Löwis added the comment: None of the PACKAGE_ macros gets defined anymore. For the other ones, I'll close the report as "won't fix". -- resolution: -> wont fix status: open -> closed Tracker <[EMAIL PROTECTED]>

[issue2254] Python CGIHTTPServer information disclosure

2008-03-07 Thread sumar
New submission from sumar: Summary: An information disclosure flaw exists in standard python CGIHTTPServer module. Bug is confirmed in

[issue2252] "continue" documentation

2008-03-07 Thread Georg Brandl
Changes by Georg Brandl: -- resolution: -> duplicate status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Your description of the patch is a bit misleading. As far as I can tell only the first chunk (Python/import.c changes) addresses a potential buffer overflow. For example the last chunk (Modules/posixmodule.c changes) simply eliminates an unused variable.

[issue2252] "continue" documentation

2008-03-07 Thread Ben Pfaff
New submission from Ben Pfaff: Apologies for filing this issue report: I hit "Enter" at the wrong time. Issue 2253 was what I really meant to file. You can close this issue. Sorry about that. __ Tracker <[EMAIL PROTECTED]> ___

[issue2253] "continue" documentation internally inconsistent

2008-03-07 Thread Ben Pfaff
New submission from Ben Pfaff: The "continue" documentation says: "continue may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally statement within that loop." In a footnote to that documentation, it says: "The restriction on occur

[issue2252] "continue" documentation

2008-03-07 Thread Ben Pfaff
Changes by Ben Pfaff: -- assignee: georg.brandl components: Documentation nosy: blp, georg.brandl severity: normal status: open title: "continue" documentation versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]>

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-03-07 Thread Ralf Schmitt
Changes by Ralf Schmitt: -- nosy: +schmir __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2240] setitimer, getitimer wrapper

2008-03-07 Thread Ralf Schmitt
Changes by Ralf Schmitt: -- nosy: +schmir __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2222] Memory leak in os.rename?

2008-03-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Aha! I did not know about the cleanup. Maybe that should be documented as well. This shows that using O& with a converter returning a PyObject* is a bad idea. (General clean-up is not possible for O& because there is no way to tell what type the conv

[issue2179] with should be as fast as try/finally

2008-03-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Hm, my tests do not see any speedup with this patch. I used VS2005 on win2K, and VS2008 on winXP. Timings are very similar before and after this patch. Maybe the optimization is only useful with gcc? __ Tracker <[EMAIL PROT

[issue2179] with should be as fast as try/finally

2008-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: I went ahead and committed the change to the bytecode generation as r61290. The deficiencies in the lock implementation should probably be raised as a separate issue, so I'm closing this one. -- resolution: -> accepted status: open -> closed ___

[issue2251] tarfile using nonexistent function

2008-03-07 Thread Lars Gustäbel
Lars Gustäbel added the comment: This is in fact misuse of the addfile() method on your side. The docs (http://docs.python.org/dev/library/tarfile.html#tarfile.TarFile.addfile) state that the first argument is supposed to be a TarInfo object not a pathname. You should use the add() method instead

[issue2179] with should be as fast as try/finally

2008-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: Patch applied cleanly for me and all tests pass. It also looked good on a visual scan over the diff text. __ Tracker <[EMAIL PROTECTED]> __

[issue2251] tarfile using nonexistent function

2008-03-07 Thread Goten Xiao
Goten Xiao added the comment: Whoops, add: import tarfile to the top of test.py. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue2251] tarfile using nonexistent function

2008-03-07 Thread Goten Xiao
New submission from Goten Xiao: Steps to reproduce: Create test.py with the following contents: tar = tarfile.open("test.tar", "w") tar.addfile("testdir") tar.close() Run the following commands (or equivalent on alternative platforms): mkdir testdir touch testdir/testfile python test.py Result

[issue2196] Fix hasattr's exception problems

2008-03-07 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: I think it would be better not to hardcode specific 2 exceptional cases and indeed follow that second way of instanceof(..., Exception). I think it was introduced exactly to separate "things that can be caught by default" from "things that may be caught only in

[issue2250] rlcompleter raises Exception on bad input

2008-03-07 Thread Lorenz Quack
New submission from Lorenz Quack: in line 130 rlcompleter calls eval on the first part (before the last dot) of the input text. if that part is not valid it will raise an exception which is likely to crash a calling application. example 1: == import rlcompleter rlcompleter.Completer().c

[issue1092502] Memory leak in socket.py on Mac OS X

2008-03-07 Thread vila
Changes by vila: -- nosy: +vila _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue1389051] imaplib causes excessive fragmentation for large documents

2008-03-07 Thread vila
Changes by vila: -- nosy: +vila _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue2222] Memory leak in os.rename?

2008-03-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Alexander, I've looked into Python/getargs.c, I think posix_2str code is fine. (PyArg_ParseTuple with format "et") After conversion succeeded on path1, addcleanup() adds memory buffer for path1 into freelist. When error happend on path2, its memory will be fre

[issue2249] To document "assertTrue" in unittest

2008-03-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión: -- versions: +Python 2.4 __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue2249] To document "assertTrue" in unittest

2008-03-07 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: Python 2.4 and 2.5 unittest includes a "assertTrue" method undocumented. Document it. It is the same method as "assert_" and "failUnless", but the name seems clearer. -- assignee: georg.brandl components: Documentation messages: 63347 nosy: georg.bra