Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Re: PEP 420 - dynamic path computation is missing rationale
 

Index | Next | Previous | View Flat


pje at telecommunity

May 23, 2012, 5:58 PM


Views: 185
Permalink
Re: PEP 420 - dynamic path computation is missing rationale [In reply to]

On Wed, May 23, 2012 at 8:24 PM, Eric V. Smith <eric [at] trueblade> wrote:

> I tried this approach and it works fine. The only caveat is that it
> assumes that the parent path can always be computed as described above,
> independent of what's passed in to PathFinder.load_module(). I think
> that's reasonable, since load_module() itself hard-codes sys.path if the
> supplied path is missing.
>

Technically, PEP 302 says that finders aren't allowed to assume their
parent packages are imported:

""" However, the find_module() method isn't necessarily always called
during an actual import: meta tools that analyze import dependencies (such
as freeze, Installer or py2exe) don't actually load modules, so a finder
shouldn't *depend* on the parent package being available in sys.modules."""

OTOH, that's finders, and I think we're dealing with loaders here.
Splitting hairs, perhaps, but at least it's in a good cause. ;-)


I've checked this in to the pep-420 branch. I prefer this approach over
> Nick's because it doesn't require any changes to any existing
> interfaces. The changes are contained to the namespace package code and
> don't affect other code in importlib.
>
> Assuming this approach is acceptable, I'm done with the PEP except for
> adding some examples.
>
> And I'm done with the implementation except for adding tests and a few
> small tweaks.
>

Yay!

Subject User Time
PEP 420 - dynamic path computation is missing rationale guido at python May 20, 2012, 6:33 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 21, 2012, 1:00 AM
        Re: PEP 420 - dynamic path computation is missing rationale guido at python May 21, 2012, 6:55 AM
    Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 21, 2012, 11:08 AM
    Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 21, 2012, 4:25 PM
    Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 21, 2012, 4:32 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 21, 2012, 5:32 PM
        Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 22, 2012, 10:47 AM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 22, 2012, 7:51 AM
        Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 22, 2012, 8:39 AM
    Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 22, 2012, 8:41 AM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 22, 2012, 9:31 AM
        Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 22, 2012, 1:43 PM
    Re: PEP 420 - dynamic path computation is missing rationale guido at python May 22, 2012, 11:37 AM
    Re: PEP 420 - dynamic path computation is missing rationale barry at python May 22, 2012, 3:05 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 22, 2012, 5:40 PM
        Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 22, 2012, 6:49 PM
        Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 22, 2012, 6:58 PM
    Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 22, 2012, 8:58 PM
    Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 22, 2012, 9:27 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 23, 2012, 5:31 AM
        Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 23, 2012, 6:02 AM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 23, 2012, 6:10 AM
        Re: PEP 420 - dynamic path computation is missing rationale brett at python May 23, 2012, 12:02 PM
    Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 23, 2012, 8:13 AM
    Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 23, 2012, 12:35 PM
    Re: PEP 420 - dynamic path computation is missing rationale brett at python May 23, 2012, 12:56 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 23, 2012, 2:29 PM
        Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 23, 2012, 5:24 PM
            Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 23, 2012, 5:58 PM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 23, 2012, 6:02 PM
        Re: PEP 420 - dynamic path computation is missing rationale pje at telecommunity May 23, 2012, 7:58 PM
        Re: PEP 420 - dynamic path computation is missing rationale ncoghlan at gmail May 23, 2012, 8:49 PM
    Re: PEP 420 - dynamic path computation is missing rationale guido at python May 24, 2012, 11:33 AM
    Re: PEP 420 - dynamic path computation is missing rationale eric at trueblade May 24, 2012, 11:42 AM
    Re: PEP 420 - dynamic path computation is missing rationale ericsnowcurrently at gmail May 24, 2012, 1:11 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.