Skip to content

Commit

Permalink
pkg_resources: Remove unused and shadowed variables (#4260)
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Mar 6, 2024
2 parents a89efc5 + ba09176 commit 9b081af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions newsfragments/4260.misc.rst
@@ -0,0 +1 @@
Remove unused ``resources_stream`` ``resource_dir`` and shadowed functions from `pkg_resources` -- by :user:`Avasam`
15 changes: 0 additions & 15 deletions pkg_resources/__init__.py
Expand Up @@ -85,9 +85,7 @@
require = None
working_set = None
add_activation_listener = None
resources_stream = None
cleanup_resources = None
resource_dir = None
resource_stream = None
set_extraction_path = None
resource_isdir = None
Expand Down Expand Up @@ -491,19 +489,6 @@ def compatible_platforms(provided, required):
return False


def run_script(dist_spec, script_name):
"""Locate distribution `dist_spec` and run its `script_name` script"""
ns = sys._getframe(1).f_globals
name = ns['__name__']
ns.clear()
ns['__name__'] = name
require(dist_spec)[0].run_script(script_name, ns)


# backward compatibility
run_main = run_script


def get_distribution(dist):
"""Return a current distribution object for a Requirement or string"""
if isinstance(dist, str):
Expand Down

0 comments on commit 9b081af

Please sign in to comment.