[Python-Dev] Planning on removing cache invalidation for file finders (original) (raw)
Brett Cannon brett at python.org
Sun Mar 3 18:08:00 CET 2013
- Previous message: [Python-Dev] Planning on removing cache invalidation for file finders
- Next message: [Python-Dev] Planning on removing cache invalidation for file finders
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Mar 2, 2013 at 8:16 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
On Sat, 2 Mar 2013 11:16:28 -0500 Brett Cannon <brett at python.org> wrote: > > In addition, it may be appropriate for importlib to offer a > > "writemodule" method that accepts (module name, target path, > > contents). This would: > > > > 1. Allow in-process caches to be invalidated implicitly and > > selectively when new modules are created > > I don't think that's necessary. If people don't want to blindly clear all > caches for a file they can write the file, search the keys in > sys.pathimportercache for the longest prefix for the newly created file, > and then call the invalidatecache() method on that explicit finder.
That's too complicated for non-import experts IMHO.
Which is why they can just call importlib.import_module(). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130303/96c780b4/attachment.html>
- Previous message: [Python-Dev] Planning on removing cache invalidation for file finders
- Next message: [Python-Dev] Planning on removing cache invalidation for file finders
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]