-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add require argument to load() to accept version specifiers (#48)
* ENH: Implement load_requirement * RF: Rewrite load_requirement as argument to load, add have_module() function * TEST: Test load(..., require=...) keyword arg and have_module() func * ENH: Delay loading of less likely modules Using python -X importtime -c "import lazy_loader": Before ------ import time: self [us] | cumulative | imported package [...] import time: 131 | 22995 | lazy_loader After ----- import time: self [us] | cumulative | imported package [...] import time: 115 | 4248 | lazy_loader * RF: Split requirement check into function, prefer importlib.metadata * Remove have_module (out-of-scope) * DOC: Update docstring and README * DOC: Note discrepancy between distribution and import names * Update README.md Co-authored-by: Dan Schult <dschult@colgate.edu>
- Loading branch information
Showing
4 changed files
with
145 additions
and
32 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
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