Deprecate uninstalling distutils installed projects

This commit is contained in:
Donald Stufft 2015-01-30 19:01:13 -05:00
parent d926c9e3b8
commit 80fedf7334
1 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import re
import shutil
import sys
import tempfile
import warnings
import zipfile
from distutils.util import change_root
@ -32,6 +33,7 @@ from pip.utils import (
dist_in_usersite, dist_in_site_packages, egg_link_path, make_path_relative,
call_subprocess, read_text_file, FakeFile, _make_build_dir,
)
from pip.utils.deprecation import RemovedInPip8Warning
from pip.utils.logging import indent_log
from pip.req.req_uninstall import UninstallPathSet
from pip.vcs import vcs
@ -600,6 +602,13 @@ exec(compile(
paths_to_remove.add(path + '.pyc')
elif distutils_egg_info:
warnings.warn(
"Uninstalling a distutils installed project ({0}) has been "
"deprecated and will be removed in a future version. This is "
"due to the fact that uninstalling a distutils project will "
"only partially uninstall the project.".format(self.name),
RemovedInPip8Warning,
)
paths_to_remove.add(distutils_egg_info)
elif dist.location.endswith('.egg'):