-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow adding a custom string to pip's User-Agent via an environment variable #5550
Conversation
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.
Out of curiosity, why did you choose the word "provisional"? To me, something like "custom" or "user-data" or "user-provided" would convey the meaning more clearly.
FWIW this will break PyPI's ability to parse these user agents, which might be OK. |
You mean PyPI breaks on new / unknown keys in the JSON? Is that intentional? |
Eh, I misread the PR because I had just woken up. I thought it was just appending data to the end of the UA, adding rando keys to the User Agent should be fine. |
Back when I made the PR there were a few points made about not replacing the entire user-agent header, so the intent was to provide a way to add text in provision to the original data in the user-agent header. In any case, I don't believe there's any particular reason to keep the word "provisional". I'll update the PR with any preferred verbiage @cjerdonek. |
b42018a
to
8d2aaa4
Compare
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
I like "user-data". If we're adding this, it should get documented. Idk if it'll make it into the BigQuery dB as is but it'd be best to include that in the documentation too. |
@pradyunsg |
3795eb0
to
70395dc
Compare
I like For documentation, it doesn't seem like there's one section in the docs listing all the environment variables that are supported (aside from environment variables that correspond to command-line options). Since this is a pretty specialized variable and was related to your proxy server use case, maybe it can be added as a sentence at the end of this short section: Alternatively, maybe a section called "General Environment Variables" could be added after "General Options" here: https://pip.pypa.io/en/stable/reference/pip/#general-options |
@cjerdonek @pradyunsg is the additional documentation something that can be added to this PR or is that a separate issue? |
The same. Documentation of a change should go in the same PR as the change itself. It probably only needs a sentence or two. |
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.
A couple comments in advance of the docs change.
2dc046f
to
8608b19
Compare
Am I missing something here or is the pipeline broken? I can't find anything in the build logs indicating a direct issue with my changes. |
I opened a PR to fix it, which is why I wasn’t able to do anything here. |
@conspicuousClockwork Can you rebase your changes now that CI has been fixed? |
… set. Add documentation to user_guide.rst.
Thanks for your work on this, @conspicuousClockwork! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Addresses issue #5549.