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

Mailing List Archive: Python: Dev
Re: importlib is now bootstrapped (and what that means)
 

Index | Next | Previous | View Flat


brett at python

Apr 20, 2012, 8:04 AM


Views: 358
Permalink
Re: importlib is now bootstrapped (and what that means) [In reply to]

On Fri, Apr 20, 2012 at 11:02, Eric Snow <ericsnowcurrently [at] gmail>wrote:

> On Fri, Apr 20, 2012 at 7:54 AM, Eric V. Smith <eric [at] trueblade> wrote:
> > On 04/14/2012 02:12 PM, Brett Cannon wrote:
> >> My multi-year project -- started in 2006 according to my blog -- to
> >> rewrite import in pure Python and then bootstrap it into CPython as
> >> *the* implementation of __import__() is finally over (mostly)!
> >
> > Maybe I'm missing something, but it seems that I need to run
> > importlib._bootstrap._install(sys, _imp) manually in order to make
> > __import__ be importlib's version. Is that not supposed to happen
> > automatically?
>
> In the default tip (3.3a2+), importlib.__import__ is already
> bootstrapped, so you don't need mess with anything. As well, in any
> of the 3.x versions you can bind builtins.__import__ to
> importlib.__import__.
>
> If you are making changes to importlib (essentially, changes in
> Lib/importlib/_bootstrap.py), you must re-build (make) cpython in
> order for your changes to get pulled into the frozen copy of
> importlib. Until you do that, the built-in import machinery will be
> the one that existed before your changes. You could also re-bind
> builtins.__import__ to try out the changes without having to re-build,
> but ultimately your changes will have to get frozen (into
> Python/importlib.h) and will be part of the commit of your changes to
> importlib.
>
> Likely you already know all this, but just in case... :)


And if you want to run a test using importlib instead of the frozen code
you can use importlib.test.regrtest to handle the injection for you.

Subject User Time
importlib is now bootstrapped (and what that means) brett at python Apr 14, 2012, 11:12 AM
    Re: importlib is now bootstrapped (and what that means) g.brandl at gmx Apr 14, 2012, 12:37 PM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 7:07 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 8:21 AM
            Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 12:17 PM
                Re: importlib is now bootstrapped (and what that means) amauryfa at gmail Apr 16, 2012, 1:43 PM
    Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 12:54 AM
        Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 4:13 AM
            Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 4:49 AM
    Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 16, 2012, 9:15 AM
        Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 9:31 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 9:40 AM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 10:04 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 10:32 AM
        Re: importlib is now bootstrapped (and what that means) g.brandl at gmx Apr 16, 2012, 4:11 PM
            Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 5:27 PM
                Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 5:41 PM
                Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 10:12 PM
            Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 17, 2012, 5:18 AM
    Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 10:08 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 10:33 AM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 10:44 AM
        Re: importlib is now bootstrapped (and what that means) barry at python Apr 16, 2012, 10:51 AM
            Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 16, 2012, 11:38 AM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 2:12 PM
    Re: importlib is now bootstrapped (and what that means) ericsnowcurrently at gmail Apr 16, 2012, 10:45 AM
    Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 10:05 PM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 17, 2012, 2:52 AM
        Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 17, 2012, 3:43 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 17, 2012, 8:41 AM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 17, 2012, 10:39 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 17, 2012, 12:52 PM
    Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 20, 2012, 6:54 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 20, 2012, 7:59 AM
        Re: importlib is now bootstrapped (and what that means) ericsnowcurrently at gmail Apr 20, 2012, 8:02 AM
    Re: importlib is now bootstrapped (and what that means) brett at python Apr 20, 2012, 8:04 AM
    Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 20, 2012, 8:07 AM

  Index | Next | Previous | View Flat
 
 


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