-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove support for git+git@ pseudo VCS URLs.
Now that we don't need to support git@ pseudo-urls, we can simplify the test for valid VCS URLs based on link.is_vcs, which is turns is based on the URL scheme. This also means we fail earlier if a git@ pseudo URL is used. Since VCS requirements are not validated to be URLs in Requirement constructors, we can simplify update_editable.
- Loading branch information
Showing
6 changed files
with
21 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Removed support for VCS pseudo URLs editable requirements. It was | ||
emitting deprecation warning since version 20.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -625,34 +625,15 @@ def update_editable(self, obtain=True): | |
if self.link.scheme == 'file': | ||
# Static paths don't get updated | ||
return | ||
assert '+' in self.link.url, \ | ||
"bad url: {self.link.url!r}".format(**locals()) | ||
vc_type, url = self.link.url.split('+', 1) | ||
vcs_backend = vcs.get_backend(vc_type) | ||
if vcs_backend: | ||
if not self.link.is_vcs: | ||
reason = ( | ||
"This form of VCS requirement is being deprecated: {}." | ||
).format( | ||
self.link.url | ||
) | ||
replacement = None | ||
if self.link.url.startswith("git+git@"): | ||
replacement = ( | ||
"git+https://[email protected]/..., " | ||
"git+ssh://[email protected]/..., " | ||
"or the insecure git+git://[email protected]/..." | ||
) | ||
deprecated(reason, replacement, gone_in="21.0", issue=7554) | ||
hidden_url = hide_url(self.link.url) | ||
if obtain: | ||
vcs_backend.obtain(self.source_dir, url=hidden_url) | ||
else: | ||
vcs_backend.export(self.source_dir, url=hidden_url) | ||
vcs_backend = vcs.get_backend_for_scheme(self.link.scheme) | ||
# Editable requirements are validated in Requirement constructors, | ||
# if it's neither a path nor a valid VCS URL, it's a bug. | ||
assert vcs_backend, f"Unsupported VCS URL {self.link.url}" | ||
hidden_url = hide_url(self.link.url) | ||
if obtain: | ||
vcs_backend.obtain(self.source_dir, url=hidden_url) | ||
else: | ||
assert 0, ( | ||
'Unexpected version control type (in {}): {}'.format( | ||
self.link, vc_type)) | ||
vcs_backend.export(self.source_dir, url=hidden_url) | ||
|
||
# Top-level Actions | ||
def uninstall(self, auto_confirm=False, verbose=False): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters