Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Phillip J. Eby
At 09:20 PM 1/9/2008 +0100, Christian Heimes wrote: >Brett Cannon wrote: > > I agree with Nick and Nick. This should really be two separate PEPs. > >I'm fine with the proposal and I'm going to chop the PEP in two parts >tonight. > >Somehow I suspect that the lazy import PEP will be postponed or re

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Christian Heimes
Brett Cannon wrote: > I agree with Nick and Nick. This should really be two separate PEPs. I'm fine with the proposal and I'm going to chop the PEP in two parts tonight. Somehow I suspect that the lazy import PEP will be postponed or reject. Christian ___

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Brett Cannon
On Jan 9, 2008 7:38 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > Christian Heimes <[EMAIL PROTECTED]> wrote: > >> I've attached the first public draft of my first PEP. > > > > Some brief thoughts from me on the PEP... > > > > Post import hooks sound great and a good ide

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Tim Golden
Neil Toronto wrote: > Aside: > > Nick Coghlan wrote: >> My main concern is that the import lock is something Python users >> typically don't have to worry about (aside from the 'don't spawn a >> thread as a side effect of importing' guideline)... > > I've never heard of this and I can't get Goo

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Neil Toronto
Aside: Nick Coghlan wrote: > My main concern is that the import lock is something Python users > typically don't have to worry about (aside from the 'don't spawn a > thread as a side effect of importing' guideline)... I've never heard of this and I can't get Google to find it. Is it a deadlock

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Nick Coghlan
Nick Craig-Wood wrote: > Christian Heimes <[EMAIL PROTECTED]> wrote: >> I've attached the first public draft of my first PEP. > > Some brief thoughts from me on the PEP... > > Post import hooks sound great and a good idea. > > Lazy importing sounds like a recipe for hard to find bugs and rather

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Nick Craig-Wood
Christian Heimes <[EMAIL PROTECTED]> wrote: > I've attached the first public draft of my first PEP. Some brief thoughts from me on the PEP... Post import hooks sound great and a good idea. Lazy importing sounds like a recipe for hard to find bugs and rather too magic for my taste. Perhaps you

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Phillip J. Eby
At 06:01 AM 1/9/2008 +0100, Christian Heimes wrote: >However the PEP covers only the basic infrastructure for lazy imports. >For example imp.lazy_import("a.b.c") doesn't put "a" and "a.b" in >sys.modules. That's probably a mistake. In the early days of peak.util.imports (which is now available a

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
[EMAIL PROTECTED] wrote: > and very recently, I implemented similar functionality myself (though it > isn't in use in Twisted yet): > > http://codebrowse.launchpad.net/~glyph/+junk/pyexport/files I'm going to study your implementation tomorrow. > Something that I notice about every other im

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Fred Drake
I foolishly wrote: > Let's not forget zope.deferredimport: > > http://pypi.python.org/pypi/zope.deferredimport On Jan 8, 2008, at 11:03 PM, Christian Heimes wrote: > I've mentioned zope.deferredimport in my PEP. :) Indeed; that's what I get for scanning the text too quickly. Sorry! The URL I

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
Fred Drake wrote: > On Jan 8, 2008, at 7:53 PM, Neal Becker wrote: >> Note also that mercurial has demandimport >> http://www.selenic.com/mercurial/wiki/ > > > Let's not forget zope.deferredimport: > >http://pypi.python.org/pypi/zope.deferredimport I've mentioned zope.deferredimport in my P

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread glyph
On 01:09 am, [EMAIL PROTECTED] wrote: >Neal Becker wrote: >>Christian Heimes wrote: >> >> > I've attached the first public draft of my first PEP. A working >>patch >> > against the py3k branch is available at >>http://bugs.python.org/issue1576 >> > >> > Christian >> >>Note also that mercurial has

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Fred Drake
On Jan 8, 2008, at 7:53 PM, Neal Becker wrote: > Note also that mercurial has demandimport > http://www.selenic.com/mercurial/wiki/ Let's not forget zope.deferredimport: http://pypi.python.org/pypi/zope.deferredimport -Fred -- Fred Drake _

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Andrew Bennetts
Neal Becker wrote: > Christian Heimes wrote: > > > I've attached the first public draft of my first PEP. A working patch > > against the py3k branch is available at http://bugs.python.org/issue1576 > > > > Christian > > Note also that mercurial has demandimport > http://www.selenic.com/mercurial

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Neal Becker
Christian Heimes wrote: > I've attached the first public draft of my first PEP. A working patch > against the py3k branch is available at http://bugs.python.org/issue1576 > > Christian Note also that mercurial has demandimport http://www.selenic.com/mercurial/wiki/ _

[Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
I've attached the first public draft of my first PEP. A working patch against the py3k branch is available at http://bugs.python.org/issue1576 Christian PEP: 369 Title: Lazy importing and post import hooks Version: $Revision$ Last-Modified: $Date$ Author: Christian Heimes Status: Draft Type: Stan