Skip to content

Commit

Permalink
Don't attempt to fixup VCS direct URLs for older python versions
Browse files Browse the repository at this point in the history
The script does not work with python 2.7 and pip's legacy resolver
that works with these older pythons does not need this workaround.
  • Loading branch information
sbidoul committed Oct 8, 2023
1 parent 4e3b66d commit 864ed8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pip_deepfreeze/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
parse as parse_req_file,
)
from .req_parser import get_req_name
from .sanity import get_pip_version
from .sanity import _get_env_info, get_pip_version
from .utils import (
check_call,
check_output,
Expand Down Expand Up @@ -269,6 +269,9 @@ def pip_uninstall(python: str, requirements: Iterable[str]) -> None:


def pip_fixup_vcs_direct_urls(python: str) -> None:
if Version(_get_env_info(python)["python_version"]) < Version("3.6"):
# Not supported, and not needed with pip's legacy resolver.
return
# This will become unnecessary when pip caches metadata or
# caches wheels that are built from a git ref that is not a commit
# (it could cache it under a modified link where the git ref is replaced
Expand Down

0 comments on commit 864ed8f

Please sign in to comment.