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

Mailing List Archive: Python: Bugs
[issue14657] Avoid two importlib copies
 

Index | Next | Previous | View Flat


report at bugs

May 6, 2012, 11:50 PM


Views: 340
Permalink
[issue14657] Avoid two importlib copies [In reply to]

Nick Coghlan <ncoghlan [at] gmail> added the comment:

In that case, how about we go with:

1. By default, importlib._bootstrap is never imported. Instead, it is set to be a reference to _frozen_importlib. However, _frozen_importlib does *not* lie about where it came from (and doesn't assume the on-disk source matches the frozen source).

2. We provide two private functions in importlib.__init__: one that replaces all _frozen_importlib references in the import state with importlib._bootstrap references (retrieving the latter from disk first), and one that reverses the process.

Note that the __import__ builtin should be replaced as well, since that will otherwise call in to the frozen version of the module.

This is basically the same as Eric Snow's suggestion, just with most of the nuts and bolts kept within importlib, so that the testing context manager doesn't need to know the details - it can just call the appropriate importlib functions to change the active implementation.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Subject User Time
[issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 3:34 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 3:42 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 3:42 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 3:43 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 3:50 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 4:01 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 5:09 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 5:41 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 5:56 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 9:40 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 23, 2012, 9:48 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 1:10 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:06 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:14 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 8:10 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 8:16 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 10:37 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 11:40 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 12:23 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 12:51 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 1:25 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 1:39 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 1:42 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:13 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:15 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:36 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:37 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:46 PM
        [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 2:52 PM
            [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 3:21 PM
                [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 3:29 PM
                    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 2:07 AM
                        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 4:49 AM
                            [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:06 AM
                                [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:12 AM
                                    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:28 AM
                                        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:38 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 24, 2012, 6:13 PM
    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:32 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 5:46 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 7:58 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:14 AM
    [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:25 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:38 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:41 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:52 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:55 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 8:58 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 9:02 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 9:40 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 9:46 AM
            [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 10:46 AM
        [issue14657] Avoid two importlib copies report at bugs Apr 25, 2012, 6:21 PM
        [issue14657] Avoid two importlib copies report at bugs Apr 29, 2012, 1:24 AM
        [issue14657] Avoid two importlib copies report at bugs May 4, 2012, 12:20 PM
            [issue14657] Avoid two importlib copies report at bugs May 17, 2012, 8:25 AM
        [issue14657] Avoid two importlib copies report at bugs May 5, 2012, 9:50 PM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 12:04 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 12:06 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 12:23 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 12:28 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 9:13 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 9:24 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 9:33 AM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 12:05 PM
        [issue14657] Avoid two importlib copies report at bugs May 6, 2012, 11:50 PM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:01 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:05 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:11 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:23 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:42 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 8:47 AM
        [issue14657] Avoid two importlib copies report at bugs May 7, 2012, 12:31 PM

  Index | Next | Previous | View Flat
 
 


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