forked from ipython/ipython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ipython#2695 from anntzer/module-cache
Key the root modules cache by sys.path entries. Instead of a single root modules cache, cache in a dict the list of modules associated with each sys.path entries (except $PWD). On future import completions, create the list of completions by merging the appropriate cache entries (while updating the cache if sys.path changed) and adding in the modules in $PWD as well. This allows the completer to keep up with multiple Python installations, virtualenvs, etc. Right now the root modules cache grows indefinitely. It may be worth implementing an LRU cache, a la functools.lru_cache. closes ipython#2688
- Loading branch information
Showing
2 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters