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

pip-compile doesn't clean up its temporary directories, generates warnings with PYTHONDEVMODE=1 #1209

Closed
si14 opened this issue Sep 2, 2020 · 2 comments

Comments

@si14
Copy link

si14 commented Sep 2, 2020

When run with PYTHONDEVMODE=1 pip-compile emits a bunch of warnings like this:

/usr/local/lib/python3.8/tempfile.py:819: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpfrhhtu6jbuild'>
  _warnings.warn(warn_message, ResourceWarning)
/usr/local/lib/python3.8/tempfile.py:819: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmp0o5twtbvsource'>

Quick skim through the sources reveals that temporary directories are created without explicit cleanup. Probably the easiest way to fix it is to use them as context managers.

Environment Versions

  1. OS Type: any
  2. Python version: 3.8
  3. pip version: 20.0.2
  4. pip-tools version: 5.3.1

Steps to replicate

  1. run PYTHONDEVMODE=1 pip-compile ... on a nontrivial list of dependencies
  2. see the warnings

Expected result

No warnings

Actual result

A bunch of warnings

@atugushev
Copy link
Member

Hello @si14,

Thanks for the issue. It's fixed in #1233.

@si14
Copy link
Author

si14 commented Dec 4, 2020

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants