[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2008-12-19 Thread saa
saa p5t...@saaworld.com added the comment: There are bigger problems here. When the code calculates the size to map if size is passed as zero, it simply assigns the 64-bit st_size to the size to mmap. On a 32-bit system, it is obvious that the amount to map must be less than a 32-bit value.

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Posted some doc cleanups in r67850 and r67851. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3439 ___

[issue4700] UnicodeEncodeError in license()

2008-12-19 Thread Michael Newman
New submission from Michael Newman michael.b.new...@gmail.com: UnicodeEncodeError occurs for Microsoft portion of license(). Confirmed on 3 separate Windows XP computers: Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license

[issue4567] Registry key not set if unattended installation used

2008-12-19 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. The registry keys do get set, though not in HKEY_LOCAL_MACHINE, but in HKEY_CURRENT_USER. To install quietly for all users, you need to add ALLUSERS=1; see http://www.python.org/download/releases/2.5/msi/ --

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
New submission from Hagen Fürstenau hfuerste...@gmx.net: As reported by Dmitry Vasiliev on python-dev, a range object suddenly becomes hash()able after an attribute access, e.g. by dir(). If I understand correctly, then the reason is that PyRange_Type doesn't set tp_hash and PyType_Ready is not

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: -- keywords: +patch Added file: http://bugs.python.org/file12400/rangehash.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: You don't need to cast PyObject_HashNotImplemented to hashfunc -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: Why does every other place seem to do the cast? Historical reasons? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: On Fri, Dec 19, 2008 at 2:02 PM, Hagen Fürstenau rep...@bugs.python.org wrote: Hagen Fürstenau hfuerste...@gmx.net added the comment: Why does every other place seem to do the cast? Historical reasons? No, if you look at the functions

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I'm talking about places like these: [hag...@chage py3k]$ grep -R (hashfunc)PyObject_HashNotImplemented Objects/*.c Modules/*.c Objects/dictobject.c: (hashfunc)PyObject_HashNotImplemented, /* tp_hash */ Objects/listobject.c:

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: On Fri, Dec 19, 2008 at 2:14 PM, Hagen Fürstenau rep...@bugs.python.org wrote: Hagen Fürstenau hfuerste...@gmx.net added the comment: I'm talking about places like these: [hag...@chage py3k]$ grep -R (hashfunc)PyObject_HashNotImplemented

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: Here's an updated patch without the cast and a separate patch for removing the other casts. Added file: http://bugs.python.org/file12401/rangehash2.patch ___ Python tracker rep...@bugs.python.org

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: Added file: http://bugs.python.org/file12402/remove_casts.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: Removed file: http://bugs.python.org/file12400/rangehash.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: About the footnote: floor(log(n, 2)) is poor code. This is not supposed to be a dramatic statement, just a statement of fact. Its correctness is dependent on minute details of floating point. It is poor code in exactly the same way that

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___ ___ Python-bugs-list mailing

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: Added file: http://bugs.python.org/file12403/rangehash3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Hagen Fürstenau
Changes by Hagen Fürstenau hfuerste...@gmx.net: Removed file: http://bugs.python.org/file12401/rangehash2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Other possible wording: ... so that ``k`` is approximately ``1 + int(log(abs(x), 2))``. -- assignee: marketdickinson - rhettinger ___ Python tracker rep...@bugs.python.org

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-19 Thread Muhammad Alkarouri
Muhammad Alkarouri malkaro...@gmail.com added the comment: 2008/12/18 Benjamin Peterson rep...@bugs.python.org: Benjamin Peterson musiccomposit...@gmail.com added the comment: I've uploaded a .dmg for 2.6.1 to http://www.python.org/ftp/python/2.6.1/. Could you please test it? Just to

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: The origin of the unnecessary hashfunc casts is just me following some of the more specific examples of filling in the tp_hash slot too closely without checking if the cast was still needed. I'll apply and backport Hagen's patches to 3.0 soon

[issue4702] [PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError

2008-12-19 Thread Philip Jenvey
New submission from Philip Jenvey pjen...@users.sourceforge.net: Python 2.6's new msvc9compiler misbehaves when it can't find a compiler (actually a utility of the missing compiler) in its query_vcvarsall() -- it raises an IOError instead of a typical distutils error build tools expect a

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-19 Thread Miki Tebeka
Changes by Miki Tebeka miki.teb...@gmail.com: -- nosy: -tebeka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4017 ___ ___ Python-bugs-list

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: OK, the discrepancy with bytearray turns out to be fairly straightforward: bytearray overrides the comparison operations, so inheritance of the default object.__hash__ is automatically blocked. range() objects don't support comparison, so they

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-19 Thread Leo M
Changes by Leo M leoofb...@gmail.com: -- nosy: -leoofborg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4017 ___ ___ Python-bugs-list mailing

[issue3439] create a numbits() method for int and long types

2008-12-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: ... so that ``k`` is approximately ``1 + int(log(abs(x), 2))``. I guess that could work. One other thing: the docs for the trunk seem to suggest that we should be using trunc here, rather than int. I'm looking at:

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Patch looks good to me. -- nosy: +amaury.forgeotdarc resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-19 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- priority: high - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4580 ___ ___

[issue4700] UnicodeEncodeError in license()

2008-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Fixed in r67859 (trunk), r67860 (py3k) and r67861 (3.0) Thanks for the report! -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed ___ Python tracker

[issue4702] [PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError

2008-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I agree with the patch, except that DistutilsPlatformError seems more appropriate - this function is called when the compiler object is configured, before it is used to actually compile files. -- nosy: +amaury.forgeotdarc

[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2008-12-19 Thread saa
saa p5t...@saaworld.com added the comment: Notes on the problem. The Python mmap documentation says: If length is 0, the maximum length of the map will be the current size of the file when mmap is called. Currently, on a system where off_t is 64-bit and size_t is 32-bit, if the size of the

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-19 Thread Ohmi
Ohmi b...@ieee.org added the comment: Installed on 10.5.6, IDLE ran correctly. Nicely done. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4017 ___ ___

[issue4691] IDLE Code Caching Windows

2008-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reopening: the user did not choose the -n option; this option is always set when using edit with IDLE Windows shell command. -- resolution: invalid - status: closed - open ___ Python

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, xrange() is hashable in Py2.6. I believe it was intended that that carry over to Py3.0's range() objects. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4701 ___ ___ Python-bugs-list mailing list

[issue4533] 3.0 file.read dreadfully slow

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4533 ___

[issue4565] io write() performance very slow

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___

[issue1717] Get rid of more refercenes to __cmp__

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717 ___

[issue4604] close() seems to have limited effect

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4604 ___

[issue4617] SyntaxError when free variable name is also an exception target

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___

[issue4228] struct.pack('L', -1)

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4228 ___

[issue3248] ScrolledText can't be placed in a PanedWindow

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3248 ___

[issue3767] tkColorChooser may fail if no color is selected

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3767 ___

[issue1706039] Added clearerr() to clear EOF state

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1706039 ___

[issue1040026] os.times() is bogus

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1040026 ___

[issue4561] Optimize new io library

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4561 ___

[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-19 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4449 ___

[issue4669] bytes,join and bytearray.join not in manual; help for bytes.join is wrong.

2008-12-19 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I am puzzled as to what you think is missing in the manual. Bytes and Byte Array Methods Bytes and bytearray objects, being “strings of bytes”, have all methods found on strings, with the exception of encode(), format() and isidentifier(),

[issue4703] Syntax error in sample code for enumerate in documentation.

2008-12-19 Thread Roger
New submission from Roger rdcol...@gmail.com: Summary: Sample code for enumerate contains a syntax error. The same code reads: for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter')]: ... print(i, season) Where the parenthesis and square bracket to the left of the colon in the

[issue4703] Syntax error in sample code for enumerate in documentation.

2008-12-19 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Thanks for the report! Fixed in r67865. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4703

[issue4669] bytes,join and bytearray.join not in manual; help for bytes.join is wrong.

2008-12-19 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: Terry, you are right. I missed that. My report was based on looking via the index and finding only (str method), no (byte[sarray] method). ___ Python tracker rep...@bugs.python.org

[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2008-12-19 Thread saa
saa p5t...@saaworld.com added the comment: Ok, put a fork in me, 'cuz I'm done with this. The latest is that mmap.size() is defined to return the size of the file and not the size of the data. It tries to return it as a ssize_t, which of course, on systems where off_t is 64-bits and ssize_t

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: It has been pointed out to me that xrange() objects are hashable in 2.x, and since these range objects are immutable, I don't believe there is any driving reason for them not to be hashable. At that point the question becomes one of why

[issue4701] range objects becomes hashable after attribute access

2008-12-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Bumping to release blocker for 3.0.1 - until I understand this better, I'm not sure if the xrange-range hashing behaviour change between 2.x and 3.x is a type specific problem or a general issue in the implementation of the new approach to