[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: That's a good idea. I'll try to get this into the installer before 2.5.2 is actually released. __ Tracker <[EMAIL PROTECTED]> __

[issue2120] broken links in advocacy HOWTO

2008-02-14 Thread Robert Lehmann
Robert Lehmann added the comment: Aye, this patch removes the spaces and re-aligns the paragraph of the latter link. -- nosy: +lehmannro Added file: http://bugs.python.org/file9434/spaces.patch __ Tracker <[EMAIL PROTECTED]>

[issue2120] broken links in advocacy HOWTO

2008-02-14 Thread Ori Avtalion
New submission from Ori Avtalion: The file python/trunk/Doc/howto/advocacy.rst has two broken links: "http://www.catb.org/ esr/jargon/html/C/compact.html" should be "http://www.catb.org/~esr/jargon/html/C/compact.html"; "http://homepages.cwi.nl/ steven/abc/" (line-wrapped in the source) should

[issue2110] Implement __format__ for Decimal

2008-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: I can take a look at this if you like. But I don't want to spoil your fun :) -- nosy: +marketdickinson __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2119] Empty test

2008-02-14 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue2119] Empty test

2008-02-14 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- nosy: loewis severity: normal status: open title: Empty test __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-li

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Christian Heimes
Christian Heimes added the comment: Thomas Heller wrote: > BTW; calling PyObject_GetAttr() with interned strings for > "__instancecheck__" and "__subclasscheck__" brings not enough speedup. I've implemented the interning as static PyObject* in r60822. It should give a small speedup. ___

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-14 Thread stranger4good
New submission from stranger4good: smtplib.SMTP() raises socket.error rather than SMTPConnectError just try this on a non-responding address >>> srv=smtplib.SMTP('192.168.13.22') Traceback (most recent call last): File "", line 1, in File "c:\python25\lib\smtplib.py", line 244, in __init__

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: With this trivial patch, all tests still pass: Index: Objects/descrobject.c === --- Objects/descrobject.c (revision 60754) +++ Objects/descrobject.c (working copy) @@ -166,7 +166,7

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Something interesting: - attribute setting uses PyObject_IsInstance, which is slower since the introduction of ABCs. - attribute reading uses PyObject_TypeCheck, which only searches the __mro__. Does this means that many calls to IsInstance could be replac

[issue2116] weakref copy module interaction

2008-02-14 Thread Rick Harris
New submission from Rick Harris: The copy module will not properly copy/deepcopy weakrefs, it will bomb out with __new__ not having enough args. This is a problem b/c it makes deepcopying of objects that make use of Weak(Key|Value)Dictionaries difficult. To replicate: import copy, weakref class

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: PyObject_IsSubclass() has the same problem. BTW; calling PyObject_GetAttr() with interned strings for "__instancecheck__" and "__subclasscheck__" brings not enough speedup. __ Tracker <[EMAIL PROTECTED]>

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Christian Heimes
Christian Heimes added the comment: I agree, Thomas -- nosy: +tiran priority: -> high __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list ma

[issue2091] file accepts 'rU+' as a mode

2008-02-14 Thread Christian Heimes
Changes by Christian Heimes: -- priority: -> high __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: I think this is a serious problem (and thanks, amaury, for finding the spot). comtypes, like ctypes, uses quite a bit of isinstance calls. It is the reason that the comtypes unit tests run between 8% and 25% slower with trunk than with python 2.5.1. If I comment

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This slowdown is due to the new implementation of isinstance in python2.6. If I comment most of the code of PyObject_IsInstance in Objects/abstract.c (remove all __instancecheck__ stuff; leave only the last line), timings are much better, and more similar

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Facundo Batista
Changes by Facundo Batista: -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Jeffrey Yasskin
New submission from Jeffrey Yasskin: (On a MacBook Pro 2.33 GHz) $ ./python.exe -m timeit -s 'class Foo(object): pass' -s 'f = Foo()' 'f.num = 3' 1000 loops, best of 3: 0.13 usec per loop $ ./python.exe -m timeit -s 'class Foo(object): __slots__ = ["num"]' -s 'f = Foo()' 'f.num = 3' 100

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: A cheap and easy fix would be to update normalize.decTest so that's it's an exact copy of reduce.decTest. This would result in all the normalization tests being run twice, but that's probably better than seeing failing tests. (What happened here is that Mike Co

[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-14 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Thanks for writing the __add__ optimization down. I hadn't realized how simple it was. I think both optimizations are worth it. 22% on a rarely used class is worth 24 lines of python, and I think nearly eliminating the overhead of ABCs (which will prevent them f

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: OSX installer is lame. The only way to work around this is to have pre- and/or post-install hooks that remove the stdlib (but not site- packages). As this only affects the unittests I don't think this is worth the problem right now. Especially because I have

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. But others may run into this problem as well. Is there any way to force the upgrade install to remove this file? __ Tracker <[EMAIL PROTECTED]> __ __

[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-14 Thread Guido van Rossum
Guido van Rossum added the comment: PS. I can shave off nearly 4 usec of the constructor like this: -self = super(Fraction, cls).__new__(cls) +if cls is Fraction: +self = object.__new__(cls) +else: +self = super().__new__(cls) This would seem to g

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: I did an upgrade install on the OSX 10.3. Doing a clean install removes the problem. I'm therefore closing this issue as invalid. Sorry about the noise. -- resolution: -> invalid status: open -> closed __ Tracker <[EM

[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-14 Thread Guido van Rossum
Guido van Rossum added the comment: Yay! And my benchmark went from 70 usec to 15 usec. Not bad! PS. Never use relative speedup numbers based on profiled code -- the profiler skews things tremendously. Not saying you did, just stating the obvious. :) __ Tracker <

[issue2113] Bad interaction between signal and subprocess

2008-02-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: First, this patch has a possible bug: if select() fails on the first iteration, wlist is left undefined, and the next instruction "if self.stdin in wlist" will fail. Second, I think that is is not a good idea to simply exit the loop on the first signal. In

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Facundo Batista
Changes by Facundo Batista: -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: It looks like you've got a stale normalize.decTest file in Lib/test/decimaltestdata. This file shouldn't be present. Can you do a fresh svn checkout and see if the problem persists? -- nosy: +marketdickinson __ Tracke

[issue1736190] asyncore/asynchat patches

2008-02-14 Thread Daniel Arbuckle
Changes by Daniel Arbuckle: -- nosy: +djarb _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue1641] asyncore delayed calls feature

2008-02-14 Thread Facundo Batista
Facundo Batista added the comment: The issue #2006 (asyncore loop lacks timers and work tasks) was closed as duplicate of this one... noting this just for reference. -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]>

[issue2006] asyncore loop lacks timers and work tasks

2008-02-14 Thread Facundo Batista
Facundo Batista added the comment: Because of Giampaolo suggestion, that is reviewing all these asyncore/asynchat issues. -- nosy: +facundobatista resolution: -> duplicate status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2006] asyncore loop lacks timers and work tasks

2008-02-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Since this seems to be a duplicate of #1641 I propose to close this issue. __ Tracker <[EMAIL PROTECTED]> __ ___ Pyt

[issue2114] test_decimal failure on OSX 10.3

2008-02-14 Thread Ronald Oussoren
New submission from Ronald Oussoren: test_decimal fails on Mac OS X 10.3 when using Python 2.5.2c1. I haven't tested other python versions. The same test passes on OSX 10.4 and 10.5 (both on Intel and PPC machines), this was done using the same binaries (the Python.org build for 2.5.2c1). The

[issue2113] Bad interaction between signal and subprocess

2008-02-14 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: Just noticed that in the patch "except select.error:" suffices instead of "except:"... __ Tracker <[EMAIL PROTECTED]> __

[issue1370380] async_chat.push() can trigger handle_error(). undocumented.

2008-02-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: If this won't going to be fixed/modified I suggest to close this report since it's frozen from year 2005. -- nosy: +giampaolo.rodola _ Tracker <[EMAIL PROTECTED]> _

[issue2113] Bad interaction between signal and subprocess

2008-02-14 Thread Daniele Varrazzo
Changes by Daniele Varrazzo: -- components: +Library (Lib) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue2113] Bad interaction between signal and subprocess

2008-02-14 Thread Daniele Varrazzo
Changes by Daniele Varrazzo: Added file: http://bugs.python.org/file9432/subprocess_signal_bug.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-l

[issue2113] Bad interaction between signal and subprocess

2008-02-14 Thread Daniele Varrazzo
New submission from Daniele Varrazzo: During Popen.communicate(), if a signal is caught during the select(), an unhandled exception is raised, and the output gathered is lost. This means that a long running or hanged process can't be killed after a timeout (as shown in the attached example, wher

[issue2112] mmap.error should be a subclass of EnvironmentError and not a direct EnvironmentError

2008-02-14 Thread Thomas Herve
New submission from Thomas Herve: mmap.error in mmapmodule is a direct reference to PyExc_EnvironmentError, whereas it should be a subclass. It makes it provide a specific string representation, and allows to be more specific when catching exceptions. The attached patch tries to provide that. -

[issue2111] mmap segfaults when trying to write a block opened with PROT_READ

2008-02-14 Thread Thomas Herve
New submission from Thomas Herve: Basically, the write method of mmap objects check the state with is_writable, which check the writability with the access attributes. But the mmap object can be opened correctly specifying the rights with prot=mmap.PROt_READ. Attached patch corrects the problem

[issue2110] Implement __format__ for Decimal

2008-02-14 Thread Facundo Batista
New submission from Facundo Batista: A remainder. -- assignee: facundobatista components: Library (Lib) messages: 62389 nosy: facundobatista severity: normal status: open title: Implement __format__ for Decimal versions: Python 3.0 __ Tracker <[EMAIL PROT

[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: In that case, I'm +1 on adding it. The OS won't load those tables unless really needed, so it's more a question of disk space than anything else. __ Tracker <[EMAIL PROTECTED]> _

[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-14 Thread Hye-Shik Chang
Hye-Shik Chang added the comment: I couldn't find an appropriate method to implement in situ compressed mapping table. AFAIK, python has the smallest mapping table footprint for each charset among major open source transcoding programs. I have thought about the compression many times, but every

[issue1813] Codec lookup failing under turkish locale

2008-02-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can confirm this on SVN trunk on a Mandriva system. -- nosy: +pitrou __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think Martin was looking for other optimizations that still leave the data in a static C const (in order to be shared between processes and only loaded on demand), but do compress the data representation, e.g. using some form of Huffman coding. While I don

[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-14 Thread Hye-Shik Chang
Hye-Shik Chang added the comment: I have generated compressed mapping tables by several ways. I extracted mapping data into individual files and reorganized them by translating into Python source code or archiving into a zip file. The following table shows the result: (in kilobytes) (also avail

[issue2109] ?

2008-02-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: For this kind of help, please ask on comp.lang.python forum. See http://www.python.org/community/lists/ Or on a pylab mailing list. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed __ Tra

[issue1762] Inheriting from ABCs makes classes slower.

2008-02-14 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Guido and I discussed this, and the next step seems to be to rewrite _Abstract in C and push it into object. For an idea of how much that'll help, just commenting out _Abstract.__new__ takes the Fraction() constructor from 9.35us to 6.7us on my box, and the C we

[issue2109] ?

2008-02-14 Thread susanna
New submission from susanna: question: i open python and type: from pylab import * plot([1,2,3,4]) show() an EMPTY gui pops up, the line is not plotted. why? this is on MAC OSX 10.4.11 -- messages: 62381 nosy: susanna severity: normal status: open title: ? _