Skip to content

Commit

Permalink
lazy load modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethreitz committed Jan 16, 2018
1 parent bdcf7cc commit 3d562ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pipenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'urllib3', 'background', 'dotenv', 'delegator', 'pexpect',
'requests', 'pip', 'pipfile', 'pipdeptree', 'requirements',
'semver', 'flake8', 'pipreqs', 'blindspin', 'click_didyoumean',
'.project', '.utils'
'.project', '.utils', 'click', 'dotenv'
]:
lazyload.make_lazy(module)

Expand Down
7 changes: 7 additions & 0 deletions pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
except ImportError:
from pathlib2 import Path

import lazyload
for module in [
'piptools', 'contetxlib', 'distutils'
]:
lazyload.make_lazy(module)


from distutils.spawn import find_executable
from contextlib import contextmanager
from piptools.resolver import Resolver
Expand Down

0 comments on commit 3d562ca

Please sign in to comment.