Skip to content

Commit

Permalink
Add compatibility for refactored is_vcs_url
Browse files Browse the repository at this point in the history
Function is_vcs_url has been replaced by is_vcs Link property.

See pypa/pip#6883
  • Loading branch information
atugushev committed Sep 17, 2019
1 parent 1d0c6b5 commit 73619fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion piptools/_compat/pip_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def do_import(module_path, subimport=None, old_path=None):
FAVORITE_HASH = do_import("utils.hashes", "FAVORITE_HASH")
is_file_url = do_import("download", "is_file_url")
is_dir_url = do_import("download", "is_dir_url")
is_vcs_url = do_import("download", "is_vcs_url")
path_to_url = do_import("download", "path_to_url")
url_to_path = do_import("download", "url_to_path")
PackageFinder = do_import("index", "PackageFinder")
Expand All @@ -63,3 +62,11 @@ def do_import(module_path, subimport=None, old_path=None):
install_req_from_editable = do_import(
"req.constructors", "install_req_from_editable"
)


def is_vcs_url(link):
if PIP_VERSION < (19, 3):
_is_vcs_url = do_import("download", "is_vcs_url")
return _is_vcs_url(link)

return link.is_vcs

0 comments on commit 73619fb

Please sign in to comment.