mirror of https://github.com/pypa/pip
Merge pull request #11996 from uranusjr/deprecate-egg-importlib-metadata
This commit is contained in:
commit
9f72cd0269
|
@ -0,0 +1 @@
|
|||
Deprecate support for eggs for Python 3.11 or later, when the new ``importlib.metadata`` backend is used to load distribution metadata. This only affects the egg *distribution format* (with the ``.egg`` extension); distributions using the ``.egg-info`` *metadata format* (but are not actually eggs) are not affected. For more information about eggs, see `relevant section in the setuptools documentation <https://setuptools.pypa.io/en/stable/deprecated/python_eggs.html>`__.
|
|
@ -151,7 +151,7 @@ def _emit_egg_deprecation(location: Optional[str]) -> None:
|
|||
deprecated(
|
||||
reason=f"Loading egg at {location} is deprecated.",
|
||||
replacement="to use pip for package installation.",
|
||||
gone_in=None,
|
||||
gone_in="23.3",
|
||||
)
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ class Environment(BaseEnvironment):
|
|||
for location in self._paths:
|
||||
yield from finder.find(location)
|
||||
for dist in finder.find_eggs(location):
|
||||
# _emit_egg_deprecation(dist.location) # TODO: Enable this.
|
||||
_emit_egg_deprecation(dist.location)
|
||||
yield dist
|
||||
# This must go last because that's how pkg_resources tie-breaks.
|
||||
yield from finder.find_linked(location)
|
||||
|
|
Loading…
Reference in New Issue