дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(python): accept direct references and bzr+lp URLs, report a missing path, and keep editable cleared after an archive (#6650)
Follow-up to #6617. The version control dialog now accepts pip's direct references (name @ git+https://..., with extras) and bzr+lp:project. Installing from a local path that does not exist fails before pip runs, with the path in the message; a trailing [extras] is not part of the path, and a folder whose name has brackets is still a folder. Typing an archive path clears the editable choice, so a directory typed after it starts unticked. Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
1 джерело
8108b440a6
коміт
d5ba63e333
6 files changed
+68
-10
No files matched your search
@@ -68,8 +68,12 @@ export function vcsRequirement(url: string) {
|
||||
return scp ? `git+ssh://${scp[1]}/${scp[2]}` : text;
|
||||
}
|
||||
|
||||
/** Whether `url` (after {@link vcsRequirement}) is a version control URL pip can install. */
|
||||
export const isVcsUrl = (url: string) => /^(git|hg|svn|bzr)\+[a-z]+:\/\/\S+$/i.test(url);
|
||||
/**
|
||||
* Whether `url` (after {@link vcsRequirement}) is a version control URL pip can install, bare
|
||||
* (`git+https://…`, `bzr+lp:project`) or as a direct reference (`name @ git+https://…`).
|
||||
*/
|
||||
export const isVcsUrl = (url: string) =>
|
||||
/^([A-Za-z0-9][\w.-]*(\[[^\]]*\])?\s*@\s*)?((git|hg|svn|bzr)\+[a-z]+:\/\/|bzr\+lp:)\S+$/i.test(url);
|
||||
|
||||
/**
|
||||
* A path typed for Install from Disk, made explicit so pip never reads it as a PyPI name: a
|
||||
|
||||
Reference in new issue
Заблокувати користувача