Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve import times and runtimes #2485

merged 11 commits into from Jul 1, 2018


Copy link

@techalchemy techalchemy commented Jul 1, 2018

Signed-off-by: Dan Ryan

Copy link
Member Author

Before PR:

 ~/g/pypa-pipenv       time -p pipenv --venv
real 0.93
user 0.84
sys 0.08

After PR:

 ~/g/pypa-pipenv   import-time-improvement     
real 0.31
user 0.26
sys 0.04

- Lazily import requirementslib

Signed-off-by: Dan Ryan <>
Signed-off-by: Dan Ryan <>
- Pew import is super expensive
- Fixes #2843

Signed-off-by: Dan Ryan <>
Signed-off-by: Dan Ryan <>
Signed-off-by: Dan Ryan <>
@techalchemy techalchemy added this to the 2018.7.0 milestone Jul 1, 2018
pipenv/ Outdated
@@ -139,6 +132,8 @@ def which(command, location=None, allow_global=False):

# Disable warnings for Python 2.6.
if 'urllib3' in globals():
import urllib3
from urllib3.exceptions import InsecureRequestWarning
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be eliminated altogether. We don’t support 2.6 anymore.

@techalchemy techalchemy merged commit ebaadfc into master Jul 1, 2018
@techalchemy techalchemy deleted the import-time-improvement branch July 1, 2018 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants