Skip to content

Return an empty list by default in pkg_resources.ResourceManager.cleanup_resources #4244

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

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/4244.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return an empty `list` by default in ``pkg_resources.ResourceManager.cleanup_resources`` -- by :user:`Avasam`
5 changes: 3 additions & 2 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import time
import re
import types
from typing import Protocol
from typing import List, Protocol
import zipfile
import zipimport
import warnings
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def set_extraction_path(self, path):

self.extraction_path = path

def cleanup_resources(self, force=False):
def cleanup_resources(self, force=False) -> List[str]:
"""
Delete all extracted resource files and directories, returning a list
of the file and directory names that could not be successfully removed.
Expand All @@ -1351,6 +1351,7 @@ def cleanup_resources(self, force=False):
directory used for extractions.
"""
# XXX
return []


def get_default_cache():
Expand Down