diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-28 16:02:14 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-28 16:02:14 -0500 |
commit | ee14a898847efe9d53f7dc57b872805753463eb5 (patch) | |
tree | 0910df385b7dfa470ed52c45976766c5008cd86d /setuptools/sandbox.py | |
parent | b239a5f2ec3ef076bfe825db1a694f02351b281f (diff) | |
download | external_python_setuptools-ee14a898847efe9d53f7dc57b872805753463eb5.tar.gz external_python_setuptools-ee14a898847efe9d53f7dc57b872805753463eb5.tar.bz2 external_python_setuptools-ee14a898847efe9d53f7dc57b872805753463eb5.zip |
Rename function to match intention.
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-x | setuptools/sandbox.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 63760df4..f1b60cc0 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -134,17 +134,17 @@ def setup_context(setup_dir): yield -def _is_setuptools_module(mod_name): +def _needs_hiding(mod_name): """ - >>> _is_setuptools_module('setuptools') + >>> _needs_hiding('setuptools') True - >>> _is_setuptools_module('pkg_resources') + >>> _needs_hiding('pkg_resources') True - >>> _is_setuptools_module('setuptools_plugin') + >>> _needs_hiding('setuptools_plugin') False - >>> _is_setuptools_module('setuptools.__init__') + >>> _needs_hiding('setuptools.__init__') True - >>> _is_setuptools_module('distutils') + >>> _needs_hiding('distutils') True """ pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)') @@ -158,7 +158,7 @@ def hide_setuptools(): necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. """ - modules = filter(_is_setuptools_module, sys.modules) + modules = filter(_needs_hiding, sys.modules) _clear_modules(modules) |