Skip to content
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

Adds a User-agent header to curl module requests #219

Merged

Conversation

colindean
Copy link
Contributor

The header will be of the form:

peru/{version} Python-urllib/{version}

Fixes #218

The header will be of the form:

    peru/{version} Python-urllib/{version}

Fixes buildinspace#218
and use a %-format instead of an f-format to maintain compatibility with
Python 3.5 since f-format came in 3.6.
This sets the stage for more request modifications.
colindean added a commit to colindean/peru that referenced this pull request Dec 1, 2021
When working on buildinspace#219, I found it repetitive to use history to invoke
commands when I could just type "make" like I do in many other projects,
including my Python projects. I extracted therefrom this minimalistic
Makefile and added references to it in CONTRIBUTING. I also cleaned up
some markup in CONTRIBUTING.
tests/test_curl_plugin.py Outdated Show resolved Hide resolved
@oconnor663
Copy link
Member

It looks like the test failures here are something that changed in Git 2.34. I can repro them on my local machine, but they go away with I downgrade to Git 2.33. Will debug more tomorrow.

@oconnor663
Copy link
Member

I ended up bisecting Git itself to figure out what they heck they changed. Turns out it's this: git/git@491a757. A relatively obscure detail of how git read-tree respects .gitignore files has changed. There's a good chance I can find some flag(s) that restore the previous behavior, not quite sure yet.

oconnor663 pushed a commit that referenced this pull request Dec 13, 2021
When working on #219, I found it repetitive to use history to invoke
commands when I could just type "make" like I do in many other projects,
including my Python projects. I extracted therefrom this minimalistic
Makefile and added references to it in CONTRIBUTING. I also cleaned up
some markup in CONTRIBUTING.
@oconnor663
Copy link
Member

I'll move discussion of the test failure into a new issue: #221

@oconnor663 oconnor663 merged commit 8c57753 into buildinspace:master Feb 25, 2022
@colindean colindean deleted the colindean-gh218-add_useragent branch February 25, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot download package possibly because of urllib defaults
2 participants