Deprecate --egg (#3956)

This commit is contained in:
Donald Stufft 2016-09-07 16:43:58 -04:00 committed by GitHub
parent 1ee7297c54
commit 403e398330
4 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,10 @@
**8.2.0 (unreleased)**
* **DEPRECATION** ``pip install --egg`` have been deprecated and will be
removed in the future. This "feature" has a long list of drawbacks where it
breaks almost all of pip's other features in subtle and hard to diagnose
ways.
* Added Appveyor CI
* Uninstall existing packages when performing an editable installation of

View File

@ -179,6 +179,15 @@ class InstallCommand(RequirementCommand):
cmdoptions.resolve_wheel_no_use_binary(options)
cmdoptions.check_install_build_global(options)
if options.as_egg:
warnings.warn(
"--egg has been deprecated and will be removed in the future. "
"This flag is mutually exclusive with large parts of pip, and "
"actually using it invalidates pip's ability to manage the "
"installation process.",
RemovedInPip10Warning,
)
if options.allow_external:
warnings.warn(
"--allow-external has been deprecated and will be removed in "

View File

@ -397,7 +397,7 @@ def test_install_as_egg(script, data):
Test installing as egg, instead of flat install.
"""
to_install = data.packages.join("FSPkg")
result = script.pip('install', to_install, '--egg', expect_error=False)
result = script.pip('install', to_install, '--egg', expect_error=True)
fspkg_folder = script.site_packages / 'fspkg'
egg_folder = script.site_packages / 'FSPkg-0.1.dev0-py%s.egg' % pyversion
assert fspkg_folder not in result.files_created, str(result.stdout)

View File

@ -341,7 +341,7 @@ def test_uninstall_as_egg(script, data):
Test uninstall package installed as egg.
"""
to_install = data.packages.join("FSPkg")
result = script.pip('install', to_install, '--egg', expect_error=False)
result = script.pip('install', to_install, '--egg', expect_error=True)
fspkg_folder = script.site_packages / 'fspkg'
egg_folder = script.site_packages / 'FSPkg-0.1.dev0-py%s.egg' % pyversion
assert fspkg_folder not in result.files_created, str(result.stdout)