-
Notifications
You must be signed in to change notification settings - Fork 404
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
Move docopt and yarg imports to local scope #253
base: master
Are you sure you want to change the base?
Conversation
2 similar comments
@befeleme I'm not sure I understood your motivation, pipreqs is not a dependency of pipenv and I couldn't find anything that mentions pipreqs being bundled with pipenv. Could you provide a source regarding this? |
Sure! See vendored dependencies of pipenv. It looks pipreqs is bundled alongside with its installable dependencies and used in this function. The two dependencies mentioned in the PR are only pulled to make pipreqs import correctly. Regarding why - pipenv comes with so many bundled libraries, it's huge. I am currently testing pipenv's dependencies in Fedora, as we prefer to debundle and pull them directly. To be fair, removing two of them will not significantly reduce the size of pipenv, but it's feasible and reduces a drop of its complexity. |
@befeleme I see, thank you for the detailed response! |
@alan-barzilay, thanks for taking time to look at this issue :) Your point is completely understandable to me. Good luck with the refactoring efforts! |
I wonder, would you consider moving the imported libraries from global to local scope?
My motivation comes from pipenv which bundles pipreqs alongside with its dependencies (yarg and docopt), but it really uses only two functions (
get_all_imports
,get_pkg_names
) which don't require them.When moved, pipenv could stop bundling yarg and docopt.