url stringlengths 50 53 | repository_url stringclasses 1 value | labels_url stringlengths 64 67 | comments_url stringlengths 59 62 | events_url stringlengths 57 60 | html_url stringlengths 38 43 | id int64 597k 2.65B | node_id stringlengths 18 32 | number int64 1 6.83k | title stringlengths 1 296 | user dict | labels listlengths 0 5 | state stringclasses 2 values | locked bool 2 classes | assignee dict | assignees listlengths 0 4 | milestone dict | comments int64 0 211 | created_at stringlengths 20 20 | updated_at stringlengths 20 20 | closed_at stringlengths 20 20 ⌀ | author_association stringclasses 3 values | active_lock_reason stringclasses 4 values | body stringlengths 0 65.6k ⌀ | closed_by dict | reactions dict | timeline_url stringlengths 59 62 | performed_via_github_app null | state_reason stringclasses 3 values | draft bool 2 classes | pull_request dict | is_pull_request bool 2 classes | issue_comments listlengths 0 30 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/psf/requests/issues/2430 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2430/labels{/name} | https://api.github.com/repos/psf/requests/issues/2430/comments | https://api.github.com/repos/psf/requests/issues/2430/events | https://github.com/psf/requests/issues/2430 | 55,872,428 | MDU6SXNzdWU1NTg3MjQyOA== | 2,430 | Upgrade/install of 2.5.0 fails on Fedora via yum | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-29T08:51:22Z | 2021-09-08T20:00:50Z | 2015-01-29T10:34:10Z | NONE | resolved | Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
Updating : python-requests-2.5.0-3.fc21.noarch 1/2
Error unpacking rpm package python-requests-2.5.0-3.fc21.noarch
_error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/requests/packages/urllib3: cpio: rename_
Verifying : python-requests-2.5.0-3.fc21.noarch 1/2
python-requests-2.3.0-3.fc21.noarch was supposed to be removed but is not!
Verifying : python-requests-2.3.0-3.fc21.noarch 2/2
Failed:
python-requests.noarch 0:2.3.0-3.fc21 python-requests.noarch 0:2.5.0-3.fc21
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2430/reactions"
} | https://api.github.com/repos/psf/requests/issues/2430/timeline | null | completed | null | null | false | [
"v 2.3 can be installed/uninstalled\nv2.5 cann't be installed/upgraded-to\nWorks fine from pip\n",
"We do not package or build the Red Hat packages. Please take this up with downstream.\n",
"This seems to be caused by a conflict when the package is already installed via pip.\nSee https://bugzilla.redhat.com/sho... |
https://api.github.com/repos/psf/requests/issues/2429 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2429/labels{/name} | https://api.github.com/repos/psf/requests/issues/2429/comments | https://api.github.com/repos/psf/requests/issues/2429/events | https://github.com/psf/requests/pull/2429 | 55,760,918 | MDExOlB1bGxSZXF1ZXN0MjgxOTYyNTE= | 2,429 | Update support documentation to be more accurate | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "fad8c7",
"default": false,
"description": null,
"id": 136616769,
"name": "Documentation",
"node_id": "MDU6TGFiZWwxMzY2MTY3Njk=",
"url": "https://api.github.com/repos/psf/requests/labels/Documentation"
}
] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 12 | 2015-01-28T14:16:25Z | 2021-09-08T08:01:05Z | 2015-03-04T22:20:33Z | CONTRIBUTOR | resolved | We were missing instructions to report security vulnerabilities,
and all of the documentation referred to Kenneth as the only
source of support. We were also missing a link to StackOverflow.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2429/reactions"
} | https://api.github.com/repos/psf/requests/issues/2429/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2429.diff",
"html_url": "https://github.com/psf/requests/pull/2429",
"merged_at": "2015-03-04T22:20:33Z",
"patch_url": "https://github.com/psf/requests/pull/2429.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2429"
} | true | [
"One note. =D\n",
"Added you @Lukasa and added a bit more detail about vulnerability reporting.\n",
"This looks good.\n- I might duplicate the vulnerability reporting text in a top-level page called \"Security\". Basically you want to make it really easy for anyone googling \"python requests security\" to find ... |
https://api.github.com/repos/psf/requests/issues/2428 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2428/labels{/name} | https://api.github.com/repos/psf/requests/issues/2428/comments | https://api.github.com/repos/psf/requests/issues/2428/events | https://github.com/psf/requests/pull/2428 | 55,613,958 | MDExOlB1bGxSZXF1ZXN0MjgxMDU4OTM= | 2,428 | Docs fixed | {
"avatar_url": "https://avatars.githubusercontent.com/u/1381173?v=4",
"events_url": "https://api.github.com/users/sepulchered/events{/privacy}",
"followers_url": "https://api.github.com/users/sepulchered/followers",
"following_url": "https://api.github.com/users/sepulchered/following{/other_user}",
"gists_url": "https://api.github.com/users/sepulchered/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sepulchered",
"id": 1381173,
"login": "sepulchered",
"node_id": "MDQ6VXNlcjEzODExNzM=",
"organizations_url": "https://api.github.com/users/sepulchered/orgs",
"received_events_url": "https://api.github.com/users/sepulchered/received_events",
"repos_url": "https://api.github.com/users/sepulchered/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sepulchered/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sepulchered/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sepulchered",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-01-27T12:53:10Z | 2021-09-08T09:01:00Z | 2015-01-27T18:22:35Z | NONE | resolved | Moved "Custom Headers" part after "More complicated POST requests" and before "POST a Multipart-Encoded File" in quickstart doc for adding headers is mentioned in the last one.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2428/reactions"
} | https://api.github.com/repos/psf/requests/issues/2428/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2428.diff",
"html_url": "https://github.com/psf/requests/pull/2428",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2428.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2428"
} | true | [
"I think the correct fix is actually to come up with an example that doesn't require the `data` parameter. Custom headers should come before anything with 'more complicated' in the title. =)\n",
"I see, I just decided that it would be enough because custom headers are not mentioned in \"More complicated POST requ... |
https://api.github.com/repos/psf/requests/issues/2427 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2427/labels{/name} | https://api.github.com/repos/psf/requests/issues/2427/comments | https://api.github.com/repos/psf/requests/issues/2427/events | https://github.com/psf/requests/pull/2427 | 55,436,588 | MDExOlB1bGxSZXF1ZXN0MjgwMDA4MDA= | 2,427 | Bug fix: field uri in digest authentication should not be empty when enc... | {
"avatar_url": "https://avatars.githubusercontent.com/u/1176856?v=4",
"events_url": "https://api.github.com/users/luozhaoyu/events{/privacy}",
"followers_url": "https://api.github.com/users/luozhaoyu/followers",
"following_url": "https://api.github.com/users/luozhaoyu/following{/other_user}",
"gists_url": "https://api.github.com/users/luozhaoyu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/luozhaoyu",
"id": 1176856,
"login": "luozhaoyu",
"node_id": "MDQ6VXNlcjExNzY4NTY=",
"organizations_url": "https://api.github.com/users/luozhaoyu/orgs",
"received_events_url": "https://api.github.com/users/luozhaoyu/received_events",
"repos_url": "https://api.github.com/users/luozhaoyu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/luozhaoyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/luozhaoyu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/luozhaoyu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-01-26T00:13:59Z | 2021-09-08T08:00:53Z | 2015-04-06T15:19:15Z | CONTRIBUTOR | resolved | ...ounter http redirections.
https://github.com/kennethreitz/requests/issues/2426
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2427/reactions"
} | https://api.github.com/repos/psf/requests/issues/2427/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2427.diff",
"html_url": "https://github.com/psf/requests/pull/2427",
"merged_at": "2015-04-06T15:19:15Z",
"patch_url": "https://github.com/psf/requests/pull/2427.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2427"
} | true | [
"I haven't read this yet, and I'm certain it really is this simple, but I want to re read the RFC about this regardless to make sure this applies to all cases. I suppose we've never had trouble with this because people were using URIs that had paths when authenticating. It doesn't hurt to be safe though. =)\n\nThan... |
https://api.github.com/repos/psf/requests/issues/2426 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2426/labels{/name} | https://api.github.com/repos/psf/requests/issues/2426/comments | https://api.github.com/repos/psf/requests/issues/2426/events | https://github.com/psf/requests/issues/2426 | 55,436,121 | MDU6SXNzdWU1NTQzNjEyMQ== | 2,426 | Bug: field "uri" in header["Proxy-Authorization"] should not be empty | {
"avatar_url": "https://avatars.githubusercontent.com/u/1176856?v=4",
"events_url": "https://api.github.com/users/luozhaoyu/events{/privacy}",
"followers_url": "https://api.github.com/users/luozhaoyu/followers",
"following_url": "https://api.github.com/users/luozhaoyu/following{/other_user}",
"gists_url": "https://api.github.com/users/luozhaoyu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/luozhaoyu",
"id": 1176856,
"login": "luozhaoyu",
"node_id": "MDQ6VXNlcjExNzY4NTY=",
"organizations_url": "https://api.github.com/users/luozhaoyu/orgs",
"received_events_url": "https://api.github.com/users/luozhaoyu/received_events",
"repos_url": "https://api.github.com/users/luozhaoyu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/luozhaoyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/luozhaoyu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/luozhaoyu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-01-25T23:58:04Z | 2021-09-08T23:05:48Z | 2015-04-06T15:19:29Z | CONTRIBUTOR | resolved | #### Issue
When I am handling [toolbelt's digest proxy issue](https://github.com/sigmavirus24/requests-toolbelt/issues/53), I find the proxy server rejects my request header:
Connection: keep-alive\r\n
Proxy-Authorization: Digest username="luozhaoyu", realm="balabalba@host.com", nonce="o3jFVAAAAADwDnHL3X8AABqmXw4AAAAA", uri="",
response="9a5d356b4a5bac5473864896bcfdcc69", qop="auth", nc=00000001, cnonce="a681e67b2a3bb034"\r\n
Accept-Encoding: gzip, deflate\r\n
The problem is because field uri should be "/" rather than "". ([request-uri's definition is in RFC 2616](http://tools.ietf.org/html/rfc2616#section-5.1.2))
#### Bug reproduce
It is funny to find the bug. Set up a digest auth proxy,
`r = requests.get(url, proxies=proxies, auth=auth, allow_redirects=True)`
url is http://bing.cn/ (this is a typo), there will be a HTTP 301 to http://www.rz.com/, client would try to access http://www.rz.com directly, but the proxy would reject and ask for user/password.
However, the automatic redirect's url parse result will be
`ParseResult(scheme='http', netloc='www.rz.com', path='', params='', query='', fragment='')`
The path is empty, and will result in authentication failure.
#### Solution is one line:
add a line in `auth.py` line 110: `path = "/" if not path else path`
I will create a pull request later.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2426/reactions"
} | https://api.github.com/repos/psf/requests/issues/2426/timeline | null | completed | null | null | false | [
"Closed by #2427.\n"
] |
https://api.github.com/repos/psf/requests/issues/2425 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2425/labels{/name} | https://api.github.com/repos/psf/requests/issues/2425/comments | https://api.github.com/repos/psf/requests/issues/2425/events | https://github.com/psf/requests/issues/2425 | 55,425,272 | MDU6SXNzdWU1NTQyNTI3Mg== | 2,425 | SOCKS proxy support | {
"avatar_url": "https://avatars.githubusercontent.com/u/6208662?v=4",
"events_url": "https://api.github.com/users/jorenham/events{/privacy}",
"followers_url": "https://api.github.com/users/jorenham/followers",
"following_url": "https://api.github.com/users/jorenham/following{/other_user}",
"gists_url": "https://api.github.com/users/jorenham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorenham",
"id": 6208662,
"login": "jorenham",
"node_id": "MDQ6VXNlcjYyMDg2NjI=",
"organizations_url": "https://api.github.com/users/jorenham/orgs",
"received_events_url": "https://api.github.com/users/jorenham/received_events",
"repos_url": "https://api.github.com/users/jorenham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorenham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorenham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorenham",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2015-01-25T19:01:05Z | 2021-09-05T00:06:58Z | 2015-01-25T19:14:56Z | NONE | resolved | I would like to request support for Socket Secure protocol. There exists a fork (https://github.com/dvska/requesocks) with this capability, but it is limited (python 2 only).
Currently the `AssertionError: Not supported proxy scheme socks5` is thrown when attempting to connect to a socks5 proxy.
A quick Google search (https://www.google.nl/search?q=socks+proxy+list) illustrates the popularity of the protocol. Even Tor and I2P use it.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2425/reactions"
} | https://api.github.com/repos/psf/requests/issues/2425/timeline | null | completed | null | null | false | [
"https://github.com/kennethreitz/requests/issues?q=is%3Aissue+socks+is%3Aclosed would have been a good search before opening this issue as well.\n",
"https://github.com/kennethreitz/requests/pull/478 was the only effort anyone made towards including this support in requests over 2 years ago. As of now, https://gi... |
https://api.github.com/repos/psf/requests/issues/2424 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2424/labels{/name} | https://api.github.com/repos/psf/requests/issues/2424/comments | https://api.github.com/repos/psf/requests/issues/2424/events | https://github.com/psf/requests/issues/2424 | 55,422,175 | MDU6SXNzdWU1NTQyMjE3NQ== | 2,424 | Consider Requests' Inclusion in Python 3.5's Standard Library | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
}
] | closed | true | null | [] | null | 42 | 2015-01-25T17:17:59Z | 2021-09-08T22:00:48Z | 2015-05-03T15:08:10Z | CONTRIBUTOR | resolved | There's a lot to this, but I'll keep it simple...
Would the Python community, as a whole, benefit from Requests being added into the standard library?
Would love to hear your thoughts and opinions on the subject!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 31,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 10,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 41,
"url": "https://api.github.com/repos/psf/requests/issues/2424/reactions"
} | https://api.github.com/repos/psf/requests/issues/2424/timeline | null | completed | null | null | false | [
"Yes, because it simplifies the entire process and does not sacrifice the performance. So yes.\n",
"- What kind of impact would this have on Requests' ability to evolve and grow?\n- Does Requests' release frequency jive with that of Python's? A big difference here might be a good indication that stdlib isn't the ... |
https://api.github.com/repos/psf/requests/issues/2423 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2423/labels{/name} | https://api.github.com/repos/psf/requests/issues/2423/comments | https://api.github.com/repos/psf/requests/issues/2423/events | https://github.com/psf/requests/issues/2423 | 55,359,316 | MDU6SXNzdWU1NTM1OTMxNg== | 2,423 | requests 2.5.0 uninstall fails | {
"avatar_url": "https://avatars.githubusercontent.com/u/715626?v=4",
"events_url": "https://api.github.com/users/dsoprea/events{/privacy}",
"followers_url": "https://api.github.com/users/dsoprea/followers",
"following_url": "https://api.github.com/users/dsoprea/following{/other_user}",
"gists_url": "https://api.github.com/users/dsoprea/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsoprea",
"id": 715626,
"login": "dsoprea",
"node_id": "MDQ6VXNlcjcxNTYyNg==",
"organizations_url": "https://api.github.com/users/dsoprea/orgs",
"received_events_url": "https://api.github.com/users/dsoprea/received_events",
"repos_url": "https://api.github.com/users/dsoprea/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsoprea/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsoprea/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsoprea",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2015-01-24T05:09:41Z | 2021-09-08T23:06:03Z | 2015-01-24T16:20:51Z | CONTRIBUTOR | resolved | Installing the latest (2.5.1) or 2.5.0 (in the examples, below), installs a version that can't be uninstalled or upgraded, though it imports without a problem. I show how 2.2.0 (my previous version) didn't have this problem.
Install 2.5.0:
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ sudo pip install requests==2.5.0
Downloading/unpacking requests==2.5.0
Downloading requests-2.5.0-py2.py3-none-any.whl (464kB): 464kB downloaded
Installing collected packages: requests
Successfully installed requests
Cleaning up...
```
Can successfully import:
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
```
Can't uninstall, though:
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ sudo pip uninstall requests
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 519, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2310, in load
return self.resolve()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2316, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
```
Cleanup, manually:
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ sudo rm -fr requests*
```
Installing 2.2.0 (the okay version):
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ sudo pip install requests==2.2.0
Downloading/unpacking requests==2.2.0
Downloading requests-2.2.0-py2.py3-none-any.whl (623kB): 623kB downloaded
Installing collected packages: requests
Successfully installed requests
Cleaning up...
```
Uninstalls, fine:
```
dustin@deploy1:/usr/local/lib/python2.7/dist-packages$ sudo pip uninstall requests
Uninstalling requests:
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/DESCRIPTION.rst
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/METADATA
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/RECORD
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/WHEEL
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/pydist.json
/usr/local/lib/python2.7/dist-packages/requests-2.2.0.dist-info/top_level.txt
/usr/local/lib/python2.7/dist-packages/requests/__init__.py
/usr/local/lib/python2.7/dist-packages/requests/__init__.pyc
/usr/local/lib/python2.7/dist-packages/requests/adapters.py
...
/usr/local/lib/python2.7/dist-packages/requests/sessions.pyc
/usr/local/lib/python2.7/dist-packages/requests/status_codes.py
/usr/local/lib/python2.7/dist-packages/requests/status_codes.pyc
/usr/local/lib/python2.7/dist-packages/requests/structures.py
/usr/local/lib/python2.7/dist-packages/requests/structures.pyc
/usr/local/lib/python2.7/dist-packages/requests/utils.py
/usr/local/lib/python2.7/dist-packages/requests/utils.pyc
Proceed (y/n)? y
Successfully uninstalled requests
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2423/reactions"
} | https://api.github.com/repos/psf/requests/issues/2423/timeline | null | completed | null | null | false | [
"This isn't our fault I don't think: your exception comes from pip. @dstufft?\n",
"## This looks like you installed pip using your system package manager and it needs a version of requests installed. \n\nSent from my Android device with K-9 Mail. Please excuse my brevity.\n",
"Yea what @sigmavirus24 said. Some ... |
https://api.github.com/repos/psf/requests/issues/2422 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2422/labels{/name} | https://api.github.com/repos/psf/requests/issues/2422/comments | https://api.github.com/repos/psf/requests/issues/2422/events | https://github.com/psf/requests/issues/2422 | 55,284,235 | MDU6SXNzdWU1NTI4NDIzNQ== | 2,422 | Broken pipe Exception | {
"avatar_url": "https://avatars.githubusercontent.com/u/1229983?v=4",
"events_url": "https://api.github.com/users/cloverstd/events{/privacy}",
"followers_url": "https://api.github.com/users/cloverstd/followers",
"following_url": "https://api.github.com/users/cloverstd/following{/other_user}",
"gists_url": "https://api.github.com/users/cloverstd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cloverstd",
"id": 1229983,
"login": "cloverstd",
"node_id": "MDQ6VXNlcjEyMjk5ODM=",
"organizations_url": "https://api.github.com/users/cloverstd/orgs",
"received_events_url": "https://api.github.com/users/cloverstd/received_events",
"repos_url": "https://api.github.com/users/cloverstd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cloverstd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cloverstd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cloverstd",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 136589914,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwxMzY1ODk5MTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20Info"
}
] | closed | true | null | [] | null | 61 | 2015-01-23T14:03:14Z | 2016-11-30T09:12:06Z | 2015-04-11T02:58:50Z | NONE | null | I post a large file to server, and it raise `ConnectionError` exception.
```
Traceback (most recent call last):
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/rq/worker.py", line 479, in perform_job
rv = job.perform()
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/rq/job.py", line 466, in perform
self._result = self.func(*self.args, **self.kwargs)
File "./jobs/office.py", line 97, in notice_file
open('test.pdf', 'rb')))
File "/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/enterprise/client/api/media.py", line 15, in upload
'media': media_file
File "/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/api/base.py", line 20, in _post
return self._client._post(url, **kwargs)
File "/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/base.py", line 74, in _post
**kwargs
File "/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/base.py", line 39, in _request
**kwargs
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(32, 'Broken pipe'))
```
The `test.pdf` is 4.2M, when I post it as a file, I get ConnectionError Exception.
But I use curl to post it to server, it can be uploaded successful.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2422/reactions"
} | https://api.github.com/repos/psf/requests/issues/2422/timeline | null | completed | null | null | false | [
"Can you reproduce it every time? What curl command are you using? Does the\nserver have any useful log messages?\n\n## \n\nKevin Burke\nphone: 925.271.7005 | twentymilliseconds.com\n\nOn Fri, Jan 23, 2015 at 6:03 AM, Cloverstd notifications@github.com wrote:\n\n> I post a large file to server, and it raise Connect... |
https://api.github.com/repos/psf/requests/issues/2421 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2421/labels{/name} | https://api.github.com/repos/psf/requests/issues/2421/comments | https://api.github.com/repos/psf/requests/issues/2421/events | https://github.com/psf/requests/issues/2421 | 55,242,976 | MDU6SXNzdWU1NTI0Mjk3Ng== | 2,421 | Quoted newlines not handled properly | {
"avatar_url": "https://avatars.githubusercontent.com/u/942461?v=4",
"events_url": "https://api.github.com/users/jrootham/events{/privacy}",
"followers_url": "https://api.github.com/users/jrootham/followers",
"following_url": "https://api.github.com/users/jrootham/following{/other_user}",
"gists_url": "https://api.github.com/users/jrootham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jrootham",
"id": 942461,
"login": "jrootham",
"node_id": "MDQ6VXNlcjk0MjQ2MQ==",
"organizations_url": "https://api.github.com/users/jrootham/orgs",
"received_events_url": "https://api.github.com/users/jrootham/received_events",
"repos_url": "https://api.github.com/users/jrootham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jrootham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jrootham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jrootham",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-01-23T04:06:42Z | 2021-09-08T23:06:03Z | 2015-01-23T15:36:40Z | NONE | resolved | When trying to use iter_lines() reader for csv to read an parse a csv file it failed. It turns out that if there is a quoted newline in the file it removes the comma quote delimiter for the quoted newline and the following line.
This makes it impossible to use iter_lines for csv.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2421/reactions"
} | https://api.github.com/repos/psf/requests/issues/2421/timeline | null | completed | null | null | false | [
"## Can you use a paste servIce to give a concrete example of this? I'm not sure I follow your description \n\nSent from my Android device with K-9 Mail. Please excuse my brevity.\n",
"Input file:\n \"a\",\"\n \",\"b\"\n \"c\",\"\n \",\"d\"\n\nOutput stings\n \"a\"\n \"c\"\n",
"I don't see how... |
https://api.github.com/repos/psf/requests/issues/2420 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2420/labels{/name} | https://api.github.com/repos/psf/requests/issues/2420/comments | https://api.github.com/repos/psf/requests/issues/2420/events | https://github.com/psf/requests/pull/2420 | 55,242,311 | MDExOlB1bGxSZXF1ZXN0Mjc4OTk2NjY= | 2,420 | Replace n-dash in HISTORY to workaround pip bug | {
"avatar_url": "https://avatars.githubusercontent.com/u/665269?v=4",
"events_url": "https://api.github.com/users/chriskuehl/events{/privacy}",
"followers_url": "https://api.github.com/users/chriskuehl/followers",
"following_url": "https://api.github.com/users/chriskuehl/following{/other_user}",
"gists_url": "https://api.github.com/users/chriskuehl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chriskuehl",
"id": 665269,
"login": "chriskuehl",
"node_id": "MDQ6VXNlcjY2NTI2OQ==",
"organizations_url": "https://api.github.com/users/chriskuehl/orgs",
"received_events_url": "https://api.github.com/users/chriskuehl/received_events",
"repos_url": "https://api.github.com/users/chriskuehl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chriskuehl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chriskuehl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chriskuehl",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-23T03:54:12Z | 2021-09-08T09:01:01Z | 2015-01-23T07:19:39Z | CONTRIBUTOR | resolved | There exists a problem (maybe a bug?) in pip when using a locale like `LC_ALL=C` (which is commonly used by CI environments and system configuration tools such as Puppet), where the PKG-INFO file is decoded using ascii, raising a UnicodeDecodeError when PKG-INFO contains non-ASCII characters (such as the n-dash removed by this commit):
```
Downloading/unpacking requests from https://pypi.python.org/packages/source/r/requests/requests-2.5.1.tar.gz
Downloading requests-2.5.1.tar.gz (443Kb): 443Kb downloaded
Running setup.py egg_info for package requests
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1014, in prepare_files
req_to_install.assert_source_matches_version()
File "/usr/lib/python3/dist-packages/pip/req.py", line 359, in assert_source_matches_version
version = self.installed_version
File "/usr/lib/python3/dist-packages/pip/req.py", line 351, in installed_version
return self.pkg_info()['version']
File "/usr/lib/python3/dist-packages/pip/req.py", line 318, in pkg_info
data = self.egg_info_data('PKG-INFO')
File "/usr/lib/python3/dist-packages/pip/req.py", line 261, in egg_info_data
data = fp.read()
File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8161: ordinal not in range(128)
```
There are some existing issues for pip:
- pypa/pip#1233
- pypa/pip#761
Other projects have had the same issue occur; there is some useful discussion in these issues as well:
- cleder/fastkml#9
- gabrielfalcao/HTTPretty#108
- rbarrois/factory_boy#118
I know this isn't really a problem with requests (and should probably be addressed ultimately in pip), but I think replacing this character in HISTORY would be a pain-free and pragmatic way to help developers and system administrators, especially given the inactivity on the pip bug reports.
Many thanks!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2420/reactions"
} | https://api.github.com/repos/psf/requests/issues/2420/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2420.diff",
"html_url": "https://github.com/psf/requests/pull/2420",
"merged_at": "2015-01-23T07:19:39Z",
"patch_url": "https://github.com/psf/requests/pull/2420.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2420"
} | true | [
"Yeah, I'm just sick of this now. Thanks! :cake:\n",
"This is the second time these have snuck in. Where are they coming from? Do we think this closes #2419?\n",
"I hope so.\n"
] |
https://api.github.com/repos/psf/requests/issues/2419 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2419/labels{/name} | https://api.github.com/repos/psf/requests/issues/2419/comments | https://api.github.com/repos/psf/requests/issues/2419/events | https://github.com/psf/requests/issues/2419 | 55,033,747 | MDU6SXNzdWU1NTAzMzc0Nw== | 2,419 | UnicodeDecodeError installing via pip-3.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/858881?v=4",
"events_url": "https://api.github.com/users/TFenby/events{/privacy}",
"followers_url": "https://api.github.com/users/TFenby/followers",
"following_url": "https://api.github.com/users/TFenby/following{/other_user}",
"gists_url": "https://api.github.com/users/TFenby/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TFenby",
"id": 858881,
"login": "TFenby",
"node_id": "MDQ6VXNlcjg1ODg4MQ==",
"organizations_url": "https://api.github.com/users/TFenby/orgs",
"received_events_url": "https://api.github.com/users/TFenby/received_events",
"repos_url": "https://api.github.com/users/TFenby/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TFenby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TFenby/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TFenby",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-21T15:32:05Z | 2021-09-08T23:04:52Z | 2015-05-03T15:08:23Z | NONE | resolved | So here's a weird one. I have a Docker container based on debian:stable where I install python3 and python3-pip, and when trying to install requests from a requirements.txt file I get the following:
```
Downloading/unpacking requests (from -r /tmp/requirements/xxx.txt (line 2))
Running setup.py egg_info for package requests
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1014, in prepare_files
req_to_install.assert_source_matches_version()
File "/usr/lib/python3/dist-packages/pip/req.py", line 359, in assert_source_matches_version
version = self.installed_version
File "/usr/lib/python3/dist-packages/pip/req.py", line 351, in installed_version
return self.pkg_info()['version']
File "/usr/lib/python3/dist-packages/pip/req.py", line 318, in pkg_info
data = self.egg_info_data('PKG-INFO')
File "/usr/lib/python3/dist-packages/pip/req.py", line 261, in egg_info_data
data = fp.read()
File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8161: ordinal not in range(128)
```
However, when I run `pip-3.2 install requests` directly, it works fine.
I honestly have no idea where even to start on debugging this.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2419/reactions"
} | https://api.github.com/repos/psf/requests/issues/2419/timeline | null | completed | null | null | false | [
"This is a duplicate of an old error that was fixed. Can you confirm that the version of requests is pinned to something in the 2.x line but is not 2.5.1?\n",
"#2196 is the already fixed issue for reference.\n",
"I've tried it with no version pinned, pinned to 2.5.1, and pinned to 2.5.0.\nThe thing that I don't... |
https://api.github.com/repos/psf/requests/issues/2418 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2418/labels{/name} | https://api.github.com/repos/psf/requests/issues/2418/comments | https://api.github.com/repos/psf/requests/issues/2418/events | https://github.com/psf/requests/issues/2418 | 54,997,272 | MDU6SXNzdWU1NDk5NzI3Mg== | 2,418 | Data argument introduced too early in Quickstart guide | {
"avatar_url": "https://avatars.githubusercontent.com/u/3679615?v=4",
"events_url": "https://api.github.com/users/alfonsomhc/events{/privacy}",
"followers_url": "https://api.github.com/users/alfonsomhc/followers",
"following_url": "https://api.github.com/users/alfonsomhc/following{/other_user}",
"gists_url": "https://api.github.com/users/alfonsomhc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alfonsomhc",
"id": 3679615,
"login": "alfonsomhc",
"node_id": "MDQ6VXNlcjM2Nzk2MTU=",
"organizations_url": "https://api.github.com/users/alfonsomhc/orgs",
"received_events_url": "https://api.github.com/users/alfonsomhc/received_events",
"repos_url": "https://api.github.com/users/alfonsomhc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alfonsomhc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alfonsomhc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alfonsomhc",
"user_view_type": "public"
} | [
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 191274,
"name": "Contributor Friendly",
"node_id": "MDU6TGFiZWwxOTEyNzQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Contributor%20Friendly"
}
] | closed | true | null | [] | null | 8 | 2015-01-21T09:45:56Z | 2021-09-08T23:05:53Z | 2015-03-15T18:39:54Z | NONE | resolved | I'm following the quick start guide in:
http://docs.python-requests.org/en/latest/user/quickstart/
I got confused when reading the section "Custom Headers" because the example code features the data argument, which hasn't been introduced in the guide yet (it is the next section "More complicated POST requests" that describes the data argument).
My suggestion is to swap the order of those two sections, i.e. have "More complicated POST requests" before "Custom Headers", or modify the example code in "Custom Headers" (remove data argument).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2418/reactions"
} | https://api.github.com/repos/psf/requests/issues/2418/timeline | null | completed | null | null | false | [
"Agreed, this should be reworked. Marking as contributor friendly.\n",
"Why not just leave out the data argument in the Custom Headers section? That section is clearly not meant to explain the usage of data argument. It is being discussed later on in the \"More complicated POST requests\" section. What do you guy... |
https://api.github.com/repos/psf/requests/issues/2417 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2417/labels{/name} | https://api.github.com/repos/psf/requests/issues/2417/comments | https://api.github.com/repos/psf/requests/issues/2417/events | https://github.com/psf/requests/issues/2417 | 54,903,649 | MDU6SXNzdWU1NDkwMzY0OQ== | 2,417 | pylint friendly | {
"avatar_url": "https://avatars.githubusercontent.com/u/5856387?v=4",
"events_url": "https://api.github.com/users/DavidHwu/events{/privacy}",
"followers_url": "https://api.github.com/users/DavidHwu/followers",
"following_url": "https://api.github.com/users/DavidHwu/following{/other_user}",
"gists_url": "https://api.github.com/users/DavidHwu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DavidHwu",
"id": 5856387,
"login": "DavidHwu",
"node_id": "MDQ6VXNlcjU4NTYzODc=",
"organizations_url": "https://api.github.com/users/DavidHwu/orgs",
"received_events_url": "https://api.github.com/users/DavidHwu/received_events",
"repos_url": "https://api.github.com/users/DavidHwu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DavidHwu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DavidHwu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DavidHwu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2015-01-20T16:21:35Z | 2021-09-08T05:00:40Z | 2015-01-20T16:51:45Z | NONE | resolved | Kindly request that requests be more pylint compliant. When evaluating which package to use, this comes up with a score of -154.
## Global evaluation
Your code has been rated at -154.92/10 (previous run: -154.91/10, -0.00)
Errors:
Davids-MacBook-Pro-2:~ dhwu$ pylint -E /Users/dhwu/Desktop/Evals/HTTP\ Libs/requests-2.5.1/requests
No config file found, using default configuration
************\* Module requests.compat
E: 88, 4: No name 'quote' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'unquote' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'quote_plus' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'unquote_plus' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'urlencode' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'getproxies' in module 'urllib' (no-name-in-module)
E: 88, 4: No name 'proxy_bypass' in module 'urllib' (no-name-in-module)
E: 98,10: Undefined variable 'unicode' (undefined-variable)
E: 99,17: Using variable 'basestring' before assignment (used-before-assignment)
E:100,26: Undefined variable 'long' (undefined-variable)
************\* Module requests.models
E: 39,10: Instance of 'LookupDict' has no 'moved' member (no-member)
E: 40,10: Instance of 'LookupDict' has no 'found' member (no-member)
E: 41,10: Instance of 'LookupDict' has no 'other' member (no-member)
E: 42,10: Instance of 'LookupDict' has no 'temporary_redirect' member (no-member)
E: 43,10: Instance of 'LookupDict' has no 'permanent_redirect' member (no-member)
E:343,18: Undefined variable 'unicode' (undefined-variable)
E:634,74: Instance of 'LookupDict' has no 'moved_permanently' member (no-member)
E:634,99: Instance of 'LookupDict' has no 'permanent_redirect' member (no-member)
E:792,51: Instance of 'bool' has no 'decode' member (no-member)
************\* Module requests.sessions
E:145,42: Instance of 'LookupDict' has no 'see_other' member (no-member)
E:151,41: Instance of 'LookupDict' has no 'found' member (no-member)
E:156,41: Instance of 'LookupDict' has no 'moved' member (no-member)
E:162,46: Instance of 'LookupDict' has no 'temporary_redirect' member (no-member)
E:162,72: Instance of 'LookupDict' has no 'permanent_redirect' member (no-member)
************\* Module requests.utils
E:537,52: Module 'sys' has no 'pypy_version_info' member (no-member)
E:538,52: Module 'sys' has no 'pypy_version_info' member (no-member)
E:539,52: Module 'sys' has no 'pypy_version_info' member (no-member)
E:540,15: Module 'sys' has no 'pypy_version_info' member (no-member)
E:541,76: Module 'sys' has no 'pypy_version_info' member (no-member)
************\* Module requests.packages.chardet
E: 23,52: Undefined variable 'unicode' (undefined-variable)
************\* Module requests.packages.chardet.compat
E: 25,21: Undefined variable 'unicode' (undefined-variable)
************\* Module requests.packages.urllib3.connection
E:159, 0: class already defined line 20 (function-redefined)
************\* Module requests.packages.urllib3.connectionpool
E: 46,19: Instance of '_MovedItems' has no 'xrange' member (no-member)
************\* Module requests.packages.urllib3.request
E: 4, 4: No name 'urlencode' in module 'urllib' (no-name-in-module)
E: 49, 8: NotImplemented raised - should raise NotImplementedError (notimplemented-raised)
************\* Module requests.packages.urllib3.response
E:182,36: Instance of 'str' has no 'read' member (no-member)
E:186,36: Instance of 'str' has no 'read' member (no-member)
E:195,33: Instance of 'str' has no 'close' member (no-member)
E:296,21: Instance of 'str' has no 'close' member (no-member)
E:303,28: Instance of 'str' has no 'closed' member (no-member)
E:305,28: Instance of 'str' has no 'isclosed' member (no-member)
E:313,28: Instance of 'str' has no 'fileno' member (no-member)
E:320,28: Instance of 'str' has no 'flush' member (no-member)
************\* Module requests.packages.urllib3.contrib.ntlmpool
E: 44,13: Instance of 'NTLMConnectionPool' has no 'num_connections' member (no-member)
E: 46,24: Instance of 'NTLMConnectionPool' has no 'num_connections' member (no-member)
E: 46,46: Instance of 'NTLMConnectionPool' has no 'host' member (no-member)
E: 53,41: Instance of 'NTLMConnectionPool' has no 'host' member (no-member)
E: 53,57: Instance of 'NTLMConnectionPool' has no 'port' member (no-member)
************\* Module requests.packages.urllib3.contrib.pyopenssl
E: 58, 0: No name '_fileobject' in module 'socket' (no-name-in-module)
E:158,33: Instance of 'OctetString' has no 'getComponentByPosition' member (no-member)
E:158,33: Instance of 'Any' has no 'getComponentByPosition' member (no-member)
E:158,33: Instance of 'str' has no 'getComponentByPosition' member (no-member)
************\* Module requests.packages.urllib3.packages.ordered_dict
E: 82,35: Instance of 'dict' has no 'itervalues' member (no-member)
E:142, 4: Method has no argument (no-method-argument)
E:165,29: Instance of 'tuple' has no 'keys' member (no-member)
************\* Module requests.packages.urllib3.packages.six
E: 42,19: Undefined variable 'basestring' (undefined-variable)
E: 43,26: Undefined variable 'long' (undefined-variable)
E: 44,31: Module 'types' has no 'ClassType' member (no-member)
E: 45,16: Undefined variable 'unicode' (undefined-variable)
E: 84,22: Instance of '_LazyDescr' has no '_resolve' member (no-member)
E:294,15: Undefined variable 'unicode' (undefined-variable)
E:341,36: Undefined variable 'basestring' (undefined-variable)
E:347,31: Undefined variable 'unicode' (undefined-variable)
E:353,31: Undefined variable 'unicode' (undefined-variable)
E:361,35: Undefined variable 'unicode' (undefined-variable)
E:365,22: Undefined variable 'unicode' (undefined-variable)
E:366,20: Undefined variable 'unicode' (undefined-variable)
************\* Module requests.packages.urllib3.util.connection
E: 87, 8: Raising NoneType while only classes or instances are allowed (raising-bad-type)
************\* Module requests.packages.urllib3.util.ssl_
E: 22, 4: No name 'OP_NO_SSLv2' in module 'ssl' (no-name-in-module)
E: 22, 4: No name 'OP_NO_SSLv3' in module 'ssl' (no-name-in-module)
E: 22, 4: No name 'OP_NO_COMPRESSION' in module 'ssl' (no-name-in-module)
E: 41, 4: class already defined line 7 (function-redefined)
Davids-MacBook-Pro-2:~ dhwu$
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2417/reactions"
} | https://api.github.com/repos/psf/requests/issues/2417/timeline | null | completed | null | null | false | [
"Opening this kind of issue is exactly the kind of thing that is likely to get you some very negative comments indeed. =) Offering criticism without offering to help improve it is extremely bad manners. It's worse when the criticism is of the form \"Your project doesn't live up to my personal standard <x>\" as this... |
https://api.github.com/repos/psf/requests/issues/2416 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2416/labels{/name} | https://api.github.com/repos/psf/requests/issues/2416/comments | https://api.github.com/repos/psf/requests/issues/2416/events | https://github.com/psf/requests/issues/2416 | 54,884,915 | MDU6SXNzdWU1NDg4NDkxNQ== | 2,416 | Cookie header isn't passed when redirected | {
"avatar_url": "https://avatars.githubusercontent.com/u/1026154?v=4",
"events_url": "https://api.github.com/users/Fizzadar/events{/privacy}",
"followers_url": "https://api.github.com/users/Fizzadar/followers",
"following_url": "https://api.github.com/users/Fizzadar/following{/other_user}",
"gists_url": "https://api.github.com/users/Fizzadar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Fizzadar",
"id": 1026154,
"login": "Fizzadar",
"node_id": "MDQ6VXNlcjEwMjYxNTQ=",
"organizations_url": "https://api.github.com/users/Fizzadar/orgs",
"received_events_url": "https://api.github.com/users/Fizzadar/received_events",
"repos_url": "https://api.github.com/users/Fizzadar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Fizzadar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Fizzadar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Fizzadar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-01-20T13:50:37Z | 2021-09-08T23:06:04Z | 2015-01-22T14:24:32Z | NONE | resolved | The `Cookie` header isn't sent to redirected URL's like other headers is:
```
# Requests version = 2.5.1
ipdb> response.request.headers
{'CustomHeader': 'this_still_works!'}
ipdb> response.history[0].request.headers
{'CustomHeader': 'this_still_works!', 'Cookie': 'token=top_secret_token; email="dev@dev.com";'}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1026154?v=4",
"events_url": "https://api.github.com/users/Fizzadar/events{/privacy}",
"followers_url": "https://api.github.com/users/Fizzadar/followers",
"following_url": "https://api.github.com/users/Fizzadar/following{/other_user}",
"gists_url": "https://api.github.com/users/Fizzadar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Fizzadar",
"id": 1026154,
"login": "Fizzadar",
"node_id": "MDQ6VXNlcjEwMjYxNTQ=",
"organizations_url": "https://api.github.com/users/Fizzadar/orgs",
"received_events_url": "https://api.github.com/users/Fizzadar/received_events",
"repos_url": "https://api.github.com/users/Fizzadar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Fizzadar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Fizzadar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Fizzadar",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2416/reactions"
} | https://api.github.com/repos/psf/requests/issues/2416/timeline | null | completed | null | null | false | [
"There isn't enough information to even begin to debug this. You're clearly being redirected.\n- Are you being redirected to new domain (or sub-domain)? (e.g., from `example.com` to `sub.example.com` or `example.org`)\n- Are you being redirected from `http://` to `https://`?\n- Where does the cookie come from?\n -... |
https://api.github.com/repos/psf/requests/issues/2415 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2415/labels{/name} | https://api.github.com/repos/psf/requests/issues/2415/comments | https://api.github.com/repos/psf/requests/issues/2415/events | https://github.com/psf/requests/pull/2415 | 54,830,688 | MDExOlB1bGxSZXF1ZXN0Mjc2NDY0Njc= | 2,415 | Move noncebit to the only place it is used | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "009800",
"default": false,
"description": null,
"id": 44501218,
"name": "Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTIxOA==",
"url": "https://api.github.com/repos/psf/requests/labels/Ready%20To%20Merge"
},
{
"color": "207de5",
"default": false,
"description... | closed | true | null | [] | null | 3 | 2015-01-20T00:51:27Z | 2021-09-08T09:01:00Z | 2015-01-27T18:22:53Z | CONTRIBUTOR | resolved | Since we only allow for "auth" qop-value, hardcode it
Fixes #2408
I want to add tests but I'm not sure a good way to write them. =(
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2415/reactions"
} | https://api.github.com/repos/psf/requests/issues/2415/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2415.diff",
"html_url": "https://github.com/psf/requests/pull/2415",
"merged_at": "2015-01-27T18:22:53Z",
"patch_url": "https://github.com/psf/requests/pull/2415.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2415"
} | true | [
"I merged the changes into my auth.py and it worked fine, both for my servers which offer qop=\"auth\" and for those which offer qop=\"auth,auth-int\".\nFrom my point of view the issue #2408 is fixed by this commit.\n",
"Testing this is a nightmare, it's super stateful and you have to patch time and all sorts of ... |
https://api.github.com/repos/psf/requests/issues/2414 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2414/labels{/name} | https://api.github.com/repos/psf/requests/issues/2414/comments | https://api.github.com/repos/psf/requests/issues/2414/events | https://github.com/psf/requests/issues/2414 | 54,724,438 | MDU6SXNzdWU1NDcyNDQzOA== | 2,414 | Environment http_proxy will cover the Session property s.proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/1917483?v=4",
"events_url": "https://api.github.com/users/syjiangrui/events{/privacy}",
"followers_url": "https://api.github.com/users/syjiangrui/followers",
"following_url": "https://api.github.com/users/syjiangrui/following{/other_user}",
"gists_url": "https://api.github.com/users/syjiangrui/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/syjiangrui",
"id": 1917483,
"login": "syjiangrui",
"node_id": "MDQ6VXNlcjE5MTc0ODM=",
"organizations_url": "https://api.github.com/users/syjiangrui/orgs",
"received_events_url": "https://api.github.com/users/syjiangrui/received_events",
"repos_url": "https://api.github.com/users/syjiangrui/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/syjiangrui/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/syjiangrui/subscriptions",
"type": "User",
"url": "https://api.github.com/users/syjiangrui",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-01-19T04:05:17Z | 2021-09-08T23:06:10Z | 2015-01-19T08:58:29Z | NONE | resolved | When I use a proxy in my code I find a problem. In the code below
``` python
s = requests.Session()
s.proxies = {'http':'127.0.0.1:3128'}
r = s.get("http://www.apple.com")
```
If I set environmet var http_proxy='http://192.168.1.100:3128' then the request will use environment proxy rather than the proxy I have set in the code.
But if I use proxy like below the program will use the proxy which I set in the code.
``` python
s = requests.Session()
r = s.get("http://www.apple.com", proxies={'http':'127.0.0.1:3128'})
```
Is there any issue?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2414/reactions"
} | https://api.github.com/repos/psf/requests/issues/2414/timeline | null | completed | null | null | false | [
"Possible duplicate of #2109\n",
"Nope, it's a definite duplicate of #2018.\n"
] |
https://api.github.com/repos/psf/requests/issues/2413 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2413/labels{/name} | https://api.github.com/repos/psf/requests/issues/2413/comments | https://api.github.com/repos/psf/requests/issues/2413/events | https://github.com/psf/requests/pull/2413 | 54,724,003 | MDExOlB1bGxSZXF1ZXN0Mjc1ODM4OTQ= | 2,413 | Check that filenames are unicode or bytes | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "009800",
"default": false,
"description": null,
"id": 44501218,
"name": "Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTIxOA==",
"url": "https://api.github.com/repos/psf/requests/labels/Ready%20To%20Merge"
},
{
"color": "207de5",
"default": false,
"description... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | {
"closed_at": "2015-04-06T01:57:33Z",
"closed_issues": 4,
"created_at": "2015-01-18T20:07:00Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/23",
"id": 940764,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/23/labels",
"node_id": "MDk6TWlsZXN0b25lOTQwNzY0",
"number": 23,
"open_issues": 0,
"state": "closed",
"title": "2.6.0",
"updated_at": "2015-04-06T01:57:33Z",
"url": "https://api.github.com/repos/psf/requests/milestones/23"
} | 4 | 2015-01-19T03:54:01Z | 2021-09-08T09:00:59Z | 2015-01-27T18:23:18Z | CONTRIBUTOR | resolved | Instead of only checking one or another type of string-like object that we
accept, let's be able to check both.
Fixes #2411
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2413/reactions"
} | https://api.github.com/repos/psf/requests/issues/2413/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2413.diff",
"html_url": "https://github.com/psf/requests/pull/2413",
"merged_at": "2015-01-27T18:23:18Z",
"patch_url": "https://github.com/psf/requests/pull/2413.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2413"
} | true | [
"Why are we not just using `basestring`?\n",
"@Lukasa This is what I get for working on this way too late last night.\n\n@arthurdarcet thanks. Done.\n",
"Thanks! LGTM. :cake:\n",
"@Lukasa fwiw, I edited the commit message on my commit and retitled the PR to be more accurate descriptions of what's happening. T... |
https://api.github.com/repos/psf/requests/issues/2412 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2412/labels{/name} | https://api.github.com/repos/psf/requests/issues/2412/comments | https://api.github.com/repos/psf/requests/issues/2412/events | https://github.com/psf/requests/pull/2412 | 54,722,570 | MDExOlB1bGxSZXF1ZXN0Mjc1ODMwOTA= | 2,412 | Remove entirely unnecessary and unused bits from requests.compat | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "009800",
"default": false,
"description": null,
"id": 44501218,
"name": "Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTIxOA==",
"url": "https://api.github.com/repos/psf/requests/labels/Ready%20To%20Merge"
},
{
"color": "207de5",
"default": false,
"description... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | {
"closed_at": "2015-04-06T01:57:33Z",
"closed_issues": 4,
"created_at": "2015-01-18T20:07:00Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/23",
"id": 940764,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/23/labels",
"node_id": "MDk6TWlsZXN0b25lOTQwNzY0",
"number": 23,
"open_issues": 0,
"state": "closed",
"title": "2.6.0",
"updated_at": "2015-04-06T01:57:33Z",
"url": "https://api.github.com/repos/psf/requests/milestones/23"
} | 2 | 2015-01-19T03:17:36Z | 2021-09-08T09:00:58Z | 2015-01-27T18:24:25Z | CONTRIBUTOR | resolved | A tiny refactor I noticed while looking into a separate bug.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2412/reactions"
} | https://api.github.com/repos/psf/requests/issues/2412/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2412.diff",
"html_url": "https://github.com/psf/requests/pull/2412",
"merged_at": "2015-01-27T18:24:25Z",
"patch_url": "https://github.com/psf/requests/pull/2412.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2412"
} | true | [
"Fine by me. :cake:\n",
"Hmmm, interesting.\n"
] |
https://api.github.com/repos/psf/requests/issues/2411 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2411/labels{/name} | https://api.github.com/repos/psf/requests/issues/2411/comments | https://api.github.com/repos/psf/requests/issues/2411/events | https://github.com/psf/requests/issues/2411 | 54,706,715 | MDU6SXNzdWU1NDcwNjcxNQ== | 2,411 | Requests 2.5.1 doesn't recognize unicode filenames for uploads | {
"avatar_url": "https://avatars.githubusercontent.com/u/80012?v=4",
"events_url": "https://api.github.com/users/sjagoe/events{/privacy}",
"followers_url": "https://api.github.com/users/sjagoe/followers",
"following_url": "https://api.github.com/users/sjagoe/following{/other_user}",
"gists_url": "https://api.github.com/users/sjagoe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sjagoe",
"id": 80012,
"login": "sjagoe",
"node_id": "MDQ6VXNlcjgwMDEy",
"organizations_url": "https://api.github.com/users/sjagoe/orgs",
"received_events_url": "https://api.github.com/users/sjagoe/received_events",
"repos_url": "https://api.github.com/users/sjagoe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sjagoe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sjagoe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sjagoe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 19 | 2015-01-18T19:21:13Z | 2021-09-08T23:05:43Z | 2015-01-27T18:23:18Z | NONE | resolved | After merge of https://github.com/kennethreitz/requests/pull/2379, to allow filenames to be `int` types, unicode filenames are no longer recognized under Python 2.
This checks that the filename is a `builtin` `str`, which has different behaviour on Python 2 and Python 3:
`requests/utils.py:118: if name and isinstance(name, builtin_str) and name[0] != '<' and name[-1] != '>':`
In `requests/compat.py`, `builtin_str` is defines as `str`, which is non-unicode `bytes` in Python 2 and unicode in Python 3. Perhaps the check should be against basestring, or is this change in behaviour intended?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2411/reactions"
} | https://api.github.com/repos/psf/requests/issues/2411/timeline | null | completed | null | null | false | [
"In fact, I have not tried this yet, but I think it will make writing code compatible with Python 2 and Python 3 much more difficult. In working around the Python 2 issue by encoding the unicode filename, it is likely that a Python 3 issue will be introduced. This is going to require version specific encoding handl... |
https://api.github.com/repos/psf/requests/issues/2410 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2410/labels{/name} | https://api.github.com/repos/psf/requests/issues/2410/comments | https://api.github.com/repos/psf/requests/issues/2410/events | https://github.com/psf/requests/issues/2410 | 54,652,674 | MDU6SXNzdWU1NDY1MjY3NA== | 2,410 | urllib3 exceptions | {
"avatar_url": "https://avatars.githubusercontent.com/u/80876?v=4",
"events_url": "https://api.github.com/users/edrahn/events{/privacy}",
"followers_url": "https://api.github.com/users/edrahn/followers",
"following_url": "https://api.github.com/users/edrahn/following{/other_user}",
"gists_url": "https://api.github.com/users/edrahn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/edrahn",
"id": 80876,
"login": "edrahn",
"node_id": "MDQ6VXNlcjgwODc2",
"organizations_url": "https://api.github.com/users/edrahn/orgs",
"received_events_url": "https://api.github.com/users/edrahn/received_events",
"repos_url": "https://api.github.com/users/edrahn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/edrahn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/edrahn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/edrahn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-01-17T06:26:33Z | 2021-09-08T23:06:11Z | 2015-01-17T14:42:51Z | NONE | resolved | Traceback (most recent call last):
File "./dlcharts.py", line 111, in <module>
content = get_url(url)
File "/home/ed/projects/equalog/src/web.py", line 118, in get_url
referrer=referrer)
File "/home/ed/projects/equalog/src/web.py", line 81, in get_content
content = response.content
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 694, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 627, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 242, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 200, in read
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='....', port=80): Read timed out.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/80876?v=4",
"events_url": "https://api.github.com/users/edrahn/events{/privacy}",
"followers_url": "https://api.github.com/users/edrahn/followers",
"following_url": "https://api.github.com/users/edrahn/following{/other_user}",
"gists_url": "https://api.github.com/users/edrahn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/edrahn",
"id": 80876,
"login": "edrahn",
"node_id": "MDQ6VXNlcjgwODc2",
"organizations_url": "https://api.github.com/users/edrahn/orgs",
"received_events_url": "https://api.github.com/users/edrahn/received_events",
"repos_url": "https://api.github.com/users/edrahn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/edrahn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/edrahn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/edrahn",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2410/reactions"
} | https://api.github.com/repos/psf/requests/issues/2410/timeline | null | completed | null | null | false | [
"What version of requests are you using? This should have been patched in 2.4.0.\n",
"I'm not sure what version it was. I was using the system package instead of my virtaulenv one, and that fixed it. Most likey diferent versions.\n"
] |
https://api.github.com/repos/psf/requests/issues/2409 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2409/labels{/name} | https://api.github.com/repos/psf/requests/issues/2409/comments | https://api.github.com/repos/psf/requests/issues/2409/events | https://github.com/psf/requests/issues/2409 | 54,500,918 | MDU6SXNzdWU1NDUwMDkxOA== | 2,409 | Consecutive requests with Session() raises 404 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1877650?v=4",
"events_url": "https://api.github.com/users/RossLote/events{/privacy}",
"followers_url": "https://api.github.com/users/RossLote/followers",
"following_url": "https://api.github.com/users/RossLote/following{/other_user}",
"gists_url": "https://api.github.com/users/RossLote/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RossLote",
"id": 1877650,
"login": "RossLote",
"node_id": "MDQ6VXNlcjE4Nzc2NTA=",
"organizations_url": "https://api.github.com/users/RossLote/orgs",
"received_events_url": "https://api.github.com/users/RossLote/received_events",
"repos_url": "https://api.github.com/users/RossLote/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RossLote/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RossLote/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RossLote",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 42 | 2015-01-15T20:38:19Z | 2021-09-08T01:21:19Z | 2018-06-19T18:23:11Z | NONE | resolved | In [1]: import requests
In [2]: s = requests.Session()
In [3]: s.get('https://www.flavourly.com/start-subscription/12/', verify=False)
Out[3]: <Response [200]>
In [4]: s.get('https://www.flavourly.com/start-subscription/12/', verify=False)
Out[4]: <Response [404]>
Is it me or is this a bug? I've checked and it only happens in versions higher than 2.3.0.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2409/reactions"
} | https://api.github.com/repos/psf/requests/issues/2409/timeline | null | completed | null | null | false | [
"I don't think it's a bug, I think it's because of cookies. Flavourly doesn't seem to like the cookies we're sending back. Try checking the difference between the value of `s.cookies` after the first request, once in something where you don't see the 'bug', and once in a version where you do.\n",
"In fact, I thin... |
https://api.github.com/repos/psf/requests/issues/2408 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2408/labels{/name} | https://api.github.com/repos/psf/requests/issues/2408/comments | https://api.github.com/repos/psf/requests/issues/2408/events | https://github.com/psf/requests/issues/2408 | 54,311,142 | MDU6SXNzdWU1NDMxMTE0Mg== | 2,408 | Wrong digest header creation when server has qop="auth,auth-int" | {
"avatar_url": "https://avatars.githubusercontent.com/u/10529974?v=4",
"events_url": "https://api.github.com/users/berndschultze/events{/privacy}",
"followers_url": "https://api.github.com/users/berndschultze/followers",
"following_url": "https://api.github.com/users/berndschultze/following{/other_user}",
"gists_url": "https://api.github.com/users/berndschultze/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/berndschultze",
"id": 10529974,
"login": "berndschultze",
"node_id": "MDQ6VXNlcjEwNTI5OTc0",
"organizations_url": "https://api.github.com/users/berndschultze/orgs",
"received_events_url": "https://api.github.com/users/berndschultze/received_events",
"repos_url": "https://api.github.com/users/berndschultze/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/berndschultze/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/berndschultze/subscriptions",
"type": "User",
"url": "https://api.github.com/users/berndschultze",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2015-01-14T11:21:32Z | 2021-09-08T23:06:03Z | 2015-01-27T18:22:53Z | NONE | resolved | I always get "401 unauthorized" when trying to log in to a server which writes qop="auth,auth-int" in its answer. The problem doesn't exist with Curl.
I debugged the requests code and probably found the problem in auth.py. The function build_digest_header in class HTTPDigestAuth calculates
noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, qop, HA2)
and gives back
base += ', qop="auth", nc=%s, cnonce="%s"' % (ncvalue, cnonce)
to the server.
So in our client digest calculation we use qop="auth,auth-int", which we take from the server response, and make the server use qop="auth" in its calculation by giving back this header.
While debugging I can log in correctly if I change noncebit on the fly to
noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, "auth", HA2)
This would be my suggestion for the solution. Theqop for the calculation should be the same as we give back in our header.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2408/reactions"
} | https://api.github.com/repos/psf/requests/issues/2408/timeline | null | completed | null | null | false | [
"We do not use `qop=auth-int`, we don't support it. When given multiple `qop` values like that in an auth challenge we're allowed to select one, and we have: `auth`.\n\nYou're right, however, about the fix. If we've chosen `auth` that's what we should use in our calculation. The simplest fix should be to pull the c... |
https://api.github.com/repos/psf/requests/issues/2407 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2407/labels{/name} | https://api.github.com/repos/psf/requests/issues/2407/comments | https://api.github.com/repos/psf/requests/issues/2407/events | https://github.com/psf/requests/issues/2407 | 54,189,745 | MDU6SXNzdWU1NDE4OTc0NQ== | 2,407 | there is a bug when filename contains a non-ascii character | {
"avatar_url": "https://avatars.githubusercontent.com/u/4251771?v=4",
"events_url": "https://api.github.com/users/mushanshitiancai/events{/privacy}",
"followers_url": "https://api.github.com/users/mushanshitiancai/followers",
"following_url": "https://api.github.com/users/mushanshitiancai/following{/other_user}",
"gists_url": "https://api.github.com/users/mushanshitiancai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mushanshitiancai",
"id": 4251771,
"login": "mushanshitiancai",
"node_id": "MDQ6VXNlcjQyNTE3NzE=",
"organizations_url": "https://api.github.com/users/mushanshitiancai/orgs",
"received_events_url": "https://api.github.com/users/mushanshitiancai/received_events",
"repos_url": "https://api.github.com/users/mushanshitiancai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mushanshitiancai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mushanshitiancai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mushanshitiancai",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-01-13T12:51:34Z | 2021-09-08T23:06:12Z | 2015-01-13T13:07:00Z | NONE | resolved | I ues python 2.7.9 and requests 2.5.1
when I do like this:
```
files = {'file1':('中文','hello')}
r = requests.post('http://test',files=files)
```
the request is like this(copy from fiddler):
```
Content-Disposition: form-data; name="file1"; filename*=utf-8''%E4%B8%AD%E6%96%87
```
I think the format of filename is wrong.
the right format should be:
```
Content-Disposition: form-data; name="file1"; filename="中文"
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2407/reactions"
} | https://api.github.com/repos/psf/requests/issues/2407/timeline | null | completed | null | null | false | [
"in requests\\packages\\urllib3\\fields.py\n\n```\ndef format_header_param(name, value):\n if not any(ch in value for ch in '\"\\\\\\r\\n'):\n result = '%s=\"%s\"' % (name, value)\n try:\n result.encode('ascii')\n except UnicodeEncodeError:\n pass\n else:\n ... |
https://api.github.com/repos/psf/requests/issues/2406 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2406/labels{/name} | https://api.github.com/repos/psf/requests/issues/2406/comments | https://api.github.com/repos/psf/requests/issues/2406/events | https://github.com/psf/requests/issues/2406 | 54,140,897 | MDU6SXNzdWU1NDE0MDg5Nw== | 2,406 | Unusable `requests` in main and forked processes (`rq` worker script) | {
"avatar_url": "https://avatars.githubusercontent.com/u/104093?v=4",
"events_url": "https://api.github.com/users/ducu/events{/privacy}",
"followers_url": "https://api.github.com/users/ducu/followers",
"following_url": "https://api.github.com/users/ducu/following{/other_user}",
"gists_url": "https://api.github.com/users/ducu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ducu",
"id": 104093,
"login": "ducu",
"node_id": "MDQ6VXNlcjEwNDA5Mw==",
"organizations_url": "https://api.github.com/users/ducu/orgs",
"received_events_url": "https://api.github.com/users/ducu/received_events",
"repos_url": "https://api.github.com/users/ducu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ducu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ducu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ducu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 33 | 2015-01-13T01:52:32Z | 2021-09-08T15:00:53Z | 2015-01-15T09:50:52Z | NONE | resolved | This is a follow up from https://github.com/kennethreitz/requests/issues/2399#issuecomment-69675695
As stated there, this is a problem which has to do with `requests` being used in both a main process and forked processes -- the `rq` worker script. If the network goes down even for a short while, `requests` raises few exceptions (ConnectionError) then it becomes unusable and the forked processes get killed instantly if they try to use it (requests.get). The issue is described on the `rq` side as well: https://github.com/nvie/rq/issues/473
Sorry if this not very clear, tired now and I'm struggling with this issue for few weeks already...
I've put up a gist to reproduce it (https://gist.github.com/ducu/ee8c0b1028775df6c72e), but please let me know if I can help. Thanks a lot for your support, cheers
| {
"avatar_url": "https://avatars.githubusercontent.com/u/104093?v=4",
"events_url": "https://api.github.com/users/ducu/events{/privacy}",
"followers_url": "https://api.github.com/users/ducu/followers",
"following_url": "https://api.github.com/users/ducu/following{/other_user}",
"gists_url": "https://api.github.com/users/ducu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ducu",
"id": 104093,
"login": "ducu",
"node_id": "MDQ6VXNlcjEwNDA5Mw==",
"organizations_url": "https://api.github.com/users/ducu/orgs",
"received_events_url": "https://api.github.com/users/ducu/received_events",
"repos_url": "https://api.github.com/users/ducu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ducu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ducu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ducu",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2406/reactions"
} | https://api.github.com/repos/psf/requests/issues/2406/timeline | null | completed | null | null | false | [
"Does requests misbehave if you pull the link down without forking? That is, if you have a single ordinary script, no forking or workers, using requests, does it hang if you run `ifconfig en0 down` in the same way?\n",
"Nope, only when forking. \n\nIf you call `count_words_at_url` in a single process for loop it ... |
https://api.github.com/repos/psf/requests/issues/2405 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2405/labels{/name} | https://api.github.com/repos/psf/requests/issues/2405/comments | https://api.github.com/repos/psf/requests/issues/2405/events | https://github.com/psf/requests/issues/2405 | 54,111,802 | MDU6SXNzdWU1NDExMTgwMg== | 2,405 | x509 Certificate | {
"avatar_url": "https://avatars.githubusercontent.com/u/505939?v=4",
"events_url": "https://api.github.com/users/kvarga/events{/privacy}",
"followers_url": "https://api.github.com/users/kvarga/followers",
"following_url": "https://api.github.com/users/kvarga/following{/other_user}",
"gists_url": "https://api.github.com/users/kvarga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kvarga",
"id": 505939,
"login": "kvarga",
"node_id": "MDQ6VXNlcjUwNTkzOQ==",
"organizations_url": "https://api.github.com/users/kvarga/orgs",
"received_events_url": "https://api.github.com/users/kvarga/received_events",
"repos_url": "https://api.github.com/users/kvarga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kvarga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kvarga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kvarga",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-01-12T21:50:24Z | 2021-09-08T23:06:13Z | 2015-01-12T22:25:22Z | NONE | resolved | Is there any support for x509 certificate authentication with requests? I can't seem to find any examples and would much prefer to use requests.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/505939?v=4",
"events_url": "https://api.github.com/users/kvarga/events{/privacy}",
"followers_url": "https://api.github.com/users/kvarga/followers",
"following_url": "https://api.github.com/users/kvarga/following{/other_user}",
"gists_url": "https://api.github.com/users/kvarga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kvarga",
"id": 505939,
"login": "kvarga",
"node_id": "MDQ6VXNlcjUwNTkzOQ==",
"organizations_url": "https://api.github.com/users/kvarga/orgs",
"received_events_url": "https://api.github.com/users/kvarga/received_events",
"repos_url": "https://api.github.com/users/kvarga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kvarga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kvarga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kvarga",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2405/reactions"
} | https://api.github.com/repos/psf/requests/issues/2405/timeline | null | completed | null | null | false | [
"By which you mean TLS authentication? Yes, it's enabled by default.\n",
"I apologise, I may have misread. Do you mean TLS _client_ certificates?\n",
"Yeah, sorry. I'm piecing together some horrible documentation from our vendor. The example app they gave is corrupted so awaiting that back. The language from do... |
https://api.github.com/repos/psf/requests/issues/2404 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2404/labels{/name} | https://api.github.com/repos/psf/requests/issues/2404/comments | https://api.github.com/repos/psf/requests/issues/2404/events | https://github.com/psf/requests/issues/2404 | 53,957,330 | MDU6SXNzdWU1Mzk1NzMzMA== | 2,404 | requests removes characters from valid url | {
"avatar_url": "https://avatars.githubusercontent.com/u/4533323?v=4",
"events_url": "https://api.github.com/users/NikolaiT/events{/privacy}",
"followers_url": "https://api.github.com/users/NikolaiT/followers",
"following_url": "https://api.github.com/users/NikolaiT/following{/other_user}",
"gists_url": "https://api.github.com/users/NikolaiT/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NikolaiT",
"id": 4533323,
"login": "NikolaiT",
"node_id": "MDQ6VXNlcjQ1MzMzMjM=",
"organizations_url": "https://api.github.com/users/NikolaiT/orgs",
"received_events_url": "https://api.github.com/users/NikolaiT/received_events",
"repos_url": "https://api.github.com/users/NikolaiT/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NikolaiT/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NikolaiT/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NikolaiT",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-10T12:52:12Z | 2021-09-08T23:06:13Z | 2015-01-10T13:10:21Z | NONE | resolved | Requests strips the question mark when a hash tag follows. urlopen doesn't do it. Why?
Recreate bug with:
``` python
#!/usr/bin/python3
from urllib.request import urlopen
from requests import get
url = 'http://incolumitas.com?#param=value'
native = urlopen(url)
req = get(url)
assert native.url == req.url, '{} vs {}'.format(native.url, req.url)
"""
AssertionError: http://incolumitas.com?#param=value vs http://incolumitas.com/#param=value
Requests strips the question mark when a hash tag follows. urlopen doesn't do it. Why?
"""
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/4533323?v=4",
"events_url": "https://api.github.com/users/NikolaiT/events{/privacy}",
"followers_url": "https://api.github.com/users/NikolaiT/followers",
"following_url": "https://api.github.com/users/NikolaiT/following{/other_user}",
"gists_url": "https://api.github.com/users/NikolaiT/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NikolaiT",
"id": 4533323,
"login": "NikolaiT",
"node_id": "MDQ6VXNlcjQ1MzMzMjM=",
"organizations_url": "https://api.github.com/users/NikolaiT/orgs",
"received_events_url": "https://api.github.com/users/NikolaiT/received_events",
"repos_url": "https://api.github.com/users/NikolaiT/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NikolaiT/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NikolaiT/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NikolaiT",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2404/reactions"
} | https://api.github.com/repos/psf/requests/issues/2404/timeline | null | completed | null | null | false | [
"The question mark indicates the beginning of the query portion of the URL. The octothorpe indicates the beginning of the fragment portion of the URL. We conclude that you have an empty query string and normalise it by removing the section entirely.\n\nIf the octothorpe is intended to be part of the query string yo... |
https://api.github.com/repos/psf/requests/issues/2403 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2403/labels{/name} | https://api.github.com/repos/psf/requests/issues/2403/comments | https://api.github.com/repos/psf/requests/issues/2403/events | https://github.com/psf/requests/issues/2403 | 53,785,849 | MDU6SXNzdWU1Mzc4NTg0OQ== | 2,403 | Provide a way for all existing connections to be discarded | {
"avatar_url": "https://avatars.githubusercontent.com/u/116235?v=4",
"events_url": "https://api.github.com/users/cameron314/events{/privacy}",
"followers_url": "https://api.github.com/users/cameron314/followers",
"following_url": "https://api.github.com/users/cameron314/following{/other_user}",
"gists_url": "https://api.github.com/users/cameron314/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cameron314",
"id": 116235,
"login": "cameron314",
"node_id": "MDQ6VXNlcjExNjIzNQ==",
"organizations_url": "https://api.github.com/users/cameron314/orgs",
"received_events_url": "https://api.github.com/users/cameron314/received_events",
"repos_url": "https://api.github.com/users/cameron314/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cameron314/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cameron314/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cameron314",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-01-08T18:49:58Z | 2021-09-08T23:06:14Z | 2015-01-08T21:21:44Z | NONE | resolved | As I gather from various web searches, there's currently no way to manage the underlying TCP connections directly, since they're supposed to "just work" and be auto-recycled, etc. However, I have found one use case where this is not enough, and the sanest way to make it work would be to instruct `requests` to discard all open connections.
Here's the use case: I have a web API I've written that I'd like to test using `requests`. Each test case starts a new instance of the API server, runs the test code, then stops the server. Because the tests run in quick succession, there's a race condition between the time the server exits (and Linux cleans up the socket) and the time that `requests` sees that the connection was closed. So, when the second test runs and starts a new instance of the server, `requests` thinks it can reuse the previous connection, which then fails (throws an exception) because the remote socket no longer exists. This is not really the fault of `requests` (technically the behaviour is correct -- the connection _was_ closed, after all), but this lack of control on the client side of the connection in face of asynchronous cleanup makes it difficult to to these types of connection tests.
There's many workarounds I could use (currently I've inserted a sleep of 75ms between test runs, which works, as does using a different port for each test, or reusing the same instance of the server for all tests). But none of them are very elegant.
Note that this doesn't happen on Windows, for some reason, only Linux (Fedora 21).
Sample exception from the second test case (if I don't sleep):
```
Traceback (most recent call last):
File "tests.py", line 52, in setUp
requests.get(api, cookies=cookies)
File "/usr/lib/python2.7/site-packages/requests-2.5.0-py2.7.egg/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.5.0-py2.7.egg/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.5.0-py2.7.egg/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.5.0-py2.7.egg/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests-2.5.0-py2.7.egg/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/116235?v=4",
"events_url": "https://api.github.com/users/cameron314/events{/privacy}",
"followers_url": "https://api.github.com/users/cameron314/followers",
"following_url": "https://api.github.com/users/cameron314/following{/other_user}",
"gists_url": "https://api.github.com/users/cameron314/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cameron314",
"id": 116235,
"login": "cameron314",
"node_id": "MDQ6VXNlcjExNjIzNQ==",
"organizations_url": "https://api.github.com/users/cameron314/orgs",
"received_events_url": "https://api.github.com/users/cameron314/received_events",
"repos_url": "https://api.github.com/users/cameron314/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cameron314/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cameron314/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cameron314",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2403/reactions"
} | https://api.github.com/repos/psf/requests/issues/2403/timeline | null | completed | null | null | false | [
"Hi there! Thanks for this detailed feature request.\n\nBefore we go too far I want to nail down exactly what's going on. Requests only re-uses connections at the scope of a single `Session` object. Given that you're calling `requests.get`, you should _not_ be seeing any connection re-use of any kind. We don't keep... |
https://api.github.com/repos/psf/requests/issues/2402 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2402/labels{/name} | https://api.github.com/repos/psf/requests/issues/2402/comments | https://api.github.com/repos/psf/requests/issues/2402/events | https://github.com/psf/requests/issues/2402 | 53,700,951 | MDU6SXNzdWU1MzcwMDk1MQ== | 2,402 | Allow a 'verbose' flag for raise_for_status() | {
"avatar_url": "https://avatars.githubusercontent.com/u/1808790?v=4",
"events_url": "https://api.github.com/users/mrname/events{/privacy}",
"followers_url": "https://api.github.com/users/mrname/followers",
"following_url": "https://api.github.com/users/mrname/following{/other_user}",
"gists_url": "https://api.github.com/users/mrname/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mrname",
"id": 1808790,
"login": "mrname",
"node_id": "MDQ6VXNlcjE4MDg3OTA=",
"organizations_url": "https://api.github.com/users/mrname/orgs",
"received_events_url": "https://api.github.com/users/mrname/received_events",
"repos_url": "https://api.github.com/users/mrname/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mrname/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mrname/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mrname",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-08T00:33:59Z | 2018-09-06T12:19:50Z | 2015-01-09T21:13:47Z | NONE | resolved | raise_for_status() is super awesome, but a lot of the time, the error code and message is not informative enough to assist with debgugging when an exception is raised. It would be nice to have a verbose flag for raise_for_status that would also print the response body, where more details are often included. I would be happy to work on this, but wanted to make sure it is not already in the works.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/2402/reactions"
} | https://api.github.com/repos/psf/requests/issues/2402/timeline | null | completed | null | null | false | [
"If you do:\n\n``` py\nimport requests\n\nr = requests.get(url)\n\ntry:\n r.raise_for_status()\nexcept requests.exceptions.HTTPError as error:\n print(error)\n print(error.response.text)\n```\n\nWe don't print the body (and likely won't add it, even as a flag) for several reasons:\n- It may not exist (and ... |
https://api.github.com/repos/psf/requests/issues/2401 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2401/labels{/name} | https://api.github.com/repos/psf/requests/issues/2401/comments | https://api.github.com/repos/psf/requests/issues/2401/events | https://github.com/psf/requests/issues/2401 | 53,515,560 | MDU6SXNzdWU1MzUxNTU2MA== | 2,401 | Problems in SSL communication | {
"avatar_url": "https://avatars.githubusercontent.com/u/10159045?v=4",
"events_url": "https://api.github.com/users/tesande/events{/privacy}",
"followers_url": "https://api.github.com/users/tesande/followers",
"following_url": "https://api.github.com/users/tesande/following{/other_user}",
"gists_url": "https://api.github.com/users/tesande/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tesande",
"id": 10159045,
"login": "tesande",
"node_id": "MDQ6VXNlcjEwMTU5MDQ1",
"organizations_url": "https://api.github.com/users/tesande/orgs",
"received_events_url": "https://api.github.com/users/tesande/received_events",
"repos_url": "https://api.github.com/users/tesande/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tesande/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tesande/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tesande",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-06T13:41:58Z | 2021-09-08T23:00:46Z | 2015-01-06T14:09:04Z | NONE | resolved | Hi again!
This issue is related to the closed issue #2383
I have now investigated further. I have tried a different client agains the server, and this communication works fine. I have used wireshark to see how the handshake goes. With the java client things works out fine, but when using requests, the connection terminates with an Encrypted alert after the change Cipher spec.
When I look at protocol in Wireshark, I see TLSv1 even if I change protocol using the SSLAdapter in the requests_toolbelt. Is this correct?
I use OpenSSL 1.0.1h 5 Jun 2014.
Could it be wise to try a different OpenSSL version? Which version is compatible with requests version 2.5.1?
Regards
Tor Erik
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2401/reactions"
} | https://api.github.com/repos/psf/requests/issues/2401/timeline | null | completed | null | null | false | [
"requests can and does use whatever version of OpenSSL Python is compiled against. There is no bug in requests from what I can tell and the SSLAdapter in `requests_toolbelt` just works for me on both OpenSSL 1.0.1 and 0.9.8. If you need help with your code, please post your question on [StackOverflow](https://stack... |
https://api.github.com/repos/psf/requests/issues/2400 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2400/labels{/name} | https://api.github.com/repos/psf/requests/issues/2400/comments | https://api.github.com/repos/psf/requests/issues/2400/events | https://github.com/psf/requests/issues/2400 | 53,473,702 | MDU6SXNzdWU1MzQ3MzcwMg== | 2,400 | Using requests session with pool_block=True blocks indefinitely for name resolution errors | {
"avatar_url": "https://avatars.githubusercontent.com/u/1521409?v=4",
"events_url": "https://api.github.com/users/sinank/events{/privacy}",
"followers_url": "https://api.github.com/users/sinank/followers",
"following_url": "https://api.github.com/users/sinank/following{/other_user}",
"gists_url": "https://api.github.com/users/sinank/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinank",
"id": 1521409,
"login": "sinank",
"node_id": "MDQ6VXNlcjE1MjE0MDk=",
"organizations_url": "https://api.github.com/users/sinank/orgs",
"received_events_url": "https://api.github.com/users/sinank/received_events",
"repos_url": "https://api.github.com/users/sinank/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinank/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinank/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinank",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-01-06T02:26:42Z | 2021-09-08T23:05:46Z | 2015-04-07T13:42:49Z | NONE | resolved | I am using a requests session pool in my code since we make a large number of HTTP requests.
We recently ran into an issue where temporary name resolution errors blocked the process from making any more HTTP requests since the pool was full.
I have pasted a quick script to reproduce the issue below.
```
from requests import Request, Session
import requests
import gevent
from gevent import monkey
monkey.patch_all()
urltotest = 'http://thisisanunresolvablesite.com/foo'
MAX_CONC_REQUESTS_PER_CONNECTION = 21
MAX_POOLS = 1
MAX_CONC_REQUESTS = 5
# Requests session pool
http_pool = None
def get_requests_session():
global http_pool
if not http_pool:
http_pool = Session()
adapter = requests.adapters.HTTPAdapter(
pool_connections=MAX_POOLS,
pool_maxsize=MAX_CONC_REQUESTS,
pool_block=True)
http_pool.mount('http://', adapter)
http_pool.mount('https://', adapter)
return http_pool
def send_request_in_greenlet(i):
try:
prepped = Request('GET', urltotest).prepare()
session = get_requests_session()
print 'Sending request #', i
resp = session.send(prepped)
body = str(resp.content)
status = str(resp.status_code)
print 'Reponse for request # %d - Status: %s' % (i, status)
except Exception as ex:
print ex
i = 0
while i < 20:
i += 1
gevent.spawn(send_request_in_greenlet, i)
try:
gevent.sleep(100)
except KeyboardInterrupt:
pass
```
The error seems to stem from the urlopen method in packages/urllib3/connectionpool.py:
```
...
except (TimeoutError, HTTPException, SocketError) as e:
if conn:
# Discard the connection for these exceptions. It will be
# be replaced during the next _get_conn() call.
conn.close()
conn = None
...
finally:
if release_conn:
# Put the connection back to be reused. If the connection is
# expired then it will be None, which will get replaced with a
# fresh connection during _get_conn.
self._put_conn(conn)
```
I am not sure that this issue should be filed under urllib3 or requests. Apologizing in advance if I posted this at the wrong place.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2400/reactions"
} | https://api.github.com/repos/psf/requests/issues/2400/timeline | null | completed | null | null | false | [
"Why aren't you using grequests for this?\n",
"@sigmavirus24 Thanks for the suggestion. Will look it up.\nDoes using grequests allow connection pooling? I briefly looked at it right now and it does not look to be as feature rich as the requests library.\nWe make a ton of HTTP requests and connection pooling is im... |
https://api.github.com/repos/psf/requests/issues/2399 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2399/labels{/name} | https://api.github.com/repos/psf/requests/issues/2399/comments | https://api.github.com/repos/psf/requests/issues/2399/events | https://github.com/psf/requests/issues/2399 | 53,460,187 | MDU6SXNzdWU1MzQ2MDE4Nw== | 2,399 | [Proposed Enhancement] Consume remainder of socket in Response.close | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 20 | 2015-01-05T23:11:00Z | 2021-09-08T23:06:13Z | 2015-01-13T02:44:59Z | CONTRIBUTOR | resolved | Earlier today I was speaking with @ducu on [IRC](https://botbot.me/freenode/python-requests/2015-01-05/?msg=28835010&page=1) about a problem they're having using `rq` and `requests`. My intuition (which is really all I have to work with about this problem) is that all of the content on the response is not being consumed and people assume that doing something like:
``` py
with contextlib.closing(requests.get(url, stream=True)) as response:
# do some stuff with response
```
The socket will close properly. If I remember correctly though, we've seen that if the socket isn't completely consumed, this won't allow the socket to be released (at least not immediately). I'm further suspicious this is the cause because killing one of the workers for `rq` lets the job resume. I wonder what people think about changing [`Response.close`](https://github.com/kennethreitz/requests/blob/7612015424c88cfd98f6be692ff994898aee1502/requests/models.py#L833) to be something like:
``` py
def close(self):
self.content
self.raw.release_conn()
```
The call to self.content will consume the rest of the socket (if there's anything to consume) and then we'll release the connection (which should release the socket in this case).
Thoughts? Also I'm pretty tired so I could be wrong about some of this stuff.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2399/reactions"
} | https://api.github.com/repos/psf/requests/issues/2399/timeline | null | completed | null | null | false | [
"That's not a bad idea. Some notes:\n1. `response.content` may take a very long time to return if timeouts aren't configured. Closing shouldn't hang.\n2. `Response.content` may throw exceptions.\n\nWe need to decide how we're dealing with these problems.\n",
"Thank you for helping with this!\n\nTrying to clarify ... |
https://api.github.com/repos/psf/requests/issues/2398 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2398/labels{/name} | https://api.github.com/repos/psf/requests/issues/2398/comments | https://api.github.com/repos/psf/requests/issues/2398/events | https://github.com/psf/requests/issues/2398 | 53,357,804 | MDU6SXNzdWU1MzM1NzgwNA== | 2,398 | Clarify InsecureRequestWarning and verify=True in docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/109467?v=4",
"events_url": "https://api.github.com/users/rsyring/events{/privacy}",
"followers_url": "https://api.github.com/users/rsyring/followers",
"following_url": "https://api.github.com/users/rsyring/following{/other_user}",
"gists_url": "https://api.github.com/users/rsyring/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rsyring",
"id": 109467,
"login": "rsyring",
"node_id": "MDQ6VXNlcjEwOTQ2Nw==",
"organizations_url": "https://api.github.com/users/rsyring/orgs",
"received_events_url": "https://api.github.com/users/rsyring/received_events",
"repos_url": "https://api.github.com/users/rsyring/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rsyring/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rsyring/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rsyring",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-01-05T02:05:53Z | 2021-09-08T23:06:14Z | 2015-01-05T02:36:36Z | NONE | resolved | The docs:
http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification
say:
> By default, verify is set to True. Option verify only applies to host certs.
If my HTTPS connection is being verified by default, why am I also seeing a InsecureRequestWarning? Clarifying this situation and updating the docs with more info would be helpful IMO.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/109467?v=4",
"events_url": "https://api.github.com/users/rsyring/events{/privacy}",
"followers_url": "https://api.github.com/users/rsyring/followers",
"following_url": "https://api.github.com/users/rsyring/following{/other_user}",
"gists_url": "https://api.github.com/users/rsyring/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rsyring",
"id": 109467,
"login": "rsyring",
"node_id": "MDQ6VXNlcjEwOTQ2Nw==",
"organizations_url": "https://api.github.com/users/rsyring/orgs",
"received_events_url": "https://api.github.com/users/rsyring/received_events",
"repos_url": "https://api.github.com/users/rsyring/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rsyring/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rsyring/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rsyring",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2398/reactions"
} | https://api.github.com/repos/psf/requests/issues/2398/timeline | null | completed | null | null | false | [
"> If my HTTPS connection is being verified by default, why am I also seeing a InsecureRequestWarning? Clarifying this situation and updating the docs with more info would be helpful IMO.\n\nI don't know why. Can you give us any details to help you?\n",
"> I don't know why. Can you give us any details to help you... |
https://api.github.com/repos/psf/requests/issues/2397 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2397/labels{/name} | https://api.github.com/repos/psf/requests/issues/2397/comments | https://api.github.com/repos/psf/requests/issues/2397/events | https://github.com/psf/requests/issues/2397 | 53,324,502 | MDU6SXNzdWU1MzMyNDUwMg== | 2,397 | how can I get the "exception code" | {
"avatar_url": "https://avatars.githubusercontent.com/u/9110611?v=4",
"events_url": "https://api.github.com/users/tdyhacker/events{/privacy}",
"followers_url": "https://api.github.com/users/tdyhacker/followers",
"following_url": "https://api.github.com/users/tdyhacker/following{/other_user}",
"gists_url": "https://api.github.com/users/tdyhacker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tdyhacker",
"id": 9110611,
"login": "tdyhacker",
"node_id": "MDQ6VXNlcjkxMTA2MTE=",
"organizations_url": "https://api.github.com/users/tdyhacker/orgs",
"received_events_url": "https://api.github.com/users/tdyhacker/received_events",
"repos_url": "https://api.github.com/users/tdyhacker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tdyhacker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tdyhacker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tdyhacker",
"user_view_type": "public"
} | [
{
"color": "777777",
"default": false,
"description": null,
"id": 162780722,
"name": "Question/Not a bug",
"node_id": "MDU6TGFiZWwxNjI3ODA3MjI=",
"url": "https://api.github.com/repos/psf/requests/labels/Question/Not%20a%20bug"
}
] | closed | true | null | [] | null | 1 | 2015-01-04T04:06:28Z | 2021-09-08T23:06:47Z | 2015-01-04T04:10:22Z | NONE | resolved | I am using "requests (2.5.1)" .now I want to catch the exception and return an dict with some exception message,the dict I will return is as following:
```
{
"status_code": 61, # exception code,
"msg": "error msg",
}
```
but now I can't get the error status_code and error message,I try to use
```
except requests.exceptions.ConnectionError as e:
response={
u'status_code':4040,
u'errno': e.errno,
u'message': (e.message.reason),
u'strerror': e.strerror,
u'response':e.response,
}
```
but it's too redundancy,how can I get the error message simplicity?anyone can give some idea?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2397/reactions"
} | https://api.github.com/repos/psf/requests/issues/2397/timeline | null | completed | null | null | false | [
"Questions belong on [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests).\n"
] |
https://api.github.com/repos/psf/requests/issues/2396 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2396/labels{/name} | https://api.github.com/repos/psf/requests/issues/2396/comments | https://api.github.com/repos/psf/requests/issues/2396/events | https://github.com/psf/requests/pull/2396 | 53,232,433 | MDExOlB1bGxSZXF1ZXN0MjY3NDc4NDU= | 2,396 | Improving format (whitespace related PEP8). | {
"avatar_url": "https://avatars.githubusercontent.com/u/3359485?v=4",
"events_url": "https://api.github.com/users/rtzll/events{/privacy}",
"followers_url": "https://api.github.com/users/rtzll/followers",
"following_url": "https://api.github.com/users/rtzll/following{/other_user}",
"gists_url": "https://api.github.com/users/rtzll/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rtzll",
"id": 3359485,
"login": "rtzll",
"node_id": "MDQ6VXNlcjMzNTk0ODU=",
"organizations_url": "https://api.github.com/users/rtzll/orgs",
"received_events_url": "https://api.github.com/users/rtzll/received_events",
"repos_url": "https://api.github.com/users/rtzll/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rtzll/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rtzll/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rtzll",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-01-02T00:11:24Z | 2021-09-08T09:01:02Z | 2015-01-02T00:31:02Z | NONE | resolved | A few instances of to much or to few whitespace.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2396/reactions"
} | https://api.github.com/repos/psf/requests/issues/2396/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2396.diff",
"html_url": "https://github.com/psf/requests/pull/2396",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2396.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2396"
} | true | [
"requests does not follow PEP8. Kenneth disagrees with many of the suggestions. You can read more on #1543, #1964, and #2298 \n"
] |
https://api.github.com/repos/psf/requests/issues/2395 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2395/labels{/name} | https://api.github.com/repos/psf/requests/issues/2395/comments | https://api.github.com/repos/psf/requests/issues/2395/events | https://github.com/psf/requests/pull/2395 | 53,212,239 | MDExOlB1bGxSZXF1ZXN0MjY3NDAzMzI= | 2,395 | Changing year in all copyright information | {
"avatar_url": "https://avatars.githubusercontent.com/u/240368?v=4",
"events_url": "https://api.github.com/users/shrayasr/events{/privacy}",
"followers_url": "https://api.github.com/users/shrayasr/followers",
"following_url": "https://api.github.com/users/shrayasr/following{/other_user}",
"gists_url": "https://api.github.com/users/shrayasr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shrayasr",
"id": 240368,
"login": "shrayasr",
"node_id": "MDQ6VXNlcjI0MDM2OA==",
"organizations_url": "https://api.github.com/users/shrayasr/orgs",
"received_events_url": "https://api.github.com/users/shrayasr/received_events",
"repos_url": "https://api.github.com/users/shrayasr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shrayasr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shrayasr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shrayasr",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-01-01T03:36:18Z | 2021-09-08T09:01:03Z | 2015-01-01T08:28:11Z | CONTRIBUTOR | resolved | :tada: :tada:
Happy new year! Thanks for this awesome library :)
:tada: :tada:
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2395/reactions"
} | https://api.github.com/repos/psf/requests/issues/2395/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2395.diff",
"html_url": "https://github.com/psf/requests/pull/2395",
"merged_at": "2015-01-01T08:28:11Z",
"patch_url": "https://github.com/psf/requests/pull/2395.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2395"
} | true | [
":tada: :balloon: :cake:\n\nThanks so much!\n",
":) Hope you had a good one!\n"
] |
https://api.github.com/repos/psf/requests/issues/2394 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2394/labels{/name} | https://api.github.com/repos/psf/requests/issues/2394/comments | https://api.github.com/repos/psf/requests/issues/2394/events | https://github.com/psf/requests/issues/2394 | 53,193,747 | MDU6SXNzdWU1MzE5Mzc0Nw== | 2,394 | verify is sticky in Session | {
"avatar_url": "https://avatars.githubusercontent.com/u/4239113?v=4",
"events_url": "https://api.github.com/users/slowaak/events{/privacy}",
"followers_url": "https://api.github.com/users/slowaak/followers",
"following_url": "https://api.github.com/users/slowaak/following{/other_user}",
"gists_url": "https://api.github.com/users/slowaak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/slowaak",
"id": 4239113,
"login": "slowaak",
"node_id": "MDQ6VXNlcjQyMzkxMTM=",
"organizations_url": "https://api.github.com/users/slowaak/orgs",
"received_events_url": "https://api.github.com/users/slowaak/received_events",
"repos_url": "https://api.github.com/users/slowaak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/slowaak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/slowaak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/slowaak",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-31T17:23:52Z | 2021-09-08T23:06:48Z | 2014-12-31T17:25:40Z | NONE | resolved | I'm using Session.request to do GET from a HTTPS URL where the the server side certificate may be invalid. For testing purposes, if the certificate is invalid, I want to retry the GET with 'verify=False'. I'm reusing the Session for the retry, but the second request also fails even though I specify 'verify=False' in the request. It seems that the verify state is persisted in the Session somewhere and not updated from the request parameters if already set in a previous request. Is this the expected behavior? It seems unusual to me. If I create a new Session for the second request the certificate doesn't get checked in this request.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2394/reactions"
} | https://api.github.com/repos/psf/requests/issues/2394/timeline | null | completed | null | null | false | [
"This is a duplicate of #2255.\n"
] |
https://api.github.com/repos/psf/requests/issues/2393 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2393/labels{/name} | https://api.github.com/repos/psf/requests/issues/2393/comments | https://api.github.com/repos/psf/requests/issues/2393/events | https://github.com/psf/requests/pull/2393 | 52,945,755 | MDExOlB1bGxSZXF1ZXN0MjY2MTAxMjk= | 2,393 | Attempt to quote anyway if unquoting fails | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "009800",
"default": false,
"description": null,
"id": 44501218,
"name": "Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTIxOA==",
"url": "https://api.github.com/repos/psf/requests/labels/Ready%20To%20Merge"
},
{
"color": "207de5",
"default": false,
"description... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | {
"closed_at": "2015-04-06T01:57:33Z",
"closed_issues": 4,
"created_at": "2015-01-18T20:07:00Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/23",
"id": 940764,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/23/labels",
"node_id": "MDk6TWlsZXN0b25lOTQwNzY0",
"number": 23,
"open_issues": 0,
"state": "closed",
"title": "2.6.0",
"updated_at": "2015-04-06T01:57:33Z",
"url": "https://api.github.com/repos/psf/requests/milestones/23"
} | 9 | 2014-12-27T02:06:03Z | 2021-09-08T09:00:59Z | 2015-01-27T18:24:34Z | CONTRIBUTOR | resolved | Fixes #2356
TODO
- [x] Add test
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2393/reactions"
} | https://api.github.com/repos/psf/requests/issues/2393/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2393.diff",
"html_url": "https://github.com/psf/requests/pull/2393",
"merged_at": "2015-01-27T18:24:34Z",
"patch_url": "https://github.com/psf/requests/pull/2393.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2393"
} | true | [
"Looks fine, modulo a test. =)\n",
"where does the list of safe characters come from? maybe this could be pulled into a named var for clarity?\n",
"## It comes from the RFCs\n\nSent from my Android device with K-9 Mail. Please excuse my brevity.\n",
"Update?\n",
"Update: forgotten. I've been really busy lat... |
https://api.github.com/repos/psf/requests/issues/2392 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2392/labels{/name} | https://api.github.com/repos/psf/requests/issues/2392/comments | https://api.github.com/repos/psf/requests/issues/2392/events | https://github.com/psf/requests/issues/2392 | 52,934,168 | MDU6SXNzdWU1MjkzNDE2OA== | 2,392 | requests.exceptions.ReadTimeout is not raised when response is chunked | {
"avatar_url": "https://avatars.githubusercontent.com/u/1444666?v=4",
"events_url": "https://api.github.com/users/nickjoyce-wf/events{/privacy}",
"followers_url": "https://api.github.com/users/nickjoyce-wf/followers",
"following_url": "https://api.github.com/users/nickjoyce-wf/following{/other_user}",
"gists_url": "https://api.github.com/users/nickjoyce-wf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nickjoyce-wf",
"id": 1444666,
"login": "nickjoyce-wf",
"node_id": "MDQ6VXNlcjE0NDQ2NjY=",
"organizations_url": "https://api.github.com/users/nickjoyce-wf/orgs",
"received_events_url": "https://api.github.com/users/nickjoyce-wf/received_events",
"repos_url": "https://api.github.com/users/nickjoyce-wf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nickjoyce-wf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickjoyce-wf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nickjoyce-wf",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"... | open | false | null | [] | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2013-11-17T11:29:34Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
},
"description": null,
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/20",
"id": 487518,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/20/labels",
"node_id": "MDk6TWlsZXN0b25lNDg3NTE4",
"number": 20,
"open_issues": 12,
"state": "open",
"title": "3.0.0",
"updated_at": "2024-05-19T18:43:00Z",
"url": "https://api.github.com/repos/psf/requests/milestones/20"
} | 5 | 2014-12-26T18:19:10Z | 2018-01-12T23:43:42Z | null | NONE | null | https://gist.github.com/nickjoyce-wf/c536f2573ef124115f86
When a request has a timeout param supplied and the response is chunked but does not return enough data in time, `requests.exceptions.ReadTimeout` should be raised.
``` shell
$ mkvirtualenv test
(test)$ pip install requests werkzeug
(test)$ python server.py
```
In another terminal:
``` shell
$ workon test
(test)$ python client.py
```
Expected results:
`requests.exceptions.ReadTimeout` is raised due to response not being sent within the timeout specified by `requests.get`.
Actual results:
```
Traceback (most recent call last):
File "client.py", line 3, in <module>
requests.get('http://127.0.0.1:8000/', timeout=0.5)
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/sessions.py", line 610, in send
r.content
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/models.py", line 730, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/Users/nick/.virtualenvs/test/lib/python2.7/site-packages/requests/models.py", line 662, in generate
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Read timed out.
```
Recorded http request/response via Wireshark:
```
GET / HTTP/1.1
Host: 127.0.0.1:8000
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.5.1 CPython/2.7.9 Darwin/13.4.0
HTTP/1.0 200 OK
Content-type: text/plain
Transfer-Encoding: chunked
Connection: close
Server: Werkzeug/0.9.6 Python/2.7.9
Date: Fri, 26 Dec 2014 17:51:21 GMT
```
Tested with requests==2.5.1
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2392/reactions"
} | https://api.github.com/repos/psf/requests/issues/2392/timeline | null | null | null | null | false | [
"Just to be really clear, the bug here is that exception we're raising is wrong. We're raising a `ConnectionError`, not a `ReadTimeoutError`.\n",
"At this point though, people are almost certainly wrapping their code in except blocks for `ConnectionError` but most likely not in [`ReadTimeout`](https://github.com/... |
https://api.github.com/repos/psf/requests/issues/2391 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2391/labels{/name} | https://api.github.com/repos/psf/requests/issues/2391/comments | https://api.github.com/repos/psf/requests/issues/2391/events | https://github.com/psf/requests/issues/2391 | 52,846,724 | MDU6SXNzdWU1Mjg0NjcyNA== | 2,391 | Using python-nss for SSL | {
"avatar_url": "https://avatars.githubusercontent.com/u/1172008?v=4",
"events_url": "https://api.github.com/users/mrniranjan/events{/privacy}",
"followers_url": "https://api.github.com/users/mrniranjan/followers",
"following_url": "https://api.github.com/users/mrniranjan/following{/other_user}",
"gists_url": "https://api.github.com/users/mrniranjan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mrniranjan",
"id": 1172008,
"login": "mrniranjan",
"node_id": "MDQ6VXNlcjExNzIwMDg=",
"organizations_url": "https://api.github.com/users/mrniranjan/orgs",
"received_events_url": "https://api.github.com/users/mrniranjan/received_events",
"repos_url": "https://api.github.com/users/mrniranjan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mrniranjan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mrniranjan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mrniranjan",
"user_view_type": "public"
} | [
{
"color": "777777",
"default": false,
"description": null,
"id": 162780722,
"name": "Question/Not a bug",
"node_id": "MDU6TGFiZWwxNjI3ODA3MjI=",
"url": "https://api.github.com/repos/psf/requests/labels/Question/Not%20a%20bug"
}
] | closed | true | null | [] | null | 1 | 2014-12-25T04:13:48Z | 2021-09-08T23:06:14Z | 2014-12-25T09:12:44Z | NONE | resolved | For HTTPS urls where Ceritifcate verification is required, I would like to use certificates/keys stored in NSS database(Mozilla NSS), There is python-nss module which provides the interface to access the NSS Database.
Is there a way i can use requests module to use python-nss. Any hints on how to achieve this would be helpful.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2391/reactions"
} | https://api.github.com/repos/psf/requests/issues/2391/timeline | null | completed | null | null | false | [
"Currently, requests cannot use python-nss directly. Assuming all you want to do is use the certificates and keys, you'll need to transform them into a `.pem` file that OpenSSL can read. That's extremely painful, I'm afraid, as OpenSSL does not let you pass it `.pem` files in memory.\n\nUnfortunately, enhancing req... |
https://api.github.com/repos/psf/requests/issues/2390 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2390/labels{/name} | https://api.github.com/repos/psf/requests/issues/2390/comments | https://api.github.com/repos/psf/requests/issues/2390/events | https://github.com/psf/requests/pull/2390 | 52,821,935 | MDExOlB1bGxSZXF1ZXN0MjY1NjA1OTQ= | 2,390 | Clean up cookie docstrings, document cookie jar. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-12-24T14:35:19Z | 2021-09-08T09:01:03Z | 2014-12-24T15:15:37Z | MEMBER | resolved | Following on from [a Stack Overflow question](https://stackoverflow.com/questions/27586779/requests-inability-to-handle-two-cookies-with-same-name-different-domain), this PR extends our cookie documentation [here](http://docs.python-requests.org/en/latest/api/#cookies) to document the cookie jar itself. This should make it more likely that users are able to discover how to make more subtle queries about cookies.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2390/reactions"
} | https://api.github.com/repos/psf/requests/issues/2390/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2390.diff",
"html_url": "https://github.com/psf/requests/pull/2390",
"merged_at": "2014-12-24T15:15:37Z",
"patch_url": "https://github.com/psf/requests/pull/2390.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2390"
} | true | [
"A couple comments. I'm also wondering if there would be use in the toolbelt for a class that extends this so that you can do \n\n```\ns.cookies['cookie-name', 'domain', 'path']\n```\n\nIf you use the custom cookie-jar. I do and don't like it. Alternatively, we could just include the recipe for the user in the docu... |
https://api.github.com/repos/psf/requests/issues/2389 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2389/labels{/name} | https://api.github.com/repos/psf/requests/issues/2389/comments | https://api.github.com/repos/psf/requests/issues/2389/events | https://github.com/psf/requests/pull/2389 | 52,755,390 | MDExOlB1bGxSZXF1ZXN0MjY1MTk3OTU= | 2,389 | Fix bug in renegotiating a nonce with the server | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2014-12-23T16:43:36Z | 2021-09-08T09:01:06Z | 2014-12-23T17:40:35Z | CONTRIBUTOR | resolved | If a session runs long enough (without constant activity) then the server can
expire the nonce the session has negotiated. If that happens the session will
get a new 401 response which we were immediately returning to the user. A user
would then have to essentially reinitialize session.auth each time they get an
unexpected 401.
Also, there's no need for setattr calls when we can simply assign the
attribute on the instance.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2389/reactions"
} | https://api.github.com/repos/psf/requests/issues/2389/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2389.diff",
"html_url": "https://github.com/psf/requests/pull/2389",
"merged_at": "2014-12-23T17:40:35Z",
"patch_url": "https://github.com/psf/requests/pull/2389.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2389"
} | true | [
"LGTM. :cake:\n",
"@Lukasa I'm just waiting for @Jaypipes to verify this fixes their issues.\n",
"@sigmavirus24 I have now verified that this fixes the issue I was seeing. Thanks very much! :)\n",
"Cool. @Lukasa I'm going to cut 2.5.1 with this because it's a rather serious bug. (I have to wonder if it could ... |
https://api.github.com/repos/psf/requests/issues/2388 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2388/labels{/name} | https://api.github.com/repos/psf/requests/issues/2388/comments | https://api.github.com/repos/psf/requests/issues/2388/events | https://github.com/psf/requests/pull/2388 | 52,699,213 | MDExOlB1bGxSZXF1ZXN0MjY0ODc0MTc= | 2,388 | Handle empty chunks | {
"avatar_url": "https://avatars.githubusercontent.com/u/1743810?v=4",
"events_url": "https://api.github.com/users/neosab/events{/privacy}",
"followers_url": "https://api.github.com/users/neosab/followers",
"following_url": "https://api.github.com/users/neosab/following{/other_user}",
"gists_url": "https://api.github.com/users/neosab/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neosab",
"id": 1743810,
"login": "neosab",
"node_id": "MDQ6VXNlcjE3NDM4MTA=",
"organizations_url": "https://api.github.com/users/neosab/orgs",
"received_events_url": "https://api.github.com/users/neosab/received_events",
"repos_url": "https://api.github.com/users/neosab/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neosab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neosab/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neosab",
"user_view_type": "public"
} | [
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
},
{
"color": "eb6420",
"default": false,
"description": null,
"id": 44501... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}... | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2013-11-17T11:29:34Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
},
"description": null,
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/20",
"id": 487518,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/20/labels",
"node_id": "MDk6TWlsZXN0b25lNDg3NTE4",
"number": 20,
"open_issues": 12,
"state": "open",
"title": "3.0.0",
"updated_at": "2024-05-19T18:43:00Z",
"url": "https://api.github.com/repos/psf/requests/milestones/20"
} | 9 | 2014-12-22T23:19:34Z | 2021-09-08T07:00:55Z | 2015-06-05T12:33:56Z | NONE | resolved | Empty chunk in request body could prematurely signal end of chunked
transmission. As a result, the terminating zero-size chunk sent by
'requests' can be interpretted as bad request by the recepient. I
have used the same logic used by httplib to handle such cases.
Please review this and comment.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2388/reactions"
} | https://api.github.com/repos/psf/requests/issues/2388/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2388.diff",
"html_url": "https://github.com/psf/requests/pull/2388",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2388.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2388"
} | true | [
"Thanks for this!\n\nThe logic doesn't look quite right. Here, if we get an empty section from a generator, we stop sending the chunked body altogether. That doesn't seem like the correct logic to me. We should really do one of two things:\n1. Throw an exception. This means that users need to not send us empty chun... |
https://api.github.com/repos/psf/requests/issues/2387 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2387/labels{/name} | https://api.github.com/repos/psf/requests/issues/2387/comments | https://api.github.com/repos/psf/requests/issues/2387/events | https://github.com/psf/requests/issues/2387 | 52,582,146 | MDU6SXNzdWU1MjU4MjE0Ng== | 2,387 | Request https url via http proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/3884436?v=4",
"events_url": "https://api.github.com/users/RafTim/events{/privacy}",
"followers_url": "https://api.github.com/users/RafTim/followers",
"following_url": "https://api.github.com/users/RafTim/following{/other_user}",
"gists_url": "https://api.github.com/users/RafTim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RafTim",
"id": 3884436,
"login": "RafTim",
"node_id": "MDQ6VXNlcjM4ODQ0MzY=",
"organizations_url": "https://api.github.com/users/RafTim/orgs",
"received_events_url": "https://api.github.com/users/RafTim/received_events",
"repos_url": "https://api.github.com/users/RafTim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RafTim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RafTim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RafTim",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-12-21T01:06:24Z | 2021-09-08T23:06:48Z | 2014-12-21T20:30:50Z | NONE | resolved | I recently tried to make a connection to a https url via a http proxy which doesn't support the 'connect' method (Crawlera http://scrapinghub.com/faq#https).
I'm using the following code:
import requests
proxies = {"http": "http://USER:PASS@paygo.crawlera.com:8010/",
{"https:": "http://USER:PASS@paygo.crawlera.com:8010/"}
requests.get("https://wikipedia.org", proxies=proxies)
will result in
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/site-packages/requests/api.py", line 55, in get
> return request('get', url, *_kwargs)
> File "/usr/lib/python2.7/site-packages/requests/api.py", line 44, in request
> return session.request(method=method, url=url, *_kwargs)
> File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
> resp = self.send(prep, *_send_kwargs)
> File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
> r = adapter.send(request, *_kwargs)
> File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 378, in send
> raise ProxyError(e)
Is there anything to do about that?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2387/reactions"
} | https://api.github.com/repos/psf/requests/issues/2387/timeline | null | completed | null | null | false | [
"A HTTP proxy that does not support the CONNECT verb cannot transport a HTTPS request.\n",
"According to that proxy:\n\"... configure your HTTP client to use a HTTP proxy even for HTTPS URLs. However, not many clients support this for privacy reasons that don't apply to web crawling. cURL doesn't support it, but ... |
https://api.github.com/repos/psf/requests/issues/2386 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2386/labels{/name} | https://api.github.com/repos/psf/requests/issues/2386/comments | https://api.github.com/repos/psf/requests/issues/2386/events | https://github.com/psf/requests/issues/2386 | 52,570,106 | MDU6SXNzdWU1MjU3MDEwNg== | 2,386 | SSL verification fails with proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/614673?v=4",
"events_url": "https://api.github.com/users/peterjeschke/events{/privacy}",
"followers_url": "https://api.github.com/users/peterjeschke/followers",
"following_url": "https://api.github.com/users/peterjeschke/following{/other_user}",
"gists_url": "https://api.github.com/users/peterjeschke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/peterjeschke",
"id": 614673,
"login": "peterjeschke",
"node_id": "MDQ6VXNlcjYxNDY3Mw==",
"organizations_url": "https://api.github.com/users/peterjeschke/orgs",
"received_events_url": "https://api.github.com/users/peterjeschke/received_events",
"repos_url": "https://api.github.com/users/peterjeschke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/peterjeschke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/peterjeschke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/peterjeschke",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 136589914,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwxMzY1ODk5MTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20Info"
}
] | closed | true | null | [] | null | 11 | 2014-12-20T17:14:49Z | 2021-09-08T22:00:53Z | 2015-08-31T09:43:00Z | NONE | resolved | Using this code:
```
import requests
requests.get('https://github.com')
```
Throws the following exception:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 382, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: hostname '<Proxy>' doesn't match either of 'github.com', 'www.github.com'
```
where <Proxy> is the URL of the http(s)-proxy I'm using. I have set the environment-variables HTTP_PROXY and HTTPS_PROXY (lowercase, too) to that URL. Is it possible to avoid that error without appending verify=False so I don't have to mess with other projects?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2386/reactions"
} | https://api.github.com/repos/psf/requests/issues/2386/timeline | null | completed | null | null | false | [
"Does the URL to your proxy begin with `https://`? That will cause us to try a TLS handshake with that proxy, which obviously fails as that proxy isn't authoritative for that domain. If this is the case, try setting the protocol to `http://`.\n",
"It does start with https://, but setting it to http:// doesn't hel... |
https://api.github.com/repos/psf/requests/issues/2385 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2385/labels{/name} | https://api.github.com/repos/psf/requests/issues/2385/comments | https://api.github.com/repos/psf/requests/issues/2385/events | https://github.com/psf/requests/issues/2385 | 52,506,296 | MDU6SXNzdWU1MjUwNjI5Ng== | 2,385 | POST to url with unicode character | {
"avatar_url": "https://avatars.githubusercontent.com/u/1793789?v=4",
"events_url": "https://api.github.com/users/burdiyan/events{/privacy}",
"followers_url": "https://api.github.com/users/burdiyan/followers",
"following_url": "https://api.github.com/users/burdiyan/following{/other_user}",
"gists_url": "https://api.github.com/users/burdiyan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/burdiyan",
"id": 1793789,
"login": "burdiyan",
"node_id": "MDQ6VXNlcjE3OTM3ODk=",
"organizations_url": "https://api.github.com/users/burdiyan/orgs",
"received_events_url": "https://api.github.com/users/burdiyan/received_events",
"repos_url": "https://api.github.com/users/burdiyan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/burdiyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/burdiyan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/burdiyan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-12-19T17:14:07Z | 2021-09-08T23:06:49Z | 2014-12-21T15:41:52Z | NONE | resolved | Hello,
I have this code for making POST request to url with unicode character. I tried to replace `í` to `%C3%AD` but python is still telling me: `UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 1771: ordinal not in range(128)`
```
# coding=UTF-8
import requests
url = u'http://www.madridmovilidad.es/localizador-vehículo.aspx?idioma=es'
payload = {'veh_matricula': '5555HWS'}
url = url.encode('UTF-8')
r = requests.post(url, data=payload)
print(r.text)
```
I'm new to Python, but I have tried all I could find to solve python unicode "problems" but nothing helps. So maybe this is requests problem?
Can anyone help me, please?
Thank you!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1793789?v=4",
"events_url": "https://api.github.com/users/burdiyan/events{/privacy}",
"followers_url": "https://api.github.com/users/burdiyan/followers",
"following_url": "https://api.github.com/users/burdiyan/following{/other_user}",
"gists_url": "https://api.github.com/users/burdiyan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/burdiyan",
"id": 1793789,
"login": "burdiyan",
"node_id": "MDQ6VXNlcjE3OTM3ODk=",
"organizations_url": "https://api.github.com/users/burdiyan/orgs",
"received_events_url": "https://api.github.com/users/burdiyan/received_events",
"repos_url": "https://api.github.com/users/burdiyan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/burdiyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/burdiyan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/burdiyan",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2385/reactions"
} | https://api.github.com/repos/psf/requests/issues/2385/timeline | null | completed | null | null | false | [
"I did the following on python 2.7 and 3.4 and had no problems\n\n``` python\nurl = u'http://www.madridmovilidad.es/localizador-vehículo.aspx?idioma=es'\npayload = {'veh_matricula': '5555HWS'}\nrequests.get(url)\nrequests.post(url, data=payload)\n```\n\nCould you provide the entire stacktrace? I suspect this is act... |
https://api.github.com/repos/psf/requests/issues/2384 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2384/labels{/name} | https://api.github.com/repos/psf/requests/issues/2384/comments | https://api.github.com/repos/psf/requests/issues/2384/events | https://github.com/psf/requests/pull/2384 | 52,464,722 | MDExOlB1bGxSZXF1ZXN0MjYzNjA1Nzk= | 2,384 | set charset in content type if UTF-8 data was encoded | {
"avatar_url": "https://avatars.githubusercontent.com/u/3083638?v=4",
"events_url": "https://api.github.com/users/bm371613/events{/privacy}",
"followers_url": "https://api.github.com/users/bm371613/followers",
"following_url": "https://api.github.com/users/bm371613/following{/other_user}",
"gists_url": "https://api.github.com/users/bm371613/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bm371613",
"id": 3083638,
"login": "bm371613",
"node_id": "MDQ6VXNlcjMwODM2Mzg=",
"organizations_url": "https://api.github.com/users/bm371613/orgs",
"received_events_url": "https://api.github.com/users/bm371613/received_events",
"repos_url": "https://api.github.com/users/bm371613/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bm371613/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bm371613/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bm371613",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-12-19T09:47:50Z | 2021-09-08T09:01:07Z | 2014-12-19T10:26:32Z | NONE | resolved | Content type `'application/x-www-form-urlencoded'`, that is automatically provided by requests sometimes, should actually be `'application/x-www-form-urlencoded; charset=UTF-8'` if provided data is UTF-8.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2384/reactions"
} | https://api.github.com/repos/psf/requests/issues/2384/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2384.diff",
"html_url": "https://github.com/psf/requests/pull/2384",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2384.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2384"
} | true | [
"This is incorrect behaviour, I'm afraid.\n\nThe `charset` parameter is only defined for documents of type `text/*`. That does not apply to `application/x-www-form-urlencoded`. Therefore, sending `charset` would be a specification violation.\n\nOur behaviour is consistent with the W3C HTML5 specification, which say... |
https://api.github.com/repos/psf/requests/issues/2383 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2383/labels{/name} | https://api.github.com/repos/psf/requests/issues/2383/comments | https://api.github.com/repos/psf/requests/issues/2383/events | https://github.com/psf/requests/issues/2383 | 52,218,518 | MDU6SXNzdWU1MjIxODUxOA== | 2,383 | Force use of tls with requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/10159045?v=4",
"events_url": "https://api.github.com/users/tesande/events{/privacy}",
"followers_url": "https://api.github.com/users/tesande/followers",
"following_url": "https://api.github.com/users/tesande/following{/other_user}",
"gists_url": "https://api.github.com/users/tesande/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tesande",
"id": 10159045,
"login": "tesande",
"node_id": "MDQ6VXNlcjEwMTU5MDQ1",
"organizations_url": "https://api.github.com/users/tesande/orgs",
"received_events_url": "https://api.github.com/users/tesande/received_events",
"repos_url": "https://api.github.com/users/tesande/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tesande/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tesande/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tesande",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2014-12-17T09:34:16Z | 2021-09-08T23:06:49Z | 2014-12-18T23:19:41Z | NONE | resolved | Hi !
I have used requests successfully for calling some rest resources.
I have called these resources in our staging environment, and things has worked well.
Now I've tried to call the resources in our test environment, but receives the error SSL3_GET_RECORD:decryption failed or bad record mac.
I recon there is a problem with the ssl connection, and want to try forcing requests to use TLS v1. How can I achieve this? I have tried creating the class ForceTLSV1Adapter which is described here http://stackoverflow.com/questions/26733462/ssl-and-tls-in-python-requests, but I don't know how to tell requests to use this class. Could you please give me a hint?
Thanks in advance
Tor Erik
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2383/reactions"
} | https://api.github.com/repos/psf/requests/issues/2383/timeline | null | completed | null | null | false | [
"By the way, I've seen the advanced usage documentation (http://docs.python-requests.org/en/latest/user/advanced/), and tried to modify the Ssl3HttpAdapter to be a TLS Adapter. \nI use s = requests.Session() s.mount to mount the adapter. In the mount command, I have both tried the rest resource url and the root url... |
https://api.github.com/repos/psf/requests/issues/2382 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2382/labels{/name} | https://api.github.com/repos/psf/requests/issues/2382/comments | https://api.github.com/repos/psf/requests/issues/2382/events | https://github.com/psf/requests/pull/2382 | 52,083,753 | MDExOlB1bGxSZXF1ZXN0MjYxMjg3MzQ= | 2,382 | catch exception more specifically | {
"avatar_url": "https://avatars.githubusercontent.com/u/3482660?v=4",
"events_url": "https://api.github.com/users/daftshady/events{/privacy}",
"followers_url": "https://api.github.com/users/daftshady/followers",
"following_url": "https://api.github.com/users/daftshady/following{/other_user}",
"gists_url": "https://api.github.com/users/daftshady/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daftshady",
"id": 3482660,
"login": "daftshady",
"node_id": "MDQ6VXNlcjM0ODI2NjA=",
"organizations_url": "https://api.github.com/users/daftshady/orgs",
"received_events_url": "https://api.github.com/users/daftshady/received_events",
"repos_url": "https://api.github.com/users/daftshady/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daftshady/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daftshady/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daftshady",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-16T08:04:53Z | 2021-09-08T09:01:08Z | 2014-12-16T09:19:50Z | CONTRIBUTOR | resolved | Because `raise_for_status` only raises `HTTPError`, I think it's better to catch `HTTPError` which is a subclass of `RequestException`. Please review this.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2382/reactions"
} | https://api.github.com/repos/psf/requests/issues/2382/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2382.diff",
"html_url": "https://github.com/psf/requests/pull/2382",
"merged_at": "2014-12-16T09:19:50Z",
"patch_url": "https://github.com/psf/requests/pull/2382.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2382"
} | true | [
"Agreed! Thanks for this! :cake:\n"
] |
https://api.github.com/repos/psf/requests/issues/2381 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2381/labels{/name} | https://api.github.com/repos/psf/requests/issues/2381/comments | https://api.github.com/repos/psf/requests/issues/2381/events | https://github.com/psf/requests/pull/2381 | 51,953,876 | MDExOlB1bGxSZXF1ZXN0MjYwNDk4MzI= | 2,381 | Fix a typo in a comment | {
"avatar_url": "https://avatars.githubusercontent.com/u/5542943?v=4",
"events_url": "https://api.github.com/users/namlede/events{/privacy}",
"followers_url": "https://api.github.com/users/namlede/followers",
"following_url": "https://api.github.com/users/namlede/following{/other_user}",
"gists_url": "https://api.github.com/users/namlede/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/namlede",
"id": 5542943,
"login": "namlede",
"node_id": "MDQ6VXNlcjU1NDI5NDM=",
"organizations_url": "https://api.github.com/users/namlede/orgs",
"received_events_url": "https://api.github.com/users/namlede/received_events",
"repos_url": "https://api.github.com/users/namlede/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/namlede/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/namlede/subscriptions",
"type": "User",
"url": "https://api.github.com/users/namlede",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-12-15T06:37:31Z | 2021-09-08T09:01:08Z | 2014-12-15T07:59:47Z | CONTRIBUTOR | resolved | I just fixed a minor typo: "throws" is misspelled as "thows".
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2381/reactions"
} | https://api.github.com/repos/psf/requests/issues/2381/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2381.diff",
"html_url": "https://github.com/psf/requests/pull/2381",
"merged_at": "2014-12-15T07:59:47Z",
"patch_url": "https://github.com/psf/requests/pull/2381.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2381"
} | true | [
"Thanks for this! :cake:\n",
"I would make a joke about how omitting random letters is cool, but it wouldn't be funy. \n\nThanks @namlede \n",
"Your wecome.\n",
":+1: \n"
] |
https://api.github.com/repos/psf/requests/issues/2380 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2380/labels{/name} | https://api.github.com/repos/psf/requests/issues/2380/comments | https://api.github.com/repos/psf/requests/issues/2380/events | https://github.com/psf/requests/pull/2380 | 51,925,675 | MDExOlB1bGxSZXF1ZXN0MjYwMzY3Nzk= | 2,380 | Added a save method to Response objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/6031925?v=4",
"events_url": "https://api.github.com/users/syndbg/events{/privacy}",
"followers_url": "https://api.github.com/users/syndbg/followers",
"following_url": "https://api.github.com/users/syndbg/following{/other_user}",
"gists_url": "https://api.github.com/users/syndbg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/syndbg",
"id": 6031925,
"login": "syndbg",
"node_id": "MDQ6VXNlcjYwMzE5MjU=",
"organizations_url": "https://api.github.com/users/syndbg/orgs",
"received_events_url": "https://api.github.com/users/syndbg/received_events",
"repos_url": "https://api.github.com/users/syndbg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/syndbg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/syndbg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/syndbg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-12-14T17:46:51Z | 2021-09-08T09:01:09Z | 2014-12-14T17:55:50Z | NONE | resolved | Added an easy way to save content on the File System.
Should I write a test for this? I didn't find a test for `iter_content` so that's why I skipped testing `save`.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2380/reactions"
} | https://api.github.com/repos/psf/requests/issues/2380/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2380.diff",
"html_url": "https://github.com/psf/requests/pull/2380",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2380.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2380"
} | true | [
"Thanks for this @syndbg! Unfortunately, we're in feature freeze, so we won't be accepting this patch. Sorry, and thanks for the work!\n",
"No problems, @Lukasa !\n\nCan I help you somehow? I'm assuming a feature freeze is applied to fix bugs. \n",
"If you see any open bugs you'd like to work on, feel free, we ... |
https://api.github.com/repos/psf/requests/issues/2379 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2379/labels{/name} | https://api.github.com/repos/psf/requests/issues/2379/comments | https://api.github.com/repos/psf/requests/issues/2379/events | https://github.com/psf/requests/pull/2379 | 51,816,271 | MDExOlB1bGxSZXF1ZXN0MjU5Nzk3NzQ= | 2,379 | utils.guess_filename fails if the given parameter looks like a file object but has a non-string name attribute | {
"avatar_url": "https://avatars.githubusercontent.com/u/973454?v=4",
"events_url": "https://api.github.com/users/arthurdarcet/events{/privacy}",
"followers_url": "https://api.github.com/users/arthurdarcet/followers",
"following_url": "https://api.github.com/users/arthurdarcet/following{/other_user}",
"gists_url": "https://api.github.com/users/arthurdarcet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arthurdarcet",
"id": 973454,
"login": "arthurdarcet",
"node_id": "MDQ6VXNlcjk3MzQ1NA==",
"organizations_url": "https://api.github.com/users/arthurdarcet/orgs",
"received_events_url": "https://api.github.com/users/arthurdarcet/received_events",
"repos_url": "https://api.github.com/users/arthurdarcet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arthurdarcet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arthurdarcet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arthurdarcet",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2014-12-12T15:16:43Z | 2021-09-08T09:01:02Z | 2014-12-13T19:49:04Z | CONTRIBUTOR | resolved | A cherrypy uploaded file behave like a regular file, except that its name attribute is an int and passing it directly to requests fails because of that
(not sure if i should add myself to AUTHORS for this?)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2379/reactions"
} | https://api.github.com/repos/psf/requests/issues/2379/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2379.diff",
"html_url": "https://github.com/psf/requests/pull/2379",
"merged_at": "2014-12-13T19:49:04Z",
"patch_url": "https://github.com/psf/requests/pull/2379.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2379"
} | true | [
"I'm +0 on this if only because no one else has found this before and it would seem to be a bigger problem otherwise. It seems entirely harmless, but CherryPy seems to be an outlier in how it behaves here. Perhaps this is more appropriately a bug in CherryPy\n",
"Yeah, that's weird. Why would its name attribute b... |
https://api.github.com/repos/psf/requests/issues/2378 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2378/labels{/name} | https://api.github.com/repos/psf/requests/issues/2378/comments | https://api.github.com/repos/psf/requests/issues/2378/events | https://github.com/psf/requests/issues/2378 | 51,786,762 | MDU6SXNzdWU1MTc4Njc2Mg== | 2,378 | readlines (without generators) | {
"avatar_url": "https://avatars.githubusercontent.com/u/5049737?v=4",
"events_url": "https://api.github.com/users/femtotrader/events{/privacy}",
"followers_url": "https://api.github.com/users/femtotrader/followers",
"following_url": "https://api.github.com/users/femtotrader/following{/other_user}",
"gists_url": "https://api.github.com/users/femtotrader/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/femtotrader",
"id": 5049737,
"login": "femtotrader",
"node_id": "MDQ6VXNlcjUwNDk3Mzc=",
"organizations_url": "https://api.github.com/users/femtotrader/orgs",
"received_events_url": "https://api.github.com/users/femtotrader/received_events",
"repos_url": "https://api.github.com/users/femtotrader/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/femtotrader/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/femtotrader/subscriptions",
"type": "User",
"url": "https://api.github.com/users/femtotrader",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-12T09:40:28Z | 2021-09-08T23:06:50Z | 2014-12-12T16:21:22Z | NONE | resolved | Hello,
I'm moving some Python code from `urlopen` to `requests` (because it will be easier for me to add a db cache (SQLite) mechanism using requests-cache)
The code I want to modify looks like
```
with urlopen(url) as resp:
lines = resp.readlines()
```
I don't find any equivalent to `readlines()`
Any idea ?
I have found a generator solution like
```
import requests
import requests_cache
requests_cache.install_cache('cache', backend='sqlite', expire_after=60*5)
response = requests.get('http://finance.yahoo.com/d/quotes.csv?s=AAPL+F&f=l1srs7t1p2', stream=True)
for line in response.iter_lines():
print(line)
```
but requests_cache doesn't seems to like this stream parameter
see https://github.com/reclosedev/requests-cache/issues/33
So there is 2 solutions (and both can be valuable).
1. fix requests-cache : that's what I'm asking to @reclosedev
2. provide a request readlines() method (or give a tip to have something like that which will return a list and not a generator)
That will be very nice.
Thanks for requests... that's a great lib for humans
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2378/reactions"
} | https://api.github.com/repos/psf/requests/issues/2378/timeline | null | completed | null | null | false | [
"We will not be providing a `readlines` method. This is most certainly a bug in requests-cache and one I haven't seen or heard of in [CacheControl](https://github.com/ionrock/cachecontrol) which is our recommended caching library.\n\nFor what it's worth you can do:\n\n``` python\nimport requests\n\nwith requests.ge... |
https://api.github.com/repos/psf/requests/issues/2377 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2377/labels{/name} | https://api.github.com/repos/psf/requests/issues/2377/comments | https://api.github.com/repos/psf/requests/issues/2377/events | https://github.com/psf/requests/issues/2377 | 51,670,274 | MDU6SXNzdWU1MTY3MDI3NA== | 2,377 | Set Cookie does not work properly with HTTP 302 | {
"avatar_url": "https://avatars.githubusercontent.com/u/10153173?v=4",
"events_url": "https://api.github.com/users/antoniofelleca/events{/privacy}",
"followers_url": "https://api.github.com/users/antoniofelleca/followers",
"following_url": "https://api.github.com/users/antoniofelleca/following{/other_user}",
"gists_url": "https://api.github.com/users/antoniofelleca/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/antoniofelleca",
"id": 10153173,
"login": "antoniofelleca",
"node_id": "MDQ6VXNlcjEwMTUzMTcz",
"organizations_url": "https://api.github.com/users/antoniofelleca/orgs",
"received_events_url": "https://api.github.com/users/antoniofelleca/received_events",
"repos_url": "https://api.github.com/users/antoniofelleca/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/antoniofelleca/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/antoniofelleca/subscriptions",
"type": "User",
"url": "https://api.github.com/users/antoniofelleca",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2014-12-11T10:31:05Z | 2021-09-08T23:06:49Z | 2014-12-18T23:22:51Z | NONE | resolved | Python Requests 2.4.3
Python 3.4 - windows 7 (64 bit)
Scenario:
Performing this request:
GET on URL: http://fantacalcio.repubblica.it/login.phpSSID=exjlkfpnaqaqpzqrrrzxjehfxpravrhdvjzjrkqpkraqdpee
I send this Header:
{'Pragma': 'max-age=0', 'Origin': 'https://login.kataweb.it', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36', 'Accept-Language': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4,es;q=0.2', 'Host': 'login.kataweb.it', 'Cache-Control': 'no-cache', 'Referer': 'https://login.kataweb.it/registrazione/repubblicafantacalcio/login.jsp?ssoOnly=false&backurl=http%3A%2F%2Fwww.fantacalcio.kataweb.it%2Fsocial%2Fsites%2Ffantacalcio%2Ffantacalciosocial%2Fcampionato%2Floader.php%3FmClose%3D2%26backUrl%3Dhttp%253A%2F%2Ffantacalcio.repubblica.it%2Flogin.php&optbackurl=http%3A%2F%2Fwww.fantacalcio.kataweb.it%2Fsocial%2Fsites%2Ffantacalcio%2Ffantacalciosocial%2Fcampionato%2Floader.php%3FmClose%3D2%26backUrl%3Dhttp%253A%2F%2Ffantacalcio.repubblica.it%2Flogin.php', 'Accept-Encoding': 'gzip,deflate,sdch', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,_/_;q=0.8', 'Proxy-Connection': 'keep-alive', 'Connection': 'keep-alive'}
and I receive this answer: (a HTTP 302) with header:
{'Expires': 'Thu, 11 Dec 2014 10:22:37 GMT', 'Set-Cookie': 'fantarep_new=0298b7c7bdd9d45ecf5749e8c1fdd5_383207; expires=Fri, 12-Dec-2014 10:22:38 GMT; path=/; domain=.fantacalcio.repubblica.it', 'Age': '0', 'X-Cacheable': 'NO:Not Cacheable', 'Accept-Ranges': 'bytes', 'Content-Length': '20', 'Content-Type': 'text/html', 'Proxy-Connection': 'keep-alive', 'X-Cache-Lookup': 'MISS from proxy1.altranit.corp.altran.com:8080', 'X-Cache': 'MISS from proxy1.altranit.corp.altran.com', 'Via': '1.0 proxy1.altranit.corp.altran.com:8080 (squid/2.6.STABLE21)', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'Server': 'Apache', 'Date': 'Thu, 11 Dec 2014 10:22:38 GMT', 'Cache-Control': 'max-age=0', 'Location': 'index.php?page=sqdlist&ck_fantacalcio=0298b7c7bdd9d45ecf5749e8c1fdd5&global=0&first=1'}
I've this Cookies (BEFORE THE REQUEST IS PERFORMED)
{'FCSOCIAL': 'FCSOCIAL_bb828ef8c292284073012f2931d739', 'gac_3_8ODxzU7xh4eFL2a_mtwjaR5JKoyX0az0MLmAfUYg8kCc2Eo63vmDP9Z3tSI7lS0h': 'VC1_E4E1B47C0B7B0D2C71751CA6855405AF_c718efX2eyW82F0KfQyyZN6hRDxp-4Gn7zYqHu-PRsb2SxHyopuk99ljuVBhks6c8E5PtMxYZEUy0IATFSkvHUPiuc4eqRyUMAYrmQLwDOy_72I4tzk6xOpSJf3s1pLTekn-zZ-TYnkIsk0vsWeHWQ%3D%3D', 'KWSSO': '"{hashId:4648b93f7efac4f16581aab27b7396e4,sessionId:1418293351099,criptKey:1ADBC72C64E0735AA89F96D77294AC827267F01B8FF4397D8D7095B4FD591E59E7033A46928DC087726DB1602EFCFCC5C1FE4A5C0E378C7C}"', 'JSESSIONID': 'F1124C14EE69AF8794998C5BF4BF65D6'}
BUT the SET COOKIE --> 'fantarep_new=0298b7c7bdd9d45ecf5749e8c1fdd5_383207; is ignored.
The http_session.cookies.get_dict()) after the 302 does not return the list updated.
Hoping can help
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2377/reactions"
} | https://api.github.com/repos/psf/requests/issues/2377/timeline | null | completed | null | null | false | [
"Can you run your code and then do this please?\n\n``` python\nfor h in r.history:\n print h.status_code\n print h.headers\n print h.request.headers\n```\n",
"## Your problem is that you're specifying the Host header. We special case cookie parsing when you do that.\n\nSent from my Android device with K-... |
https://api.github.com/repos/psf/requests/issues/2376 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2376/labels{/name} | https://api.github.com/repos/psf/requests/issues/2376/comments | https://api.github.com/repos/psf/requests/issues/2376/events | https://github.com/psf/requests/issues/2376 | 51,559,396 | MDU6SXNzdWU1MTU1OTM5Ng== | 2,376 | AttributeError: 'module' object has no attribute 'python_implementation' | {
"avatar_url": "https://avatars.githubusercontent.com/u/914786?v=4",
"events_url": "https://api.github.com/users/reddypdl/events{/privacy}",
"followers_url": "https://api.github.com/users/reddypdl/followers",
"following_url": "https://api.github.com/users/reddypdl/following{/other_user}",
"gists_url": "https://api.github.com/users/reddypdl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/reddypdl",
"id": 914786,
"login": "reddypdl",
"node_id": "MDQ6VXNlcjkxNDc4Ng==",
"organizations_url": "https://api.github.com/users/reddypdl/orgs",
"received_events_url": "https://api.github.com/users/reddypdl/received_events",
"repos_url": "https://api.github.com/users/reddypdl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/reddypdl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/reddypdl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/reddypdl",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 136589914,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwxMzY1ODk5MTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20Info"
}
] | closed | true | null | [] | null | 2 | 2014-12-10T13:44:15Z | 2021-09-08T23:06:50Z | 2014-12-11T07:22:59Z | NONE | resolved | ```
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> req = requests.request('GET', 'http://httpbin.org/get')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/symbol/python2.7.3/local/lib/python2.7/site-packages/requests/api.py", line 48, in request
session = sessions.Session()
File "/home/symbol/python2.7.3/local/lib/python2.7/site-packages/requests/sessions.py", line 284, in __init__
self.headers = default_headers()
File "/home/symbol/python2.7.3/local/lib/python2.7/site-packages/requests/utils.py", line 552, in default_headers
'User-Agent': default_user_agent(),
File "/home/symbol/python2.7.3/local/lib/python2.7/site-packages/requests/utils.py", line 521, in default_user_agent
_implementation = platform.python_implementation()
AttributeError: 'module' object has no attribute 'python_implementation'
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/914786?v=4",
"events_url": "https://api.github.com/users/reddypdl/events{/privacy}",
"followers_url": "https://api.github.com/users/reddypdl/followers",
"following_url": "https://api.github.com/users/reddypdl/following{/other_user}",
"gists_url": "https://api.github.com/users/reddypdl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/reddypdl",
"id": 914786,
"login": "reddypdl",
"node_id": "MDQ6VXNlcjkxNDc4Ng==",
"organizations_url": "https://api.github.com/users/reddypdl/orgs",
"received_events_url": "https://api.github.com/users/reddypdl/received_events",
"repos_url": "https://api.github.com/users/reddypdl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/reddypdl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/reddypdl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/reddypdl",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2376/reactions"
} | https://api.github.com/repos/psf/requests/issues/2376/timeline | null | completed | null | null | false | [
"@reddypdl can you do `python -c 'import platform; print(platform.python_implementation())'`, if not can you tell us how you built this version of Python? The `platform` module is a standard library module and `platform.python_implementation()` has been around since Python 2.3 so if this is a real version of Python... |
https://api.github.com/repos/psf/requests/issues/2375 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2375/labels{/name} | https://api.github.com/repos/psf/requests/issues/2375/comments | https://api.github.com/repos/psf/requests/issues/2375/events | https://github.com/psf/requests/pull/2375 | 51,382,319 | MDExOlB1bGxSZXF1ZXN0MjU3MTYxMjc= | 2,375 | Copy pip's import machinery wholesale | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] | closed | true | null | [] | null | 39 | 2014-12-09T02:58:42Z | 2021-09-08T09:01:00Z | 2015-01-09T20:38:31Z | CONTRIBUTOR | resolved | Fedora and Debian have both recently added symlinks to their distributions of requests so people can do `from requests.packages import urllib3` but they seem to still rewrite our import statements. So the following situation is possible:
- User registers adapter for custom scheme
- User does the following:
``` python
from requests.packages.urllib3 import poolmanager
poolmanager.pool_classes_by_scheme['glance+https'] = HTTPSConectionPool
```
- When they do `s.get('glance+https://...')` they see a `KeyError` because the urllib3 we're using in requests is not the one they've imported (according to `sys.modules`).
Pip works around this with the copied machinery. The tests seem to work just fine for me. I still need to test this with our vendored packages removed and urllib3/chardet installed separately.
/cc @dstufft @eriolv @ralphbean
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2375/reactions"
} | https://api.github.com/repos/psf/requests/issues/2375/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2375.diff",
"html_url": "https://github.com/psf/requests/pull/2375",
"merged_at": "2015-01-09T20:38:31Z",
"patch_url": "https://github.com/psf/requests/pull/2375.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2375"
} | true | [
"I don't really see why this is our problem. Debian/downstream have introduced this bug, why are we the ones fixing it?\n",
"The reason pip did this is primarily because while it annoys me to no end what the downstream re-distributors do I felt that ultimately it was better for the end-users if we made sure this ... |
https://api.github.com/repos/psf/requests/issues/2374 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2374/labels{/name} | https://api.github.com/repos/psf/requests/issues/2374/comments | https://api.github.com/repos/psf/requests/issues/2374/events | https://github.com/psf/requests/pull/2374 | 51,348,660 | MDExOlB1bGxSZXF1ZXN0MjU2OTQ3NTI= | 2,374 | Updated the broken link to twitter streaming API documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/3087430?v=4",
"events_url": "https://api.github.com/users/krvc/events{/privacy}",
"followers_url": "https://api.github.com/users/krvc/followers",
"following_url": "https://api.github.com/users/krvc/following{/other_user}",
"gists_url": "https://api.github.com/users/krvc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/krvc",
"id": 3087430,
"login": "krvc",
"node_id": "MDQ6VXNlcjMwODc0MzA=",
"organizations_url": "https://api.github.com/users/krvc/orgs",
"received_events_url": "https://api.github.com/users/krvc/received_events",
"repos_url": "https://api.github.com/users/krvc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/krvc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/krvc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/krvc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-08T20:34:47Z | 2021-09-08T09:01:09Z | 2014-12-08T23:46:08Z | CONTRIBUTOR | resolved | The existing link to Twitter streaming API is broken in the Requests documentation. Updated the link with the working URL.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2374/reactions"
} | https://api.github.com/repos/psf/requests/issues/2374/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2374.diff",
"html_url": "https://github.com/psf/requests/pull/2374",
"merged_at": "2014-12-08T23:46:08Z",
"patch_url": "https://github.com/psf/requests/pull/2374.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2374"
} | true | [
"Thanks @krvc \n"
] |
https://api.github.com/repos/psf/requests/issues/2373 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2373/labels{/name} | https://api.github.com/repos/psf/requests/issues/2373/comments | https://api.github.com/repos/psf/requests/issues/2373/events | https://github.com/psf/requests/pull/2373 | 51,332,370 | MDExOlB1bGxSZXF1ZXN0MjU2ODQ2NzY= | 2,373 | Enable GitHub syntax highlighting on README | {
"avatar_url": "https://avatars.githubusercontent.com/u/416575?v=4",
"events_url": "https://api.github.com/users/frewsxcv/events{/privacy}",
"followers_url": "https://api.github.com/users/frewsxcv/followers",
"following_url": "https://api.github.com/users/frewsxcv/following{/other_user}",
"gists_url": "https://api.github.com/users/frewsxcv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/frewsxcv",
"id": 416575,
"login": "frewsxcv",
"node_id": "MDQ6VXNlcjQxNjU3NQ==",
"organizations_url": "https://api.github.com/users/frewsxcv/orgs",
"received_events_url": "https://api.github.com/users/frewsxcv/received_events",
"repos_url": "https://api.github.com/users/frewsxcv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/frewsxcv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/frewsxcv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/frewsxcv",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-12-08T18:04:33Z | 2021-09-08T09:01:10Z | 2014-12-08T18:40:45Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2373/reactions"
} | https://api.github.com/repos/psf/requests/issues/2373/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2373.diff",
"html_url": "https://github.com/psf/requests/pull/2373",
"merged_at": "2014-12-08T18:40:44Z",
"patch_url": "https://github.com/psf/requests/pull/2373.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2373"
} | true | [
":+1: \n",
"reStructuredText on GitHub is so weird. Thanks @frewsxcv \n"
] | |
https://api.github.com/repos/psf/requests/issues/2372 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2372/labels{/name} | https://api.github.com/repos/psf/requests/issues/2372/comments | https://api.github.com/repos/psf/requests/issues/2372/events | https://github.com/psf/requests/issues/2372 | 51,270,385 | MDU6SXNzdWU1MTI3MDM4NQ== | 2,372 | "import requests" is very slow on python2 when ndg-httpsclient and pyasn1 are available | {
"avatar_url": "https://avatars.githubusercontent.com/u/1496354?v=4",
"events_url": "https://api.github.com/users/douardda/events{/privacy}",
"followers_url": "https://api.github.com/users/douardda/followers",
"following_url": "https://api.github.com/users/douardda/following{/other_user}",
"gists_url": "https://api.github.com/users/douardda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/douardda",
"id": 1496354,
"login": "douardda",
"node_id": "MDQ6VXNlcjE0OTYzNTQ=",
"organizations_url": "https://api.github.com/users/douardda/orgs",
"received_events_url": "https://api.github.com/users/douardda/received_events",
"repos_url": "https://api.github.com/users/douardda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/douardda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/douardda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/douardda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2014-12-08T08:55:23Z | 2021-09-08T23:06:51Z | 2014-12-08T15:34:54Z | NONE | resolved | Juste after upgrading my laptop to jessie, I discovered a problem with python requests on py2. For the record, I've created a Debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772506
But to summerize the problem (in a fresh jessie docker container):
In a fresh virtualenv (on a jessie box):
```
(tst)root@ead8881e8ed5:/# pip install requests
Downloading/unpacking requests
Downloading requests-2.5.0-py2.py3-none-any.whl (464kB): 464kB downloaded
Installing collected packages: requests
Successfully installed requests
Cleaning up...
(tst)root@ead8881e8ed5:/# time python -c "import requests"
real 0m0.087s
user 0m0.044s
sys 0m0.040s
(tst)root@ead8881e8ed5:/# pip install ndg-httpsclient
[...]
(req)root@ead8881e8ed5:/req# time python -c "import requests"
/req/local/lib/python2.7/site-packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing pyasn1, subjectAltName check for SSL peer verification will be disabled. Import error is: No module named pyasn1.type
warnings.warn(import_error_msg)
/req/local/lib/python2.7/site-packages/ndg/httpsclient/ssl_peer_verification.py:24: UserWarning: SubjectAltName support is disabled - check pyasn1 package installation to enable
warnings.warn(SUBJ_ALT_NAME_SUPPORT_MSG)
/req/local/lib/python2.7/site-packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing pyasn1, subjectAltName check for SSL peer verification will be disabled. Import error is: No module named pyasn1.type
warnings.warn(import_error_msg)
real 0m0.100s
user 0m0.080s
sys 0m0.012s
(req)root@ead8881e8ed5:/req# pip install pyasn1
[...]
(req)root@ead8881e8ed5:/req# time python -c "import requests"
real 0m0.769s
user 0m0.712s
sys 0m0.052s
```
Notice the last time measurement (almost 800ms), which is very painfull since I use requests in cmdline utilities and mercurial extensions...
David
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1496354?v=4",
"events_url": "https://api.github.com/users/douardda/events{/privacy}",
"followers_url": "https://api.github.com/users/douardda/followers",
"following_url": "https://api.github.com/users/douardda/following{/other_user}",
"gists_url": "https://api.github.com/users/douardda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/douardda",
"id": 1496354,
"login": "douardda",
"node_id": "MDQ6VXNlcjE0OTYzNTQ=",
"organizations_url": "https://api.github.com/users/douardda/orgs",
"received_events_url": "https://api.github.com/users/douardda/received_events",
"repos_url": "https://api.github.com/users/douardda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/douardda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/douardda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/douardda",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2372/reactions"
} | https://api.github.com/repos/psf/requests/issues/2372/timeline | null | completed | null | null | false | [
"Your debian bug report blames OpenSSL, and shows that the time is lost in yacc. This suggests to me that it should only happen the first time: parsing shouldn't be required on initialization after the first time. Is that right, or does it happen consistently?\n",
"It happens consistently (otherwise it would not ... |
https://api.github.com/repos/psf/requests/issues/2371 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2371/labels{/name} | https://api.github.com/repos/psf/requests/issues/2371/comments | https://api.github.com/repos/psf/requests/issues/2371/events | https://github.com/psf/requests/issues/2371 | 51,049,181 | MDU6SXNzdWU1MTA0OTE4MQ== | 2,371 | requests has poor performance streaming large binary responses | {
"avatar_url": "https://avatars.githubusercontent.com/u/772?v=4",
"events_url": "https://api.github.com/users/alex/events{/privacy}",
"followers_url": "https://api.github.com/users/alex/followers",
"following_url": "https://api.github.com/users/alex/following{/other_user}",
"gists_url": "https://api.github.com/users/alex/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex",
"id": 772,
"login": "alex",
"node_id": "MDQ6VXNlcjc3Mg==",
"organizations_url": "https://api.github.com/users/alex/orgs",
"received_events_url": "https://api.github.com/users/alex/received_events",
"repos_url": "https://api.github.com/users/alex/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
}
] | closed | true | null | [] | null | 40 | 2014-12-05T00:37:40Z | 2021-09-08T04:00:55Z | 2016-04-16T04:14:55Z | MEMBER | resolved | https://github.com/alex/http-client-bench contains the benchmarks I used.
The results are something like:
| | requests/http | socket |
| --- | --- | --- |
| CPython | 12MB/s | 200MB/s |
| PyPy | 80MB/s | 300MB/s |
| Go | 150MB/s | n/a |
requests imposes a considerable overhead compared to a socket, particularly on CPython.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2371/reactions"
} | https://api.github.com/repos/psf/requests/issues/2371/timeline | null | completed | null | null | false | [
"That overhead is unexpectedly large. However, avoiding it might be tricky.\n\nThe big problem is that we do quite a lot of processing per chunk. That's all the way down the stack: requests, urllib3 and httplib. It would be extremely interesting to see where the time is being spent to work out who is causing the in... |
https://api.github.com/repos/psf/requests/issues/2370 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2370/labels{/name} | https://api.github.com/repos/psf/requests/issues/2370/comments | https://api.github.com/repos/psf/requests/issues/2370/events | https://github.com/psf/requests/issues/2370 | 50,959,784 | MDU6SXNzdWU1MDk1OTc4NA== | 2,370 | question of urlencode | {
"avatar_url": "https://avatars.githubusercontent.com/u/924733?v=4",
"events_url": "https://api.github.com/users/wangcc/events{/privacy}",
"followers_url": "https://api.github.com/users/wangcc/followers",
"following_url": "https://api.github.com/users/wangcc/following{/other_user}",
"gists_url": "https://api.github.com/users/wangcc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangcc",
"id": 924733,
"login": "wangcc",
"node_id": "MDQ6VXNlcjkyNDczMw==",
"organizations_url": "https://api.github.com/users/wangcc/orgs",
"received_events_url": "https://api.github.com/users/wangcc/received_events",
"repos_url": "https://api.github.com/users/wangcc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangcc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangcc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangcc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-04T10:36:47Z | 2021-09-08T23:06:52Z | 2014-12-04T10:41:29Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/924733?v=4",
"events_url": "https://api.github.com/users/wangcc/events{/privacy}",
"followers_url": "https://api.github.com/users/wangcc/followers",
"following_url": "https://api.github.com/users/wangcc/following{/other_user}",
"gists_url": "https://api.github.com/users/wangcc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangcc",
"id": 924733,
"login": "wangcc",
"node_id": "MDQ6VXNlcjkyNDczMw==",
"organizations_url": "https://api.github.com/users/wangcc/orgs",
"received_events_url": "https://api.github.com/users/wangcc/received_events",
"repos_url": "https://api.github.com/users/wangcc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangcc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangcc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangcc",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2370/reactions"
} | https://api.github.com/repos/psf/requests/issues/2370/timeline | null | completed | null | null | false | [
"Hey @wangcc I expect you resolved whatever problem you had. In the future, please don't delete the description of the issue, even if you filed it on the wrong project. Issues that have had their content edited out are confusing and unhelpful to most people.\n"
] | |
https://api.github.com/repos/psf/requests/issues/2369 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2369/labels{/name} | https://api.github.com/repos/psf/requests/issues/2369/comments | https://api.github.com/repos/psf/requests/issues/2369/events | https://github.com/psf/requests/pull/2369 | 50,913,544 | MDExOlB1bGxSZXF1ZXN0MjU0NjQ2MDE= | 2,369 | Set connection timeouts for HTTPS proxy attempts. | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-12-04T00:33:48Z | 2021-09-08T09:01:10Z | 2014-12-04T02:57:41Z | CONTRIBUTOR | resolved | Fixes #2336
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2369/reactions"
} | https://api.github.com/repos/psf/requests/issues/2369/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2369.diff",
"html_url": "https://github.com/psf/requests/pull/2369",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2369.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2369"
} | true | [
"@kevinburke Wrong repo. ;) Merge to urllib3 first, then we'll take the fix.\n",
"Sorry, that wasn't clear, it's been a long day (just got off a flight, LHR -> SFO).\n\nWhat I meant was: we'll bring in a whole urllib3 when we move to the next release, so we shouldn't merge an individual fix.\n"
] |
https://api.github.com/repos/psf/requests/issues/2368 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2368/labels{/name} | https://api.github.com/repos/psf/requests/issues/2368/comments | https://api.github.com/repos/psf/requests/issues/2368/events | https://github.com/psf/requests/issues/2368 | 50,911,684 | MDU6SXNzdWU1MDkxMTY4NA== | 2,368 | api.dribbble.com SSL certificate does not validate | {
"avatar_url": "https://avatars.githubusercontent.com/u/1097349?v=4",
"events_url": "https://api.github.com/users/joealcorn/events{/privacy}",
"followers_url": "https://api.github.com/users/joealcorn/followers",
"following_url": "https://api.github.com/users/joealcorn/following{/other_user}",
"gists_url": "https://api.github.com/users/joealcorn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joealcorn",
"id": 1097349,
"login": "joealcorn",
"node_id": "MDQ6VXNlcjEwOTczNDk=",
"organizations_url": "https://api.github.com/users/joealcorn/orgs",
"received_events_url": "https://api.github.com/users/joealcorn/received_events",
"repos_url": "https://api.github.com/users/joealcorn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joealcorn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joealcorn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joealcorn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2014-12-04T00:09:04Z | 2021-09-08T23:06:53Z | 2014-12-04T14:38:21Z | CONTRIBUTOR | resolved | Built something with dribbble's API recently and noticed this.
This very may well be the fault of dribbble, but I don't know enough to diagnose. It works in browsers and curl, so it seems something's up with requests.
ssllabs shows the cert presented as a wildcard certificate https://www.ssllabs.com/ssltest/analyze.html?d=api.dribbble.com
However when connecting with requests 2.5.0 on python 2.7.8 an `SSLError` is raised
`SSLError: hostname 'api.dribbble.com' doesn't match either of 'dribbble.com', 'www.dribbble.com'`
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2368/reactions"
} | https://api.github.com/repos/psf/requests/issues/2368/timeline | null | completed | null | null | false | [
"(Pdb) self.sock.getpeercert()\n{'notAfter': 'Mar 26 12:00:00 2015 GMT', 'subjectAltName': (('DNS', 'dribbble.com'), ('DNS', 'www.dribbble.com')), 'subject': ((('businessCategory', u'Private Organization'),), (('1.3.6.1.4.1.311.60.2.1.3', u'US'),), (('1.3.6.1.4.1.311.60.2.1.2', u'Massachusetts'),), (('serialNumber'... |
https://api.github.com/repos/psf/requests/issues/2367 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2367/labels{/name} | https://api.github.com/repos/psf/requests/issues/2367/comments | https://api.github.com/repos/psf/requests/issues/2367/events | https://github.com/psf/requests/issues/2367 | 50,891,603 | MDU6SXNzdWU1MDg5MTYwMw== | 2,367 | requests.post() issues a GET with verify=False on insecure ssl environment | {
"avatar_url": "https://avatars.githubusercontent.com/u/1216869?v=4",
"events_url": "https://api.github.com/users/kevinlondon/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinlondon/followers",
"following_url": "https://api.github.com/users/kevinlondon/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinlondon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinlondon",
"id": 1216869,
"login": "kevinlondon",
"node_id": "MDQ6VXNlcjEyMTY4Njk=",
"organizations_url": "https://api.github.com/users/kevinlondon/orgs",
"received_events_url": "https://api.github.com/users/kevinlondon/received_events",
"repos_url": "https://api.github.com/users/kevinlondon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinlondon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinlondon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinlondon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-12-03T20:54:47Z | 2021-09-08T23:06:53Z | 2014-12-03T21:52:49Z | NONE | resolved | I did a search to see if I could find any similar issues prior to filing the bug. It seems like something within the way urllib3 is behaving, in particular, but I'm not sure.
I have an API endpoint where GET is disabled so only POST and OPTIONS are valid methods. It works fine when I interact with it when it's hosted on HTTP but when I host it over HTTPS, the response is a 405. It behaves the same if I'm using either `requests.post()` or `requests.Session().post()`.
Specifically, here's an example of the request / response cycle:
```
>>> resp = requests.Session().post(url, headers=self._headers, verify=False)
>>> resp.content
'{"code": 405, "total": null, "version": 1, "errors": [{"message": "Method \'GET\' not allowed."}]'
```
On an HTTP environment, with the same call (including `verify=False`), I get the expected response. I've also been able to successfully hit the same URL with the same headers using Postman and cURL without issue on the HTTPS server.
Is this a bug with the library or am I doing something wrong?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1216869?v=4",
"events_url": "https://api.github.com/users/kevinlondon/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinlondon/followers",
"following_url": "https://api.github.com/users/kevinlondon/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinlondon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinlondon",
"id": 1216869,
"login": "kevinlondon",
"node_id": "MDQ6VXNlcjEyMTY4Njk=",
"organizations_url": "https://api.github.com/users/kevinlondon/orgs",
"received_events_url": "https://api.github.com/users/kevinlondon/received_events",
"repos_url": "https://api.github.com/users/kevinlondon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinlondon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinlondon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinlondon",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2367/reactions"
} | https://api.github.com/repos/psf/requests/issues/2367/timeline | null | completed | null | null | false | [
"What is the output of `resp.history`. It's plausible you're being redirected and the status code we're getting is causing us to switch the request to a `GET` (as we should be).\n",
"Ah, okay. Thank you for the pointer. In history was a Response [301] and I traced it to the fact that nginx was redirecting me from... |
https://api.github.com/repos/psf/requests/issues/2366 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2366/labels{/name} | https://api.github.com/repos/psf/requests/issues/2366/comments | https://api.github.com/repos/psf/requests/issues/2366/events | https://github.com/psf/requests/issues/2366 | 50,789,806 | MDU6SXNzdWU1MDc4OTgwNg== | 2,366 | redirected request with a wrong host header | {
"avatar_url": "https://avatars.githubusercontent.com/u/860837?v=4",
"events_url": "https://api.github.com/users/hakulat/events{/privacy}",
"followers_url": "https://api.github.com/users/hakulat/followers",
"following_url": "https://api.github.com/users/hakulat/following{/other_user}",
"gists_url": "https://api.github.com/users/hakulat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hakulat",
"id": 860837,
"login": "hakulat",
"node_id": "MDQ6VXNlcjg2MDgzNw==",
"organizations_url": "https://api.github.com/users/hakulat/orgs",
"received_events_url": "https://api.github.com/users/hakulat/received_events",
"repos_url": "https://api.github.com/users/hakulat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hakulat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hakulat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hakulat",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2014-12-03T06:43:23Z | 2021-09-08T23:05:54Z | 2014-12-18T08:45:06Z | NONE | resolved | for example:
r = requests.get(url, allow_redirects=True, headers={"Host":"www.baidu.com"})
first response is:
302 with location: http://www.abc.com/index.html
then the followed request is also with the Host of www.baidu.com, for 302 location is a abs Request-URI, should not the request with the host of www.abc.com?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2366/reactions"
} | https://api.github.com/repos/psf/requests/issues/2366/timeline | null | completed | null | null | false | [
"Hi @wttang \n\nFor the most part, we actively discourage users from specifying they're own `Host` header. Because we discourage users from handling their own `Host` header, we do not remove it on redirect because 99% of the time there's no need for us to do so. By specifying this header yourself and not handling r... |
https://api.github.com/repos/psf/requests/issues/2365 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2365/labels{/name} | https://api.github.com/repos/psf/requests/issues/2365/comments | https://api.github.com/repos/psf/requests/issues/2365/events | https://github.com/psf/requests/pull/2365 | 50,590,904 | MDExOlB1bGxSZXF1ZXN0MjUzMDYzNzM= | 2,365 | Release v2.5.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}... | null | 6 | 2014-12-01T23:04:05Z | 2021-09-08T09:01:11Z | 2014-12-01T23:22:17Z | CONTRIBUTOR | resolved | TODO:
- [x] Tag release
- [x] Upload to PyPI
- [x] Create release on GitHub
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2365/reactions"
} | https://api.github.com/repos/psf/requests/issues/2365/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2365.diff",
"html_url": "https://github.com/psf/requests/pull/2365",
"merged_at": "2014-12-01T23:22:17Z",
"patch_url": "https://github.com/psf/requests/pull/2365.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2365"
} | true | [
":cake: LGTM.\n\nReady when you are @kennethreitz.\n",
":shipit: \n",
"@kennethreitz wanted to get this out today and added both of us to PyPI as maintainers so I'm going to wrap this up right now.\n",
"- [Tag](https://github.com/kennethreitz/requests/releases/tag/v2.5.0)\n- [Release](https://github.com/kenne... |
https://api.github.com/repos/psf/requests/issues/2364 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2364/labels{/name} | https://api.github.com/repos/psf/requests/issues/2364/comments | https://api.github.com/repos/psf/requests/issues/2364/events | https://github.com/psf/requests/issues/2364 | 50,590,618 | MDU6SXNzdWU1MDU5MDYxOA== | 2,364 | ConnectionError: ('Connection aborted.', BadStatusLine(""''''")) on Windows | {
"avatar_url": "https://avatars.githubusercontent.com/u/410872?v=4",
"events_url": "https://api.github.com/users/greedo/events{/privacy}",
"followers_url": "https://api.github.com/users/greedo/followers",
"following_url": "https://api.github.com/users/greedo/following{/other_user}",
"gists_url": "https://api.github.com/users/greedo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/greedo",
"id": 410872,
"login": "greedo",
"node_id": "MDQ6VXNlcjQxMDg3Mg==",
"organizations_url": "https://api.github.com/users/greedo/orgs",
"received_events_url": "https://api.github.com/users/greedo/received_events",
"repos_url": "https://api.github.com/users/greedo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/greedo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/greedo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/greedo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 31 | 2014-12-01T23:00:53Z | 2018-10-20T11:29:28Z | 2015-07-20T14:55:07Z | NONE | resolved | I am encountering this error when making a PUT request on Windows only, It works fine on *nix.
```
requests.put(
https://upload.com,
timeout=None,
headers={
'Content-Length': 28689538,
'Content-Range': 'bytes: 0-28689538/28689538',
'User-Agent': 'test'
}, data=f)
File "C:\Python27\lib\site-packages\requests\api.py", line 105, in put
return request('put', url, data=data, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 49, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 457, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 408, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', BadStatusLine("''",))
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2364/reactions"
} | https://api.github.com/repos/psf/requests/issues/2364/timeline | null | completed | null | null | false | [
"`BadStatusLine` is an exception coming out of the bowels of `httplib`, and it suggests that the data it receives doesn't make any sense. If I had to guess, I'd say that the obvious error is related to the TLS connection you're making. It would be interesting to see a packet capture (from tcpdump or wireshark) of t... |
https://api.github.com/repos/psf/requests/issues/2363 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2363/labels{/name} | https://api.github.com/repos/psf/requests/issues/2363/comments | https://api.github.com/repos/psf/requests/issues/2363/events | https://github.com/psf/requests/pull/2363 | 50,586,064 | MDExOlB1bGxSZXF1ZXN0MjUzMDQwMjM= | 2,363 | Update tests to work offline | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-12-01T22:25:44Z | 2021-09-08T09:01:11Z | 2014-12-03T04:46:10Z | CONTRIBUTOR | resolved | There are still some that we cannot force to work offline but this improves a lot of things.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2363/reactions"
} | https://api.github.com/repos/psf/requests/issues/2363/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2363.diff",
"html_url": "https://github.com/psf/requests/pull/2363",
"merged_at": "2014-12-03T04:46:10Z",
"patch_url": "https://github.com/psf/requests/pull/2363.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2363"
} | true | [
"Some of the tests you port to `httpbin()` use `http` and others use `https`, is that significant?\n",
"@alex those tests that were using https didn't seem to have any necessity to rely on https. They were likely written by me and I just write `'https://httpbin.org'` everytime I want to talk to httpbin by force o... |
https://api.github.com/repos/psf/requests/issues/2362 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2362/labels{/name} | https://api.github.com/repos/psf/requests/issues/2362/comments | https://api.github.com/repos/psf/requests/issues/2362/events | https://github.com/psf/requests/issues/2362 | 50,566,424 | MDU6SXNzdWU1MDU2NjQyNA== | 2,362 | Reduce bus factor | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2014-12-01T19:51:59Z | 2021-09-08T23:06:51Z | 2014-12-08T17:03:13Z | CONTRIBUTOR | resolved | Keys to the kingdom for @Lukasa and @sigmavirus24.
This includes....
- [ ] DNSimple collab access]
- [x] PyPi collab access
I think that's it...
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2362/reactions"
} | https://api.github.com/repos/psf/requests/issues/2362/timeline | null | completed | null | null | false | [
"What about ci.kennethreitz.org\n",
"@kevinburke hmm, i suppose so . \n",
"Op on the IRC channel as well\n",
"@kevinburke if someone tells me what command to type in, i'll do it lol\n",
"I'm not sure we need op on the channel. I've never seen any problems arise in there. \n\n```\n/msg ChanServ FLAGS #python... |
https://api.github.com/repos/psf/requests/issues/2361 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2361/labels{/name} | https://api.github.com/repos/psf/requests/issues/2361/comments | https://api.github.com/repos/psf/requests/issues/2361/events | https://github.com/psf/requests/issues/2361 | 50,513,357 | MDU6SXNzdWU1MDUxMzM1Nw== | 2,361 | Combining pool_block == True with head blocks | {
"avatar_url": "https://avatars.githubusercontent.com/u/5834577?v=4",
"events_url": "https://api.github.com/users/ARF1/events{/privacy}",
"followers_url": "https://api.github.com/users/ARF1/followers",
"following_url": "https://api.github.com/users/ARF1/following{/other_user}",
"gists_url": "https://api.github.com/users/ARF1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ARF1",
"id": 5834577,
"login": "ARF1",
"node_id": "MDQ6VXNlcjU4MzQ1Nzc=",
"organizations_url": "https://api.github.com/users/ARF1/orgs",
"received_events_url": "https://api.github.com/users/ARF1/received_events",
"repos_url": "https://api.github.com/users/ARF1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ARF1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ARF1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ARF1",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-12-01T11:23:57Z | 2021-09-08T23:05:46Z | 2015-04-07T14:10:08Z | NONE | resolved | I am using requests to read redirection targets from 302 responses for a list of urls.
The core function is:
```
def getRedirect(url):
print('requesting: %s' % url)
request = reqsSess.head(url)
print('done: %s' % url)
request.raise_for_status()
location = request.headers['location']
request.close()
return location
```
To avoid I/O lock, I am using gevent to spawn a separate `getRedirect` for all urls in my list (about 1000) and wanted to use requests' adapter rate limiting. Here I limited to one connection for testing purposes, but obviously the idea was to raise this once confirmed the it works. (Note, raising to 2 makes no difference to the issue.)
```
import requests
connection_limit = 1
adapter = requests.adapters.HTTPAdapter(pool_connections=connection_limit,
max_retries=3,
pool_block=True)
reqsSess = requests.session()
reqsSess.mount('http://www.mydomain.com', adapter)
```
The problem is, that I only see "requesting: url1", etc only eight times. Then the script blocks. Am I doing something wrong? I thought this might be related to #1967 but adding `request.close()` did not help.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2361/reactions"
} | https://api.github.com/repos/psf/requests/issues/2361/timeline | null | completed | null | null | false | [
"Additional observations:\n\nWith `connection_limit = 1` and `pool_block=True`, about 6-8 (changing) `requesting: url...` statements are printed. Wireshark shows only a single DNS request and response. **No http requests of any kind are transmitted.**\n\nWith `connection_limit = 2` and `pool_block=True`, exactly 11... |
https://api.github.com/repos/psf/requests/issues/2360 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2360/labels{/name} | https://api.github.com/repos/psf/requests/issues/2360/comments | https://api.github.com/repos/psf/requests/issues/2360/events | https://github.com/psf/requests/pull/2360 | 50,474,384 | MDExOlB1bGxSZXF1ZXN0MjUyNDEyMDM= | 2,360 | dummy commit | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-30T23:02:02Z | 2021-09-08T09:01:11Z | 2014-11-30T23:36:43Z | CONTRIBUTOR | resolved | testing whether ci.kennethreitz.org is working again
| {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2360/reactions"
} | https://api.github.com/repos/psf/requests/issues/2360/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2360.diff",
"html_url": "https://github.com/psf/requests/pull/2360",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2360.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2360"
} | true | [
"looks like it is!\n"
] |
https://api.github.com/repos/psf/requests/issues/2359 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2359/labels{/name} | https://api.github.com/repos/psf/requests/issues/2359/comments | https://api.github.com/repos/psf/requests/issues/2359/events | https://github.com/psf/requests/issues/2359 | 50,243,267 | MDU6SXNzdWU1MDI0MzI2Nw== | 2,359 | Charset detection in text() can be pathologically slow | {
"avatar_url": "https://avatars.githubusercontent.com/u/1546674?v=4",
"events_url": "https://api.github.com/users/marcocova/events{/privacy}",
"followers_url": "https://api.github.com/users/marcocova/followers",
"following_url": "https://api.github.com/users/marcocova/following{/other_user}",
"gists_url": "https://api.github.com/users/marcocova/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marcocova",
"id": 1546674,
"login": "marcocova",
"node_id": "MDQ6VXNlcjE1NDY2NzQ=",
"organizations_url": "https://api.github.com/users/marcocova/orgs",
"received_events_url": "https://api.github.com/users/marcocova/received_events",
"repos_url": "https://api.github.com/users/marcocova/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marcocova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcocova/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marcocova",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
}
] | closed | true | null | [] | null | 10 | 2014-11-27T01:00:37Z | 2021-09-03T00:10:52Z | 2015-04-07T13:43:51Z | NONE | resolved | When calling `response.text()` and no encoding was set or determined, requests relies on `chardet` to detect the encoding:
``` python
@property
def apparent_encoding(self):
"""The apparent encoding, provided by the chardet library"""
return chardet.detect(self.content)['encoding']
```
Unfortunately, chardet can be pathologically [slow and memory-hungry](https://github.com/chardet/chardet/issues/29) to do its job. For example, processing the text property of a response with the following content:
```
"a" * (1024 * 1024) + "\xa9"
```
causes python-requests to use 131.00MB and 40+ seconds (for a 1MB response!)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/2359/reactions"
} | https://api.github.com/repos/psf/requests/issues/2359/timeline | null | completed | null | null | false | [
"We're aware of this. Do you have a proposal to replace it with something better?\n",
"How about using <a href=https://pypi.python.org/pypi/cchardet/> cChardet </a>? \n",
"We can't vendor anything that uses C extensions, so no @rsnair2 we can't use cChardet\n",
"Couldn't it be the solution in @marcocova's cas... |
https://api.github.com/repos/psf/requests/issues/2358 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2358/labels{/name} | https://api.github.com/repos/psf/requests/issues/2358/comments | https://api.github.com/repos/psf/requests/issues/2358/events | https://github.com/psf/requests/issues/2358 | 50,116,861 | MDU6SXNzdWU1MDExNjg2MQ== | 2,358 | about GET request | {
"avatar_url": "https://avatars.githubusercontent.com/u/1115526?v=4",
"events_url": "https://api.github.com/users/snowleung/events{/privacy}",
"followers_url": "https://api.github.com/users/snowleung/followers",
"following_url": "https://api.github.com/users/snowleung/following{/other_user}",
"gists_url": "https://api.github.com/users/snowleung/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/snowleung",
"id": 1115526,
"login": "snowleung",
"node_id": "MDQ6VXNlcjExMTU1MjY=",
"organizations_url": "https://api.github.com/users/snowleung/orgs",
"received_events_url": "https://api.github.com/users/snowleung/received_events",
"repos_url": "https://api.github.com/users/snowleung/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/snowleung/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/snowleung/subscriptions",
"type": "User",
"url": "https://api.github.com/users/snowleung",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-11-26T04:22:25Z | 2021-09-08T23:06:55Z | 2014-11-26T04:30:33Z | NONE | resolved | In requests, GET request need "params = request_body", but POST (or ohter) request need "data=request_body",
so
i think about is let the request data together.
i know HTTP BODY and URL params need a different handler, but we can let this handler in send_request function (means use URL or BODY).
and
it's there any "design pattern" about using "params" and "data" ?
thx.
file: api.py line: 23-24
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2358/reactions"
} | https://api.github.com/repos/psf/requests/issues/2358/timeline | null | completed | null | null | false | [
"Nothing prevents you from using both `params` and `data` simultaneously. I'm not sure I understand what you're asking. Regardless, it seems as though you're asking a question and this is not a forum it is an issue tracker. Questions belong on [StackOverflow](https://stackoverflow.com/questions/tagged/python-reques... |
https://api.github.com/repos/psf/requests/issues/2357 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2357/labels{/name} | https://api.github.com/repos/psf/requests/issues/2357/comments | https://api.github.com/repos/psf/requests/issues/2357/events | https://github.com/psf/requests/pull/2357 | 50,109,917 | MDExOlB1bGxSZXF1ZXN0MjUwNTY1Mzg= | 2,357 | work around for dealing with a multipart/related multipart upload instea... | {
"avatar_url": "https://avatars.githubusercontent.com/u/64289?v=4",
"events_url": "https://api.github.com/users/netjunki/events{/privacy}",
"followers_url": "https://api.github.com/users/netjunki/followers",
"following_url": "https://api.github.com/users/netjunki/following{/other_user}",
"gists_url": "https://api.github.com/users/netjunki/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/netjunki",
"id": 64289,
"login": "netjunki",
"node_id": "MDQ6VXNlcjY0Mjg5",
"organizations_url": "https://api.github.com/users/netjunki/orgs",
"received_events_url": "https://api.github.com/users/netjunki/received_events",
"repos_url": "https://api.github.com/users/netjunki/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/netjunki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/netjunki/subscriptions",
"type": "User",
"url": "https://api.github.com/users/netjunki",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-26T02:13:25Z | 2021-09-08T09:01:13Z | 2014-11-26T02:23:35Z | NONE | resolved | ...d of a multipart/form-data. Was trying to integrate file upload support for the HipChat v2 API with will and discovered that requests can't deal with the type of multipart request their upload api requires.
https://www.hipchat.com/docs/apiv2/method/share_file_with_room
I think this approach is a complete mess... but not sure about the best way to go about dealing with it.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2357/reactions"
} | https://api.github.com/repos/psf/requests/issues/2357/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2357.diff",
"html_url": "https://github.com/psf/requests/pull/2357",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2357.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2357"
} | true | [
"Hey @netjunki,\n\nWe're not expanding the API any longer. Requests is under a feature freeze unless Kenneth blesses it for inclusion (which is rare and highly unlikely). You could probably subclass the `MultipartEncoder` from the requests-toolbelt and achieve what you're looking for here pretty easily.\n\nThanks f... |
https://api.github.com/repos/psf/requests/issues/2356 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2356/labels{/name} | https://api.github.com/repos/psf/requests/issues/2356/comments | https://api.github.com/repos/psf/requests/issues/2356/events | https://github.com/psf/requests/issues/2356 | 50,071,109 | MDU6SXNzdWU1MDA3MTEwOQ== | 2,356 | Requests unable to follow/retrieve links with percent in url | {
"avatar_url": "https://avatars.githubusercontent.com/u/1652853?v=4",
"events_url": "https://api.github.com/users/suhaasprasad/events{/privacy}",
"followers_url": "https://api.github.com/users/suhaasprasad/followers",
"following_url": "https://api.github.com/users/suhaasprasad/following{/other_user}",
"gists_url": "https://api.github.com/users/suhaasprasad/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/suhaasprasad",
"id": 1652853,
"login": "suhaasprasad",
"node_id": "MDQ6VXNlcjE2NTI4NTM=",
"organizations_url": "https://api.github.com/users/suhaasprasad/orgs",
"received_events_url": "https://api.github.com/users/suhaasprasad/received_events",
"repos_url": "https://api.github.com/users/suhaasprasad/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/suhaasprasad/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/suhaasprasad/subscriptions",
"type": "User",
"url": "https://api.github.com/users/suhaasprasad",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-11-25T19:15:39Z | 2021-09-08T23:06:02Z | 2015-01-27T18:24:34Z | NONE | resolved | A simple requests.get(url) doesn't work for the following:
http://bit.ly/1x5vKWM
http://bit.ly/1yPgqvg
http://style.shoedazzle.com/dmg/3AE3B8?dzcode=FBT&dzcontent=FBT_SDZ_CPM_Q414&pid=112768085&aid=285880402&cid=0&publisher=%ppublisher=!;&placement=%pplacement=!;
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2356/reactions"
} | https://api.github.com/repos/psf/requests/issues/2356/timeline | null | completed | null | null | false | [
"This bug is exactly the same as #1360, with one key difference: here, the server isn't percent-encoding percent signs. This is not valid HTTP, and we're totally allowed to fail here according to RFC 7231:\n\n> Note: Some recipients attempt to recover from Location fields that are not valid URI references. This sp... |
https://api.github.com/repos/psf/requests/issues/2355 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2355/labels{/name} | https://api.github.com/repos/psf/requests/issues/2355/comments | https://api.github.com/repos/psf/requests/issues/2355/events | https://github.com/psf/requests/pull/2355 | 49,961,012 | MDExOlB1bGxSZXF1ZXN0MjQ5NzU1NTc= | 2,355 | Unix domain sockets | {
"avatar_url": "https://avatars.githubusercontent.com/u/305268?v=4",
"events_url": "https://api.github.com/users/msabramo/events{/privacy}",
"followers_url": "https://api.github.com/users/msabramo/followers",
"following_url": "https://api.github.com/users/msabramo/following{/other_user}",
"gists_url": "https://api.github.com/users/msabramo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/msabramo",
"id": 305268,
"login": "msabramo",
"node_id": "MDQ6VXNlcjMwNTI2OA==",
"organizations_url": "https://api.github.com/users/msabramo/orgs",
"received_events_url": "https://api.github.com/users/msabramo/received_events",
"repos_url": "https://api.github.com/users/msabramo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/msabramo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/msabramo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/msabramo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-11-25T00:18:28Z | 2021-09-08T09:01:14Z | 2014-11-25T02:09:42Z | CONTRIBUTOR | resolved | This adds support for unix domain sockets by using a slightly modified version of the unix domain socket adapter from the [docker-py](https://github.com/docker/docker-py) project:
https://github.com/docker/docker-py/blob/master/docker/unixconn/unixconn.py
The modifications are to make the adapter more usable in a greater variety of contexts by getting rid of the context of a `base_url` for the adapter and inventing a URL syntax that allows embedding the socket path into the URL. Basically the socket name goes in the netloc (host) part of the URL, but it's URL-encoded so that slashes become `%2F`'s so that the slashes don't interfere with separating the netloc and path parts of the URLs. This was roughly inspired by URL syntaxes that are mentioned in the following comments:
- http://daniel.haxx.se/blog/2008/04/14/http-over-unix-domain-sockets/
- http://lists.w3.org/Archives/Public/uri/2008Oct/0000.html
So for example if I had a server listening on `/tmp/profilesvc.sock`:
```
$ gunicorn --paste development.ini --log-config development.ini --bind unix:/tmp/profilesvc.sock
...
2014-11-24 16:14:54,943 INFO [MainThread][gunicorn.error.info][glogging.py +213] Listening at:
unix:/tmp/profilesvc.sock (95775)
...
```
I can access it as follows:
``` python
import requests
resp = requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/status/pid')
```
In case you're curious about the motivation for adding unix domain socket support, it was inspired by:
https://github.com/jakubroztocil/httpie/issues/209
Cc: @shin-, @jakubroztocil, @monsanto, @np, @nuxlli, @matrixise, @remmelt
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2355/reactions"
} | https://api.github.com/repos/psf/requests/issues/2355/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2355.diff",
"html_url": "https://github.com/psf/requests/pull/2355",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2355.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2355"
} | true | [
"Probably if `requests` had this, docker-py and other projects might be able to make use of it and not have to maintain their own versions. I wonder if @shin- could use this in docker-py.\n",
"Very nice @msabramo \n",
"So the fundamental thing to remember about requests is that it is an HTTP library which means... |
https://api.github.com/repos/psf/requests/issues/2354 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2354/labels{/name} | https://api.github.com/repos/psf/requests/issues/2354/comments | https://api.github.com/repos/psf/requests/issues/2354/events | https://github.com/psf/requests/issues/2354 | 49,920,234 | MDU6SXNzdWU0OTkyMDIzNA== | 2,354 | is there any way to make requests waiting for ajax to respond? | {
"avatar_url": "https://avatars.githubusercontent.com/u/2675621?v=4",
"events_url": "https://api.github.com/users/Casyfill/events{/privacy}",
"followers_url": "https://api.github.com/users/Casyfill/followers",
"following_url": "https://api.github.com/users/Casyfill/following{/other_user}",
"gists_url": "https://api.github.com/users/Casyfill/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Casyfill",
"id": 2675621,
"login": "Casyfill",
"node_id": "MDQ6VXNlcjI2NzU2MjE=",
"organizations_url": "https://api.github.com/users/Casyfill/orgs",
"received_events_url": "https://api.github.com/users/Casyfill/received_events",
"repos_url": "https://api.github.com/users/Casyfill/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Casyfill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Casyfill/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Casyfill",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-11-24T17:48:44Z | 2021-09-08T23:06:55Z | 2014-11-24T17:51:34Z | NONE | resolved | a site (http://echo.msk.ru/) is responding to the request in a second. However, with a simple request.get I cant put a hand on the site content. For sure, I can use selenium for that, but is there any simple way to make requests wait for answer?
thanks in advance
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2354/reactions"
} | https://api.github.com/repos/psf/requests/issues/2354/timeline | null | completed | null | null | false | [
"requests does not wait for AJAX because it doesn't read HTML. You need something that will read the HTML of the site to learn where the Javascript is, then obtain it and execute it. requests is not built to do that, though it could be a _component_ of doing it.\n\nMy recommendation would be to use the browser deve... |
https://api.github.com/repos/psf/requests/issues/2353 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2353/labels{/name} | https://api.github.com/repos/psf/requests/issues/2353/comments | https://api.github.com/repos/psf/requests/issues/2353/events | https://github.com/psf/requests/pull/2353 | 49,849,592 | MDExOlB1bGxSZXF1ZXN0MjQ5MTA2MjI= | 2,353 | url was already parsed, don't urlparse twice | {
"avatar_url": "https://avatars.githubusercontent.com/u/375744?v=4",
"events_url": "https://api.github.com/users/mattrobenolt/events{/privacy}",
"followers_url": "https://api.github.com/users/mattrobenolt/followers",
"following_url": "https://api.github.com/users/mattrobenolt/following{/other_user}",
"gists_url": "https://api.github.com/users/mattrobenolt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mattrobenolt",
"id": 375744,
"login": "mattrobenolt",
"node_id": "MDQ6VXNlcjM3NTc0NA==",
"organizations_url": "https://api.github.com/users/mattrobenolt/orgs",
"received_events_url": "https://api.github.com/users/mattrobenolt/received_events",
"repos_url": "https://api.github.com/users/mattrobenolt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mattrobenolt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mattrobenolt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mattrobenolt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-11-24T01:54:56Z | 2021-09-08T09:01:12Z | 2014-11-30T19:11:52Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2353/reactions"
} | https://api.github.com/repos/psf/requests/issues/2353/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2353.diff",
"html_url": "https://github.com/psf/requests/pull/2353",
"merged_at": "2014-11-30T19:11:52Z",
"patch_url": "https://github.com/psf/requests/pull/2353.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2353"
} | true | [
"I think this is safe to take. @sigmavirus24?\n",
"Looks safe to me\n",
"cool :)\n"
] | |
https://api.github.com/repos/psf/requests/issues/2352 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2352/labels{/name} | https://api.github.com/repos/psf/requests/issues/2352/comments | https://api.github.com/repos/psf/requests/issues/2352/events | https://github.com/psf/requests/issues/2352 | 49,789,576 | MDU6SXNzdWU0OTc4OTU3Ng== | 2,352 | Clarity on docs regarding debugging | {
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"events_url": "https://api.github.com/users/foxx/events{/privacy}",
"followers_url": "https://api.github.com/users/foxx/followers",
"following_url": "https://api.github.com/users/foxx/following{/other_user}",
"gists_url": "https://api.github.com/users/foxx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/foxx",
"id": 651797,
"login": "foxx",
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"organizations_url": "https://api.github.com/users/foxx/orgs",
"received_events_url": "https://api.github.com/users/foxx/received_events",
"repos_url": "https://api.github.com/users/foxx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/foxx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/foxx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/foxx",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 17 | 2014-11-22T13:08:47Z | 2021-09-08T23:06:56Z | 2014-11-23T22:46:19Z | NONE | resolved | As spending about 10 minutes figuring out how to log raw request/responses in requests, I eventually came across the following [SO article](http://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application), which references an obscure part of the [documentation](http://docs.python-requests.org/en/master/api/?highlight=debuglevel).
It would be nice if there was a clear section in the docs which explains how to do this, as it's not very clear and took quite a bit of searching. A quick copy/paste (or a complete move) would suffice. Thoughts?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"events_url": "https://api.github.com/users/foxx/events{/privacy}",
"followers_url": "https://api.github.com/users/foxx/followers",
"following_url": "https://api.github.com/users/foxx/following{/other_user}",
"gists_url": "https://api.github.com/users/foxx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/foxx",
"id": 651797,
"login": "foxx",
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"organizations_url": "https://api.github.com/users/foxx/orgs",
"received_events_url": "https://api.github.com/users/foxx/received_events",
"repos_url": "https://api.github.com/users/foxx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/foxx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/foxx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/foxx",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2352/reactions"
} | https://api.github.com/repos/psf/requests/issues/2352/timeline | null | completed | null | null | false | [
"Using the search functionality with the phrase \"logging\" helped me find the section of the docs that details how to enable logging. I for one would rather not have the same content copied and pasted in the documentation because that provides two places where it would need to be updated and they will easily fall ... |
https://api.github.com/repos/psf/requests/issues/2351 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2351/labels{/name} | https://api.github.com/repos/psf/requests/issues/2351/comments | https://api.github.com/repos/psf/requests/issues/2351/events | https://github.com/psf/requests/pull/2351 | 49,689,412 | MDExOlB1bGxSZXF1ZXN0MjQ4MzYwMjc= | 2,351 | Added ability to use list of proxies for each scheme. Proxies are randomly selected. | {
"avatar_url": "https://avatars.githubusercontent.com/u/955888?v=4",
"events_url": "https://api.github.com/users/lexapi/events{/privacy}",
"followers_url": "https://api.github.com/users/lexapi/followers",
"following_url": "https://api.github.com/users/lexapi/following{/other_user}",
"gists_url": "https://api.github.com/users/lexapi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lexapi",
"id": 955888,
"login": "lexapi",
"node_id": "MDQ6VXNlcjk1NTg4OA==",
"organizations_url": "https://api.github.com/users/lexapi/orgs",
"received_events_url": "https://api.github.com/users/lexapi/received_events",
"repos_url": "https://api.github.com/users/lexapi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lexapi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lexapi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lexapi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-11-21T12:15:25Z | 2021-09-08T09:01:13Z | 2014-11-25T03:06:12Z | NONE | resolved | Basic Usage:
``` python
import requests
r = requests.Session()
p = {'http':['proxy1.com:81', 'proxy2:82', 'proxy2:82'], 'https': 'proxy4.com'}
r.proxies = p
print r.get('http://ya.ru')
print r.get('http://google.com')
print requests.get('http://ya.ru', proxies=p)
print r.get('https://www.google.ru')
print requests.get('https://www.google.ru')
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2351/reactions"
} | https://api.github.com/repos/psf/requests/issues/2351/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2351.diff",
"html_url": "https://github.com/psf/requests/pull/2351",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2351.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2351"
} | true | [
"I'm not sure I understand how this is supposed to work.\n",
"Currently, we are can use only one proxy for scheme, but some sites have limits on the number of requests from 1 IP (per second, minutes, etc)\nIf we make a spider for the site - we will have big problems (\nThis function allows you to immediately set ... |
https://api.github.com/repos/psf/requests/issues/2350 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2350/labels{/name} | https://api.github.com/repos/psf/requests/issues/2350/comments | https://api.github.com/repos/psf/requests/issues/2350/events | https://github.com/psf/requests/issues/2350 | 49,639,244 | MDU6SXNzdWU0OTYzOTI0NA== | 2,350 | JSONP support | {
"avatar_url": "https://avatars.githubusercontent.com/u/9846444?v=4",
"events_url": "https://api.github.com/users/gtlhc/events{/privacy}",
"followers_url": "https://api.github.com/users/gtlhc/followers",
"following_url": "https://api.github.com/users/gtlhc/following{/other_user}",
"gists_url": "https://api.github.com/users/gtlhc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gtlhc",
"id": 9846444,
"login": "gtlhc",
"node_id": "MDQ6VXNlcjk4NDY0NDQ=",
"organizations_url": "https://api.github.com/users/gtlhc/orgs",
"received_events_url": "https://api.github.com/users/gtlhc/received_events",
"repos_url": "https://api.github.com/users/gtlhc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gtlhc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gtlhc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gtlhc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-21T00:58:18Z | 2021-09-08T23:06:56Z | 2014-11-21T01:17:30Z | NONE | resolved | Add JSONP support for the Response:
code:
jp=r.content
qi=jp.index('(')
callback=jp[:qi]
data=jp[qi+1:-1]
return callback,data
usage:
r.jsonp.callback #string
r.jsonp.data #json
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2350/reactions"
} | https://api.github.com/repos/psf/requests/issues/2350/timeline | null | completed | null | null | false | [
"We're not accepting new features any longer unless there's an extremely compelling usecase. Thanks for the suggestion though! \n"
] |
https://api.github.com/repos/psf/requests/issues/2349 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2349/labels{/name} | https://api.github.com/repos/psf/requests/issues/2349/comments | https://api.github.com/repos/psf/requests/issues/2349/events | https://github.com/psf/requests/pull/2349 | 49,179,140 | MDExOlB1bGxSZXF1ZXN0MjQ1ODc5MDE= | 2,349 | Properly serialize RecentlyUsedContainers for cache | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "009800",
"default": false,
"description": null,
"id": 44501218,
"name": "Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTIxOA==",
"url": "https://api.github.com/repos/psf/requests/labels/Ready%20To%20Merge"
},
{
"color": "207de5",
"default": false,
"description... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 3 | 2014-11-18T04:18:55Z | 2021-09-08T09:01:12Z | 2014-11-30T19:12:43Z | CONTRIBUTOR | resolved | RecentlyUsedContainers are threadsafe so they require a lock and as such
cannot be serialized with pickle directly. To handle it, we need to
convert it to a dictionary first and then back when deserializing.
Fixes #2345
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2349/reactions"
} | https://api.github.com/repos/psf/requests/issues/2349/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2349.diff",
"html_url": "https://github.com/psf/requests/pull/2349",
"merged_at": "2014-11-30T19:12:43Z",
"patch_url": "https://github.com/psf/requests/pull/2349.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2349"
} | true | [
"looks good! any way to add a test exposing this issue?\n",
"> any way to add a test exposing this issue?\n\nBesides the test that failed in the first place? Jenkins isn't running for a reason only @kennethreitz can determine. Had @Lukasa or I been running the tests locally before approving PRs, it probably would... |
https://api.github.com/repos/psf/requests/issues/2348 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2348/labels{/name} | https://api.github.com/repos/psf/requests/issues/2348/comments | https://api.github.com/repos/psf/requests/issues/2348/events | https://github.com/psf/requests/pull/2348 | 49,072,887 | MDExOlB1bGxSZXF1ZXN0MjQ1MjY5NDc= | 2,348 | Docs: Add more section labels for referencing | {
"avatar_url": "https://avatars.githubusercontent.com/u/434495?v=4",
"events_url": "https://api.github.com/users/danmichaelo/events{/privacy}",
"followers_url": "https://api.github.com/users/danmichaelo/followers",
"following_url": "https://api.github.com/users/danmichaelo/following{/other_user}",
"gists_url": "https://api.github.com/users/danmichaelo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/danmichaelo",
"id": 434495,
"login": "danmichaelo",
"node_id": "MDQ6VXNlcjQzNDQ5NQ==",
"organizations_url": "https://api.github.com/users/danmichaelo/orgs",
"received_events_url": "https://api.github.com/users/danmichaelo/received_events",
"repos_url": "https://api.github.com/users/danmichaelo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/danmichaelo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/danmichaelo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/danmichaelo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-17T10:42:33Z | 2021-09-08T09:01:12Z | 2014-11-30T19:12:04Z | CONTRIBUTOR | resolved | so sections can be linked from other projects using Intersphinx
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2348/reactions"
} | https://api.github.com/repos/psf/requests/issues/2348/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2348.diff",
"html_url": "https://github.com/psf/requests/pull/2348",
"merged_at": "2014-11-30T19:12:04Z",
"patch_url": "https://github.com/psf/requests/pull/2348.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2348"
} | true | [
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/2347 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2347/labels{/name} | https://api.github.com/repos/psf/requests/issues/2347/comments | https://api.github.com/repos/psf/requests/issues/2347/events | https://github.com/psf/requests/issues/2347 | 49,035,544 | MDU6SXNzdWU0OTAzNTU0NA== | 2,347 | feature request: add a timeout to DNS lookups | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2014-11-17T04:24:41Z | 2021-09-08T23:06:58Z | 2014-11-17T05:45:05Z | CONTRIBUTOR | resolved | I don't think it's possible. But it would be nice.
Currently if:
1. you set your DNS resolvers to something that's not listening on port 53, eg 123.123.123.123
2. you try to make a request with a timeout
The request will use the system timeout, usually upwards of 2 minutes.
It would be nice to be able to attach a timeout to DNS lookups. Go attaches one for example by resolving DNS in a goroutine with a thread timeout.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/2347/reactions"
} | https://api.github.com/repos/psf/requests/issues/2347/timeline | null | completed | null | null | false | [
"in theory you could run the socket.connect() in a thread and time it out\n",
"Given that requests doesn't handle sockets itself, I think this is a feature you should be requesting in urllib3. Before you open an issue there, I wonder if @shazow would care to express their opinion here first.\n",
"I would love t... |
https://api.github.com/repos/psf/requests/issues/2346 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2346/labels{/name} | https://api.github.com/repos/psf/requests/issues/2346/comments | https://api.github.com/repos/psf/requests/issues/2346/events | https://github.com/psf/requests/issues/2346 | 49,033,987 | MDU6SXNzdWU0OTAzMzk4Nw== | 2,346 | Uploading Binary Files Without Reading Into RAM | {
"avatar_url": "https://avatars.githubusercontent.com/u/7476821?v=4",
"events_url": "https://api.github.com/users/tuntapovski/events{/privacy}",
"followers_url": "https://api.github.com/users/tuntapovski/followers",
"following_url": "https://api.github.com/users/tuntapovski/following{/other_user}",
"gists_url": "https://api.github.com/users/tuntapovski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tuntapovski",
"id": 7476821,
"login": "tuntapovski",
"node_id": "MDQ6VXNlcjc0NzY4MjE=",
"organizations_url": "https://api.github.com/users/tuntapovski/orgs",
"received_events_url": "https://api.github.com/users/tuntapovski/received_events",
"repos_url": "https://api.github.com/users/tuntapovski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tuntapovski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tuntapovski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tuntapovski",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-11-17T04:08:38Z | 2021-09-08T23:06:58Z | 2014-11-17T04:42:53Z | NONE | resolved | hi there.
i try to upload a file via this:
http://docs.python-requests.org/en/latest/user/advanced/#post-multiple-multipart-encoded-files
but it does seem to read it into ram first. because i get memory errors on my low ram vps.
it would be good if it would have worked like this:
http://docs.python-requests.org/en/latest/user/advanced/#streaming-uploads
my example code:
import requests
with open('example.rar', 'rb') as f:
r = requests.post('https://anonfiles.com/api/v1/upload', files={'file' : f})
print r.text
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2346/reactions"
} | https://api.github.com/repos/psf/requests/issues/2346/timeline | null | completed | null | null | false | [
"If you look at http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file you'll see that we mention this limitation and recommend [requests-toolbelt](/sigmavirus24/requests-toolbelt). There's documentation on that project and it should be simple to use. Any problems encountered while... |
https://api.github.com/repos/psf/requests/issues/2345 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2345/labels{/name} | https://api.github.com/repos/psf/requests/issues/2345/comments | https://api.github.com/repos/psf/requests/issues/2345/events | https://github.com/psf/requests/issues/2345 | 48,994,009 | MDU6SXNzdWU0ODk5NDAwOQ== | 2,345 | Using RecentlyUsedContainer for session cache breaks pickling | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] | closed | true | null | [] | null | 5 | 2014-11-16T15:52:15Z | 2021-09-08T23:06:55Z | 2014-11-30T19:12:43Z | CONTRIBUTOR | resolved | The changes in 387c8f8 have broken the ability to pickle a Session object.
Possible solutions:
- Re-implement `RecentlyUsedContainer` to not use threading locks
- Do not attempt to pickle the session redirect cache (personally, I prefer this one)
Reasons this wasn't caught earlier:
- Jenkins has magically stopped working
- No one has been running the suite locally before merging/approving changes
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2345/reactions"
} | https://api.github.com/repos/psf/requests/issues/2345/timeline | null | completed | null | null | false | [
"Note to @kennethreitz, we **can not** do a release until we fix this.\n",
"So we can't just remove `redirect_cache` from the list of `__attrs__`, it breaks the tests. So ... I'm thinking we have to special case how we serialize a `RecentlyUsedContainer`. We can call `dict` on the cache, but to repopulate it, we ... |
https://api.github.com/repos/psf/requests/issues/2344 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2344/labels{/name} | https://api.github.com/repos/psf/requests/issues/2344/comments | https://api.github.com/repos/psf/requests/issues/2344/events | https://github.com/psf/requests/pull/2344 | 48,938,522 | MDExOlB1bGxSZXF1ZXN0MjQ0OTY0MzQ= | 2,344 | Partially addresses Issue #1572 | {
"avatar_url": "https://avatars.githubusercontent.com/u/7707694?v=4",
"events_url": "https://api.github.com/users/ContinuousFunction/events{/privacy}",
"followers_url": "https://api.github.com/users/ContinuousFunction/followers",
"following_url": "https://api.github.com/users/ContinuousFunction/following{/other_user}",
"gists_url": "https://api.github.com/users/ContinuousFunction/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ContinuousFunction",
"id": 7707694,
"login": "ContinuousFunction",
"node_id": "MDQ6VXNlcjc3MDc2OTQ=",
"organizations_url": "https://api.github.com/users/ContinuousFunction/orgs",
"received_events_url": "https://api.github.com/users/ContinuousFunction/received_events",
"repos_url": "https://api.github.com/users/ContinuousFunction/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ContinuousFunction/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ContinuousFunction/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ContinuousFunction",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2014-11-16T00:59:29Z | 2021-09-08T09:01:07Z | 2014-12-17T04:49:50Z | CONTRIBUTOR | resolved | Addresses the LocationParseError but not the DecodeError from kennethreitz#1572. When running
test_requests.py, I got an error in test_session_pickling which resulted in a TypeError. I'm not sure of the reason for the TypeError but I have commented out that test.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2344/reactions"
} | https://api.github.com/repos/psf/requests/issues/2344/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2344.diff",
"html_url": "https://github.com/psf/requests/pull/2344",
"merged_at": "2014-12-17T04:49:50Z",
"patch_url": "https://github.com/psf/requests/pull/2344.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2344"
} | true | [
"Why have we commented out a test here?\n",
"@Lukasa it's a test failure on master apparently. Besides that, I'm -1 on this. A `LocationParseError` happens long before a connection is even attempted. This should be an `InvalidURL` error\n",
"Also the test failure was introduced sometime since 122c92e59002cad20c... |
https://api.github.com/repos/psf/requests/issues/2343 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2343/labels{/name} | https://api.github.com/repos/psf/requests/issues/2343/comments | https://api.github.com/repos/psf/requests/issues/2343/events | https://github.com/psf/requests/pull/2343 | 48,936,444 | MDExOlB1bGxSZXF1ZXN0MjQ0OTU1MDU= | 2,343 | Partially addresses Issue #1572 | {
"avatar_url": "https://avatars.githubusercontent.com/u/7707694?v=4",
"events_url": "https://api.github.com/users/ContinuousFunction/events{/privacy}",
"followers_url": "https://api.github.com/users/ContinuousFunction/followers",
"following_url": "https://api.github.com/users/ContinuousFunction/following{/other_user}",
"gists_url": "https://api.github.com/users/ContinuousFunction/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ContinuousFunction",
"id": 7707694,
"login": "ContinuousFunction",
"node_id": "MDQ6VXNlcjc3MDc2OTQ=",
"organizations_url": "https://api.github.com/users/ContinuousFunction/orgs",
"received_events_url": "https://api.github.com/users/ContinuousFunction/received_events",
"repos_url": "https://api.github.com/users/ContinuousFunction/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ContinuousFunction/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ContinuousFunction/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ContinuousFunction",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-15T23:23:58Z | 2021-09-08T09:01:14Z | 2014-11-15T23:56:42Z | CONTRIBUTOR | resolved | Addresses the LocationParseError but not the DecodeError from kennethreitz#1572. When running
test_requests.py, I got an error in test_session_pickling which resulted in a TypeError. I'm not sure of the reason for the TypeError but I have commented out that test.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/7707694?v=4",
"events_url": "https://api.github.com/users/ContinuousFunction/events{/privacy}",
"followers_url": "https://api.github.com/users/ContinuousFunction/followers",
"following_url": "https://api.github.com/users/ContinuousFunction/following{/other_user}",
"gists_url": "https://api.github.com/users/ContinuousFunction/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ContinuousFunction",
"id": 7707694,
"login": "ContinuousFunction",
"node_id": "MDQ6VXNlcjc3MDc2OTQ=",
"organizations_url": "https://api.github.com/users/ContinuousFunction/orgs",
"received_events_url": "https://api.github.com/users/ContinuousFunction/received_events",
"repos_url": "https://api.github.com/users/ContinuousFunction/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ContinuousFunction/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ContinuousFunction/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ContinuousFunction",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2343/reactions"
} | https://api.github.com/repos/psf/requests/issues/2343/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2343.diff",
"html_url": "https://github.com/psf/requests/pull/2343",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2343.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2343"
} | true | [
"My branch is 96 commits ahead and 142 commits behind. Will close until I figure out the problem.\n"
] |
https://api.github.com/repos/psf/requests/issues/2342 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2342/labels{/name} | https://api.github.com/repos/psf/requests/issues/2342/comments | https://api.github.com/repos/psf/requests/issues/2342/events | https://github.com/psf/requests/issues/2342 | 48,837,799 | MDU6SXNzdWU0ODgzNzc5OQ== | 2,342 | chardet ImportError: cannot import name universaldetector | {
"avatar_url": "https://avatars.githubusercontent.com/u/9618138?v=4",
"events_url": "https://api.github.com/users/ivankoster/events{/privacy}",
"followers_url": "https://api.github.com/users/ivankoster/followers",
"following_url": "https://api.github.com/users/ivankoster/following{/other_user}",
"gists_url": "https://api.github.com/users/ivankoster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ivankoster",
"id": 9618138,
"login": "ivankoster",
"node_id": "MDQ6VXNlcjk2MTgxMzg=",
"organizations_url": "https://api.github.com/users/ivankoster/orgs",
"received_events_url": "https://api.github.com/users/ivankoster/received_events",
"repos_url": "https://api.github.com/users/ivankoster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ivankoster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ivankoster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ivankoster",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-11-14T20:46:58Z | 2021-09-08T23:06:59Z | 2014-11-14T21:28:32Z | NONE | resolved | Hello,
When I try to retrieve the text attribute from a request, i get the following error:
Traceback (most recent call last):
File ".\sublime_plugin.py", line 175, in on_load
File ".\sublime_plugin.py", line 154, in run_timed_function
File ".\sublime_plugin.py", line 174, in <lambda>
File ".\SublimeYouCompleteMe.py", line 244, in on_load
File ".\plugin\ycmd_request.py", line 136, in send
File ".\plugin\ycmd_request.py", line 43, in post_data_to_handler
File ".\plugin\ycmd_request.py", line 109, in json_from_response
File ".\requests\models.py", line 756, in text
encoding = self.apparent_encoding
File ".\requests\models.py", line 637, in apparent_encoding
return chardet.detect(self.content)['encoding']
File ".\requests\packages\chardet\detect.py", line 11, in detect
ImportError: cannot import name universaldetector
On python 2.7.8
I think this is an error in chardet's detect function in **init**.py, which does an import on function level instead of module level.
The import is "from . import universaldetector" and since it is called from requests/models.py it searches in the requests folder for universaldetector, which obviously fails.
I confirmed this by changing the line to "from packages.chardet import universaldetector" which hilariously solves the problem.
But I wonder if this bug is down to my specific configuration, because it seems like a bug that would affect a lot of people?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/9618138?v=4",
"events_url": "https://api.github.com/users/ivankoster/events{/privacy}",
"followers_url": "https://api.github.com/users/ivankoster/followers",
"following_url": "https://api.github.com/users/ivankoster/following{/other_user}",
"gists_url": "https://api.github.com/users/ivankoster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ivankoster",
"id": 9618138,
"login": "ivankoster",
"node_id": "MDQ6VXNlcjk2MTgxMzg=",
"organizations_url": "https://api.github.com/users/ivankoster/orgs",
"received_events_url": "https://api.github.com/users/ivankoster/received_events",
"repos_url": "https://api.github.com/users/ivankoster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ivankoster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ivankoster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ivankoster",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2342/reactions"
} | https://api.github.com/repos/psf/requests/issues/2342/timeline | null | completed | null | null | false | [
"This is simply because you're using requests inside a sublime package and sublime has it's own weird Python that it ships with (if I remember correctly).\n",
"Ah thanks for the insight.\nI expected something like that, because it would affect too many people otherwise.\nI do know the encoding beforehand so I've ... |
https://api.github.com/repos/psf/requests/issues/2341 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2341/labels{/name} | https://api.github.com/repos/psf/requests/issues/2341/comments | https://api.github.com/repos/psf/requests/issues/2341/events | https://github.com/psf/requests/issues/2341 | 48,812,889 | MDU6SXNzdWU0ODgxMjg4OQ== | 2,341 | "keep-alive" over a HTTP/1.0 request issue | {
"avatar_url": "https://avatars.githubusercontent.com/u/642052?v=4",
"events_url": "https://api.github.com/users/laurento/events{/privacy}",
"followers_url": "https://api.github.com/users/laurento/followers",
"following_url": "https://api.github.com/users/laurento/following{/other_user}",
"gists_url": "https://api.github.com/users/laurento/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/laurento",
"id": 642052,
"login": "laurento",
"node_id": "MDQ6VXNlcjY0MjA1Mg==",
"organizations_url": "https://api.github.com/users/laurento/orgs",
"received_events_url": "https://api.github.com/users/laurento/received_events",
"repos_url": "https://api.github.com/users/laurento/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/laurento/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/laurento/subscriptions",
"type": "User",
"url": "https://api.github.com/users/laurento",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-14T17:00:38Z | 2021-09-08T23:06:58Z | 2014-11-15T14:27:36Z | NONE | resolved | Debugging a nasty "300: Bad request" error I noticed an invalid behaviour when requests-2.4 is used in combination with HTTP/1.0.
Tring to reproduce the issue this is what I found...
``` python
import httplib
import requests
# Workaround for the IncompleteRead issue.
# See http://bugs.python.org/issue14044
httplib.HTTPConnection._http_vsn = 10
httplib.HTTPConnection._http_vsn_str = 'HTTP/1.0'
r = requests.get('https://www.google.com')
r.request.headers
```
On requests-2.4.3 (from PyPi) the request headers are
``` python
{'Connection': 'keep-alive',
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'User-Agent': 'python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-24-generic'}
```
On requests-2.3.0 (Ubuntu 14.10 official repos) the request headers are (notice no keep-alive here)
``` python
{'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'User-Agent': 'python-requests/2.3.0 CPython/2.7.8 Linux/3.16.0-24-generic'}
```
Reading the documentation I guess HTTP/1.0 is not supported by the requests library but I'd like to suggest at least a nice WARN log message to inform the result can be weird.
Some setups don't seem to like the _invalid_ combination "keep-alive" in the headers and HTTP/1.0 and even if in most cases everything is working fine at least once I received a "300: Bad request" error.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2341/reactions"
} | https://api.github.com/repos/psf/requests/issues/2341/timeline | null | completed | null | null | false | [
"Sorry, this is a bit unclear to me. Are you explicitly setting the version string on all `HTTPConnection`s? You can override the `Connection: keep-alive` header, like so\n\n``` pycon\nPython 2.7.8 (default, Oct 19 2014, 16:03:53)\n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin\nType \"help\", \"c... |
https://api.github.com/repos/psf/requests/issues/2340 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2340/labels{/name} | https://api.github.com/repos/psf/requests/issues/2340/comments | https://api.github.com/repos/psf/requests/issues/2340/events | https://github.com/psf/requests/issues/2340 | 48,777,189 | MDU6SXNzdWU0ODc3NzE4OQ== | 2,340 | ImportError: cannot import name 'certs' | {
"avatar_url": "https://avatars.githubusercontent.com/u/7079544?v=4",
"events_url": "https://api.github.com/users/davyria/events{/privacy}",
"followers_url": "https://api.github.com/users/davyria/followers",
"following_url": "https://api.github.com/users/davyria/following{/other_user}",
"gists_url": "https://api.github.com/users/davyria/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davyria",
"id": 7079544,
"login": "davyria",
"node_id": "MDQ6VXNlcjcwNzk1NDQ=",
"organizations_url": "https://api.github.com/users/davyria/orgs",
"received_events_url": "https://api.github.com/users/davyria/received_events",
"repos_url": "https://api.github.com/users/davyria/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davyria/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davyria/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davyria",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2014-11-14T11:41:59Z | 2021-09-08T23:06:57Z | 2014-11-15T14:20:41Z | NONE | resolved | I'm having this error for the last 2 days. It seems a problem with python requests library, but I've re-installed it several times with no luck.
```
Traceback (most recent call last):
File "project-src/bla-blah/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "project-src\env\lib\site-packages\django\core\management\__init__.py", line 385, in execute_from_command_line
utility.execute()
File "project-src\env\lib\site-packages\django\core\management\__init__.py", line 354, in execute
django.setup()
File "project-src\env\lib\site-packages\django\__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "project-src\env\lib\site-packages\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "project-src\env\lib\site-packages\django\apps\config.py", line 112, in create
mod = import_module(mod_path)
File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "project-src\env\lib\site-packages\social\apps\django_app\__init__.py", line 14, in <module>
from social.apps.django_app.utils import load_strategy
File "project-src\env\lib\site-packages\social\apps\django_app\utils.py", line 12, in <module>
from social.backends.utils import get_backend
File "project-src\env\lib\site-packages\social\backends\utils.py", line 2, in <module>
from social.backends.base import BaseAuth
File "project-src\env\lib\site-packages\social\backends\base.py", line 1, in <module>
from requests import request, ConnectionError
File "project-src\env\lib\site-packages\requests\__init__.py", line 58, in <module>
from . import utils
File "project-src\env\lib\site-packages\requests\utils.py", line 24, in <module>
from . import certs
ImportError: cannot import name 'certs'
```
Maybe it's a problem with Windows 7 update from 2 days ago, because is the only thing that has changed in the last few days.
By the way, I'm using python 3.4 with virtualenv, PyCharm 3.4.1 IDE and Win7.
Inside **certs.py** there is the code that has the problem (last line):
```
try:
from certifi import where
except ImportError:
def where():
"""Return the preferred certificate bundle."""
# vendored bundle inside Requests
return os.path.join(os.path.dirname(__file__), 'cacert.pem')
```
Any ideas?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2340/reactions"
} | https://api.github.com/repos/psf/requests/issues/2340/timeline | null | completed | null | null | false | [
"As discussed on your [StackOverflow question](https://stackoverflow.com/questions/26928672/importerror-cannot-import-name-certs?noredirect=1#comment42433284_26928672), we concluded this is not a bug. Thanks @davyria \n",
"It happens to me exactly the same after installing the latest Windows update. It is the onl... |
https://api.github.com/repos/psf/requests/issues/2339 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2339/labels{/name} | https://api.github.com/repos/psf/requests/issues/2339/comments | https://api.github.com/repos/psf/requests/issues/2339/events | https://github.com/psf/requests/issues/2339 | 48,704,429 | MDU6SXNzdWU0ODcwNDQyOQ== | 2,339 | Create a response object from archived string or file HTTP responses. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1725327?v=4",
"events_url": "https://api.github.com/users/recrm/events{/privacy}",
"followers_url": "https://api.github.com/users/recrm/followers",
"following_url": "https://api.github.com/users/recrm/following{/other_user}",
"gists_url": "https://api.github.com/users/recrm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/recrm",
"id": 1725327,
"login": "recrm",
"node_id": "MDQ6VXNlcjE3MjUzMjc=",
"organizations_url": "https://api.github.com/users/recrm/orgs",
"received_events_url": "https://api.github.com/users/recrm/received_events",
"repos_url": "https://api.github.com/users/recrm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/recrm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/recrm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/recrm",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
}
] | closed | true | null | [] | null | 3 | 2014-11-13T22:56:56Z | 2021-09-08T23:06:59Z | 2014-11-14T14:20:49Z | NONE | resolved | So I'm working with warc files. Warc files are a storage medium for saving and archiving websites, so they contain plenty (possibly thousands) of text HTTP request / response pairs. I need a way to parse these responses into usable objects.
Extracting the text of the HTTP response from the warc file is easy enough, but I can't find a decent python library that will convert that response text into a response object. About the best I can find is this:
http://stackoverflow.com/questions/24728088/python-parse-http-response-string
which requires me to set up fake server connections using a really ugly library. As a work around it kinda works, but it would be nice to work with something a bit more human.
In my field the internet archive is growing in importance and I can see this issue coming up for more people than just me. It would be a nice feature to have.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2339/reactions"
} | https://api.github.com/repos/psf/requests/issues/2339/timeline | null | completed | null | null | false | [
"This feature really belongs in another library altogether. The problem is that the HTTP parsing logic in requests is in `httplib`, which is well down our stack and outside our control. This means we can't pull it out into common code.\n\n_However_, @dstufft has been working on a formal HTTP parsing library which m... |
https://api.github.com/repos/psf/requests/issues/2338 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2338/labels{/name} | https://api.github.com/repos/psf/requests/issues/2338/comments | https://api.github.com/repos/psf/requests/issues/2338/events | https://github.com/psf/requests/issues/2338 | 48,663,828 | MDU6SXNzdWU0ODY2MzgyOA== | 2,338 | Proxy not working | {
"avatar_url": "https://avatars.githubusercontent.com/u/9723897?v=4",
"events_url": "https://api.github.com/users/dmorri/events{/privacy}",
"followers_url": "https://api.github.com/users/dmorri/followers",
"following_url": "https://api.github.com/users/dmorri/following{/other_user}",
"gists_url": "https://api.github.com/users/dmorri/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dmorri",
"id": 9723897,
"login": "dmorri",
"node_id": "MDQ6VXNlcjk3MjM4OTc=",
"organizations_url": "https://api.github.com/users/dmorri/orgs",
"received_events_url": "https://api.github.com/users/dmorri/received_events",
"repos_url": "https://api.github.com/users/dmorri/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dmorri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dmorri/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dmorri",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 45 | 2014-11-13T17:13:41Z | 2021-09-05T00:06:57Z | 2014-11-17T08:48:58Z | NONE | resolved | This code will work on my personal laptop, but then when I move to a windows server where we have to use a proxy to access the outside world, I get a 407 error. I added the proxies to this (just like I have setup in my Internet explorer settings that work). Any ideas?
import requests
proxies = {
"http": "10.51.1.140:8080",
"https": "10.51.1.140:8080",
}
r = requests.get('https://epfws.usps.gov/ws/resources/epf/version', proxies=proxies)
print(r.text)
Here is what I get:
G:\Python34>python uspsver.py
Traceback (most recent call last):
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connectionpool.py", line 511, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connectionpool.py", line 231, in _get_conn
return conn or self._new_conn()
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connectionpool.py", line 712, in _new_conn
return self._prepare_conn(conn)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connectionpool.py", line 685, in _prepare_conn
conn.connect()
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connection.py", line 208, in connect
self._tunnel()
File "G:\Python34\lib\http\client.py", line 822, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\adapters
.py", line 364, in send
timeout=timeout
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\connectionpool.py", line 559, in urlopen
_pool=self, _stacktrace=stacktrace)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\packages
\urllib3\util\retry.py", line 265, in increment
raise MaxRetryError(_pool, url, error)
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ep
fws.usps.gov', port=443): Max retries exceeded with url: /ws/resources/epf/versi
on (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection
failed: 407 Proxy Authentication Required',)))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "uspsver.py", line 5, in <module>
r = requests.get('https://epfws.usps.gov/ws/resources/epf/version', proxies=
proxies)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\api.py",
line 65, in get
return request('get', url, *_kwargs)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\api.py",
line 49, in request
response = session.request(method=method, url=url, *_kwargs)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\sessions
.py", line 459, in request
resp = self.send(prep, *_send_kwargs)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\sessions
.py", line 571, in send
r = adapter.send(request, *_kwargs)
File "G:\Python34\lib\site-packages\requests-2.4.3-py3.4.egg\requests\adapters
.py", line 415, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='epfws.usps.gov',
port=443): Max retries exceeded with url: /ws/resources/epf/version (Caused by P
roxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Pro
xy Authentication Required',)))
G:\Python34>
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2338/reactions"
} | https://api.github.com/repos/psf/requests/issues/2338/timeline | null | completed | null | null | false | [
"The error here is extremely clear: _407 Proxy Authentication Required_.\n\nYou need to send some user credentials to the proxy. The real risk here is that the proxy is a Windows domain auth proxy, in which case this will be extremely difficult.\n",
"Yep. Clear. But here is the deal. I do NOT have to send in any ... |
https://api.github.com/repos/psf/requests/issues/2337 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2337/labels{/name} | https://api.github.com/repos/psf/requests/issues/2337/comments | https://api.github.com/repos/psf/requests/issues/2337/events | https://github.com/psf/requests/issues/2337 | 48,650,926 | MDU6SXNzdWU0ODY1MDkyNg== | 2,337 | [MISTAKE] POST requests are executed like GET | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-11-13T15:44:01Z | 2021-09-08T23:06:52Z | 2014-11-13T18:51:18Z | NONE | resolved | Hi,
Seems like always POST requests are executed as GET. All examples that I found seems to match my way of using `requests.post()`, but still no POST request is executed.
My `requests` version is '2.2.1', my python version is `2.7.6`
Here is code snippet:
----------------------- Python code start ----------------------------
import requests
import json
url = 'http://api.website.com'
auth = ('user', 'pass')
headers = {'Content-Type' : 'application/json'}
proxies = {"http" : "http://address:port", "https" : "http:/address:port"}
data = json.dumps({'1' : 2, 'a' : 'b'})
response = requests.post(url=url, data=data, headers=headers, auth=auth, proxies=proxies)
print response.headers
print response.text
----------------------- Python code end ----------------------------
I hope it is not implementation issue.
Thanks
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2337/reactions"
} | https://api.github.com/repos/psf/requests/issues/2337/timeline | null | completed | null | null | false | [
"What does 'executed as a GET' mean?\n\nA POST request is signaled by sending a request line that looks like this:\n\n```\nPOST / HTTP/1.1\n```\n\nWe're definitely doing that correctly. You're going to have to be more specific about what you think is wrong.\n",
"I suspect you're being redirected. Try passing `all... |
https://api.github.com/repos/psf/requests/issues/2336 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2336/labels{/name} | https://api.github.com/repos/psf/requests/issues/2336/comments | https://api.github.com/repos/psf/requests/issues/2336/events | https://github.com/psf/requests/issues/2336 | 48,629,128 | MDU6SXNzdWU0ODYyOTEyOA== | 2,336 | Timeout for connecting to proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/716339?v=4",
"events_url": "https://api.github.com/users/glaslos/events{/privacy}",
"followers_url": "https://api.github.com/users/glaslos/followers",
"following_url": "https://api.github.com/users/glaslos/following{/other_user}",
"gists_url": "https://api.github.com/users/glaslos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/glaslos",
"id": 716339,
"login": "glaslos",
"node_id": "MDQ6VXNlcjcxNjMzOQ==",
"organizations_url": "https://api.github.com/users/glaslos/orgs",
"received_events_url": "https://api.github.com/users/glaslos/received_events",
"repos_url": "https://api.github.com/users/glaslos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/glaslos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/glaslos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/glaslos",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] | closed | true | null | [] | null | 38 | 2014-11-13T12:10:06Z | 2021-09-08T17:05:23Z | 2015-03-02T09:49:24Z | NONE | resolved | I provided a bogus proxy, set a very short timeout and expected requests to fail very fast. Unfortunately the opposite happened. Is this behavior intentional? As far as I can tell there is no way to set a timeout for the proxy connection.
``` Python
time python -c "import requests; print requests.__version__; requests.get('https://google.com', timeout=0.01, proxies={'https':'https://1.1.1.1'})"
2.4.3
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 49, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 413, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', error(110, 'Connection timed out')))
real 2m7.350s
user 0m0.090s
sys 0m0.030s
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/716339?v=4",
"events_url": "https://api.github.com/users/glaslos/events{/privacy}",
"followers_url": "https://api.github.com/users/glaslos/followers",
"following_url": "https://api.github.com/users/glaslos/following{/other_user}",
"gists_url": "https://api.github.com/users/glaslos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/glaslos",
"id": 716339,
"login": "glaslos",
"node_id": "MDQ6VXNlcjcxNjMzOQ==",
"organizations_url": "https://api.github.com/users/glaslos/orgs",
"received_events_url": "https://api.github.com/users/glaslos/received_events",
"repos_url": "https://api.github.com/users/glaslos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/glaslos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/glaslos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/glaslos",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2336/reactions"
} | https://api.github.com/repos/psf/requests/issues/2336/timeline | null | completed | null | null | false | [
"That's an interesting question. @kevinburke, got any idea?\n",
"A guess without looking at anything is that the ProxyManager doesn't apply the timeout to connections to the proxy.\n",
"Will take a look when I get an computer\n\nOn Thursday, November 13, 2014, Ian Cordasco notifications@github.com\nwrote:\n\n> ... |
https://api.github.com/repos/psf/requests/issues/2335 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2335/labels{/name} | https://api.github.com/repos/psf/requests/issues/2335/comments | https://api.github.com/repos/psf/requests/issues/2335/events | https://github.com/psf/requests/issues/2335 | 48,597,173 | MDU6SXNzdWU0ODU5NzE3Mw== | 2,335 | Cannot install anything depending on requests using pip 1.1 / Python 3.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/140276?v=4",
"events_url": "https://api.github.com/users/koterpillar/events{/privacy}",
"followers_url": "https://api.github.com/users/koterpillar/followers",
"following_url": "https://api.github.com/users/koterpillar/following{/other_user}",
"gists_url": "https://api.github.com/users/koterpillar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koterpillar",
"id": 140276,
"login": "koterpillar",
"node_id": "MDQ6VXNlcjE0MDI3Ng==",
"organizations_url": "https://api.github.com/users/koterpillar/orgs",
"received_events_url": "https://api.github.com/users/koterpillar/received_events",
"repos_url": "https://api.github.com/users/koterpillar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koterpillar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koterpillar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koterpillar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2014-11-13T04:34:34Z | 2021-09-08T23:07:00Z | 2014-11-13T14:42:22Z | NONE | resolved | Using stock Debian Wheezy configuration of Python 3.2 and pip 1.1, I can't install anything dependant on `requests`. For example, on a clean install:
```
# pip-3.2 install docker-py
...
Downloading/unpacking requests>=2.2.1 (from docker-py>=0.4.0->docker-forklift)
Downloading requests-2.4.3.tar.gz (438Kb): 438Kb downloaded
Running setup.py egg_info for package requests
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1014, in prepare_files
req_to_install.assert_source_matches_version()
File "/usr/lib/python3/dist-packages/pip/req.py", line 359, in assert_source_matches_version
version = self.installed_version
File "/usr/lib/python3/dist-packages/pip/req.py", line 351, in installed_version
return self.pkg_info()['version']
File "/usr/lib/python3/dist-packages/pip/req.py", line 318, in pkg_info
data = self.egg_info_data('PKG-INFO')
File "/usr/lib/python3/dist-packages/pip/req.py", line 261, in egg_info_data
data = fp.read()
File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6265: ordinal not in range(128)
```
The offending line is in `HISTORY.rst`: "Refactored settings loading from environment — new Session.merge_environment_settings."
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2335/reactions"
} | https://api.github.com/repos/psf/requests/issues/2335/timeline | null | completed | null | null | false | [
"Requests does not support Python 3.2, so I'm not really surprised by this.\n\nThat said, we can easily remove _this particular problem_. That makes no guarantees that requests works on Python 3.2, however, it's not part of our CI system and we don't test on the platform.\n",
"We do not support Python 3.2 but in ... |
https://api.github.com/repos/psf/requests/issues/2334 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2334/labels{/name} | https://api.github.com/repos/psf/requests/issues/2334/comments | https://api.github.com/repos/psf/requests/issues/2334/events | https://github.com/psf/requests/issues/2334 | 48,540,996 | MDU6SXNzdWU0ODU0MDk5Ng== | 2,334 | HTTPDigestAuth on session not thread-safe | {
"avatar_url": "https://avatars.githubusercontent.com/u/9700216?v=4",
"events_url": "https://api.github.com/users/achorrath/events{/privacy}",
"followers_url": "https://api.github.com/users/achorrath/followers",
"following_url": "https://api.github.com/users/achorrath/following{/other_user}",
"gists_url": "https://api.github.com/users/achorrath/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/achorrath",
"id": 9700216,
"login": "achorrath",
"node_id": "MDQ6VXNlcjk3MDAyMTY=",
"organizations_url": "https://api.github.com/users/achorrath/orgs",
"received_events_url": "https://api.github.com/users/achorrath/received_events",
"repos_url": "https://api.github.com/users/achorrath/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/achorrath/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/achorrath/subscriptions",
"type": "User",
"url": "https://api.github.com/users/achorrath",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2014-11-12T17:56:21Z | 2021-09-08T18:00:53Z | 2016-04-16T04:15:15Z | NONE | resolved | HTTPDigestAuth is not thread-safe when used on a session object. This script demonstrates the problem:
``` python
import Queue
import sys
import threading
import requests
s = requests.Session()
s.auth = requests.auth.HTTPDigestAuth('user', 'passwd')
def tprint(astr):
t = threading.current_thread().name
sys.stdout.write('%s: %s\n' % (t, astr))
def worker():
resp = s.get('http://httpbin.org/digest-auth/auth/user/passwd')
tprint(resp.status_code)
t1 = threading.Thread(target=worker)
t1.start()
t2 = threading.Thread(target=worker)
t2.start()
t1.join()
t2.join()
```
With debugging tprint()s added to auth.HTTPDigestAuth.handle_401(), the script generates output like this:
```
$ python threads_digest_1.py
Thread-1: handle_401: num_401_calls: 1
Thread-1: handle_401: s_auth: Digest qop=auth, nonce="929169e53bab111e1c06e7a5207fe63b", realm="me@kennethreitz.com", opaque="3e5078f698656ced77637bf72881e06b"
Thread-2: handle_401: num_401_calls: 2
Thread-2: handle_401: s_auth: Digest qop=auth, nonce="f9bf0aa7be1fb59e85cbe0000f67a56a", realm="me@kennethreitz.com", opaque="b0d6dee4bc0030c5bdefc2c76342479d"
Thread-2: 401
Thread-1: 200
$
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2334/reactions"
} | https://api.github.com/repos/psf/requests/issues/2334/timeline | null | completed | null | null | false | [
"Session's aren't threadsafe so I'm not sure I understand why this is suprising.\n",
"This is surprising because \"thread-safe\" is listed as one of the features of Requests, and there is nothing in the documentation to indicate that parts of it are not thread-safe.\n",
"+1 with achorrath, I faced this issue an... |
https://api.github.com/repos/psf/requests/issues/2333 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2333/labels{/name} | https://api.github.com/repos/psf/requests/issues/2333/comments | https://api.github.com/repos/psf/requests/issues/2333/events | https://github.com/psf/requests/pull/2333 | 48,523,557 | MDExOlB1bGxSZXF1ZXN0MjQzMDA1MDk= | 2,333 | Fix HTTPDigestAuth not to treat non-file as a file | {
"avatar_url": "https://avatars.githubusercontent.com/u/53781?v=4",
"events_url": "https://api.github.com/users/akitada/events{/privacy}",
"followers_url": "https://api.github.com/users/akitada/followers",
"following_url": "https://api.github.com/users/akitada/following{/other_user}",
"gists_url": "https://api.github.com/users/akitada/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akitada",
"id": 53781,
"login": "akitada",
"node_id": "MDQ6VXNlcjUzNzgx",
"organizations_url": "https://api.github.com/users/akitada/orgs",
"received_events_url": "https://api.github.com/users/akitada/received_events",
"repos_url": "https://api.github.com/users/akitada/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akitada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akitada/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akitada",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-12T15:35:12Z | 2021-09-08T09:01:17Z | 2014-11-12T15:53:32Z | CONTRIBUTOR | resolved | Ensure pos is set to None when the body is not a file
so that HTTPDigestAuth detects the type of the body correctly.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2333/reactions"
} | https://api.github.com/repos/psf/requests/issues/2333/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2333.diff",
"html_url": "https://github.com/psf/requests/pull/2333",
"merged_at": "2014-11-12T15:53:32Z",
"patch_url": "https://github.com/psf/requests/pull/2333.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2333"
} | true | [
":sparkles: :cake: :sparkles: Thanks @akitada !!!\n"
] |
https://api.github.com/repos/psf/requests/issues/2332 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2332/labels{/name} | https://api.github.com/repos/psf/requests/issues/2332/comments | https://api.github.com/repos/psf/requests/issues/2332/events | https://github.com/psf/requests/pull/2332 | 48,518,978 | MDExOlB1bGxSZXF1ZXN0MjQyOTc2MTg= | 2,332 | Add overriding Content-Length | {
"avatar_url": "https://avatars.githubusercontent.com/u/2456311?v=4",
"events_url": "https://api.github.com/users/asnelzin/events{/privacy}",
"followers_url": "https://api.github.com/users/asnelzin/followers",
"following_url": "https://api.github.com/users/asnelzin/following{/other_user}",
"gists_url": "https://api.github.com/users/asnelzin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asnelzin",
"id": 2456311,
"login": "asnelzin",
"node_id": "MDQ6VXNlcjI0NTYzMTE=",
"organizations_url": "https://api.github.com/users/asnelzin/orgs",
"received_events_url": "https://api.github.com/users/asnelzin/received_events",
"repos_url": "https://api.github.com/users/asnelzin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asnelzin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asnelzin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asnelzin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2014-11-12T14:58:25Z | 2021-09-08T09:01:17Z | 2014-11-12T17:34:48Z | CONTRIBUTOR | resolved | This is related to https://github.com/kennethreitz/requests/issues/2329
Just implemented @Lukasa's solution and added test.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2332/reactions"
} | https://api.github.com/repos/psf/requests/issues/2332/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2332.diff",
"html_url": "https://github.com/psf/requests/pull/2332",
"merged_at": "2014-11-12T17:34:48Z",
"patch_url": "https://github.com/psf/requests/pull/2332.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2332"
} | true | [
"LGTM. I'm happy to take this. :cake: Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/2331 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2331/labels{/name} | https://api.github.com/repos/psf/requests/issues/2331/comments | https://api.github.com/repos/psf/requests/issues/2331/events | https://github.com/psf/requests/issues/2331 | 48,497,928 | MDU6SXNzdWU0ODQ5NzkyOA== | 2,331 | 401 does not prevent ConnectionError: [Errno 104] Connection reset by peer | {
"avatar_url": "https://avatars.githubusercontent.com/u/6807917?v=4",
"events_url": "https://api.github.com/users/suonto/events{/privacy}",
"followers_url": "https://api.github.com/users/suonto/followers",
"following_url": "https://api.github.com/users/suonto/following{/other_user}",
"gists_url": "https://api.github.com/users/suonto/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/suonto",
"id": 6807917,
"login": "suonto",
"node_id": "MDQ6VXNlcjY4MDc5MTc=",
"organizations_url": "https://api.github.com/users/suonto/orgs",
"received_events_url": "https://api.github.com/users/suonto/received_events",
"repos_url": "https://api.github.com/users/suonto/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/suonto/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/suonto/subscriptions",
"type": "User",
"url": "https://api.github.com/users/suonto",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2014-11-12T11:02:05Z | 2021-09-08T23:07:02Z | 2014-11-12T14:35:41Z | NONE | resolved | The following code behaviour is not logical in a specific case:
response = requests.post(url, data=yielding_function())
If the server sends error in prepare, for example 401 before processing data, then in the client requests will raise:
ConnectionError [Errno 104] Connection reset by peer
In my opinion, the proper behaviour would be to not raise the exception, and return 401 and the body in the standard way. Of course only in the case that 401 is received before data is rejected.
I further tested this by adding 1 second delay before yielding any data, and even if the 401 comes back from the server before any data is sent, requests will still ignore it, send the data, and then raise ConnectionError: [Errno 104] Connection reset by peer because the data get's rejected.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2331/reactions"
} | https://api.github.com/repos/psf/requests/issues/2331/timeline | null | completed | null | null | false | [
"Thanks for raising this!\n\nUnfortunately, this bug lives a long way down the stack, in `httplib`. Specifically, `httplib` never checks the socket to see if there is any data to read before sending the body.\n\nWhat you've actually stumbled upon, however, is one of the trickiest parts of HTTP/1.1: how do we know w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.