-
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.
Merge pull request #11617 from trail-of-forks/ww/restrict-egg-fragement
Restrict `#egg=` fragments to valid PEP 508 names
- Loading branch information
Showing
5 changed files
with
63 additions
and
5 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
File renamed without changes.
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,3 @@ | ||
Deprecated a historical ambiguity in how ``egg`` fragments in URL-style | ||
requirements are formatted and handled. ``egg`` fragments that do not look | ||
like PEP 508 names now produce a deprecation warning. |
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
dca39dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So pipenv definitely uses the extras in the egg fragment today -- is the idea then to use:
Instead of:
git+https://github.com/foo/bar.git@some-rev#egg=bar[dev]
This is supposed to be what we support:
bar[dev] @ git+https://github.com/foo/bar.git@some-rev
That will be a bit of work for requirementslib that I'll have to take on based on how baked in the egg fragments are to having extras work, but before I take this on I want to understand if I am heading in the right direction. @pradyunsg and @woodruffw ? (sorry for commenting here, the issue was locked)
dca39dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followup question would be how to handle subdirectories? Before it was the final thing appended to the uri after the egg fragment (and possible extras):
dca39dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matteius
bar[dev] @ git+https://github.com/foo/bar.git@some-rev
is the PEP 508 syntax, so yes?Regarding subdirectory fragments, pip extracts them with this regex
pip/src/pip/_internal/models/link.py
Line 400 in 5cc3114
so they can be anywhere in the fragments list.