diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:35:02 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:35:02 -0400 |
commit | dcc71f773576c19a3658735879893515b056ece5 (patch) | |
tree | 2ebc5e39593fb475a7fc957f9965339b5b9ae60a /setuptools/sandbox.py | |
parent | 1e53a2c14e7e0f788c9df2a542ac10f6b2f511d7 (diff) | |
download | external_python_setuptools-dcc71f773576c19a3658735879893515b056ece5.tar.gz external_python_setuptools-dcc71f773576c19a3658735879893515b056ece5.tar.bz2 external_python_setuptools-dcc71f773576c19a3658735879893515b056ece5.zip |
Rename _distutils_importer to _distutils_hack, as it supplies more than just an importer.
Diffstat (limited to 'setuptools/sandbox.py')
-rw-r--r-- | setuptools/sandbox.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 342a713f..24a36080 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -200,7 +200,7 @@ _MODULES_TO_HIDE = { 'distutils', 'pkg_resources', 'Cython', - '_distutils_importer', + '_distutils_hack', } @@ -232,9 +232,9 @@ def hide_setuptools(): necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. """ - _distutils_importer = sys.modules.get('_distutils_importer', None) - if _distutils_importer is not None: - _distutils_importer.remove_shim() + _distutils_hack = sys.modules.get('_distutils_hack', None) + if _distutils_hack is not None: + _distutils_hack.remove_shim() modules = filter(_needs_hiding, sys.modules) _clear_modules(modules) |