Skip to content

when executed as a wheel, pip creates a temporary file containing ca certificates which is not cleaned up #10753

Closed
@asottile

Description

Description

a temporary file is leaked during the execution of pip as a wheel. repeated execution consumes ~250KB per execution which quickly fills up disk if run in a loop

Expected behavior

I expect the temporary file to be cleaned up instead of left around after execution

pip version

21.3.1

Python version

3.8.10

OS

ubuntu 20.04

How to Reproduce

python3 -m pip download pip==21.3.1
PYTHONPATH=pip-21.3.1-py3-none-any.whl python3 -m pip download astpretty

Output

$ du -hs /tmp/tmp*
du: cannot access '/tmp/tmp*': No such file or directory
$ PYTHONPATH=pip-21.3.1-py3-none-any.whl python3 -m pip download astpretty
Collecting astpretty
  Using cached astpretty-2.1.0-py2.py3-none-any.whl (5.3 kB)
Saved ./astpretty-2.1.0-py2.py3-none-any.whl
Successfully downloaded astpretty
$ du -hs /tmp/tmp*
256K	/tmp/tmpf4qxtczw

Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    S: needs triageIssues/PRs that need to be triagedtype: bugA confirmed bug or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions