-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(manager/pip_requirements): allow = as extra-url separator #29727
base: main
Are you sure you want to change the base?
Conversation
The CI seems to be stuck :( @rarkins |
GitHub requires manual approval of workflows any time a new contributor pushes to their branch. They're not stuck as in bug, but stuck as in security |
I don't know how to fix the issues the CI is showing 🙈 |
Focus on coverage first |
if (line.includes('=')) { | ||
registryUrls = [line.split('=')[1]]; |
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.
Due to split on =
the flags will be included in the registryUrl too
ie. for
--index-url=https://artifactory.company.com/artifactory/api/pypi/python/simple --trusted-host artifactory.company.com --default-timeout 600
registryUrl will be:
https://artifactory.company.com/artifactory/api/pypi/python/simple --trusted-host artifactory.company.com --default-timeout 600
whereas we want:
https://artifactory.company.com/artifactory/api/pypi/python/simple
This is also the cause of the failing tests in CI.
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.
Ah, good point. I'll look into it as I find time.
See also: #29726
Changes
manager/pip_requirements
Before:
only
--extra-index-url http...
matchedAfter:
also
--extra-index-url=http...
matchesContext
These lines reflect CLI arguments, normal or expected behaviour is that
--foo bar
and--foo=bar
lead to the same result.This is not explicitly documented, but inferred from behaviour of many other tools: https://pip.pypa.io/en/stable/reference/requirements-file-format/
Documentation (please check one with an [x])
Please comment if the docs should be updated, and where.
How I've tested my work (please select one)
I have verified these changes via: