diff options
| -rw-r--r-- | distutils/core.py | 2 | ||||
| -rw-r--r-- | distutils/dir_util.py | 2 | ||||
| -rw-r--r-- | distutils/tests/test_archive_util.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/distutils/core.py b/distutils/core.py index 34cafbce..05d29719 100644 --- a/distutils/core.py +++ b/distutils/core.py @@ -132,7 +132,7 @@ def setup(**attrs): # noqa: C901 # our Distribution (see below). klass = attrs.get('distclass') if klass: - del attrs['distclass'] + attrs.pop('distclass') else: klass = Distribution diff --git a/distutils/dir_util.py b/distutils/dir_util.py index 80f77649..23dc3392 100644 --- a/distutils/dir_util.py +++ b/distutils/dir_util.py @@ -227,7 +227,7 @@ def remove_tree(directory, verbose=1, dry_run=0): # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) if abspath in _path_created: - del _path_created[abspath] + _path_created.pop(abspath) except OSError as exc: log.warning("error removing %s: %s", directory, exc) diff --git a/distutils/tests/test_archive_util.py b/distutils/tests/test_archive_util.py index 7778c3ad..89c415d7 100644 --- a/distutils/tests/test_archive_util.py +++ b/distutils/tests/test_archive_util.py @@ -289,7 +289,7 @@ class ArchiveUtilTestCase(support.TempdirManager): pass assert os.getcwd() == current_dir finally: - del ARCHIVE_FORMATS['xxx'] + ARCHIVE_FORMATS.pop('xxx') def test_make_archive_tar(self): base_dir = self._create_files() |
