Re: [Python-Dev] 2.5.3: assessing commits

2008-10-08 Thread A.M. Kuchling
On Tue, Oct 07, 2008 at 08:44:09PM -0400, A.M. Kuchling wrote: > At this point I still have 1191 files left. Many of these commits are > still irrelevant, but this is a lot for me to look through. A tarball > with the remaining commits is at > > http://www.amk.ca/files/python/2.6-changes.t

[Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Sidnei da Silva
I am working on getting Zope to run (or at least, start) with Python 2.6. It actually starts right now after applying some patches, which is amazing on itself, but it dies right away due to changes in asyncore that break Zope's internal version of medusa. I've opened a bug against Zope on Launchpa

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Bill Janssen
Sidnei da Silva <[EMAIL PROTECTED]> wrote: > https://bugs.edge.launchpad.net/zope2/+bug/280020 I think there are real issues here with both asynchat and Medusa. Asynchat has been heavily re-written, and the "ac_out_buffer" has apparently disappeared. But "ac_out_buffer_size" is still there. Tha

[Python-Dev] effect of "exec" on local scope

2008-10-08 Thread Willem Broekema
The issue came up while trying to get some Sympy code running on CLPython. class C: exec "a = 3" print locals() 1. Is it guaranteed that class C gets an attribute "a", i.e. that the locals printed include {'a': 3}? 2. It it (also) guaranteed if it were in a function scope? The complete syntax

[Python-Dev] python dll no longer in system directory?

2008-10-08 Thread Thomas Heller
Is it intended that python30.dll and python26.dll are not longer installed in the \windows\system32 directory? This (pythonxy.dll not on $PATH) causes problems for COM objects implemented in Python. Thanks, Thomas ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] python dll no longer in system directory?

2008-10-08 Thread Christian Heimes
Thomas Heller wrote: Is it intended that python30.dll and python26.dll are not longer installed in the \windows\system32 directory? This (pythonxy.dll not on $PATH) causes problems for COM objects implemented in Python. How did you install Python 2.6? Did you install it only for yourself or f

Re: [Python-Dev] python dll no longer in system directory?

2008-10-08 Thread Thomas Heller
Christian Heimes schrieb: > Thomas Heller wrote: >> Is it intended that python30.dll and python26.dll are not longer >> installed in the \windows\system32 directory? >> >> This (pythonxy.dll not on $PATH) causes problems for COM objects >> implemented in Python. > > How did you install Python 2.6

Re: [Python-Dev] [python-committers] Proposed Python 3.0 schedule

2008-10-08 Thread Benjamin Peterson
On 10/7/08, Mark Hammond <[EMAIL PROTECTED]> wrote: > # This is a Python 3.x script to execute a python 2.x script by 2to3'ing it. > import sys > from lib2to3.refactor import RefactoringTool, get_fixers_from_package > > fixers = get_fixers_from_package('lib2to3.fixes') > options = dict(doctests_onl

Re: [Python-Dev] effect of "exec" on local scope

2008-10-08 Thread Terry Reedy
Willem Broekema wrote: The issue came up while trying to get some Sympy code running on CLPython. class C: exec "a = 3" print locals() 1. Is it guaranteed that class C gets an attribute "a", i.e. that the locals printed include {'a': 3}? 2. It it (also) guaranteed if it were in a function sco

[Python-Dev] __getattr__ and new style classes

2008-10-08 Thread Kristján Valur Jónsson
Hello there. I've just noticed what I consider a performance problem: Using new style classes to provide attribute-like access using __getattr__ is considerably slower than old style classes: Observe: s = """ class dude: def bar(self):pass def __getattr__(self, a): return a class

Re: [Python-Dev] 2.5.3: assessing commits

2008-10-08 Thread A.M. Kuchling
On Wed, Oct 08, 2008 at 08:06:09AM -0400, A.M. Kuchling wrote: > look at commits individually. I'll turn the lists of commits into a > set of wiki pages that we can examine and edit down in parallel. I decided to put them in SVN instead, in sandbox/py2.5.3/ . How do we want to assess these commi

Re: [Python-Dev] python dll no longer in system directory?

2008-10-08 Thread Martin v. Löwis
Thomas Heller wrote: > Is it intended that python30.dll and python26.dll are not longer > installed in the \windows\system32 directory? No, it's not. Please create a bug report (or, better, study the msiexec logs, and msi.py, to find out why this happens). I might not have time to look into this

Re: [Python-Dev] [Python-3000] Proposed Python 3.0 schedule

2008-10-08 Thread Benjamin Peterson
On Wed, Oct 8, 2008 at 12:51 AM, Dmitry Vasiliev <[EMAIL PROTECTED]> wrote: > > BTW, I think the following issues should be also marked as release blockers: Agreed and done. > > - http://bugs.python.org/issue3714 (nntplib module broken by str to > unicode conversion) > - http://bugs.python.org/is

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Josiah Carlson
On Wed, Oct 8, 2008 at 10:30 AM, Bill Janssen <[EMAIL PROTECTED]> wrote: > Sidnei da Silva <[EMAIL PROTECTED]> wrote: > >> https://bugs.edge.launchpad.net/zope2/+bug/280020 > > I think there are real issues here with both asynchat and Medusa. > Asynchat has been heavily re-written, and the "ac_out_

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Sidnei da Silva
On Wed, Oct 8, 2008 at 6:26 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: > ac_out_buffer was removed because it is unneeded (we have a deque; why > rely on an extra attribute?). > ac_out_buffer_size still remains as a blocksize in which to pre-split > outgoing data (if you have a 100k string you w

Re: [Python-Dev] __getattr__ and new style classes

2008-10-08 Thread Nick Coghlan
Kristján Valur Jónsson wrote: > Hello there. > > I‘ve just noticed what I consider a performance problem: > > Using new style classes to provide attribute-like access using > __getattr__ is considerably slower than old style classes: Observe: I can't reproduce those relative numbers using SVN t

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Bill Janssen
Sidnei da Silva <[EMAIL PROTECTED]> wrote: > Great to know. So medusa should be changed similarly to the changes > made to asynchat? Hmmm. Been a long time since a Medusa release, but I need a working Medusa, too. > Your suggestion on the bugtracker is even better: to > subclass asynchat as muc

Re: [Python-Dev] __getattr__ and new style classes

2008-10-08 Thread Steven D'Aprano
On Thu, 9 Oct 2008 06:27:06 am Kristján Valur Jónsson wrote: > Hello there. > I've just noticed what I consider a performance problem: > Using new style classes to provide attribute-like access using > __getattr__ is considerably slower than old style classes: Observe: > > s = """ > class dude: >

Re: [Python-Dev] __getattr__ and new style classes

2008-10-08 Thread Christian Heimes
Steven D'Aprano wrote: Not only don't I observe the same results as you, I'm afraid I can't even get your code to run. I get a SyntaxError from the funny quotes you're using: ´d.foo´ instead of 'd.foo' or "d.foo". Kristján is using the old style and alternative syntax for repr(). Somehow the

Re: [Python-Dev] effect of "exec" on local scope

2008-10-08 Thread Ondrej Certik
Hi Terry, On Wed, Oct 8, 2008 at 9:17 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Willem Broekema wrote: >> >> The issue came up while trying to get some Sympy code running on CLPython. >> >> class C: >> exec "a = 3" >> print locals() >> >> 1. Is it guaranteed that class C gets an attribute "a"

Re: [Python-Dev] __getattr__ and new style classes

2008-10-08 Thread Greg Ewing
Kristján Valur Jónsson wrote: Using new style classes to provide attribute-like access using __getattr__ is considerably slower than old style classes Do you really need __getattr__, or could you use properties instead? -- Greg ___ Python-Dev mailin

Re: [Python-Dev] effect of "exec" on local scope

2008-10-08 Thread Guido van Rossum
Well, I don't recall what CLPython is, but I believe it is broken and that code should work -- there are (or used to be) examples of using exec to populate classes in the standard library so while it may look dodgy it really is exected to work... On Wed, Oct 8, 2008 at 4:40 PM, Ondrej Certik <[EMA

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Bill Janssen
Josiah Carlson <[EMAIL PROTECTED]> wrote: > But yes, zope needs to be changed to reflect the updated > asyncore/asynchat semantics. Trust me; it's faster, cleaner, and > easier to use now. Just for completeness, I built a fresh 2.6, installed Medusa (from http://www.amk.ca/python/code/medusa.htm

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2008-10-08 Thread Guido van Rossum
On Wed, Oct 8, 2008 at 6:39 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > Josiah Carlson <[EMAIL PROTECTED]> wrote: > >> But yes, zope needs to be changed to reflect the updated >> asyncore/asynchat semantics. Trust me; it's faster, cleaner, and >> easier to use now. > > Just for completeness, I b

Re: [Python-Dev] effect of "exec" on local scope

2008-10-08 Thread Terry Reedy
Ondrej Certik wrote: Which works in CPython but fails in CLPython. From your answer it seems to me that this code is not nice and we should not use it and should rather use something like: class Basic(AssumeMeths): ... for k in AssumeMeths._assume_defined: setattr(Basic, 'is_%s' % k, prope