Skip to content

Commit

Permalink
Deprecate --egg
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Sep 7, 2016
1 parent 1ee7297 commit 8587dbf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions pip/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ def run(self, options, args):
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 "
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8587dbf

Please sign in to comment.