diff --git a/news/6151.bugfix.rst b/news/6151.bugfix.rst new file mode 100644 index 0000000000..dc9ba2f519 --- /dev/null +++ b/news/6151.bugfix.rst @@ -0,0 +1 @@ +Disable ``ResourceWarning`` warning for temporary files that are cleaned on program exit. diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py index 1523fdbb67..6f6281be5d 100644 --- a/pipenv/routines/install.py +++ b/pipenv/routines/install.py @@ -48,7 +48,7 @@ def do_install( requirements_directory = fileutils.create_tracked_tempdir( suffix="-requirements", prefix="pipenv-" ) - warnings.filterwarnings("default", category=ResourceWarning) + warnings.filterwarnings("ignore", category=ResourceWarning) packages = packages if packages else [] editable_packages = editable_packages if editable_packages else [] package_args = [p for p in packages if p] + [p for p in editable_packages if p]