[issue2605] Descriptor instance attributes not interpreted consistently

2008-04-16 Thread Piet Delport
Piet Delport <[EMAIL PROTECTED]> added the comment: >From the Py3K list: http://mail.python.org/pipermail/python-3000/2007-March/006304.html The sentiment appears to be to leave the behavior implementation-defined. It seems straightforward to update inspect and pydoc to mirror typeobject.c, bu

[issue2603] Make range __eq__ work

2008-04-16 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: No need to get hung-up on the hash function. I can fix that up after a checkin and use something simple like: hashvalue = (start*prime1+seqlen) *prime2+step. That doesn't involve object creation and it produces the same hash value for r

[issue2646] Python does not accept unicode keywords

2008-04-16 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: -- versions: +Python 2.6 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mail

[issue2647] XML munges apos entity in tag content

2008-04-16 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: That's not a bug. The two XML documents are completely equivalent. If you rely on the lexical representation of specific characters, you should reconsider your usage of XML. toxml could have chosen to represent < as <, and that still would ha

[issue643841] New class special method lookup change

2008-04-16 Thread Piet Delport
Piet Delport <[EMAIL PROTECTED]> added the comment: Somewhat related: #2605 (descriptor __get__/__set__/__delete__) -- nosy: +pjd Tracker <[EMAIL PROTECTED]> __

[issue2605] Descriptor instance attributes not interpreted consistently

2008-04-16 Thread Piet Delport
Piet Delport <[EMAIL PROTECTED]> added the comment: Related: #643841 (new-style special method lookup) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-

[issue2630] repr() should not escape non-ASCII characters

2008-04-16 Thread atsuo ishimoto
atsuo ishimoto <[EMAIL PROTECTED]> added the comment: > If you do want to have this more flexible, then make the encoding used > by unicode_repr() adjustable, turn the existing code into a codec (e.g. > "unicode-repr") and leave it setup as default. Turning code in unicode_repr() into a codec

[issue2646] Python does not accept unicode keywords

2008-04-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10045/issue2646.diff __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue2646] Python does not accept unicode keywords

2008-04-16 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: I would say this is a good idea for 2.6. Note that C functions are more forgiving: >>> from datetime import * >>> date(1,2,**{u'day':10}) datetime.date(1, 2, 10) >>> dict(**{u'x':1,2:3,():5}) {u'x': 1, 2: 3, (): 5} but >>> date(1,2,*

[issue2603] Make range __eq__ work

2008-04-16 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Wed, Apr 16, 2008 at 9:24 PM, Benjamin Peterson wrote: .. > Why not just hash a tuple? There are a few reasons, but neither is good enough to have another round of code review :-) 1. It is strange to have the hash function allocate

[issue2647] XML munges apos entity in tag content

2008-04-16 Thread Richard Esplin
New submission from Richard Esplin <[EMAIL PROTECTED]>: I would like it to leave my ' alone, just like it does with my < and > Python 2.5.1 (r251:54863, Sep 21 2007, 22:46:31) [GCC 4.2.1 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.d

[issue2603] Make range __eq__ work

2008-04-16 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: When I was trying to get the hash to resemble tuple's, it occurred to me: Why not just hash a tuple? Added file: http://bugs.python.org/file10044/range_eq6.patch __ Tracker <[EMAIL PROTECTED]>

[issue2646] Python does not accept unicode keywords

2008-04-16 Thread John (J5) Palmieri
John (J5) Palmieri <[EMAIL PROTECTED]> added the comment: Someone has convinced me that it is not worth bothering the dev team since they will have this fixed in P3k the right way. If it is easy then please fix this, otherwise feel free to close. __ Tracker <[EMAI

[issue2646] Python does not accept unicode keywords

2008-04-16 Thread John (J5) Palmieri
New submission from John (J5) Palmieri <[EMAIL PROTECTED]>: # given this function def a(**kwargs): pass # this works a(**{'b':'c'}) # this throws a format error a(**{u'b':'c'}) I am using a web framework (TurboGears w/ genshi templating) which often pass around dictionaries as keyword arg

[issue2603] Make range __eq__ work

2008-04-16 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Wed, Apr 16, 2008 at 3:40 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: .. > Why would you want to have hash(range(a,b,c)) == hash((a,b,c)) ? No particular reason other than that this is easy to test and gives some assurance that ha

[issue2640] "excel" csv option generates multiple lines

2008-04-16 Thread Skip Montanaro
Changes by Skip Montanaro <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bu

[issue2603] Make range __eq__ work

2008-04-16 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Why would you want to have hash(range(a,b,c)) == hash((a,b,c)) ? It'd be more logical to have hash(range(a,b,c)) == hash(tuple(range(a,b,c))) ... which is not the same thing at all :) -- nosy: +pitrou

[issue2630] repr() should not escape non-ASCII characters

2008-04-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: While it may be desirable to to have repr(unicode) return a non-ASCII string, the suggested approach is not suitable to solve the problem. repr() is usually used in logging and applications/users/tools don't expect to suddenly find non-AS

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2008-04-16 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: I tested under Linux (Ubuntu distro), Python trunk _ Tracker <[EMAIL PROTECTED]> _ ___ P

[issue2483] int and float accept bytes, complex does not

2008-04-16 Thread Mark Dickinson
Changes by Mark Dickinson <[EMAIL PROTECTED]>: -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue2640] "excel" csv option generates multiple lines

2008-04-16 Thread Jeff Hall
Jeff Hall <[EMAIL PROTECTED]> added the comment: you're absolutely correct, i apologize. On Tue, Apr 15, 2008 at 7:40 PM, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > Skip Montanaro <[EMAIL PROTECTED]> added the comment: > > What platform are you on? Did you open the output file in > binary m

[issue2632] performance problem in socket._fileobject.read

2008-04-16 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: As A.M. Kuchling said in the other bug :), there is no need to fix 2.5.2 as the offending change is posterior to the release. By the way, somewhat really ought to close either this bug or #2601, discussing things in parallel in two different b

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2008-04-16 Thread Tal Einat
Tal Einat <[EMAIL PROTECTED]> added the comment: Thanks for taking the time to review this patch, Guilherme. For the record, on which OS+Python have you tested this? _ Tracker <[EMAIL PROTECTED]> __

[issue2645] httplib throws ValueError

2008-04-16 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: thanks for the patch. can you check the HTTP/1.1 RFC and see what it says (if anything) about handling this case? also, do you happen to get this consistently from any particular urls or servers or is this pretty random just happening und

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-04-16 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is an updated patch against trunk. -- keywords: +patch Added file: http://bugs.python.org/file10041/1222.patch __ Tracker <[EMAIL PROTECTED]> ___

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-04-16 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9341/1222.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2645] httplib throws ValueError

2008-04-16 Thread Niall O'Higgins
New submission from Niall O'Higgins <[EMAIL PROTECTED]>: I do a lot of urllib2 reads of HTTP URLs. From time to time, I see the following exception being thrown: File "/usr/local/lib/python2.5/socket.py", line 291, in read data = self._sock.recv(recv_size) File "/usr/local/lib/python2.5

[issue2603] Make range __eq__ work

2008-04-16 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: range_eq5.patch fails to reproduce tuple hash because in the tuple hash implementation the len variable varies between iterations over items. I would just use literals for the three different values of mult rather than copying mult += (l

[issue2603] Make range __eq__ work

2008-04-16 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: With range_eq5.patch applied on an x86-64 Linux box: $ ./python Python 3.0a4+ (py3k:62359M, Apr 16 2008, 13:36:31) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2008-04-16 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: The close method does not call msync or FlushViewOfFile. I find this a bit strange cause explicitly closing the mmap will not flush changes but relying on the garbage collector will flush changes. __ Tracker <[EM

[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2008-04-16 Thread Ralf Schmitt
Changes by Ralf Schmitt <[EMAIL PROTECTED]>: -- type: -> behavior versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue2644] errors from msync ignored in mmap_object_dealloc

2008-04-16 Thread Ralf Schmitt
New submission from Ralf Schmitt <[EMAIL PROTECTED]>: mmapmodule.c's mmap_object_dealloc calls msync without checking for an error. -- messages: 65553 nosy: schmir severity: normal status: open title: errors from msync ignored in mmap_object_dealloc type: behavior versions: Python 2.6 _

[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2008-04-16 Thread Ralf Schmitt
New submission from Ralf Schmitt <[EMAIL PROTECTED]>: on unix it does call msync however. here is the relevant part from mmapmodule.c: static void mmap_object_dealloc(mmap_object *m_obj) { #ifdef MS_WINDOWS if (m_obj->data != NULL) UnmapViewOfFile (m_obj->data);

[issue2122] mmap.flush does not check for errors on windows

2008-04-16 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: I thought about this too, but I don't know of a way to provoke an error. (Other than passing in illegal values, but the code tries to catch those. And btw, raises an Exception on windows :) One could currently pass in a negative value for size

[issue2122] mmap.flush does not check for errors on windows

2008-04-16 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Perhaps it would be better if the patch came with unit tests. I agree that the situation right now is insane. PS : I have no power to commit or even accept a patch :) -- nosy: +pitrou __ Tracker <[EMA

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

2008-04-16 Thread Ralf Schmitt
Changes by Ralf Schmitt <[EMAIL PROTECTED]>: -- nosy: +schmir __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2122] mmap.flush does not check for errors on windows

2008-04-16 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: now this insanity is even documented with svn revision 62359 (http://hgpy.de/py/trunk/rev/442252bce780) __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1622] zipfile hangs on certain zip files

2008-04-16 Thread Alan McIntyre
Alan McIntyre <[EMAIL PROTECTED]> added the comment: Is there anything else that needs to be addressed before this can be committed? At the moment I don't know of anything, just wanted to make sure somebody wasn't waiting on me. As a reminder, issues #1526 and #1746 should be closed if this p

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2008-04-16 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: Works fine for me, I just dislike that Port binding error message because it is a bit misleading. It says "IDLE can't bind any TCP/IP port, ..." which is not entirely true. -- nosy: +gpolo _ Tracke

[issue2603] Make range __eq__ work

2008-04-16 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Thanks Alexander. Trying again. Added file: http://bugs.python.org/file10039/range_eq5.patch __ Tracker <[EMAIL PROTECTED]> __