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/428
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/428/labels{/name}
https://api.github.com/repos/psf/requests/issues/428/comments
https://api.github.com/repos/psf/requests/issues/428/events
https://github.com/psf/requests/pull/428
3,216,604
MDExOlB1bGxSZXF1ZXN0ODI1NTcy
428
Keep non RFC cookie key characters separate.
{ "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
1
2012-02-14T10:31:45Z
2021-09-08T14:00:57Z
2012-02-15T06:08:21Z
MEMBER
resolved
Discussion on commit Lukasa/requests@f72c13ffdad47ff684d102b6d9fb6122db899891 suggested it might be better to keep the characters that are disallowed in the RFC separate from those that are. This is mostly stylistic, so you can take it or leave 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/428/reactions" }
https://api.github.com/repos/psf/requests/issues/428/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/428.diff", "html_url": "https://github.com/psf/requests/pull/428", "merged_at": "2012-02-15T06:08:21Z", "patch_url": "https://github.com/psf/requests/pull/428.patch", "url": "https://api.github.com/repos/psf/requests/pulls/428" }
true
[ "Thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/427
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/427/labels{/name}
https://api.github.com/repos/psf/requests/issues/427/comments
https://api.github.com/repos/psf/requests/issues/427/events
https://github.com/psf/requests/issues/427
3,215,770
MDU6SXNzdWUzMjE1Nzcw
427
Installation of v0.10.1 on Windows 7 & Py2.5 fails - syntax error in utils.randombytes
{ "avatar_url": "https://avatars.githubusercontent.com/u/163996?v=4", "events_url": "https://api.github.com/users/jqb/events{/privacy}", "followers_url": "https://api.github.com/users/jqb/followers", "following_url": "https://api.github.com/users/jqb/following{/other_user}", "gists_url": "https://api.github.com/users/jqb/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jqb", "id": 163996, "login": "jqb", "node_id": "MDQ6VXNlcjE2Mzk5Ng==", "organizations_url": "https://api.github.com/users/jqb/orgs", "received_events_url": "https://api.github.com/users/jqb/received_events", "repos_url": "https://api.github.com/users/jqb/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jqb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jqb/subscriptions", "type": "User", "url": "https://api.github.com/users/jqb", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2012-02-14T09:17:56Z
2021-09-09T06:00:47Z
2012-08-24T10:28:35Z
NONE
resolved
ver 0.10.1 contains new implementation of `requests.utils.randombytes`. line https://github.com/kennethreitz/requests/blob/v0.10.1/requests/utils.py#L185 causes an error on Windows 7 with Python 2.5.4 Older versions 0.10.0 & 0.9.x works.
{ "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/427/reactions" }
https://api.github.com/repos/psf/requests/issues/427/timeline
null
completed
null
null
false
[ "Python 2.5 is no longer supported.\n", "Why is 2.5 no longer supported?\n", "I'd say because it's old, and prevents from using new stuff of 2.6+ versions.\n", "Yep, but still there's a lot of code that runs on Py2.5. Sad but true. I guess I'll need to use older version to run it on Py2.5. Should I close an issue?\n", "@kennethreitz Hm, I thought you would consider adding Python 2.5 support again.. at least that's what I understood when I asked you about it regarding requests adoption in pip. Mind elaborating?\n", "I have no intentions of supporting Python 2.5 at this time. If pip decided to move to requests, I would revisit that ;)\n", "@kennethreitz Not sure what more is needed than a pip developer saying that requests adoption requires 2.5. A public statement?\n", "Start adopting it and I'll start putting 2.5 back in. It'll take half an evening :)\n", "Work on the adoption is being done as we write these silly messages, I've ported most of the PEP381 changes to requests. I need to test it on Python 2.5 though :)\n", "Fantastic :) I'll start to add 2.5 back in soon then. \n", "I lied.\n", "Obviously.\n", ":cake:\n", "Should we move this discussion to a new issue? The name of this issue is totally misleading...\n", "@Lukasa Good idea +1\n" ]
https://api.github.com/repos/psf/requests/issues/426
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/426/labels{/name}
https://api.github.com/repos/psf/requests/issues/426/comments
https://api.github.com/repos/psf/requests/issues/426/events
https://github.com/psf/requests/pull/426
3,212,974
MDExOlB1bGxSZXF1ZXN0ODI0MzU5
426
URI encoding fixes
{ "avatar_url": "https://avatars.githubusercontent.com/u/228433?v=4", "events_url": "https://api.github.com/users/mgiuca/events{/privacy}", "followers_url": "https://api.github.com/users/mgiuca/followers", "following_url": "https://api.github.com/users/mgiuca/following{/other_user}", "gists_url": "https://api.github.com/users/mgiuca/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mgiuca", "id": 228433, "login": "mgiuca", "node_id": "MDQ6VXNlcjIyODQzMw==", "organizations_url": "https://api.github.com/users/mgiuca/orgs", "received_events_url": "https://api.github.com/users/mgiuca/received_events", "repos_url": "https://api.github.com/users/mgiuca/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mgiuca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mgiuca/subscriptions", "type": "User", "url": "https://api.github.com/users/mgiuca", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2012-02-14T02:16:51Z
2021-09-08T05:01:00Z
2012-02-14T09:49:09Z
CONTRIBUTOR
resolved
Fixes for Issue #369, as described in my [comment on that thread](https://github.com/kennethreitz/requests/issues/369#issuecomment-3953802).
{ "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/426/reactions" }
https://api.github.com/repos/psf/requests/issues/426/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/426.diff", "html_url": "https://github.com/psf/requests/pull/426", "merged_at": "2012-02-14T09:49:09Z", "patch_url": "https://github.com/psf/requests/pull/426.patch", "url": "https://api.github.com/repos/psf/requests/pulls/426" }
true
[ "Hey,\n\nCan someone please compare this with our hotfix to see which is the better method to use:\n\nhttps://github.com/kennethreitz/requests/issues/429\n\nThanks\n\nCal\n", "@kennethreitz Thanks for merging. I forgot to add my name to AUTHORS. Could you please do that (Matt Giuca)?\n@foxx I don't think we are talking about the same issue. I'll respond on the talk page for Issue #429.\n", "@mgiuca ah - i see what you mean, looks like it is a completely different issue, thanks!\n", "Hey say if I have a param like `{\"percentage\" : \"35%\"}`, how can I avoid requests to encode the percentage sign in my string? Thanks!\n", "@dorafmon Why would you want to avoid requests encoding the percentage sign? That URL is not valid: there's a trailing percentage sign in it that _must_ be encoded.\n\nHowever, if you really must have that, you should use the [prepared request flow](http://docs.python-requests.org/en/latest/user/advanced/#prepared-requests) and edit `prepped.url` to look the way you'd like it to.\n", "@Lukasa , because some website do have a percentage sign in their get parameters so I kind of need to avoid the percentage sign to be encoded.\n", "@dorafmon Unfortunately those websites are broken. There's no requirement for us to support that in the general API, so you'll need to use the prepared request flow as linked above.\n" ]
https://api.github.com/repos/psf/requests/issues/425
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/425/labels{/name}
https://api.github.com/repos/psf/requests/issues/425/comments
https://api.github.com/repos/psf/requests/issues/425/events
https://github.com/psf/requests/pull/425
3,211,833
MDExOlB1bGxSZXF1ZXN0ODIzODU1
425
Issue #335: Accept unusual keys in cookies.
{ "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
2
2012-02-14T00:13:29Z
2021-09-08T14:00:57Z
2012-02-14T00:14:39Z
MEMBER
resolved
Fixed a bug: RFC 2109 forbids certain characters, including colons and braces, from being in the key field of a cookie. Requests is compliant with RFC 2109, but many web frameworks are not. When requests receives such a key, a CookieError is raised and execution halts. This fix allows requests to accept and send such non-standards-compliant cookie keys.
{ "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/425/reactions" }
https://api.github.com/repos/psf/requests/issues/425/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/425.diff", "html_url": "https://github.com/psf/requests/pull/425", "merged_at": "2012-02-14T00:14:39Z", "patch_url": "https://github.com/psf/requests/pull/425.patch", "url": "https://api.github.com/repos/psf/requests/pulls/425" }
true
[ "Hah, the whole reason oreos exists is to add `[]_` to that list :)\n", "Thanks, this looks great.\n" ]
https://api.github.com/repos/psf/requests/issues/424
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/424/labels{/name}
https://api.github.com/repos/psf/requests/issues/424/comments
https://api.github.com/repos/psf/requests/issues/424/events
https://github.com/psf/requests/issues/424
3,209,519
MDU6SXNzdWUzMjA5NTE5
424
Unicode header dict values cause unhandled exception
{ "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" }
[ { "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
1
2012-02-13T21:27:39Z
2021-09-09T00:01:00Z
2012-07-27T06:00:53Z
NONE
resolved
Hey, The following problem happens when you use a unicode string for a header dict: ``` _headers = { 'test' : u'hello world' } requests.get('http://example.com', headers = _headers) File "/home/foxx/dev/iz/webapp/../webapp/libs/_requests/utils.py", line 152, in header_expand for i, (value, params) in enumerate(headers): ValueError: need more than 1 value to unpack ``` This is due to the following code: ``` def header_expand(headers): """Returns an HTTP Header value string from a dictionary. Example expansion:: {'text/x-dvi': {'q': '.8', 'mxb': '100000', 'mxt': '5.0'}, 'text/x-c': {}} # Accept: text/x-dvi; q=.8; mxb=100000; mxt=5.0, text/x-c (('text/x-dvi', {'q': '.8', 'mxb': '100000', 'mxt': '5.0'}), ('text/x-c', {})) # Accept: text/x-dvi; q=.8; mxb=100000; mxt=5.0, text/x-c """ collector = [] if isinstance(headers, dict): headers = list(headers.items()) elif isinstance(headers, str): return headers ``` We have hotfix'd this by doing: ``` elif isinstance(headers, str) or isinstance(headers, unicode): return headers ``` Hope this helps! Cal
{ "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/424/reactions" }
https://api.github.com/repos/psf/requests/issues/424/timeline
null
completed
null
null
false
[ "This is working for me in trunk:\n\n```\n[shivaram@good-fortune ~/workspace/requests]$ cat header_test.py \nimport requests\n\n_headers = {\n 'test' : u'hello world'\n}\n\nr = requests.get('http://httpbin.org/headers', headers = _headers)\n\nprint r.content\n[shivaram@good-fortune ~/workspace/requests]$ python ./header_test.py \n{\n \"headers\": {\n \"Content-Length\": \"\", \n \"Accept-Encoding\": \"identity, deflate, compress, gzip\", \n \"Connection\": \"keep-alive\", \n \"Accept\": \"*/*\", \n \"User-Agent\": \"python-requests/0.12.0\", \n \"Host\": \"httpbin.org\", \n \"Test\": \"hello world\", \n \"Content-Type\": \"\"\n }\n}\n```\n\n@foxx check your use case, see if this is closeable?\n" ]
https://api.github.com/repos/psf/requests/issues/423
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/423/labels{/name}
https://api.github.com/repos/psf/requests/issues/423/comments
https://api.github.com/repos/psf/requests/issues/423/events
https://github.com/psf/requests/issues/423
3,195,794
MDU6SXNzdWUzMTk1Nzk0
423
Cast the request URL as a string before using it
{ "avatar_url": "https://avatars.githubusercontent.com/u/127497?v=4", "events_url": "https://api.github.com/users/fletom/events{/privacy}", "followers_url": "https://api.github.com/users/fletom/followers", "following_url": "https://api.github.com/users/fletom/following{/other_user}", "gists_url": "https://api.github.com/users/fletom/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fletom", "id": 127497, "login": "fletom", "node_id": "MDQ6VXNlcjEyNzQ5Nw==", "organizations_url": "https://api.github.com/users/fletom/orgs", "received_events_url": "https://api.github.com/users/fletom/received_events", "repos_url": "https://api.github.com/users/fletom/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fletom/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fletom/subscriptions", "type": "User", "url": "https://api.github.com/users/fletom", "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
5
2012-02-13T04:35:29Z
2021-09-09T06:00:54Z
2012-08-08T20:20:54Z
NONE
resolved
It would be great if requests would call `unicode()` on the URL parameter before using it, so that users can pass things masquerading as URL-strings, like an object from the excellent and extremely useful library [furl](https://github.com/gruns/furl). This would turn this code: ``` requests.get(furl('http://example.com/ ').set({'query': 'string'}).url) ``` Into this: ``` requests.get(furl('http://example.com/ ').set({'query': 'string'})) ``` Which currently raises `AttributeError: 'furl' object has no attribute 'find'`. Also, as a side note, it would be cool if you could use schema-less URLs and requests would default to http:// Edit: `unicode(furl_obj)` or `str(furl_obj)` is the same as `furl_obj.url`, by the way. That's what I mean when I say it's "masquerading" as a string.
{ "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/423/reactions" }
https://api.github.com/repos/psf/requests/issues/423/timeline
null
completed
null
null
false
[ "This would be fantastic. \n", "As far you know, is it as simple as wrapping the URL argument with `unicode()`?\n", "I think this would get hairy in python3 :)\n", "I do welcome this change.\n", "Resolved by #766.\n" ]
https://api.github.com/repos/psf/requests/issues/422
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/422/labels{/name}
https://api.github.com/repos/psf/requests/issues/422/comments
https://api.github.com/repos/psf/requests/issues/422/events
https://github.com/psf/requests/pull/422
3,190,572
MDExOlB1bGxSZXF1ZXN0ODE3MDUy
422
Issue #285
{ "avatar_url": "https://avatars.githubusercontent.com/u/1404241?v=4", "events_url": "https://api.github.com/users/kojit/events{/privacy}", "followers_url": "https://api.github.com/users/kojit/followers", "following_url": "https://api.github.com/users/kojit/following{/other_user}", "gists_url": "https://api.github.com/users/kojit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kojit", "id": 1404241, "login": "kojit", "node_id": "MDQ6VXNlcjE0MDQyNDE=", "organizations_url": "https://api.github.com/users/kojit/orgs", "received_events_url": "https://api.github.com/users/kojit/received_events", "repos_url": "https://api.github.com/users/kojit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kojit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kojit/subscriptions", "type": "User", "url": "https://api.github.com/users/kojit", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-02-12T12:43:50Z
2021-09-08T23:00:59Z
2012-02-20T17:35:04Z
NONE
resolved
fixed a bug: Requests doesn't allow multiple values for a single key if the request is with files. This fix is not elegant though...
{ "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/422/reactions" }
https://api.github.com/repos/psf/requests/issues/422/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/422.diff", "html_url": "https://github.com/psf/requests/pull/422", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/422.patch", "url": "https://api.github.com/repos/psf/requests/pulls/422" }
true
[ "This fix belongs in [urllib3](https://github.com/shazow/urllib3). I hope you submit it there.\n" ]
https://api.github.com/repos/psf/requests/issues/421
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/421/labels{/name}
https://api.github.com/repos/psf/requests/issues/421/comments
https://api.github.com/repos/psf/requests/issues/421/events
https://github.com/psf/requests/issues/421
3,189,528
MDU6SXNzdWUzMTg5NTI4
421
unicode strings not allowed in headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/586800?v=4", "events_url": "https://api.github.com/users/pmdarrow/events{/privacy}", "followers_url": "https://api.github.com/users/pmdarrow/followers", "following_url": "https://api.github.com/users/pmdarrow/following{/other_user}", "gists_url": "https://api.github.com/users/pmdarrow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pmdarrow", "id": 586800, "login": "pmdarrow", "node_id": "MDQ6VXNlcjU4NjgwMA==", "organizations_url": "https://api.github.com/users/pmdarrow/orgs", "received_events_url": "https://api.github.com/users/pmdarrow/received_events", "repos_url": "https://api.github.com/users/pmdarrow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pmdarrow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pmdarrow/subscriptions", "type": "User", "url": "https://api.github.com/users/pmdarrow", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
5
2012-02-12T06:47:58Z
2021-09-09T10:00:37Z
2012-02-13T21:10:46Z
NONE
resolved
``` >>> import requests >>> requests.get('www.google.com', headers={'foo': u'bar'}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/api.py", line 51, in get return request('get', url, **kwargs) File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/api.py", line 39, in request return s.request(method=method, url=url, **kwargs) File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/sessions.py", line 159, in request headers[k] = header_expand(v) File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/utils.py", line 152, in header_expand for i, (value, params) in enumerate(headers): ValueError: need more than 1 value to unpack ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/586800?v=4", "events_url": "https://api.github.com/users/pmdarrow/events{/privacy}", "followers_url": "https://api.github.com/users/pmdarrow/followers", "following_url": "https://api.github.com/users/pmdarrow/following{/other_user}", "gists_url": "https://api.github.com/users/pmdarrow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pmdarrow", "id": 586800, "login": "pmdarrow", "node_id": "MDQ6VXNlcjU4NjgwMA==", "organizations_url": "https://api.github.com/users/pmdarrow/orgs", "received_events_url": "https://api.github.com/users/pmdarrow/received_events", "repos_url": "https://api.github.com/users/pmdarrow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pmdarrow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pmdarrow/subscriptions", "type": "User", "url": "https://api.github.com/users/pmdarrow", "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/421/reactions" }
https://api.github.com/repos/psf/requests/issues/421/timeline
null
completed
null
null
false
[ "We have a failing test for this right now. Working on it ;)\n", "Contributions welcome, of course :)\n", "I forked requests and was going to fix this but it appears that the latest checkout of the develop branch does not have this problem. I was using requests 0.10.1 from PyPI.\n", "Dupe of https://github.com/kennethreitz/requests/issues/400\n", "Edited :)\n" ]
https://api.github.com/repos/psf/requests/issues/420
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/420/labels{/name}
https://api.github.com/repos/psf/requests/issues/420/comments
https://api.github.com/repos/psf/requests/issues/420/events
https://github.com/psf/requests/issues/420
3,185,568
MDU6SXNzdWUzMTg1NTY4
420
request.get('www.httpbin.org') throws error
{ "avatar_url": "https://avatars.githubusercontent.com/u/311929?v=4", "events_url": "https://api.github.com/users/kracekumar/events{/privacy}", "followers_url": "https://api.github.com/users/kracekumar/followers", "following_url": "https://api.github.com/users/kracekumar/following{/other_user}", "gists_url": "https://api.github.com/users/kracekumar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kracekumar", "id": 311929, "login": "kracekumar", "node_id": "MDQ6VXNlcjMxMTkyOQ==", "organizations_url": "https://api.github.com/users/kracekumar/orgs", "received_events_url": "https://api.github.com/users/kracekumar/received_events", "repos_url": "https://api.github.com/users/kracekumar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kracekumar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kracekumar/subscriptions", "type": "User", "url": "https://api.github.com/users/kracekumar", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-02-11T16:10:15Z
2021-09-09T10:00:38Z
2012-02-12T00:12:29Z
CONTRIBUTOR
resolved
## In [2]: r = requests.get("www.httpbin.org") ValueError Traceback (most recent call last) /home/kracekumar/<ipython-input-2-4bfef4bceb42> in <module>() ----> 1 r = requests.get("www.httpbin.org") /usr/local/lib/python2.7/dist-packages/requests/api.pyc in get(url, *_kwargs) 78 79 kwargs.setdefault('allow_redirects', True) ---> 80 return request('get', url, *_kwargs) 81 82 /usr/local/lib/python2.7/dist-packages/requests/api.pyc in request(method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, return_response, prefetch, session, config) 65 return_response=return_response, 66 config=config, ---> 67 prefetch=prefetch 68 ) 69 /usr/local/lib/python2.7/dist-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, return_response, config, prefetch) 189 190 # Send the HTTP Request. --> 191 r.send(prefetch=prefetch) 192 193 # Send any cookies back up the to the session. /usr/local/lib/python2.7/dist-packages/requests/models.pyc in send(self, anyway, prefetch) 345 346 # Build the URL --> 347 url = self.full_url 348 349 # Logging /usr/local/lib/python2.7/dist-packages/requests/models.pyc in full_url(self) 288 289 if not scheme: --> 290 raise ValueError() 291 292 netloc = netloc.encode('idna') ValueError: This is kinda frustrating since `protocol` isn't menthioned underlying `urllib` is throwing error. So it would be awesome if `www.xyz.com` is converted to `http://www.xyz.com`.
{ "avatar_url": "https://avatars.githubusercontent.com/u/311929?v=4", "events_url": "https://api.github.com/users/kracekumar/events{/privacy}", "followers_url": "https://api.github.com/users/kracekumar/followers", "following_url": "https://api.github.com/users/kracekumar/following{/other_user}", "gists_url": "https://api.github.com/users/kracekumar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kracekumar", "id": 311929, "login": "kracekumar", "node_id": "MDQ6VXNlcjMxMTkyOQ==", "organizations_url": "https://api.github.com/users/kracekumar/orgs", "received_events_url": "https://api.github.com/users/kracekumar/received_events", "repos_url": "https://api.github.com/users/kracekumar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kracekumar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kracekumar/subscriptions", "type": "User", "url": "https://api.github.com/users/kracekumar", "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/420/reactions" }
https://api.github.com/repos/psf/requests/issues/420/timeline
null
completed
null
null
false
[ "That's not a valid URL.\n", "Browsers had made people to forget valid URL, everyone thinks www.xyz.com is valid. \n", "Developers don't.\n", "oops. Then I aint look one :(\n" ]
https://api.github.com/repos/psf/requests/issues/419
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/419/labels{/name}
https://api.github.com/repos/psf/requests/issues/419/comments
https://api.github.com/repos/psf/requests/issues/419/events
https://github.com/psf/requests/issues/419
3,184,400
MDU6SXNzdWUzMTg0NDAw
419
RequestException should subclass RuntimeError
{ "avatar_url": "https://avatars.githubusercontent.com/u/14172?v=4", "events_url": "https://api.github.com/users/timbertson/events{/privacy}", "followers_url": "https://api.github.com/users/timbertson/followers", "following_url": "https://api.github.com/users/timbertson/following{/other_user}", "gists_url": "https://api.github.com/users/timbertson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/timbertson", "id": 14172, "login": "timbertson", "node_id": "MDQ6VXNlcjE0MTcy", "organizations_url": "https://api.github.com/users/timbertson/orgs", "received_events_url": "https://api.github.com/users/timbertson/received_events", "repos_url": "https://api.github.com/users/timbertson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/timbertson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/timbertson/subscriptions", "type": "User", "url": "https://api.github.com/users/timbertson", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
2
2012-02-11T10:19:40Z
2021-09-09T02:11:39Z
2012-02-15T07:06:55Z
NONE
resolved
At the very least, it should subclass StandardError so that it can easily be caught without mentioning specifically or catching Exception (which is bad practice). All of its subclasses except for maybe URLRequired are clearly runtime errors, rather than coding errors. URLRequired should possibly subclass ValueError, although it may not be worth making it different to the other `RequestException`s
{ "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/419/reactions" }
https://api.github.com/repos/psf/requests/issues/419/timeline
null
completed
null
null
false
[ "Sounds good to me.\n", "Done!\n" ]
https://api.github.com/repos/psf/requests/issues/418
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/418/labels{/name}
https://api.github.com/repos/psf/requests/issues/418/comments
https://api.github.com/repos/psf/requests/issues/418/events
https://github.com/psf/requests/issues/418
3,153,244
MDU6SXNzdWUzMTUzMjQ0
418
get with HTTPDigestAuth is returning 401 in 12.1 [EDIT: more data, updated requests]]
{ "avatar_url": "https://avatars.githubusercontent.com/u/471587?v=4", "events_url": "https://api.github.com/users/telejester/events{/privacy}", "followers_url": "https://api.github.com/users/telejester/followers", "following_url": "https://api.github.com/users/telejester/following{/other_user}", "gists_url": "https://api.github.com/users/telejester/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/telejester", "id": 471587, "login": "telejester", "node_id": "MDQ6VXNlcjQ3MTU4Nw==", "organizations_url": "https://api.github.com/users/telejester/orgs", "received_events_url": "https://api.github.com/users/telejester/received_events", "repos_url": "https://api.github.com/users/telejester/repos", "site_admin": false, "starred_url": "https://api.github.com/users/telejester/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/telejester/subscriptions", "type": "User", "url": "https://api.github.com/users/telejester", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-02-09T06:57:50Z
2021-09-09T07:05:24Z
2012-07-27T06:03:05Z
NONE
resolved
Although I can get HTTPDigestAuth to work on some servers, I have a case where it doesn't seem to trap the 401 and apply the credentials. I should state for the record that this all works in the browser. The server should reply with a 301 to another page, but it doesn't seem to be getting that far. ``` $ python >>> import requests >>> from requests.auth import HTTPDigestAuth >>> r = requests.get("http://[server]", auth=('[user]','[pass]'), allow_redirects=True) >>> r <Response [401]> >>> r.headers r.headers ``` {'content-length': '349', 'content-encoding': 'gzip', 'date': 'Fri, 18 May 2012 21:29:32 GMT', 'content-type': 'text/html; charset=iso-8859-1', 'vary': 'Accept-Encoding', 'www-authenticate': 'Digest realm="[realm]", nonce="jniCP1bABAA=d312512776a608d2ebaa0d1a70af1b7a28b1c018", algorithm=MD5, domain="[server-realm]", qop="auth"', 'server': 'Apache/2.2.17 (Ubuntu)'} Those headers look to me as though requests is not trapping the 401, and is just returning the server's initial response. Is there a header missing that requests is looking for?
{ "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/418/reactions" }
https://api.github.com/repos/psf/requests/issues/418/timeline
null
completed
null
null
false
[ "Aha! Requests' 401 hook is grabbing the 301 the server is returning -- and clobbering it by treating it like another 401.\n\nWhen I send the request in such a way that no redirect is required, it works as advertised. \n\nVerbose logging makes it clear that the 301 is trapped and handled, but as the current code runs, the 401 handler never gets the chance to redo its hashes.\n\nThis seems like a bug to me.\n" ]
https://api.github.com/repos/psf/requests/issues/417
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/417/labels{/name}
https://api.github.com/repos/psf/requests/issues/417/comments
https://api.github.com/repos/psf/requests/issues/417/events
https://github.com/psf/requests/pull/417
3,151,631
MDExOlB1bGxSZXF1ZXN0ODAzMTg3
417
Zlib decompress fix
{ "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
false
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
7
2012-02-09T02:53:38Z
2014-07-02T14:30:56Z
2012-02-15T08:06:03Z
NONE
null
#336 fixed.
{ "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/417/reactions" }
https://api.github.com/repos/psf/requests/issues/417/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/417.diff", "html_url": "https://github.com/psf/requests/pull/417", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/417.patch", "url": "https://api.github.com/repos/psf/requests/pulls/417" }
true
[ "Can't this argument to `decompress` be somehow calculated before call?\n", "We shouldn't be relying on urllib3 for decompression right now, actually.\n", "The fact that we are is a bug.\n", "> We shouldn't be relying on urllib3 for decompression right now, actually.\n> The fact that we are is a bug.\n\n@kennethreitz I would agree. FWIW, I've come across some issues using requests (urllib3) with some gzipped responses.\n", "This is a new bug that was introduced temporarily to fix a bug with our decompression. I'll use urllib3's deflate functions, but from requests.\n", "@kennethreitz Any reasonable guesses as to when it might be squashed? Thanks very much.\n", "Fixed urllib3 bug. Decided to always use stream decoding.\n" ]
https://api.github.com/repos/psf/requests/issues/416
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/416/labels{/name}
https://api.github.com/repos/psf/requests/issues/416/comments
https://api.github.com/repos/psf/requests/issues/416/events
https://github.com/psf/requests/issues/416
3,134,790
MDU6SXNzdWUzMTM0Nzkw
416
Make requests.request data kwarg accept file-like objects
{ "avatar_url": "https://avatars.githubusercontent.com/u/75556?v=4", "events_url": "https://api.github.com/users/gtaylor/events{/privacy}", "followers_url": "https://api.github.com/users/gtaylor/followers", "following_url": "https://api.github.com/users/gtaylor/following{/other_user}", "gists_url": "https://api.github.com/users/gtaylor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gtaylor", "id": 75556, "login": "gtaylor", "node_id": "MDQ6VXNlcjc1NTU2", "organizations_url": "https://api.github.com/users/gtaylor/orgs", "received_events_url": "https://api.github.com/users/gtaylor/received_events", "repos_url": "https://api.github.com/users/gtaylor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gtaylor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gtaylor/subscriptions", "type": "User", "url": "https://api.github.com/users/gtaylor", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-02-08T01:45:00Z
2021-09-09T07:05:24Z
2012-07-27T06:03:11Z
NONE
resolved
It would be of great help to boto and others dealing with large files if requests.request's data kwarg accepted file-like objects, in addition to bytes and dicts. In the case of boto and S3, the max file upload size is 5GB. Many VMs and lesser machines don't have that much RAM, so this quickly grinds them to a halt. Being able to gradually read and upload would alleviate this issue.
{ "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/416/reactions" }
https://api.github.com/repos/psf/requests/issues/416/timeline
null
completed
null
null
false
[ "@garnaat mentioning you here so you're aware of this issue.\n", "why not use parameter `files`?\n\n`:param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.`\n", "Because we're not dealing with multi-part uploads, if I understand correctly.\n\nAlso, @kennethreitz mentioned wanting to add generator support at the same time, so the 'data' kwarg doesn't care what you feed it, as long as you give it something. Maybe it's a file, maybe it's a huge string, it probably shouldn't care.\n" ]
https://api.github.com/repos/psf/requests/issues/415
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/415/labels{/name}
https://api.github.com/repos/psf/requests/issues/415/comments
https://api.github.com/repos/psf/requests/issues/415/events
https://github.com/psf/requests/issues/415
3,126,823
MDU6SXNzdWUzMTI2ODIz
415
Tests fail for application/json content type
{ "avatar_url": "https://avatars.githubusercontent.com/u/404227?v=4", "events_url": "https://api.github.com/users/francescomari/events{/privacy}", "followers_url": "https://api.github.com/users/francescomari/followers", "following_url": "https://api.github.com/users/francescomari/following{/other_user}", "gists_url": "https://api.github.com/users/francescomari/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/francescomari", "id": 404227, "login": "francescomari", "node_id": "MDQ6VXNlcjQwNDIyNw==", "organizations_url": "https://api.github.com/users/francescomari/orgs", "received_events_url": "https://api.github.com/users/francescomari/received_events", "repos_url": "https://api.github.com/users/francescomari/repos", "site_admin": false, "starred_url": "https://api.github.com/users/francescomari/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/francescomari/subscriptions", "type": "User", "url": "https://api.github.com/users/francescomari", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-02-07T16:41:02Z
2021-09-09T10:00:39Z
2012-02-07T18:27:35Z
NONE
resolved
Almost every test case reads the property `response.text` to assert against response data. According to `Response.text()`, this property is `None` if it's not possible to detect the encoding of the content in the response. Should the tests use `response.content` instead?
{ "avatar_url": "https://avatars.githubusercontent.com/u/404227?v=4", "events_url": "https://api.github.com/users/francescomari/events{/privacy}", "followers_url": "https://api.github.com/users/francescomari/followers", "following_url": "https://api.github.com/users/francescomari/following{/other_user}", "gists_url": "https://api.github.com/users/francescomari/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/francescomari", "id": 404227, "login": "francescomari", "node_id": "MDQ6VXNlcjQwNDIyNw==", "organizations_url": "https://api.github.com/users/francescomari/orgs", "received_events_url": "https://api.github.com/users/francescomari/received_events", "repos_url": "https://api.github.com/users/francescomari/repos", "site_admin": false, "starred_url": "https://api.github.com/users/francescomari/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/francescomari/subscriptions", "type": "User", "url": "https://api.github.com/users/francescomari", "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/415/reactions" }
https://api.github.com/repos/psf/requests/issues/415/timeline
null
completed
null
null
false
[ "You don't have the dependency `chardet` installed then.\n", "Me so stupid. Closing the issue.\n" ]
https://api.github.com/repos/psf/requests/issues/414
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/414/labels{/name}
https://api.github.com/repos/psf/requests/issues/414/comments
https://api.github.com/repos/psf/requests/issues/414/events
https://github.com/psf/requests/issues/414
3,111,900
MDU6SXNzdWUzMTExOTAw
414
Redirect to unicode URL fails.
{ "avatar_url": "https://avatars.githubusercontent.com/u/95922?v=4", "events_url": "https://api.github.com/users/jvangael/events{/privacy}", "followers_url": "https://api.github.com/users/jvangael/followers", "following_url": "https://api.github.com/users/jvangael/following{/other_user}", "gists_url": "https://api.github.com/users/jvangael/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jvangael", "id": 95922, "login": "jvangael", "node_id": "MDQ6VXNlcjk1OTIy", "organizations_url": "https://api.github.com/users/jvangael/orgs", "received_events_url": "https://api.github.com/users/jvangael/received_events", "repos_url": "https://api.github.com/users/jvangael/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jvangael/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jvangael/subscriptions", "type": "User", "url": "https://api.github.com/users/jvangael", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
3
2012-02-06T18:07:27Z
2021-09-09T09:00:50Z
2012-02-15T06:14:44Z
NONE
resolved
When I use requests 0.10.1 to get a URL like the following http://www.amazon.co.uk/dp/B0002862UW with a special user agent so that amazon redirects to a URL with unicode in it, requests will fail with a TooManyRedirects exception. E.g. `r = requests.get(u'http://www.amazon.co.uk/dp/B0002862UW', headers={'User-Agent': 'Mozilla/5.0 (compatible; somebot)'})`
{ "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/414/reactions" }
https://api.github.com/repos/psf/requests/issues/414/timeline
null
completed
null
null
false
[ "Thanks for the report. I'll try to push out a fix in the next release.\n", "done!\n", "Thank you so much!\n\nOn Wednesday, 15 February 2012 at 06:14, Kenneth Reitz wrote:\n\n> done!\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/414#issuecomment-3975549\n" ]
https://api.github.com/repos/psf/requests/issues/413
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/413/labels{/name}
https://api.github.com/repos/psf/requests/issues/413/comments
https://api.github.com/repos/psf/requests/issues/413/events
https://github.com/psf/requests/pull/413
3,107,280
MDExOlB1bGxSZXF1ZXN0Nzg2NDI4
413
Typo fix in oreos/structures.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/367440?v=4", "events_url": "https://api.github.com/users/bancek/events{/privacy}", "followers_url": "https://api.github.com/users/bancek/followers", "following_url": "https://api.github.com/users/bancek/following{/other_user}", "gists_url": "https://api.github.com/users/bancek/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bancek", "id": 367440, "login": "bancek", "node_id": "MDQ6VXNlcjM2NzQ0MA==", "organizations_url": "https://api.github.com/users/bancek/orgs", "received_events_url": "https://api.github.com/users/bancek/received_events", "repos_url": "https://api.github.com/users/bancek/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bancek/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bancek/subscriptions", "type": "User", "url": "https://api.github.com/users/bancek", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-02-06T12:42:45Z
2021-09-08T14:00:56Z
2012-02-06T17:08:04Z
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/413/reactions" }
https://api.github.com/repos/psf/requests/issues/413/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/413.diff", "html_url": "https://github.com/psf/requests/pull/413", "merged_at": "2012-02-06T17:08:03Z", "patch_url": "https://github.com/psf/requests/pull/413.patch", "url": "https://api.github.com/repos/psf/requests/pulls/413" }
true
[ "Thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/412
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/412/labels{/name}
https://api.github.com/repos/psf/requests/issues/412/comments
https://api.github.com/repos/psf/requests/issues/412/events
https://github.com/psf/requests/pull/412
3,106,755
MDExOlB1bGxSZXF1ZXN0Nzg2MjM1
412
added use_2to3=True to setup.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1269088?v=4", "events_url": "https://api.github.com/users/doloopwhile/events{/privacy}", "followers_url": "https://api.github.com/users/doloopwhile/followers", "following_url": "https://api.github.com/users/doloopwhile/following{/other_user}", "gists_url": "https://api.github.com/users/doloopwhile/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/doloopwhile", "id": 1269088, "login": "doloopwhile", "node_id": "MDQ6VXNlcjEyNjkwODg=", "organizations_url": "https://api.github.com/users/doloopwhile/orgs", "received_events_url": "https://api.github.com/users/doloopwhile/received_events", "repos_url": "https://api.github.com/users/doloopwhile/repos", "site_admin": false, "starred_url": "https://api.github.com/users/doloopwhile/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/doloopwhile/subscriptions", "type": "User", "url": "https://api.github.com/users/doloopwhile", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-02-06T11:47:35Z
2021-09-08T14:00:56Z
2012-02-12T10:14:03Z
NONE
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/412/reactions" }
https://api.github.com/repos/psf/requests/issues/412/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/412.diff", "html_url": "https://github.com/psf/requests/pull/412", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/412.patch", "url": "https://api.github.com/repos/psf/requests/pulls/412" }
true
[ "Why did you do this?\n", "Sorry. I want to make the package 3.x compatible. use_2to3 is a keyword parameter added by Distribute. If use_2to3=True was set, setup script automatically apply 2to3 to package.\n\nBut, the code that I commit include a bug. Due to use_2to3=True, setup() in my commit will apply 2to3 even if python version is 2.x.\n\nI should do like the following:\n\nextras = {}\nif is_py3:\n required.append('chardet2')\n extras.update(use_2to3=True)\nelse:\n required.append('chardet>=1.0.0')\n packages.append('requests.packages.oreos')\n\nSo, Could you please reject my pull request ?\n\nregards.\n", "It already is python3 compatible. No need to use 2to3.\n", "The core of requests is 3.x compatible. But oreos and test_requests.py are not compatible.\nBecause of that, I misunderstood.\n" ]
https://api.github.com/repos/psf/requests/issues/411
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/411/labels{/name}
https://api.github.com/repos/psf/requests/issues/411/comments
https://api.github.com/repos/psf/requests/issues/411/events
https://github.com/psf/requests/issues/411
3,101,431
MDU6SXNzdWUzMTAxNDMx
411
Indicated version on python-requests.org higher than what's actually released
{ "avatar_url": "https://avatars.githubusercontent.com/u/78236?v=4", "events_url": "https://api.github.com/users/mineo/events{/privacy}", "followers_url": "https://api.github.com/users/mineo/followers", "following_url": "https://api.github.com/users/mineo/following{/other_user}", "gists_url": "https://api.github.com/users/mineo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mineo", "id": 78236, "login": "mineo", "node_id": "MDQ6VXNlcjc4MjM2", "organizations_url": "https://api.github.com/users/mineo/orgs", "received_events_url": "https://api.github.com/users/mineo/received_events", "repos_url": "https://api.github.com/users/mineo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mineo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mineo/subscriptions", "type": "User", "url": "https://api.github.com/users/mineo", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-02-05T20:28:26Z
2021-09-09T10:00:39Z
2012-02-05T20:58:23Z
NONE
resolved
[python-requests.org](http://docs.python-requests.org/en/latest/index.html) shows 0.10.2, but neither [PyPI](http://pypi.python.org/pypi/requests/) nor gits tags know about that release.
{ "avatar_url": "https://avatars.githubusercontent.com/u/78236?v=4", "events_url": "https://api.github.com/users/mineo/events{/privacy}", "followers_url": "https://api.github.com/users/mineo/followers", "following_url": "https://api.github.com/users/mineo/following{/other_user}", "gists_url": "https://api.github.com/users/mineo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mineo", "id": 78236, "login": "mineo", "node_id": "MDQ6VXNlcjc4MjM2", "organizations_url": "https://api.github.com/users/mineo/orgs", "received_events_url": "https://api.github.com/users/mineo/received_events", "repos_url": "https://api.github.com/users/mineo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mineo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mineo/subscriptions", "type": "User", "url": "https://api.github.com/users/mineo", "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/411/reactions" }
https://api.github.com/repos/psf/requests/issues/411/timeline
null
completed
null
null
false
[ "It's the development docs of the next release. \n", "But that means these docs are not for the version I get when following the installation instructions right next to the version number (well, at least not if I use pip or easy_install). That's not really elegant, is it?\n", "Usually the overlap is only for a few hours. I'm just stuck on a few bugs right now.\n\nIf there was anything that changed usage, it'd say (dev), and the default would be the latest release.\n", "Fair enough.\n", "I agree that it's not ideal.\n" ]
https://api.github.com/repos/psf/requests/issues/410
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/410/labels{/name}
https://api.github.com/repos/psf/requests/issues/410/comments
https://api.github.com/repos/psf/requests/issues/410/events
https://github.com/psf/requests/pull/410
3,097,386
MDExOlB1bGxSZXF1ZXN0NzgzNjE5
410
Fix SyntaxError on Python3 because "except Error, e" is not supported anymore
{ "avatar_url": "https://avatars.githubusercontent.com/u/212279?v=4", "events_url": "https://api.github.com/users/eriol/events{/privacy}", "followers_url": "https://api.github.com/users/eriol/followers", "following_url": "https://api.github.com/users/eriol/following{/other_user}", "gists_url": "https://api.github.com/users/eriol/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eriol", "id": 212279, "login": "eriol", "node_id": "MDQ6VXNlcjIxMjI3OQ==", "organizations_url": "https://api.github.com/users/eriol/orgs", "received_events_url": "https://api.github.com/users/eriol/received_events", "repos_url": "https://api.github.com/users/eriol/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eriol/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eriol/subscriptions", "type": "User", "url": "https://api.github.com/users/eriol", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-02-05T03:27:08Z
2021-09-08T14:00:55Z
2012-02-12T10:16:48Z
CONTRIBUTOR
resolved
Since requests 0.10.1 dropped Python5 support, to catch an exception and store the exception object in a variable the "as" keyword can be used so Python3 will not raise a SyntaxError. Kind regards, Daniele Tricoli
{ "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/410/reactions" }
https://api.github.com/repos/psf/requests/issues/410/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/410.diff", "html_url": "https://github.com/psf/requests/pull/410", "merged_at": "2012-02-12T10:16:48Z", "patch_url": "https://github.com/psf/requests/pull/410.patch", "url": "https://api.github.com/repos/psf/requests/pulls/410" }
true
[ "s/Python5/Python2.5/ of course!\n\nCheers,\nDaniele Tricoli\n", "Oreos isn't imported or included in python 3. I'll merge anyway though :)\n" ]
https://api.github.com/repos/psf/requests/issues/409
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/409/labels{/name}
https://api.github.com/repos/psf/requests/issues/409/comments
https://api.github.com/repos/psf/requests/issues/409/events
https://github.com/psf/requests/pull/409
3,097,302
MDExOlB1bGxSZXF1ZXN0NzgzNTg5
409
Correct header enumeration with unicode instances
{ "avatar_url": "https://avatars.githubusercontent.com/u/75556?v=4", "events_url": "https://api.github.com/users/gtaylor/events{/privacy}", "followers_url": "https://api.github.com/users/gtaylor/followers", "following_url": "https://api.github.com/users/gtaylor/following{/other_user}", "gists_url": "https://api.github.com/users/gtaylor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gtaylor", "id": 75556, "login": "gtaylor", "node_id": "MDQ6VXNlcjc1NTU2", "organizations_url": "https://api.github.com/users/gtaylor/orgs", "received_events_url": "https://api.github.com/users/gtaylor/received_events", "repos_url": "https://api.github.com/users/gtaylor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gtaylor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gtaylor/subscriptions", "type": "User", "url": "https://api.github.com/users/gtaylor", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-02-05T02:58:02Z
2021-09-08T14:00:55Z
2012-02-05T19:00:40Z
NONE
resolved
Use basestring instead of str to determine when to return headers as-is. This makes sure that unicode instances aren't enumerated.
{ "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/409/reactions" }
https://api.github.com/repos/psf/requests/issues/409/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/409.diff", "html_url": "https://github.com/psf/requests/pull/409", "merged_at": "2012-02-05T19:00:40Z", "patch_url": "https://github.com/psf/requests/pull/409.patch", "url": "https://api.github.com/repos/psf/requests/pulls/409" }
true
[ "Hmm, this isn't compatible with Python 3.\n", "Added the necessary basestring fun to requests.compat to make this work on Python 3.\n" ]
https://api.github.com/repos/psf/requests/issues/408
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/408/labels{/name}
https://api.github.com/repos/psf/requests/issues/408/comments
https://api.github.com/repos/psf/requests/issues/408/events
https://github.com/psf/requests/issues/408
3,070,135
MDU6SXNzdWUzMDcwMTM1
408
Requests no longer python2.5 compatible
{ "avatar_url": "https://avatars.githubusercontent.com/u/95281?v=4", "events_url": "https://api.github.com/users/seanodonnell/events{/privacy}", "followers_url": "https://api.github.com/users/seanodonnell/followers", "following_url": "https://api.github.com/users/seanodonnell/following{/other_user}", "gists_url": "https://api.github.com/users/seanodonnell/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/seanodonnell", "id": 95281, "login": "seanodonnell", "node_id": "MDQ6VXNlcjk1Mjgx", "organizations_url": "https://api.github.com/users/seanodonnell/orgs", "received_events_url": "https://api.github.com/users/seanodonnell/received_events", "repos_url": "https://api.github.com/users/seanodonnell/repos", "site_admin": false, "starred_url": "https://api.github.com/users/seanodonnell/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/seanodonnell/subscriptions", "type": "User", "url": "https://api.github.com/users/seanodonnell", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-02-02T16:20:23Z
2021-09-09T10:00:39Z
2012-02-03T18:30:15Z
NONE
resolved
Looks like this commit took it down https://github.com/kennethreitz/requests/commit/b0e2e4f284f619536b7f405122bb1a93900cd743 and specificially the use of the byte literal here - L = [chr(random.randrange(0, 256)).encode('utf-8') for i in range(n)] 189 - return b"".join(L)
{ "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/408/reactions" }
https://api.github.com/repos/psf/requests/issues/408/timeline
null
completed
null
null
false
[ "There are many commits that took it down — it was an intentional decision ;)\n", "fair enough, you may want to take 2.5 off the listof supported versions in the docs so\n", "Where do you see it?\n", " http://docs.python-requests.org/en/latest/community/faq/ in the python 3 support section\n", "Whoops, I thought I fixed that :)\n" ]
https://api.github.com/repos/psf/requests/issues/407
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/407/labels{/name}
https://api.github.com/repos/psf/requests/issues/407/comments
https://api.github.com/repos/psf/requests/issues/407/events
https://github.com/psf/requests/issues/407
3,069,558
MDU6SXNzdWUzMDY5NTU4
407
Cannot upload binary data using auth
{ "avatar_url": "https://avatars.githubusercontent.com/u/133055?v=4", "events_url": "https://api.github.com/users/arty-name/events{/privacy}", "followers_url": "https://api.github.com/users/arty-name/followers", "following_url": "https://api.github.com/users/arty-name/following{/other_user}", "gists_url": "https://api.github.com/users/arty-name/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/arty-name", "id": 133055, "login": "arty-name", "node_id": "MDQ6VXNlcjEzMzA1NQ==", "organizations_url": "https://api.github.com/users/arty-name/orgs", "received_events_url": "https://api.github.com/users/arty-name/received_events", "repos_url": "https://api.github.com/users/arty-name/repos", "site_admin": false, "starred_url": "https://api.github.com/users/arty-name/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arty-name/subscriptions", "type": "User", "url": "https://api.github.com/users/arty-name", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
3
2012-02-02T15:46:03Z
2021-09-09T10:00:36Z
2012-02-15T07:01:42Z
NONE
resolved
Simplest way to reproduce that: ``` requests.get('http://example.com/', auth=('a','b'), data='\xff') … File "/usr/lib/python2.7/httplib.py", line 810, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) ``` It appear that when you specify auth parameters whole HTTP headers section becomes unicode string, and when httplib tries to append binary body to it the thing goes kaboom. Probably this is caused by following lines in auth.py: ``` from __future__ import unicode_literals ``` and decode('utf8') in ``` return 'Basic ' + b64encode(("%s:%s" % (username, password)).encode('utf-8')).strip().decode('utf8') ``` However fixing this line isn't enough to make this work through proxy. This will still throw then: ``` requests.get('http://example.com/', auth=('a','b'), data='\xff', proxies=proxy_config) ```
{ "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/407/reactions" }
https://api.github.com/repos/psf/requests/issues/407/timeline
null
completed
null
null
false
[ "I don't think that's the issue. It seems there's an issue with uploading binary data in general in 0.10.1. Working on it ;)\n", "+1 for this problem. I will downgrade the requests if this is related only to 0.10.1.\n", "Yes, It works in version 0.10.0.\n" ]
https://api.github.com/repos/psf/requests/issues/406
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/406/labels{/name}
https://api.github.com/repos/psf/requests/issues/406/comments
https://api.github.com/repos/psf/requests/issues/406/events
https://github.com/psf/requests/issues/406
3,066,624
MDU6SXNzdWUzMDY2NjI0
406
Ability to override quote per request / session
{ "avatar_url": "https://avatars.githubusercontent.com/u/290976?v=4", "events_url": "https://api.github.com/users/vmihailenco/events{/privacy}", "followers_url": "https://api.github.com/users/vmihailenco/followers", "following_url": "https://api.github.com/users/vmihailenco/following{/other_user}", "gists_url": "https://api.github.com/users/vmihailenco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vmihailenco", "id": 290976, "login": "vmihailenco", "node_id": "MDQ6VXNlcjI5MDk3Ng==", "organizations_url": "https://api.github.com/users/vmihailenco/orgs", "received_events_url": "https://api.github.com/users/vmihailenco/received_events", "repos_url": "https://api.github.com/users/vmihailenco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vmihailenco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vmihailenco/subscriptions", "type": "User", "url": "https://api.github.com/users/vmihailenco", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
2
2012-02-02T11:44:23Z
2021-09-09T10:00:36Z
2012-02-15T06:15:20Z
NONE
resolved
Amazon S3 allows serving images with signed URLs. Such URL looks like: https://BUCKET.s3.amazonaws.com/IMAGE?AWSAccessKeyId=KEY&Expires=EXPIRES&Signature=SIGNATURE So site should calculate SIGNATURE for given URL and expiration time. Then I can fetch that URL using python-requests. But the problem is that some languages (in my case PHP) does not properly quote URL (in my case PHP does not quote ":"). So while PHP site signs URL like "/some:image:name" python-requests tries to get URL like "/some%3Aimage%3Aname" and S3 refuses to proivde access: ``` <Error><Code>SignatureDoesNotMatch</Code></Error> ``` That happens because PHP and Python encode URLs in different ways. And it would be nice if we have opportunity to override quote() per session. It may look like: ``` class PhpCompatSession(Session): def quote(self, url): .... requests.get('URL', session=PhpCompatSession) ``` I can submit a patch if this proposal sounds good for you.
{ "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/406/reactions" }
https://api.github.com/repos/psf/requests/issues/406/timeline
null
completed
null
null
false
[ "Related: issue #392 colon in url path is escaped\n", "I still think this is a good idea, but it should be unnecessary now.\n" ]
https://api.github.com/repos/psf/requests/issues/405
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/405/labels{/name}
https://api.github.com/repos/psf/requests/issues/405/comments
https://api.github.com/repos/psf/requests/issues/405/events
https://github.com/psf/requests/issues/405
3,038,242
MDU6SXNzdWUzMDM4MjQy
405
POST request without data payload leads to 411
{ "avatar_url": "https://avatars.githubusercontent.com/u/105398?v=4", "events_url": "https://api.github.com/users/nickdeveaux/events{/privacy}", "followers_url": "https://api.github.com/users/nickdeveaux/followers", "following_url": "https://api.github.com/users/nickdeveaux/following{/other_user}", "gists_url": "https://api.github.com/users/nickdeveaux/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nickdeveaux", "id": 105398, "login": "nickdeveaux", "node_id": "MDQ6VXNlcjEwNTM5OA==", "organizations_url": "https://api.github.com/users/nickdeveaux/orgs", "received_events_url": "https://api.github.com/users/nickdeveaux/received_events", "repos_url": "https://api.github.com/users/nickdeveaux/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nickdeveaux/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nickdeveaux/subscriptions", "type": "User", "url": "https://api.github.com/users/nickdeveaux", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-01-31T16:27:48Z
2021-09-09T10:00:37Z
2012-02-12T10:20:37Z
NONE
resolved
This behavior was observed while using the requests.post() function on a cherrypy server. The response from the server: HTTP error 411 : no content-length specified. When the data parameter was passed into the requests.post() function, issue was 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/405/reactions" }
https://api.github.com/repos/psf/requests/issues/405/timeline
null
completed
null
null
false
[ "It would be nice if you wrote what version was used...\nAlso, [searching](https://github.com/kennethreitz/requests/issues/search?q=length) for length in opened issues brings issue #223 \"Content-Length is missing\" as the first hit.\n", "Same here #356 & #223\n", "Closing for #223\n" ]
https://api.github.com/repos/psf/requests/issues/404
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/404/labels{/name}
https://api.github.com/repos/psf/requests/issues/404/comments
https://api.github.com/repos/psf/requests/issues/404/events
https://github.com/psf/requests/issues/404
3,035,202
MDU6SXNzdWUzMDM1MjAy
404
Redirection problem
{ "avatar_url": "https://avatars.githubusercontent.com/u/86238?v=4", "events_url": "https://api.github.com/users/namlook/events{/privacy}", "followers_url": "https://api.github.com/users/namlook/followers", "following_url": "https://api.github.com/users/namlook/following{/other_user}", "gists_url": "https://api.github.com/users/namlook/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/namlook", "id": 86238, "login": "namlook", "node_id": "MDQ6VXNlcjg2MjM4", "organizations_url": "https://api.github.com/users/namlook/orgs", "received_events_url": "https://api.github.com/users/namlook/received_events", "repos_url": "https://api.github.com/users/namlook/repos", "site_admin": false, "starred_url": "https://api.github.com/users/namlook/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/namlook/subscriptions", "type": "User", "url": "https://api.github.com/users/namlook", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2012-01-31T12:48:04Z
2021-09-09T09:00:49Z
2012-02-18T17:45:52Z
NONE
resolved
Making a GET request with the python module Requests ends up with strange url: ``` python >>> import requests >>> r = requests.get("http://t.co/Uspy071j") >>> print r.url http://feeds.feedburner.com/%257Er/LesArdoises/%257E3/bD2JuJagz5I/roxino-cest-tout-vert.html?utm_source=twitterfeed&utm_medium=twitter ``` This url ends with an error 400. But using RestKit for the same url, the final_url return the correct value: ``` python >>> import restkit >>> r = restkit.request("http://t.co/Uspy071j", follow_redirect=True) >>> print r.final_url http://lesardoises.com/6277/roxino-cest-tout-vert.html?utm_medium=twitter&utm_source=twitterfeed ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/86238?v=4", "events_url": "https://api.github.com/users/namlook/events{/privacy}", "followers_url": "https://api.github.com/users/namlook/followers", "following_url": "https://api.github.com/users/namlook/following{/other_user}", "gists_url": "https://api.github.com/users/namlook/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/namlook", "id": 86238, "login": "namlook", "node_id": "MDQ6VXNlcjg2MjM4", "organizations_url": "https://api.github.com/users/namlook/orgs", "received_events_url": "https://api.github.com/users/namlook/received_events", "repos_url": "https://api.github.com/users/namlook/repos", "site_admin": false, "starred_url": "https://api.github.com/users/namlook/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/namlook/subscriptions", "type": "User", "url": "https://api.github.com/users/namlook", "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/404/reactions" }
https://api.github.com/repos/psf/requests/issues/404/timeline
null
completed
null
null
false
[ "Well... suits this issue right to be #404.\n", "Probably due to issue #269 fix subsequent redirect request method type\n", "@yuvadm Yep, this is really a deal breaker for me. Its a shame 'cause requests fill all my needs but this redirection problem break the tool...\n\n@piotr-dobrogost I hope this will be fixed soon, #269 was open 3 months ago...\n", "@piotr-dobrogost I don't see how this would be related to that at all.\n", "Looks like a result of a URL-escaping bug.\n", "My mistake - it's GET not POST and has nothing to do with issue 269.\n", "I think this has to do with #392.\nFrom my experimentation it's the tilde.\n", "It works now with the version 0.10.2\n" ]
https://api.github.com/repos/psf/requests/issues/403
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/403/labels{/name}
https://api.github.com/repos/psf/requests/issues/403/comments
https://api.github.com/repos/psf/requests/issues/403/events
https://github.com/psf/requests/issues/403
3,028,476
MDU6SXNzdWUzMDI4NDc2
403
Binary POST data stopped working in requests 0.10.1
{ "avatar_url": "https://avatars.githubusercontent.com/u/1081620?v=4", "events_url": "https://api.github.com/users/vimalb/events{/privacy}", "followers_url": "https://api.github.com/users/vimalb/followers", "following_url": "https://api.github.com/users/vimalb/following{/other_user}", "gists_url": "https://api.github.com/users/vimalb/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vimalb", "id": 1081620, "login": "vimalb", "node_id": "MDQ6VXNlcjEwODE2MjA=", "organizations_url": "https://api.github.com/users/vimalb/orgs", "received_events_url": "https://api.github.com/users/vimalb/received_events", "repos_url": "https://api.github.com/users/vimalb/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vimalb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vimalb/subscriptions", "type": "User", "url": "https://api.github.com/users/vimalb", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
5
2012-01-30T23:13:57Z
2021-09-09T04:00:49Z
2012-02-15T07:05:36Z
NONE
resolved
The following method for POSTing binary data worked with requests 0.10.0 on Python 2.7.1 (Ubuntu 11.04 x64) : ``` bodybytes = '\xDE\xAD\xBE\xEF' r = requests.post(url, data=bodybytes) ``` With requests 0.10.1 on the same environment, it no longer works correctly. Specifically, the body data does not get appended correctly and passed onto the server. A full example (including sample flask server) that works with 0.10.0 but not 0.10.1: ``` import flask, multiprocessing, requests app = flask.Flask(__name__) @app.route("/testpost", methods=['POST']) def echopost(): return str(len(flask.request.data)) web_process = multiprocessing.Process(target=lambda: app.run(host='127.0.0.1', port=5000)) web_process.start() try: bodybytes = '\xDE\xAD\xBE\xEF' print('Original body length = '+str(len(bodybytes))) r = requests.post('http://127.0.0.1:5000/testpost', data=bodybytes ) print('POST body length = '+str(r.content)) assert(int(r.content) == len(bodybytes)) finally: web_process.terminate() ``` Any idea what may have caused this change in behavior?
{ "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/403/reactions" }
https://api.github.com/repos/psf/requests/issues/403/timeline
null
completed
null
null
false
[ "Not sure if this is related but I also got problem uploading binary data with 0.10.1 which work just fine in 0.9.0. I have the following code which upload photo to Flickr API:-\n\n<pre>\ndef upload_photo(self, inputfile, **kwargs):\n parameters = kwargs\n req = self.sign_request(UPLOAD_URL, parameters, method='POST')\n headers = req.to_header()\n\n files = {\n 'photo': open(inputfile, 'rb'),\n }\n resp = requests.post(UPLOAD_URL, data=kwargs, files=files, headers=headers)\n\n xml = ET.XML(resp.content)\n if xml.attrib['stat'] == 'ok':\n class Photo(object): pass\n photo = Photo()\n photo.id = xml[0].text\n return photo\n</pre>\n\n\nNow when running using 0.10.1, got the following traceback:-\n\n<pre>\nTraceback (most recent call last):\n File \"__init__.py\", line 291, in <module>\n print flickrapi.upload_photo('/home/kamal/Pictures/Image2442.jpg')\n File \"__init__.py\", line 155, in upload_photo\n resp = requests.post(UPLOAD_URL, data=kwargs, files=files, headers=headers)\n File \"/home/kamal/python/env/pyflickr/lib/python2.6/site-packages/requests/api.py\", line 84, in post\n return request('post', url, data=data, **kwargs)\n File \"/home/kamal/python/env/pyflickr/lib/python2.6/site-packages/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/home/kamal/python/env/pyflickr/lib/python2.6/site-packages/requests/sessions.py\", line 159, in request\n headers[k] = header_expand(v)\n File \"/home/kamal/python/env/pyflickr/lib/python2.6/site-packages/requests/utils.py\", line 152, in header_expand\n for i, (value, params) in enumerate(headers):\nValueError: need more than 1 value to unpack\n</pre>\n", "I have problem with binary data too. Everything works fine in 0.9.3.\n\nrequests own test suite fails with 4 errors (related to unicode data, and it raises the same exception that I am getting). I have reproduced the problem with Python 2.7.1 (Mac OS X Lion) and Python 2.7.2 (home-built on Debian Squeeze).\n\nThis issue seems to be triggering a Python 2.7 / httplib bug where the URL is getting (somehow) passed in as a Unicode string into httplib:\nhttp://bugs.python.org/issue11898\n\nI tried to bisect the error to find the commit that introduced the regression, starting from 0.9.3-ish to latest develop, but I could not get any good results since other unrelated errors cropped up all along the way.\n\nThis is the most simple program to demonstrate the bug:\n\n```\n# -*- coding: utf-8 -*-\nimport requests\nutf8_string = (u'Smörgås').encode('utf-8')\nrequests.post('http://www.google.com/', data=utf8_string)\n```\n\nAnd the output:\n\n```\n[requests_dev] [develop] ~/code/requests $ python simpletest.py\nTraceback (most recent call last):\n File \"simpletest.py\", line 4, in <module>\n requests.post('http://www.google.com/', data=utf8_string)\n File \"/Users/andreas/code/requests/requests/api.py\", line 84, in post\n return request('post', url, data=data, **kwargs)\n File \"/Users/andreas/code/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/andreas/code/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/andreas/code/requests/requests/models.py\", line 527, in send\n timeout=self.timeout,\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n body=body, headers=headers)\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 941, in request\n self._send_request(method, url, body, headers)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 975, in _send_request\n self.endheaders(body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 937, in endheaders\n self._send_output(message_body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 795, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)\n```\n\nThis is the test suite output:\n\n```\n[requests_dev] [develop] ~/code/requests $ PORT=80 HTTPBIN_URL=\"http://httpbin.org/\" python test_requests.py\n............EEE.......................E..........\n======================================================================\nERROR: test_POSTBIN_GET_POST_FILES (__main__.RequestsTestSuite)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"test_requests.py\", line 220, in test_POSTBIN_GET_POST_FILES\n post2 = post(url, files={'some': open('test_requests.py')})\n File \"/Users/andreas/code/requests/requests/api.py\", line 84, in post\n return request('post', url, data=data, **kwargs)\n File \"/Users/andreas/code/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/andreas/code/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/andreas/code/requests/requests/models.py\", line 527, in send\n timeout=self.timeout,\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n body=body, headers=headers)\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 941, in request\n self._send_request(method, url, body, headers)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 975, in _send_request\n self.endheaders(body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 937, in endheaders\n self._send_output(message_body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 795, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7959: ordinal not in range(128)\n\n======================================================================\nERROR: test_POSTBIN_GET_POST_FILES_WITH_HEADERS (__main__.RequestsTestSuite)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"test_requests.py\", line 247, in test_POSTBIN_GET_POST_FILES_WITH_HEADERS\n headers = {'User-Agent': 'requests-tests'})\n File \"/Users/andreas/code/requests/requests/api.py\", line 84, in post\n return request('post', url, data=data, **kwargs)\n File \"/Users/andreas/code/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/andreas/code/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/andreas/code/requests/requests/models.py\", line 527, in send\n timeout=self.timeout,\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n body=body, headers=headers)\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 941, in request\n self._send_request(method, url, body, headers)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 975, in _send_request\n self.endheaders(body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 937, in endheaders\n self._send_output(message_body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 795, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7959: ordinal not in range(128)\n\n======================================================================\nERROR: test_POSTBIN_GET_POST_FILES_WITH_PARAMS (__main__.RequestsTestSuite)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"test_requests.py\", line 234, in test_POSTBIN_GET_POST_FILES_WITH_PARAMS\n data={'some': 'data'})\n File \"/Users/andreas/code/requests/requests/api.py\", line 84, in post\n return request('post', url, data=data, **kwargs)\n File \"/Users/andreas/code/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/andreas/code/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/andreas/code/requests/requests/models.py\", line 527, in send\n timeout=self.timeout,\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n body=body, headers=headers)\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 941, in request\n self._send_request(method, url, body, headers)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 975, in _send_request\n self.endheaders(body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 937, in endheaders\n self._send_output(message_body)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 795, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7959: ordinal not in range(128)\n\n======================================================================\nERROR: test_session_with_unicode_headers (__main__.RequestsTestSuite)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"test_requests.py\", line 117, in test_session_with_unicode_headers\n requests.get(url=httpbin('get'), headers=heads)\n File \"/Users/andreas/code/requests/requests/api.py\", line 51, in get\n return request('get', url, **kwargs)\n File \"/Users/andreas/code/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/andreas/code/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/andreas/code/requests/requests/models.py\", line 527, in send\n timeout=self.timeout,\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n body=body, headers=headers)\n File \"/Users/andreas/code/requests/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 941, in request\n self._send_request(method, url, body, headers)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 974, in _send_request\n self.putheader(hdr, value)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 921, in putheader\n hdr = '%s: %s' % (header, '\\r\\n\\t'.join([str(v) for v in values]))\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)\n\n----------------------------------------------------------------------\nRan 49 tests in 21.474s\n\nFAILED (errors=4)\n```\n", "Fixed!\n", "I think that I'm still experiencing the same issue:\n\n``` python\n>>> files = {\"xml\": open(\"photos.xml\", \"r\"), \"image\": open(\"Vienna-Orchestra.jpg\", \"rb\")}\n>>> r = requests.post(url, files=files, auth=('***', '***'))\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"build/bdist.linux-i686/egg/requests/api.py\", line 84, in post\n File \"build/bdist.linux-i686/egg/requests/api.py\", line 39, in request\n File \"build/bdist.linux-i686/egg/requests/sessions.py\", line 200, in request\n File \"build/bdist.linux-i686/egg/requests/models.py\", line 535, in send\n File \"build/bdist.linux-i686/egg/requests/packages/urllib3/connectionpool.py\", line 370, in urlopen\n File \"build/bdist.linux-i686/egg/requests/packages/urllib3/connectionpool.py\", line 246, in _make_request\n File \"/usr/local/lib/python2.7/httplib.py\", line 946, in request\n self._send_request(method, url, body, headers)\n File \"/usr/local/lib/python2.7/httplib.py\", line 987, in _send_request\n self.endheaders(body)\n File \"/usr/local/lib/python2.7/httplib.py\", line 940, in endheaders\n self._send_output(message_body)\n File \"/usr/local/lib/python2.7/httplib.py\", line 801, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 484: ordinal not in range(128)\n>>> print requests.__version__\n0.10.2\n```\n\nNevertheless, this code is working:\n\n``` python\nbodybytes = '\\xDE\\xAD\\xBE\\xEF'\nr = requests.post(url, data=bodybytes)\n```\n", "Today, I was struggling with UnicodeDecodeError at line 801 of /httplib.py in _send_output. Worked fine on Mac (2.7.2). Not working on Windows (2.7 r27 2010-07-04). Thought that looked a bit old. Installed latest Python version (2.7.3 2012-04-10) and the problem has disappeared. (Shame I wasted about 4 hours trying to fix it!)\n" ]
https://api.github.com/repos/psf/requests/issues/402
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/402/labels{/name}
https://api.github.com/repos/psf/requests/issues/402/comments
https://api.github.com/repos/psf/requests/issues/402/events
https://github.com/psf/requests/pull/402
3,020,051
MDExOlB1bGxSZXF1ZXN0NzU0MDkw
402
The `self` was missing again, and I think the two blocks were redundant.
{ "avatar_url": "https://avatars.githubusercontent.com/u/223663?v=4", "events_url": "https://api.github.com/users/Telofy/events{/privacy}", "followers_url": "https://api.github.com/users/Telofy/followers", "following_url": "https://api.github.com/users/Telofy/following{/other_user}", "gists_url": "https://api.github.com/users/Telofy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Telofy", "id": 223663, "login": "Telofy", "node_id": "MDQ6VXNlcjIyMzY2Mw==", "organizations_url": "https://api.github.com/users/Telofy/orgs", "received_events_url": "https://api.github.com/users/Telofy/received_events", "repos_url": "https://api.github.com/users/Telofy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Telofy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Telofy/subscriptions", "type": "User", "url": "https://api.github.com/users/Telofy", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-30T13:02:58Z
2021-09-08T14:00:54Z
2012-01-30T14:41:17Z
NONE
resolved
I hope I’m not overlooking something regarding the two try-except blocks, but I can’t think of a scenario where they’d make any difference. Thanks.
{ "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/402/reactions" }
https://api.github.com/repos/psf/requests/issues/402/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/402.diff", "html_url": "https://github.com/psf/requests/pull/402", "merged_at": "2012-01-30T14:41:17Z", "patch_url": "https://github.com/psf/requests/pull/402.patch", "url": "https://api.github.com/repos/psf/requests/pulls/402" }
true
[ "Hmm, I think you're right. Good call.\n" ]
https://api.github.com/repos/psf/requests/issues/401
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/401/labels{/name}
https://api.github.com/repos/psf/requests/issues/401/comments
https://api.github.com/repos/psf/requests/issues/401/events
https://github.com/psf/requests/pull/401
3,016,949
MDExOlB1bGxSZXF1ZXN0NzUzMDg1
401
Added ability to check if missing trailing slash in path.
{ "avatar_url": "https://avatars.githubusercontent.com/u/425026?v=4", "events_url": "https://api.github.com/users/brendon-codes/events{/privacy}", "followers_url": "https://api.github.com/users/brendon-codes/followers", "following_url": "https://api.github.com/users/brendon-codes/following{/other_user}", "gists_url": "https://api.github.com/users/brendon-codes/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/brendon-codes", "id": 425026, "login": "brendon-codes", "node_id": "MDQ6VXNlcjQyNTAyNg==", "organizations_url": "https://api.github.com/users/brendon-codes/orgs", "received_events_url": "https://api.github.com/users/brendon-codes/received_events", "repos_url": "https://api.github.com/users/brendon-codes/repos", "site_admin": false, "starred_url": "https://api.github.com/users/brendon-codes/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brendon-codes/subscriptions", "type": "User", "url": "https://api.github.com/users/brendon-codes", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-30T07:28:31Z
2021-09-08T14:00:54Z
2012-01-30T14:33:37Z
CONTRIBUTOR
resolved
Previously this URL would not work: ``` http://example.com?foo=bar ``` But this URL would work: ``` http://example.com/?foo=bar ``` Even though a slash is required for a valid URL, it is a common use case for the slash to be left out, so it would be a good idea to account for this.
{ "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/401/reactions" }
https://api.github.com/repos/psf/requests/issues/401/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/401.diff", "html_url": "https://github.com/psf/requests/pull/401", "merged_at": "2012-01-30T14:33:36Z", "patch_url": "https://github.com/psf/requests/pull/401.patch", "url": "https://api.github.com/repos/psf/requests/pulls/401" }
true
[ "A supporting reason to consider this patch...\n\nAn example of a missing slash can actually been seen on the Requests documentation homepage at http://docs.python-requests.org/en/latest/index.html :\n\n```\nr = requests.get('https://api.github.com', auth=('user', 'pass'))\n```\n\nIf that example had any params such as the following, it would fail:\n\n```\nr = requests.get('https://api.github.com?foo=bar', auth=('user', 'pass'))\nr = requests.get('https://api.github.com', auth=('user', 'pass'), params={'foo':'bar'})\n```\n", "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/400
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/400/labels{/name}
https://api.github.com/repos/psf/requests/issues/400/comments
https://api.github.com/repos/psf/requests/issues/400/events
https://github.com/psf/requests/issues/400
3,014,651
MDU6SXNzdWUzMDE0NjUx
400
Unfortunate header unicode interactions
{ "avatar_url": "https://avatars.githubusercontent.com/u/46565?v=4", "events_url": "https://api.github.com/users/acdha/events{/privacy}", "followers_url": "https://api.github.com/users/acdha/followers", "following_url": "https://api.github.com/users/acdha/following{/other_user}", "gists_url": "https://api.github.com/users/acdha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/acdha", "id": 46565, "login": "acdha", "node_id": "MDQ6VXNlcjQ2NTY1", "organizations_url": "https://api.github.com/users/acdha/orgs", "received_events_url": "https://api.github.com/users/acdha/received_events", "repos_url": "https://api.github.com/users/acdha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/acdha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/acdha/subscriptions", "type": "User", "url": "https://api.github.com/users/acdha", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
12
2012-01-30T00:19:28Z
2021-09-09T10:00:35Z
2012-02-15T07:01:05Z
CONTRIBUTOR
resolved
header_expand (https://github.com/kennethreitz/requests/blob/develop/requests/utils.py#L149) has a fast path which only supports `str`. Unfortunately, `response.url` will contain a unicode string which means that anyone doing something like `requests.get(response.url, headers={'Referer': response.url})` will get a `ValueError` from `header_expand`. Does it make more sense to simply make the `header_expand` check do `if isinstance(headers, basestring)` or have an explicit `if isinstance(headers, unicode): return headers.encode("utf-8")` instead? I'm happy to test either way.
{ "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/400/reactions" }
https://api.github.com/repos/psf/requests/issues/400/timeline
null
completed
null
null
false
[ "We have a failing test in `develop` right now for this actually :)\n", "Spent some time scratching my head over this.\n\nThe language of http://www.ietf.org/rfc/rfc2047.txt suggests that headers can only be ASCII (maybe latin1?) so it seems that the behavior is correct.\n\nAdding:\n\n``` python\nelif isinstance(headers, unicode):\n return headers.encode('ascii')\n```\n\nWould handle the common case of a user accidentally using reasonable unicode - and will throw a more informative error in the edge case.\n", "I've been told recently that `latin1` is the proper encoding to use as well.\n", "http://greenbytes.de/tech/webdav/draft-reschke-basicauth-enc-01.html\n", "Well, having trolled (shallowly) through a bunch RFCs futilely, it seems that in practice, some (i tested two: gunicorn, bigIP) web servers handle unicode headers gracefully. I guess it depends on how much you want to hand-hold the user, Kenneth.\n\n``` bash\n[18] bshi@air:requests $ curl -vL -H 'X-Test: 中文' 'http://httpbin.org/get'\n* About to connect() to httpbin.org port 80 (#0)\n* Trying 107.21.118.103... connected\n> GET /get HTTP/1.1\n> User-Agent: curl/7.23.1 (x86_64-apple-darwin11.2.0) libcurl/7.23.1 OpenSSL/1.0.0g zlib/1.2.5 libidn/1.22\n> Host: httpbin.org\n> Accept: */*\n> X-Test: 中文\n> \n< HTTP/1.1 200 OK\n< Content-Type: application/json\n< Date: Wed, 01 Feb 2012 07:28:18 GMT\n< Server: gunicorn/0.13.4\n< Content-Length: 413\n< Connection: keep-alive\n< \n{\n \"url\": \"http://httpbin.org/get\", \n \"headers\": {\n \"Content-Length\": \"\", \n \"X-Forwarded-Port\": \"80\", \n \"Connection\": \"keep-alive\", \n \"Accept\": \"*/*\", \n \"User-Agent\": \"curl/7.23.1 (x86_64-apple-darwin11.2.0) libcurl/7.23.1 OpenSSL/1.0.0g zlib/1.2.5 libidn/1.22\", \n \"Host\": \"httpbin.org\", \n \"Content-Type\": \"\", \n \"X-Test\": \"\\u4e2d\\u6587\"\n }, \n \"args\": {}, \n \"origin\": \"107.3.137.146\"\n* Connection #0 to host httpbin.org left intact\n}* Closing connection #0\n```\n", "SO question [HTTP header should use what character encoding?](http://stackoverflow.com/questions/4400678/http-header-should-use-what-character-encoding)\n", "This is biting me right now. I think the above mentioned fix:\n\n```\nelif isinstance(headers, unicode):\n return headers.encode('ascii')\n```\n\nis the right way to go. For instance, I'm getting the header info straight from a json doc. json.loads automatically encodes all my strings to unicode. Py3k will be worse as unicode strings are standard (I think). Not doing this will only cause headaches. Also, the error message is not very helpful...\n", "Let's do it — except w/ `latin1` instead.\n", "I made the easy change & updated the tests to confirm that simply calling request.get with a unicode instance in the headers can now work. I'm not sure how much we care but it's still not possible to use non-latin-1 characters without manually handling the RFC 2047 encoding yourself – does it make any sense for us to attempt that here?\n", "The same issue exists with cookies. If you pass a dict with unicode a cryptic error appears when the translate method is called on the unicode object. I don't know if the cookies should be handled the same or if it's documented that the cookies should be strings and not unicode, but I wanted to mention this in case people weren't aware of it.\n", "Fixed!\n", "awesome, thanks.\n" ]
https://api.github.com/repos/psf/requests/issues/399
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/399/labels{/name}
https://api.github.com/repos/psf/requests/issues/399/comments
https://api.github.com/repos/psf/requests/issues/399/events
https://github.com/psf/requests/pull/399
3,014,532
MDExOlB1bGxSZXF1ZXN0NzUyMzY2
399
Fix for #239: “Too many open files”
{ "avatar_url": "https://avatars.githubusercontent.com/u/46565?v=4", "events_url": "https://api.github.com/users/acdha/events{/privacy}", "followers_url": "https://api.github.com/users/acdha/followers", "following_url": "https://api.github.com/users/acdha/following{/other_user}", "gists_url": "https://api.github.com/users/acdha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/acdha", "id": 46565, "login": "acdha", "node_id": "MDQ6VXNlcjQ2NTY1", "organizations_url": "https://api.github.com/users/acdha/orgs", "received_events_url": "https://api.github.com/users/acdha/received_events", "repos_url": "https://api.github.com/users/acdha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/acdha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/acdha/subscriptions", "type": "User", "url": "https://api.github.com/users/acdha", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2012-01-29T23:58:02Z
2021-09-08T23:07:29Z
2012-01-30T00:06:46Z
CONTRIBUTOR
resolved
The underlying problem appears to have been consuming async replies too late in two places: 1. async.send(prefetch=True) did not pass prefetch=True to the request.send() call but instead consumed the responses _after_ all of them had been processed, leading to an error any time the total number of requests exceeded the number of available file descriptors. acdha@495646bb6a89802a60208c2ab09749edba1f8e51 changes async.send to call request.send with the prefetch value. 2. Following redirects would result in only the last request in the chain being consumed, leading at least one file descriptor. acdha@67f50a0fe53765987e5a6a1c02daabe6400322af consumes each redirect response before following 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/399/reactions" }
https://api.github.com/repos/psf/requests/issues/399/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/399.diff", "html_url": "https://github.com/psf/requests/pull/399", "merged_at": "2012-01-30T00:06:46Z", "patch_url": "https://github.com/psf/requests/pull/399.patch", "url": "https://api.github.com/repos/psf/requests/pulls/399" }
true
[ "Beautiful.\n", "I might revisit this — there's really no need to download the content at all.\n", "I'm not sure how much difference it will make for redirects - are you receiving non-zero byte contents from many servers? I'm assuming that if it fits in one 1500 byte packet it's probably not worth worrying about. I did verify that we need more than simply calling `raw.release_conn()` to actually close the socket but didn't investigate further.\n", "Well the socket _should_ be kept open because it's within a PoolManager within a session. The connection itself should be closed though.\n", "Perhaps sessions are leaving connections open when they should be killed. @shazow ?\n", "Does this problem still exist in urllib3 1.2? The 'use poll instead of select' might fix this problem.\n\nCan someone write code to replicate this issue in urllib3? I'll have a look then.\n", "I believe that select is related. Unfortunately, poll is all we have on osx :(\n" ]
https://api.github.com/repos/psf/requests/issues/398
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/398/labels{/name}
https://api.github.com/repos/psf/requests/issues/398/comments
https://api.github.com/repos/psf/requests/issues/398/events
https://github.com/psf/requests/issues/398
3,014,020
MDU6SXNzdWUzMDE0MDIw
398
Header capitalization causes problems with some web servers
{ "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
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
10
2012-01-29T22:34:19Z
2021-09-09T10:00:35Z
2012-02-15T07:06:35Z
NONE
resolved
As raised here: http://bugs.python.org/issue12455 Although your documentation states: "The dictionary is special, though: it’s made just for HTTP headers. According to RFC 2616 , HTTP Headers are case-insensitive" It should be noted that many web servers do not conform to this standard, and enforcing it makes some requests break. Therefore, I'd like to request a patch on this library which allows the user to disable the automatic header capitalization (i.e. just keep the headers as it received them). Cal
{ "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/398/reactions" }
https://api.github.com/repos/psf/requests/issues/398/timeline
null
completed
null
null
false
[ "Also note, this is affecting cookies (name/value) as well.\n", "Headers should be sent upstream untouched. If they aren't currently, there's a bug.\n", "I'm making a patch for this now, along with full debug, will send shortly.\n", "Thanks a ton!\n", "Only queries should be case-insensitive. \n", "Okay, seems to be unrelated to the original python bug I pasted, but raises a totally new bug:\n\nBROKEN (using oreos.monkeys.SimpleCookie) - line 471.\n\n```\n\n{'Accept-Encoding': 'identity, deflate, compress, gzip', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1', 'Cookie': 'LOB=Auto; NIAX_JSESSIONID=\"0001ZjlThXjY9q7bIws1je8WMFh:14a8mcptb\"; TLTSID=B631D51A4AC3104AC60FC1A310F28ADB; siteserver=b632b571-4ac3-11e1-8776-7b5f576f558c; state=PA', 'Referer': 'https://buyonline.nationwide.com/autoquote/initiateNewQuote.do', 'Content-Type': 'application/x-www-form-urlencoded'}\n\n```\n\nWORKING:\n\n```\n\n{'Accept-Encoding': 'identity, deflate, compress, gzip', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1', 'Cookie': 'LOB=Auto; NIAX_JSESSIONID=0001ZjlThXjY9q7bIws1je8WMFh:14a8mcptb; TLTSID=B631D51A4AC3104AC60FC1A310F28ADB; siteserver=b632b571-4ac3-11e1-8776-7b5f576f558c; state=PA;', 'Referer': 'https://buyonline.nationwide.com/autoquote/initiateNewQuote.do', 'Content-Type': 'application/x-www-form-urlencoded'}\n\n```\n\nNotice how the cookie 'NIAX_JSESSIONID' has additional quoting around its value, where as browsers would not do this (and as such, it is causing the web server to throw a 5XX)\n\nIt seems to stem from this method:\n\n```\n\ndef _quote(str, LegalChars=_LegalChars,\n idmap=_idmap, translate=string.translate):\n #\n # If the string does not need to be double-quoted,\n # then just return the string. Otherwise, surround\n # the string in doublequotes and precede quote (with a \\)\n # special characters.\n #\n if \"\" == translate(str, idmap, LegalChars):\n return str\n else:\n return '\"' + _nulljoin( map(_Translator.get, str, str) ) + '\"'\n# end _quote\n\n```\n\nThere is a whole set of rules in the comments above there, but suffice to say, the browsers I have tested this in don't act in the same manner.\n\nAny thoughts??\n\nCal\n", "Also, I just tried this with Python built in 'Cookie' lib, and the same problem happens there also:\n\n```\n\n cookies = {\n 'siteserver' : 'b632b571-4ac3-11e1-8776-7b5f576f558c',\n 'TLTSID' : 'B631D51A4AC3104AC60FC1A310F28ADB',\n 'NIAX_JSESSIONID' : '0001ZjlThXjY9q7bIws1je8WMFh:14a8mcptb',\n 'LOB' : 'Auto',\n 'state' : 'PA'\n }\n\n from Cookie import SimpleCookie\n _c = SimpleCookie(cookies)\n print _c.output()\n\n```\n\n```\n\nSet-Cookie: LOB=Auto\nSet-Cookie: NIAX_JSESSIONID=\"0001ZjlThXjY9q7bIws1je8WMFh:14a8mcptb\"\nSet-Cookie: TLTSID=B631D51A4AC3104AC60FC1A310F28ADB\nSet-Cookie: siteserver=b632b571-4ac3-11e1-8776-7b5f576f558c\nSet-Cookie: state=PA\n\n```\n\nBut given that oreo SimpleCookie is forked from 'Cookie', even if it was patched in python core (which would take months), it would then need to filter down the chain, so we're looking at maybe 6-12 months until the bug was fixed.\n\nGiven this situation, would you be willing to patch in requests lib, or would you hold back until it was patched in the core (if).\n\nCal\n", "Oh, and the specific reason why it's failing in my case is:\n\n```\n\nLegalChars = string.ascii_letters + string.digits + \"!#$%&'*+-.^_`|~[]_\"\n\n```\n\nMy cookie value contains ':' which isn't in the LegalChars - however adding quotes around the value seems to break the app, so I'm wondering if the most appropriate monkey patch would be to just remove the LegalChars.. (but then what happens if someone includes ';' in their cookies. argh).\n", "Well, I've put in a fix which (for the time being) fixed our bug, but it is alpha as fuck and may cause a whole bunch of other problems. Hopefully this will be useful to anyone else that stumbles across this problem.\n\n```\n\n#!/usr/bin/env python\nimport requests\ndef _quote(val, *args, **kwargs):\n print \"WARNING: cookie value has been monkey patched\"\n return val\n\nrequests.packages.oreos.monkeys._quote= _quote\n\n```\n\nCal Leeming\nSimplicity Media Ltd\[email protected]\n", "Should be fixed now.\n" ]
https://api.github.com/repos/psf/requests/issues/397
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/397/labels{/name}
https://api.github.com/repos/psf/requests/issues/397/comments
https://api.github.com/repos/psf/requests/issues/397/events
https://github.com/psf/requests/issues/397
3,009,623
MDU6SXNzdWUzMDA5NjIz
397
Ability to declare how the content should be parsed
{ "avatar_url": "https://avatars.githubusercontent.com/u/27889?v=4", "events_url": "https://api.github.com/users/timClicks/events{/privacy}", "followers_url": "https://api.github.com/users/timClicks/followers", "following_url": "https://api.github.com/users/timClicks/following{/other_user}", "gists_url": "https://api.github.com/users/timClicks/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/timClicks", "id": 27889, "login": "timClicks", "node_id": "MDQ6VXNlcjI3ODg5", "organizations_url": "https://api.github.com/users/timClicks/orgs", "received_events_url": "https://api.github.com/users/timClicks/received_events", "repos_url": "https://api.github.com/users/timClicks/repos", "site_admin": false, "starred_url": "https://api.github.com/users/timClicks/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/timClicks/subscriptions", "type": "User", "url": "https://api.github.com/users/timClicks", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2012-01-29T03:39:39Z
2021-09-09T10:00:40Z
2012-01-29T04:03:41Z
NONE
resolved
Just an idea. Make it super-simple to get the objects to users. When playing in the Python prompt with a new API, this looks pretty normal: ``` python >>> import json >>> import requests >>> res = requests.get('http://example.com/data.json') >>> data = json.loads(res.content) ... ``` Here's a suggestion that might add a little convenience for this kind of explorative work: ``` python >>> import requests >>> res = requests.get("http://example.com/data.json", as='json') >>> data = res.content ... ``` The idea is, dynamically import a parser. There are reasonable defaults in the stdilb. It will only save a few lines of code, but would make it even easier to play around with APIs in the Python prompt. I thought the `as` option could accept `xml`, `json`, `text`, `csv`, `tsv` and `infer`. `infer` would use an appropriate the `Content-Type` and/or the file extension and/or `format=xml` in the URL to make the choice/ Possibly a more sensible way to approach this kind of thing would be to specify a callback: ``` python requests.get("http://example.com/data.json", parse_content_with=json.loads) ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/27889?v=4", "events_url": "https://api.github.com/users/timClicks/events{/privacy}", "followers_url": "https://api.github.com/users/timClicks/followers", "following_url": "https://api.github.com/users/timClicks/following{/other_user}", "gists_url": "https://api.github.com/users/timClicks/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/timClicks", "id": 27889, "login": "timClicks", "node_id": "MDQ6VXNlcjI3ODg5", "organizations_url": "https://api.github.com/users/timClicks/orgs", "received_events_url": "https://api.github.com/users/timClicks/received_events", "repos_url": "https://api.github.com/users/timClicks/repos", "site_admin": false, "starred_url": "https://api.github.com/users/timClicks/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/timClicks/subscriptions", "type": "User", "url": "https://api.github.com/users/timClicks", "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/397/reactions" }
https://api.github.com/repos/psf/requests/issues/397/timeline
null
completed
null
null
false
[ "This has been deeply considered before and decided against.\n\nI definitely see the use case and understand the desire for this functionality, but it would quickly get out of scope. At the end of the day, requests is a HTTP module, not a HTML, JSON, YAML, XML, etc module. I'll link to a few past discussions below.\n", "#151\n", "#330\n", "#310\n", "Sorry for not looking into the backlog!\n", "No worries at all, there are over 400 issues :)\n", "I realize this is closed but just a thought: Is there really any benefit in...\n\n``` python\nrequests.get(\"http://example.com/data.json\", parse_content_with=json.loads)\n```\n\nOver...\n\n``` python\njson.loads(requests.get(\"http://example.com/data.json\").content)\n```\n\nThe latter seems more explicit and less magical. In fact if a requests response object was file-like or string-like, you could just do:\n\n``` python\njson.loads(requests.get(\"http://example.com/data.json\"))\n```\n", "There is not.\n", ":cake:\n" ]
https://api.github.com/repos/psf/requests/issues/396
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/396/labels{/name}
https://api.github.com/repos/psf/requests/issues/396/comments
https://api.github.com/repos/psf/requests/issues/396/events
https://github.com/psf/requests/issues/396
3,004,043
MDU6SXNzdWUzMDA0MDQz
396
Track upload/download progress
{ "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
8
2012-01-28T08:45:15Z
2021-09-09T07:05:24Z
2012-07-27T06:03:23Z
NONE
resolved
I think this would be an interesting feature for Requests. I really miss 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/396/reactions" }
https://api.github.com/repos/psf/requests/issues/396/timeline
null
completed
null
null
false
[ "Moved to [Urllib3](https://github.com/shazow/urllib3/issues/43).\n", "Use the content-length header to find out the size of the content being downloaded, and then use [iter_content](http://docs.python-requests.org/en/latest/api/?highlight=iter#requests.Response.iter_content) to download it, updating your download progress indicator after each loop.\n", "What @johtso said :)\n\nWe should add this to the docs. People ask for it so often :)\n", "@kennethreitz And for upload?\n", "Streaming uploads aren't supported at this time.\n", "As @johtso said, this is very easy with `iter_content`. Add this code sample to the documentation and close this issue?\n\n```\nimport requests\nfrom clint.textui import progress\n\nCHUNK_SIZE = 1024 * 10\n\nresponse = requests.get('http://files-r-us.com/bigfile.tar')\ncontent_length = response.headers.get('content-length')\niter_content = response.iter_content(CHUNK_SIZE)\n\n# Display progress bar if content-length is set\nif content_length is not None:\n expected_ittimes = int(content_length) / CHUNK_SIZE\n iter_content = progress.bar(iter_content, expected_size=expected_ittimes)\n\nwith tempfile.NamedTemporaryFile(prefix='song-', suffix=extension, delete=False) \\\n as fp:\n for chunk in iter_content:\n fp.write(chunk)\n```\n", "Sorry, you forgot a part of the issue. Upload progress tracking.\n", "The issue is closed on urllib3 :disappointed:\n" ]
https://api.github.com/repos/psf/requests/issues/395
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/395/labels{/name}
https://api.github.com/repos/psf/requests/issues/395/comments
https://api.github.com/repos/psf/requests/issues/395/events
https://github.com/psf/requests/issues/395
3,003,859
MDU6SXNzdWUzMDAzODU5
395
Quoted urls don't work in newer versions
{ "avatar_url": "https://avatars.githubusercontent.com/u/14459?v=4", "events_url": "https://api.github.com/users/bwhite/events{/privacy}", "followers_url": "https://api.github.com/users/bwhite/followers", "following_url": "https://api.github.com/users/bwhite/following{/other_user}", "gists_url": "https://api.github.com/users/bwhite/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bwhite", "id": 14459, "login": "bwhite", "node_id": "MDQ6VXNlcjE0NDU5", "organizations_url": "https://api.github.com/users/bwhite/orgs", "received_events_url": "https://api.github.com/users/bwhite/received_events", "repos_url": "https://api.github.com/users/bwhite/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bwhite/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bwhite/subscriptions", "type": "User", "url": "https://api.github.com/users/bwhite", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
2
2012-01-28T07:30:29Z
2021-09-09T10:00:37Z
2012-02-15T06:14:15Z
NONE
resolved
This worked in 9.1 requests.get('http://knowyourmeme.com/memes/ming-general-sushi-%E6%98%8E%E5%B0%87%E5%A3%BD%E5%8F%B8/photos').status_code And would give 200 as a status code. In 10.1 it doesn't work. I also tried to unquote it and utf-8 decode it and neither of those worked. I see that several unicode changes happened so it may just be that this was intentional but I am not sure how such a url should be provided then.
{ "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/395/reactions" }
https://api.github.com/repos/psf/requests/issues/395/timeline
null
completed
null
null
false
[ "This was fixed in #387. It works with current develop branch.\n", "200 again!\n" ]
https://api.github.com/repos/psf/requests/issues/394
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/394/labels{/name}
https://api.github.com/repos/psf/requests/issues/394/comments
https://api.github.com/repos/psf/requests/issues/394/events
https://github.com/psf/requests/issues/394
2,996,931
MDU6SXNzdWUyOTk2OTMx
394
Binding a particular IP
{ "avatar_url": "https://avatars.githubusercontent.com/u/184600?v=4", "events_url": "https://api.github.com/users/jibaku/events{/privacy}", "followers_url": "https://api.github.com/users/jibaku/followers", "following_url": "https://api.github.com/users/jibaku/following{/other_user}", "gists_url": "https://api.github.com/users/jibaku/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jibaku", "id": 184600, "login": "jibaku", "node_id": "MDQ6VXNlcjE4NDYwMA==", "organizations_url": "https://api.github.com/users/jibaku/orgs", "received_events_url": "https://api.github.com/users/jibaku/received_events", "repos_url": "https://api.github.com/users/jibaku/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jibaku/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jibaku/subscriptions", "type": "User", "url": "https://api.github.com/users/jibaku", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2012-01-27T16:59:42Z
2018-12-20T20:25:15Z
2012-02-12T10:22:11Z
NONE
resolved
It would be great to be able to bound a particular IP as the source address (for hosts with multiple IP addresses).
{ "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/394/reactions" }
https://api.github.com/repos/psf/requests/issues/394/timeline
null
completed
null
null
false
[ "Interesting. How do you invision the usage?\n", "^ shazow/urllib3#9\n", "The goal is to write a crawler using an IP associated with a particular country. But I don't know how it would be used on a API level. \n", "Couldn't you just send a request to an IP with a particular `Host` header?\n", "No, because it's to have the specific IP in the web server log (to be reversed to a particular country using tools like GeoIP). \n", "I don't follow. \n\n``` pycon\n>>> requests.get('http://184.106.67.239', headers={'host': 'ci.kennethreitz.com'})\n<Response [200]>\n```\n", "``` python\nimport socket\nimport urllib2\ntrue_socket = socket.socket\n\ndef make_bound_socket(source_ip):\n def bound_socket(*a, **k):\n sock = true_socket(*a, **k)\n sock.bind((source_ip, 0))\n return sock\n return bound_socket\n\nsocket.socket = make_bound_socket('<some source ip>')\nprint urllib2.urlopen('http://httpbin.org/ip').read()\n\nsocket.socket = make_bound_socket('<some other source ip>')\nprint urllib2.urlopen('http://httpbin.org/ip').read()\n```\n\nIf traffic going out from the two source ip numbers goes out through two different public ip numbers one should see these different public numbers in the origin field of the response.\n", "I think this is out of scope. \n", "For people interested in this still, you might want to take a look at urlib3's HttpConnectionPool, in particular where new httplib/http.client HttpConnections are spun up so you can pass in source_address. If you do that, then you can keep on exposing this in request's Request model, and use it as you wish.\n", "For those arriving here from google, you will want to follow this: https://github.com/shazow/urllib3/issues/9#issuecomment-15871420\n", "This should be reopened - it's not out of scope, and it's quite necessary when working with hosts inside a VPN.\n\nDepending on specifics of the address spaces of the current & remote network, one often has to send requests from the IP bound to the interface set up by the VPN. Or make changes to the routing table. This applies at least to using NetExtender on a Mac.\n\nMany networking programs such as ssh and curl support setting the interface to use / binding to IP of an interface. \n", "@petri Your assertion that this is not out of scope is incorrect, given that the scope of the Requests project is defined entirely by Kenneth. =)\n\nSpecifically, we view it as being out of scope for the core requests project. However, you can still do it, and it's not even very hard. [This discussion](https://github.com/kennethreitz/requests/issues/2008#issuecomment-40793099) covers how to do it.\n", "Nice - I was not aware of that kind of mechanism in requests. Thanks!\n", "> ```python\r\n> import socket\r\n> import urllib2\r\n> true_socket = socket.socket\r\n> \r\n> def make_bound_socket(source_ip):\r\n> def bound_socket(*a, **k):\r\n> sock = true_socket(*a, **k)\r\n> sock.bind((source_ip, 0))\r\n> return sock\r\n> return bound_socket\r\n> \r\n> socket.socket = make_bound_socket('<some source ip>')\r\n> print urllib2.urlopen('http://httpbin.org/ip').read()\r\n> \r\n> socket.socket = make_bound_socket('<some other source ip>')\r\n> print urllib2.urlopen('http://httpbin.org/ip').read()\r\n> ```\r\n> \r\n> If traffic going out from the two source ip numbers goes out through two different public ip numbers one should see these different public numbers in the origin field of the response.\r\n\r\nJust wanted you to know I've been scouring the internet for forever and this was the only solution that worked for me. ", "https://toolbelt.readthedocs.io/en/latest/adapters.html#sourceaddressadapter exists and is far less of a hack" ]
https://api.github.com/repos/psf/requests/issues/393
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/393/labels{/name}
https://api.github.com/repos/psf/requests/issues/393/comments
https://api.github.com/repos/psf/requests/issues/393/events
https://github.com/psf/requests/issues/393
2,993,677
MDU6SXNzdWUyOTkzNjc3
393
Support proxies set in environment variables
{ "avatar_url": "https://avatars.githubusercontent.com/u/6988?v=4", "events_url": "https://api.github.com/users/j4mie/events{/privacy}", "followers_url": "https://api.github.com/users/j4mie/followers", "following_url": "https://api.github.com/users/j4mie/following{/other_user}", "gists_url": "https://api.github.com/users/j4mie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/j4mie", "id": 6988, "login": "j4mie", "node_id": "MDQ6VXNlcjY5ODg=", "organizations_url": "https://api.github.com/users/j4mie/orgs", "received_events_url": "https://api.github.com/users/j4mie/received_events", "repos_url": "https://api.github.com/users/j4mie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/j4mie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/j4mie/subscriptions", "type": "User", "url": "https://api.github.com/users/j4mie", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-01-27T12:30:26Z
2021-09-09T07:05:20Z
2012-07-27T06:03:40Z
NONE
resolved
A common standard supported by many command-line tools is to use environment variables to configure proxies. The variables are described in full here: http://www.gnu.org/software/wget/manual/html_node/Proxies.html According to the documentation, urllib and urllib2 support this. Note that the environment variable names for these settings are considered to be case-insensitive, so `http_proxy` or `HTTP_PROXY` should work. I'm happy to have a go at implementing this, if you can point me to the correct place in the code where you think it should be handled. Also, is there a guide anywhere detailing how to run the test suite? Cheers
{ "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/393/reactions" }
https://api.github.com/repos/psf/requests/issues/393/timeline
null
completed
null
null
false
[ "I would _love_ this.\n", "Are you sure this is not working already - I tested using\n\n``` sh\npip install mitmproxy\nmitmproxy\n```\n\nThis works:\n\n``` sh\nexport https_proxy=http://localhost:8080\npython -c \"import requests; requests.get('https://github.com/')\"\n```\n\nThis doesn't\n\n``` sh\nexport https_proxy=http://localhost:8081\npython -c \"import requests; requests.get('https://github.com/')\"\nTraceback (most recent call last):\n File \"<string>\", line 1, in <module>\n File \"requests/api.py\", line 54, in get\n return request('get', url, **kwargs)\n File \"requests/safe_mode.py\", line 37, in wrapped\n return function(method, url, **kwargs)\n File \"requests/api.py\", line 42, in request\n return s.request(method=method, url=url, **kwargs)\n File \"requests/sessions.py\", line 229, in request\n r.send(prefetch=prefetch)\n File \"requests/models.py\", line 605, in send\n raise ConnectionError(e)\nrequests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: https://github.com/\n```\n", "Commit was SHA: 0ba8c442\n", "This was done forever ago :)\n", ":thumbsup: thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/392
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/392/labels{/name}
https://api.github.com/repos/psf/requests/issues/392/comments
https://api.github.com/repos/psf/requests/issues/392/events
https://github.com/psf/requests/issues/392
2,993,014
MDU6SXNzdWUyOTkzMDE0
392
colon in url path is escaped
{ "avatar_url": "https://avatars.githubusercontent.com/u/49957?v=4", "events_url": "https://api.github.com/users/fmarani/events{/privacy}", "followers_url": "https://api.github.com/users/fmarani/followers", "following_url": "https://api.github.com/users/fmarani/following{/other_user}", "gists_url": "https://api.github.com/users/fmarani/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fmarani", "id": 49957, "login": "fmarani", "node_id": "MDQ6VXNlcjQ5OTU3", "organizations_url": "https://api.github.com/users/fmarani/orgs", "received_events_url": "https://api.github.com/users/fmarani/received_events", "repos_url": "https://api.github.com/users/fmarani/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fmarani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fmarani/subscriptions", "type": "User", "url": "https://api.github.com/users/fmarani", "user_view_type": "public" }
[]
closed
true
null
[]
null
12
2012-01-27T11:07:35Z
2021-09-09T09:00:44Z
2012-03-08T01:36:36Z
NONE
resolved
if you get a url with this format http://www.colon.com/kql:a/in, the colon after kql becomes escaped and as far as i understood it shouldn't. Same behavior does not happen in urllib2. See http://stackoverflow.com/questions/2053132/is-a-colon-safe-for-friendly-url-use
{ "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/392/reactions" }
https://api.github.com/repos/psf/requests/issues/392/timeline
null
completed
null
null
false
[ "The question you refer to talks specifically about [fragment part](http://tools.ietf.org/html/rfc3986#section-3.5) (the part of url after `#` sign). The example you show has `:` sign in the **path** part. However, according to [3.3. Path](http://tools.ietf.org/html/rfc3986#section-3.3) section of RFC3986 `:` is allowed in this part of url as well. I'm not sure if some HTML specs are more strict about this (see answer of irreputable to the SO question).\n", "After having a good read of the article it seems to me that the \":\" should not be escaped. Firefox and urllib2 do not escape it so i don't understand why this library should\n", "If you had also a good read of my post here you would know that I **agree** with you :)\nBtw, this calls for new `url` endpoint in httpbin I guess :)\n", "I'd like to add a configuration for disabling url escaping.\n", "I'm going to fix this.\n", "Thanks guys :)\n", "The same issue with `=` sign in the path. For example, try to `get` this URL: `http://lh3.ggpht.com/pQVGhZF5dQJmCaJqiKX6jZx6cKXJ1DL-PQkrZxtkelPPrXaIRIZK2t1t-uCbsKAIFbA=w124`, and you'll get 404 instead of the image.\n", "I think I have the same issue with `~`:\n`http://feedproxy.google.com/~r/StephenHoliday/~3/E64PhsZa2_w/fidofetch-architecture`\n", "As of requests 0.10.2, the colon is actually escaped twice. The first escaping happens at utils.requote_path(), which is called from Request.full_url. The second escaping happens in Request.path_url method: \n\npath = quote(path.encode('utf-8'))\n\nAs a result, it's not possible to send a valid request containing a colon in the path part.\n", "`encode_uri` configuration was added!\n", "Kenneth,\nI see absolutely no reason why this behavior should be configurable. The problems currently experienced by the users are caused by double escaping (see my comment above), which is simply a bug and needs to be fixed.\n", "@yole there are always edge cases.\n" ]
https://api.github.com/repos/psf/requests/issues/391
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/391/labels{/name}
https://api.github.com/repos/psf/requests/issues/391/comments
https://api.github.com/repos/psf/requests/issues/391/events
https://github.com/psf/requests/issues/391
2,986,702
MDU6SXNzdWUyOTg2NzAy
391
re-enable support for scalar values in headers dict
{ "avatar_url": "https://avatars.githubusercontent.com/u/862013?v=4", "events_url": "https://api.github.com/users/kislyuk/events{/privacy}", "followers_url": "https://api.github.com/users/kislyuk/followers", "following_url": "https://api.github.com/users/kislyuk/following{/other_user}", "gists_url": "https://api.github.com/users/kislyuk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kislyuk", "id": 862013, "login": "kislyuk", "node_id": "MDQ6VXNlcjg2MjAxMw==", "organizations_url": "https://api.github.com/users/kislyuk/orgs", "received_events_url": "https://api.github.com/users/kislyuk/received_events", "repos_url": "https://api.github.com/users/kislyuk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kislyuk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kislyuk/subscriptions", "type": "User", "url": "https://api.github.com/users/kislyuk", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-01-26T21:53:59Z
2021-09-09T10:00:38Z
2012-01-28T20:25:15Z
NONE
resolved
Between 0.8.x and 0.10.x, support for this was dropped: requests.get(resource, headers={'Authorization': 'string'}) It now requires a dict as the header value. Can we get support for both dict and string as the value?
{ "avatar_url": "https://avatars.githubusercontent.com/u/862013?v=4", "events_url": "https://api.github.com/users/kislyuk/events{/privacy}", "followers_url": "https://api.github.com/users/kislyuk/followers", "following_url": "https://api.github.com/users/kislyuk/following{/other_user}", "gists_url": "https://api.github.com/users/kislyuk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kislyuk", "id": 862013, "login": "kislyuk", "node_id": "MDQ6VXNlcjg2MjAxMw==", "organizations_url": "https://api.github.com/users/kislyuk/orgs", "received_events_url": "https://api.github.com/users/kislyuk/received_events", "repos_url": "https://api.github.com/users/kislyuk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kislyuk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kislyuk/subscriptions", "type": "User", "url": "https://api.github.com/users/kislyuk", "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/391/reactions" }
https://api.github.com/repos/psf/requests/issues/391/timeline
null
completed
null
null
false
[ "Never mind, looks like I was passing a dict as the header value (expecting it to be automagically json dumped), and getting confused by the error. Sorry about the noise.\n", "No worries, I'm glad you got it figured out ;)\n", "FYI, I came back to this and realized it was because of the problem this fixed: https://github.com/kislyuk/requests/commit/f8b3141204c83737fd6ab7a5ba3aa84e0a1b6d61\n\nYour latest tag (0.10.1) still contains that error, do you mind tagging 0.10.2 with this fix?\n\nThanks.\n" ]
https://api.github.com/repos/psf/requests/issues/390
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/390/labels{/name}
https://api.github.com/repos/psf/requests/issues/390/comments
https://api.github.com/repos/psf/requests/issues/390/events
https://github.com/psf/requests/pull/390
2,984,778
MDExOlB1bGxSZXF1ZXN0NzQyMjUz
390
add failing test for unicode headers (python 2.x only)
{ "avatar_url": "https://avatars.githubusercontent.com/u/631620?v=4", "events_url": "https://api.github.com/users/davidarkemp/events{/privacy}", "followers_url": "https://api.github.com/users/davidarkemp/followers", "following_url": "https://api.github.com/users/davidarkemp/following{/other_user}", "gists_url": "https://api.github.com/users/davidarkemp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/davidarkemp", "id": 631620, "login": "davidarkemp", "node_id": "MDQ6VXNlcjYzMTYyMA==", "organizations_url": "https://api.github.com/users/davidarkemp/orgs", "received_events_url": "https://api.github.com/users/davidarkemp/received_events", "repos_url": "https://api.github.com/users/davidarkemp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/davidarkemp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidarkemp/subscriptions", "type": "User", "url": "https://api.github.com/users/davidarkemp", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-26T19:44:48Z
2021-09-08T14:00:53Z
2012-01-27T17:16:58Z
NONE
resolved
This adds a failing test for unicode headers in python 2.x (I've tested python 2.6) I've tried to fix this the original problem is that in [utils.py (line 149)](https://github.com/kennethreitz/requests/blob/develop/requests/utils.py#L149) doesn't check for unicode, or rather that it doesn't import the str and bytes definitions from compat). However, you _might_ want to change the order of the [definitions of str and bytes for python 2 in compat](https://github.com/kennethreitz/requests/blob/develop/requests/compat.py#L89), because, at the moment, they end up both being defined as unicode. Right, so, if one fixes this (I've got the code if you want that too), and then there ends up being a problem with gevent's socket just calling data.decode(), which fails on my linux box, because that ends up trying to convert everything to ascii (which seems to be default behaviour). I can work around this by making sure I only ever pass py2's strs as keys and values, but I'd like to make it work if you can point me in the right direction.
{ "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/390/reactions" }
https://api.github.com/repos/psf/requests/issues/390/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/390.diff", "html_url": "https://github.com/psf/requests/pull/390", "merged_at": "2012-01-27T17:16:58Z", "patch_url": "https://github.com/psf/requests/pull/390.patch", "url": "https://api.github.com/repos/psf/requests/pulls/390" }
true
[ "Thanks a lot! We'll have to fix this.\n" ]
https://api.github.com/repos/psf/requests/issues/389
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/389/labels{/name}
https://api.github.com/repos/psf/requests/issues/389/comments
https://api.github.com/repos/psf/requests/issues/389/events
https://github.com/psf/requests/pull/389
2,974,838
MDExOlB1bGxSZXF1ZXN0NzM4NDY2
389
Fix httpbin urls with missing .org in docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/830800?v=4", "events_url": "https://api.github.com/users/johtso/events{/privacy}", "followers_url": "https://api.github.com/users/johtso/followers", "following_url": "https://api.github.com/users/johtso/following{/other_user}", "gists_url": "https://api.github.com/users/johtso/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johtso", "id": 830800, "login": "johtso", "node_id": "MDQ6VXNlcjgzMDgwMA==", "organizations_url": "https://api.github.com/users/johtso/orgs", "received_events_url": "https://api.github.com/users/johtso/received_events", "repos_url": "https://api.github.com/users/johtso/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johtso/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johtso/subscriptions", "type": "User", "url": "https://api.github.com/users/johtso", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-26T02:22:51Z
2021-09-08T14:00:53Z
2012-01-26T06:40:30Z
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/389/reactions" }
https://api.github.com/repos/psf/requests/issues/389/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/389.diff", "html_url": "https://github.com/psf/requests/pull/389", "merged_at": "2012-01-26T06:40:30Z", "patch_url": "https://github.com/psf/requests/pull/389.patch", "url": "https://api.github.com/repos/psf/requests/pulls/389" }
true
[ "whoops :)\n" ]
https://api.github.com/repos/psf/requests/issues/388
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/388/labels{/name}
https://api.github.com/repos/psf/requests/issues/388/comments
https://api.github.com/repos/psf/requests/issues/388/events
https://github.com/psf/requests/pull/388
2,974,152
MDExOlB1bGxSZXF1ZXN0NzM4MjA0
388
Develop
{ "avatar_url": "https://avatars.githubusercontent.com/u/128454?v=4", "events_url": "https://api.github.com/users/seanjensengrey/events{/privacy}", "followers_url": "https://api.github.com/users/seanjensengrey/followers", "following_url": "https://api.github.com/users/seanjensengrey/following{/other_user}", "gists_url": "https://api.github.com/users/seanjensengrey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/seanjensengrey", "id": 128454, "login": "seanjensengrey", "node_id": "MDQ6VXNlcjEyODQ1NA==", "organizations_url": "https://api.github.com/users/seanjensengrey/orgs", "received_events_url": "https://api.github.com/users/seanjensengrey/received_events", "repos_url": "https://api.github.com/users/seanjensengrey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/seanjensengrey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/seanjensengrey/subscriptions", "type": "User", "url": "https://api.github.com/users/seanjensengrey", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-01-26T00:56:22Z
2021-09-08T23:07:30Z
2012-02-12T10:15:09Z
NONE
resolved
I noticed yesterday that requests doesn't work on Python 2.5 ( or Jython ). These commits make running the tests slightly easier to setup. The core tests now pass on cPython 2.5. All tests (core, async, ext) pass on cPython 2.6. Working on changes to support Jython (currently one failing test in test_safe_mode). If you want me to rework anything, let me know. But I really would like to re-enable Python 2.5 support.
{ "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/388/reactions" }
https://api.github.com/repos/psf/requests/issues/388/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/388.diff", "html_url": "https://github.com/psf/requests/pull/388", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/388.patch", "url": "https://api.github.com/repos/psf/requests/pulls/388" }
true
[ "I appreciate the contribution, but Python 2.5 support was dropped intentionally. \n\nWhile it is fairly simple to support again (as this pull request shows), It's a bit more subtle than that. The main issue is that `except RequestException, e` is invalid syntax in Python 3. I'd also like to move to modern string formatting, which isn't possible when supporting 2.5.\n", "I think the idea of having different requirements files is nice and worth merging. Btw, why is nose a requirement?\n\n@seanjensengrey You say all tests including new async ones pass. I'm very surprised. See issue #383 Any comments on this?\n", "@kennethreitz What if I added in using the 2to3 into the Makefile so we could generate a Python 3 compatible install? The vast majority of users are still on the Python 2.x line and will be for the foreseeable future.\n\nRequests is great and I would like to see it replace all the other cruft out there by being available everywhere. It would be nice if I could run it on cPython 2.5 and Jython, it limits my use of it on the systems I use as I can't migrate programs across environments.\n", "For now, if you'd like Python2.5 support, using a version before 0.10 is probably best. \n" ]
https://api.github.com/repos/psf/requests/issues/387
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/387/labels{/name}
https://api.github.com/repos/psf/requests/issues/387/comments
https://api.github.com/repos/psf/requests/issues/387/events
https://github.com/psf/requests/pull/387
2,967,225
MDExOlB1bGxSZXF1ZXN0NzM1MzAw
387
fix problem with path being double escaped
{ "avatar_url": "https://avatars.githubusercontent.com/u/631620?v=4", "events_url": "https://api.github.com/users/davidarkemp/events{/privacy}", "followers_url": "https://api.github.com/users/davidarkemp/followers", "following_url": "https://api.github.com/users/davidarkemp/following{/other_user}", "gists_url": "https://api.github.com/users/davidarkemp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/davidarkemp", "id": 631620, "login": "davidarkemp", "node_id": "MDQ6VXNlcjYzMTYyMA==", "organizations_url": "https://api.github.com/users/davidarkemp/orgs", "received_events_url": "https://api.github.com/users/davidarkemp/received_events", "repos_url": "https://api.github.com/users/davidarkemp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/davidarkemp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidarkemp/subscriptions", "type": "User", "url": "https://api.github.com/users/davidarkemp", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-25T16:24:25Z
2021-09-09T00:01:25Z
2012-01-25T16:25:26Z
NONE
resolved
On python 2.6.4 (at least) the path portion is getting escaped twice -> once in Request.full_url and once in Request.path_url This fixes it, but I don't know why there was a commented test for Python 3.
{ "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/387/reactions" }
https://api.github.com/repos/psf/requests/issues/387/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/387.diff", "html_url": "https://github.com/psf/requests/pull/387", "merged_at": "2012-01-25T16:25:26Z", "patch_url": "https://github.com/psf/requests/pull/387.patch", "url": "https://api.github.com/repos/psf/requests/pulls/387" }
true
[ "Nice catch. thanks!\n", "Removing the check is not the right way to go. It fails exactly the same way in Py3. You have to remove the two lines to get it working there too.\n" ]
https://api.github.com/repos/psf/requests/issues/386
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/386/labels{/name}
https://api.github.com/repos/psf/requests/issues/386/comments
https://api.github.com/repos/psf/requests/issues/386/events
https://github.com/psf/requests/issues/386
2,965,723
MDU6SXNzdWUyOTY1NzIz
386
Requests and urllib3 using one test platform?
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2012-01-25T14:39:23Z
2021-09-09T10:00:41Z
2012-01-29T04:05:14Z
NONE
resolved
Basically the needs of the two libs as far as test environment is concerned are the same. It looks like there would be much benefit if requests could reuse test platform provided by urllib3.
{ "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/386/reactions" }
https://api.github.com/repos/psf/requests/issues/386/timeline
null
completed
null
null
false
[ "@shazow have (_very_ lightly) been discussing the idea of merging our projects in the mid-future. If that comes to fruition, that will be the time to merge test suites.\n\nIn the meantime, I'm fine with requests \"trusting\" that `urllib3` is tested and reliable.\n", "> @shazow have (very lightly) been discussing the idea of merging our projects in the mid-future\n\nThat's really interesting.\n\n> In the meantime, I'm fine with requests \"trusting\" that urllib3 is tested and reliable.\n\nI was not implying it's not the case. I think it would be easier to have one test platform used by both libs. Taking into account that requests already embeds urllib3 there's no reason not to use its test platform if it supports all features requests' tests need. This way we could start taking advantage of this right away and in addition there would be less work to do when merging projects :)\n", "On the other hand, it's kind of nice that we're not testing against the same webserver in the event that one of our's is buggy, at least there's some chance we'd catch the bug on the other layer. :P\n", "@shazow +1\n", "> On the other hand, it's kind of nice that we're not testing against the same webserver\n\nAm I missing something or is test platform in urllib3 going to have multiple backends? If so then both libs would in fact have been tested even better than now, right?\n", "@piotr-dobrogost Not sure what you mean by multiple backends.\n\nOriginally we had a wsgiref simple server, then we moved to an evenlet wsgi app server, now we're moving to a Tornado wsgi server and a socket-handler based thread server.\n", "Oh, well I thought you're adding support for Tornado not switching to it.\n", "All in the name of Python3 :)\n" ]
https://api.github.com/repos/psf/requests/issues/385
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/385/labels{/name}
https://api.github.com/repos/psf/requests/issues/385/comments
https://api.github.com/repos/psf/requests/issues/385/events
https://github.com/psf/requests/issues/385
2,963,240
MDU6SXNzdWUyOTYzMjQw
385
docs - how to do authentication against a proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/684948?v=4", "events_url": "https://api.github.com/users/guillermooo/events{/privacy}", "followers_url": "https://api.github.com/users/guillermooo/followers", "following_url": "https://api.github.com/users/guillermooo/following{/other_user}", "gists_url": "https://api.github.com/users/guillermooo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/guillermooo", "id": 684948, "login": "guillermooo", "node_id": "MDQ6VXNlcjY4NDk0OA==", "organizations_url": "https://api.github.com/users/guillermooo/orgs", "received_events_url": "https://api.github.com/users/guillermooo/received_events", "repos_url": "https://api.github.com/users/guillermooo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/guillermooo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/guillermooo/subscriptions", "type": "User", "url": "https://api.github.com/users/guillermooo", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
0
2012-01-25T10:37:45Z
2021-09-09T07:05:35Z
2012-07-12T21:19:34Z
NONE
resolved
The docs should mention more or less what's explained here, because it isn't obvious: http://stackoverflow.com/questions/8862492/python-proxy-error-with-requests-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" }
{ "+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/385/reactions" }
https://api.github.com/repos/psf/requests/issues/385/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/384
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/384/labels{/name}
https://api.github.com/repos/psf/requests/issues/384/comments
https://api.github.com/repos/psf/requests/issues/384/events
https://github.com/psf/requests/issues/384
2,957,900
MDU6SXNzdWUyOTU3OTAw
384
Docs don't show how to use config API
{ "avatar_url": "https://avatars.githubusercontent.com/u/137979?v=4", "events_url": "https://api.github.com/users/tartley/events{/privacy}", "followers_url": "https://api.github.com/users/tartley/followers", "following_url": "https://api.github.com/users/tartley/following{/other_user}", "gists_url": "https://api.github.com/users/tartley/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tartley", "id": 137979, "login": "tartley", "node_id": "MDQ6VXNlcjEzNzk3OQ==", "organizations_url": "https://api.github.com/users/tartley/orgs", "received_events_url": "https://api.github.com/users/tartley/received_events", "repos_url": "https://api.github.com/users/tartley/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tartley/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tartley/subscriptions", "type": "User", "url": "https://api.github.com/users/tartley", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-01-24T22:19:54Z
2021-09-09T06:00:57Z
2012-07-27T06:04:56Z
NONE
resolved
Hey. Newb user here. I've just spent about 30 minutes figuring out how to use the config API to set 'danger_mode' = True. The docs don't seem to show this (or at least, I couldn't find it) I was trying all sorts of wrong things, based on what I saw in the docs under 'Configuration API Docs' (http://docs.python-requests.org/en/latest/api/#configurations), such as: import requests requests.defaults.danger_zone = True In the end I resorted to looking in the source. I think the docs need a short sentance and example of setting a config option. Many thanks.
{ "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/384/reactions" }
https://api.github.com/repos/psf/requests/issues/384/timeline
null
completed
null
null
false
[ "I was looking at config today and ran into the same issue. For the time being, requests.get('http://example.com').config gives a good summary of what config options are available. \n", "http://docs.python-requests.org/en/latest/user/advanced/#configuring-requests\n", "I don't want to be unhelpful, but I followed the link to the docs and had a five minute search around, but I'm still completely in the dark as to how to use the config. If I had to do it again today, I'd have to go look at the source again to figure out where I pass in or modify a config dict. Am I being dumb? With respect, if the bug is 'wontfix', I can understand and that's cool, but for the record I don't think this documentation bug is fixed. Peace.\n" ]
https://api.github.com/repos/psf/requests/issues/383
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/383/labels{/name}
https://api.github.com/repos/psf/requests/issues/383/comments
https://api.github.com/repos/psf/requests/issues/383/events
https://github.com/psf/requests/pull/383
2,956,597
MDExOlB1bGxSZXF1ZXN0NzMxMjMy
383
Standard tests from RequestsTestSuite run using async api
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2012-01-24T20:50:08Z
2021-09-08T14:00:52Z
2012-01-25T14:27:09Z
NONE
resolved
Almost all are failing... Need some feedback if it makes any sense.
{ "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/383/reactions" }
https://api.github.com/repos/psf/requests/issues/383/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/383.diff", "html_url": "https://github.com/psf/requests/pull/383", "merged_at": "2012-01-25T14:27:09Z", "patch_url": "https://github.com/psf/requests/pull/383.patch", "url": "https://api.github.com/repos/psf/requests/pulls/383" }
true
[ "I haven't tried running these yet, but at first-glance these look great.\n\nI'm not a fan of the `session=s`, but I see the use case :)\n", "@piotr-dobrogost I am seeing all the async tests pass under python 2.6, I am not able test under 2.5 right now as my gevent isn't installed properly.\n\n```\nnosetests --with-color test_requests_async.py\n................................................................................................\n----------------------------------------------------------------------\nRan 96 tests in 0.872 seconds\nOK\n```\n\nIs that expected behavior?\n", "Could you please run tests against http://httpbin.org - that's what I do and most tests fail.\nCould you please also run below script a couple of times. I get about 1-3 `Max retries exceeded` errors when running this.\n\n``` python\nfrom gevent import monkey\nmonkey.patch_all()\n\nimport gevent\nimport requests\n\ndef http_req(i, url):\n for j in xrange(2):\n r = requests.get(url)\n print \"Request \", i, j, r\n\n\nif __name__ == '__main__':\n greens = [gevent.spawn(http_req, i, 'http://httpbin.org')\n for i in xrange(50)]\n print \"waiting end of greenlets ...\"\n gevent.joinall(greens)\n```\n", "Running your script I do see some failures that I don't see with the local tests.\n\n```\nTraceback (most recent call last):\n File \"/Library/Python/2.6/site-packages/gevent/greenlet.py\", line 390, in run\n result = self._run(*self.args, **self.kwargs)\n File \"test_piotr.py\", line 9, in http_req\n r = requests.get(url)\n File \"/Users/s.jensengrey/wxz/python-requests/requests/requests/api.py\", line 51, in get\n return request('get', url, **kwargs)\n File \"/Users/s.jensengrey/wxz/python-requests/requests/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/s.jensengrey/wxz/python-requests/requests/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/s.jensengrey/wxz/python-requests/requests/requests/models.py\", line 537, in send\n raise ConnectionError(e)\nConnectionError: HTTPConnectionPool(host=u'httpbin.org', port=80): Max retries exceeded with url: /\n<Greenlet at 0x101227550: http_req(47, 'http://httpbin.org')> failed with ConnectionError\n```\n\nNot sure if that is a failure in `requests` itself or the server running on httpbin ?\n", "I don't know either; urllib3 masks network errors - see shazow/urllib3#32.\nCould you run async tests against httpbin.org?\n", "I just did a \n\n```\nHTTPBIN_URL=http://httpbin.org/ make test\n```\n\nand all tests pass (requests, requests_ext, requests_async) on my fork. I added in a print statement to confirm the test url. My local server was showing no hits during the test pass.\n" ]
https://api.github.com/repos/psf/requests/issues/382
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/382/labels{/name}
https://api.github.com/repos/psf/requests/issues/382/comments
https://api.github.com/repos/psf/requests/issues/382/events
https://github.com/psf/requests/pull/382
2,956,279
MDExOlB1bGxSZXF1ZXN0NzMxMDg0
382
Moved dispatch_hook call for pre_request into send method
{ "avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4", "events_url": "https://api.github.com/users/btoews/events{/privacy}", "followers_url": "https://api.github.com/users/btoews/followers", "following_url": "https://api.github.com/users/btoews/following{/other_user}", "gists_url": "https://api.github.com/users/btoews/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/btoews", "id": 1144197, "login": "btoews", "node_id": "MDQ6VXNlcjExNDQxOTc=", "organizations_url": "https://api.github.com/users/btoews/orgs", "received_events_url": "https://api.github.com/users/btoews/received_events", "repos_url": "https://api.github.com/users/btoews/repos", "site_admin": false, "starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/btoews/subscriptions", "type": "User", "url": "https://api.github.com/users/btoews", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2012-01-24T20:25:16Z
2021-09-08T14:00:52Z
2012-01-25T14:27:08Z
CONTRIBUTOR
resolved
In the case of using requests.Request or async.request the pre_request hook wasn't very useful because it was called when the request was made rather than when the request was being sent. I moved the dispatch_hook call to just before the call out to conn.urlopen in request.send. Considering that multiple hooks was implemented instead of Response.response_time, I think that this is important because it allows users to time responses. Example: https://gist.github.com/1667527
{ "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/382/reactions" }
https://api.github.com/repos/psf/requests/issues/382/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/382.diff", "html_url": "https://github.com/psf/requests/pull/382", "merged_at": "2012-01-25T14:27:08Z", "patch_url": "https://github.com/psf/requests/pull/382.patch", "url": "https://api.github.com/repos/psf/requests/pulls/382" }
true
[ "Thanks, I like this!\n\nMaybe it would be better to have a pre-pre-request hook too ;)\n", "I considered that, but I didn't know how much value people would find in it. We already have the args hood being called wen the request is created.\n", "Now that we can have multiple hooks, I'd like to use hooks internally more. Most of the processing steps could become hooks.\n", "This actually moves it to a place where it is not anymore possible to prevent a http request like described in http://notebook.okfn.org/2011/10/08/implementing-an-http-cache-using-requests-api-hooks/\n\nPlease consider moving it a bit more higher :-)\n", "This is a different use-case than what I use 'pre_request' for. Does this maybe warrant another hook? Maybe a 'creation' hook?\n", "Ah. I forgot about the `if not self.sent or anyway:`. I think this change looks good\n" ]
https://api.github.com/repos/psf/requests/issues/381
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/381/labels{/name}
https://api.github.com/repos/psf/requests/issues/381/comments
https://api.github.com/repos/psf/requests/issues/381/events
https://github.com/psf/requests/issues/381
2,935,216
MDU6SXNzdWUyOTM1MjE2
381
requests.async -- catch DNS errors more explicitly?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1305819?v=4", "events_url": "https://api.github.com/users/computableinsights/events{/privacy}", "followers_url": "https://api.github.com/users/computableinsights/followers", "following_url": "https://api.github.com/users/computableinsights/following{/other_user}", "gists_url": "https://api.github.com/users/computableinsights/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/computableinsights", "id": 1305819, "login": "computableinsights", "node_id": "MDEyOk9yZ2FuaXphdGlvbjEzMDU4MTk=", "organizations_url": "https://api.github.com/users/computableinsights/orgs", "received_events_url": "https://api.github.com/users/computableinsights/received_events", "repos_url": "https://api.github.com/users/computableinsights/repos", "site_admin": false, "starred_url": "https://api.github.com/users/computableinsights/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/computableinsights/subscriptions", "type": "Organization", "url": "https://api.github.com/users/computableinsights", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-23T14:19:55Z
2021-09-09T08:00:44Z
2012-05-10T22:05:51Z
NONE
resolved
This is related to #380, however the manifestation is different when using requests.async This could be handled by detected that the redirect URL is bogus. On the other hand, it would be good to have a more explicit exception than an low-level IOError when gevent's DNS infrastructure gets confused. What's the best way to fix this? ``` >>> r = requests.get( ... 'http://travel.rr.com/in?a=roadrunner&;p=heroluxuryvacation&;url=/dealssearchcat=Luxury&;rp=t&;nv=t&;pz=15&;pgsrc=roadrunner', ... allow_redirects=False) >>> >>> r <Response [302]> >>> r.headers.get('location') 'http://www.kayak.com?;nv=t&;pz=15&;url=%2Fdealssearchcat%3DLuxury&;pgsrc=roadrunner&;p=heroluxuryvacation&;rp=t' >>> >>> >>> import requests.async >>> r = requests.async.get('http://travel.rr.com/in?a=roadrunner&;p=heroluxuryvacation&;url=/dealssearchcat=Luxury&;rp=t&;nv=t&;pz=15&;pgsrc=roadrunner') >>> r.send() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 514, in send self._build_response(r) File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 253, in _build_response request.send() File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 492, in send timeout=self.timeout, File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 336, in urlopen body=body, headers=headers) File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 217, in _make_request conn.request(method, url, **httplib_request_kw) File "httplib.py", line 970, in request self._send_request(method, url, body, headers) File "httplib.py", line 1004, in _send_request self.endheaders(body) File "httplib.py", line 966, in endheaders self._send_output(message_body) File "httplib.py", line 826, in _send_output self.send(msg) File "httplib.py", line 779, in send self.connect() File "httplib.py", line 760, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/pymodules/python2.7/gevent/socket.py", line 681, in getaddrinfo _ttl, addrs = resolve_ipv4(host, evdns_flags) File "/usr/lib/pymodules/python2.7/gevent/dns.py", line 56, in resolve_ipv4 core.dns_resolve_ipv4(name, flags, waiter.switch_args) File "evdns.pxi", line 93, in gevent.core.dns_resolve_ipv4 (gevent/core.c:6533) IOError: evdns_resolve_ipv4('www.kayak.com?;nv=t&;pz=15&;url=%2Fdealssearchcat%3DLuxury&;pgsrc=roadrunner&;p=heroluxuryvacation&;rp=t', 0) returned -1 >>> ```
{ "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/381/reactions" }
https://api.github.com/repos/psf/requests/issues/381/timeline
null
completed
null
null
false
[ "You're right. We should be catching these gevent errors and mapping them to regular request exceptions.\n", "Async is removed from requests now. A new module, [grequests](https://github.com/kennethreitz/grequests) will replace it.\n" ]
https://api.github.com/repos/psf/requests/issues/380
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/380/labels{/name}
https://api.github.com/repos/psf/requests/issues/380/comments
https://api.github.com/repos/psf/requests/issues/380/events
https://github.com/psf/requests/issues/380
2,934,841
MDU6SXNzdWUyOTM0ODQx
380
redirect to bogus URL generates low-level exception; can do better
{ "avatar_url": "https://avatars.githubusercontent.com/u/1305819?v=4", "events_url": "https://api.github.com/users/computableinsights/events{/privacy}", "followers_url": "https://api.github.com/users/computableinsights/followers", "following_url": "https://api.github.com/users/computableinsights/following{/other_user}", "gists_url": "https://api.github.com/users/computableinsights/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/computableinsights", "id": 1305819, "login": "computableinsights", "node_id": "MDEyOk9yZ2FuaXphdGlvbjEzMDU4MTk=", "organizations_url": "https://api.github.com/users/computableinsights/orgs", "received_events_url": "https://api.github.com/users/computableinsights/received_events", "repos_url": "https://api.github.com/users/computableinsights/repos", "site_admin": false, "starred_url": "https://api.github.com/users/computableinsights/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/computableinsights/subscriptions", "type": "Organization", "url": "https://api.github.com/users/computableinsights", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-01-23T13:50:28Z
2021-09-09T07:05:23Z
2012-07-27T06:03:51Z
NONE
resolved
This issue is reported in tickets [#38](https://github.com/shazow/urllib3/issues/38) and [#39](https://github.com/shazow/urllib3/issues/39) in urllib3. These two URLs are examples that generate bogus redirect URLs. The exceptions raised by urllib3 and by requests are not useful. Can we create a more useful exception that says what is going on and can be caught specifically? Is this a known issue? Here are the two example URLs: > http://stats.e-go.gr/rx.asp?nWebSrvID=100230&nCatID=23425&nLevelId=-20&target=mailto%3Aadvertising%40pegasusinteractive%2Egr > > http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day ``` >>> r = requests.get('http://stats.e-go.gr/rx.asp?nWebSrvID=100230&nCatID=23425&nLevelId=-20&target=mailto%3Aadvertising%40pegasusinteractive%2Egr', allow_redirects=False) >>> r <Response [302]> >>> r.headers {'content-length': '161', 'x-powered-by': 'ASP.NET', 'set-cookie': 'nUserID=4862144; expires=Mon, 21-Jan-2013 22:00:00 GMT; path=/, ASPSESSIONIDCSQABRTR=NOJOKALCFLCHFCALIBBMFJIJ; path=/', 'expires': 'Mon, 23 Jan 2012 13:40:53 GMT', 'server': 'Microsoft-IIS/6.0', 'location': 'mailto:[email protected]', 'cache-control': 'False', 'date': 'Mon, 23 Jan 2012 13:41:53 GMT', 'p3p': 'CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"', 'content-type': 'text/html'} >>> >>> >>> r = requests.get('http://stats.e-go.gr/rx.asp?nWebSrvID=100230&nCatID=23425&nLevelId=-20&target=mailto%3Aadvertising%40pegasusinteractive%2Egr')Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50, in get return request('get', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 38, in request return s.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 200, in request r.send(prefetch=prefetch) File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 514, in send self._build_response(r) File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 253, in _build_response request.send() File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 430, in send conn = self._poolmanager.connection_from_url(url) File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/poolmanager.py", line 94, in connection_from_url scheme, host, port = get_host(url) File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 524, in get_host port = int(port) ValueError: invalid literal for int() with base 10: 'advertising%40pegasusinteractive.gr' >>> ``` notice the http://http:// at the beginning of the new location! --- (nice work Patch.com :-) ``` >>> r = requests.get('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day', allow_redirects=False) >>> r.headers {'status': '302', 'content-length': '160', 'content-encoding': 'gzip', 'set-cookie': 'p13n=%5B%5D; path=/, _patch_session=BAh7BzoPc2Vzc2lvbl9pZCIlNmEzYzM4YzZjMWIxMTdiNDkxMmEwNmEwM2JmZDQzYTU6FnByb21wdF9mb3Jfc3VydmV5aQA%3D--547af227538bb1d039809a3d01eaadb320a9a42b; domain=patch.com; path=/', 'x-powered-by': 'Phusion Passenger (mod_rails/mod_rack) 3.0.11', 'vary': 'Accept-Encoding', 'server': 'Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l Phusion_Passenger/3.0.11', 'x-runtime': '15', 'location': 'http://http://www.dailytribune.com/articles/2011/11/09/news/doc4ebb336cad1c7378471368.txt?viewmode=fullstory', 'cache-control': 'no-cache', 'date': 'Mon, 23 Jan 2012 13:32:36 GMT', 'content-type': 'text/html; charset=utf-8', 'x-rack-cache': 'miss'} >>> >>> >>> r = requests.get('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day')Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50, in get return request('get', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 38, in request return s.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 200, in request r.send(prefetch=prefetch) File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 514, in send self._build_response(r) File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 253, in _build_response request.send() File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 430, in send conn = self._poolmanager.connection_from_url(url) File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/poolmanager.py", line 94, in connection_from_url scheme, host, port = get_host(url) File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 524, in get_host port = int(port) ValueError: invalid literal for int() with base 10: '' ```
{ "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/380/reactions" }
https://api.github.com/repos/psf/requests/issues/380/timeline
null
completed
null
null
false
[ "Hmm, all we currently do is check that a schema exists in the url to verify that it's kosher. \n", "This problem is not only with redirects:\n\n``` python\n>>> requests.get('http://http://')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"requests\\api.py\", line 51, in get\n return request('get', url, **kwargs)\n File \"requests\\api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"requests\\sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"requests\\models.py\", line 463, in send\n conn = self._poolmanager.connection_from_url(url)\n File \"requests\\packages\\urllib3\\poolmanager.py\", line 89, in connection_from_url\n scheme, host, port = get_host(url)\n File \"requests\\packages\\urllib3\\connectionpool.py\", line 557, in get_host\n port = int(port)\nValueError: invalid literal for int() with base 10: ''\n```\n", "See also #323\n", "Solving the problem where we hit a mailto: URL isn't too bad, we just have to sanity check the scheme. I'm reluctant to throw exceptions only for mailto: URLs: might be worth deciding which schemes requests supports, and explicitly checking against them.\n\nThe case of the other two examples here is more difficult. Neither is a valid URL, and urlparse doesn't check for URL validity. My reading of [RFC 3986](http://tools.ietf.org/html/rfc3986) is that a colon is not a valid character in a domain name, but checking for that in a stupid way makes using IPv6 literals impossible.\n\nI see two obvious way of handling this. I could write a regex to determine if the netloc is an IP literal or a domain name, and throw a useful exception if it can't decide. Alternatively, we could catch the exceptions being raised by urllib3 and rethrow them. Doing that seems wrong, but I can't entirely articulate why.\n", "We support `http` and `https`. That shouldn't be changing any time soon.\n" ]
https://api.github.com/repos/psf/requests/issues/379
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/379/labels{/name}
https://api.github.com/repos/psf/requests/issues/379/comments
https://api.github.com/repos/psf/requests/issues/379/events
https://github.com/psf/requests/pull/379
2,928,532
MDExOlB1bGxSZXF1ZXN0NzIxMTE4
379
Added missing parentheses and “self.”
{ "avatar_url": "https://avatars.githubusercontent.com/u/223663?v=4", "events_url": "https://api.github.com/users/Telofy/events{/privacy}", "followers_url": "https://api.github.com/users/Telofy/followers", "following_url": "https://api.github.com/users/Telofy/following{/other_user}", "gists_url": "https://api.github.com/users/Telofy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Telofy", "id": 223663, "login": "Telofy", "node_id": "MDQ6VXNlcjIyMzY2Mw==", "organizations_url": "https://api.github.com/users/Telofy/orgs", "received_events_url": "https://api.github.com/users/Telofy/received_events", "repos_url": "https://api.github.com/users/Telofy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Telofy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Telofy/subscriptions", "type": "User", "url": "https://api.github.com/users/Telofy", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-22T20:24:03Z
2021-09-08T14:00:51Z
2012-01-22T20:25:05Z
NONE
resolved
Use e.g., http://telofy.spline.de/foo/lxml-bug-690110.html to test the error handling. (Originally created for an lxml bug.) Is the first block (ll. 751–755) even necessary?
{ "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/379/reactions" }
https://api.github.com/repos/psf/requests/issues/379/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/379.diff", "html_url": "https://github.com/psf/requests/pull/379", "merged_at": "2012-01-22T20:25:04Z", "patch_url": "https://github.com/psf/requests/pull/379.patch", "url": "https://api.github.com/repos/psf/requests/pulls/379" }
true
[ "Parens aren't needed there, but I'll take it :)\n", "Thanks for pulling; great library you have here. Regarding the parentheses, I think they are. Otherwise any `UnicodeError` is assigned to `TypeError`, while a `TypeError` is not caught, leading to behavior that looks utterly mind-boggling at first glance:\n\n```\nIn [5]: resp = requests.get('http://telofy.spline.de/foo/lxml-bug-690110.html')\n\nIn [6]: resp.text\n---------------------------------------------------------------------------\nTypeError Traceback (most recent call last)\n/home/telofy/documents/university/bsc/memaw/<ipython-input-6-89da6afc31f1> in <module>()\n----> 1 resp.text\n\n/home/telofy/.buildout/eggs/requests-0.10.0-py2.7.egg/requests/models.pyc in text(self)\n 758 if not content:\n 759 try:\n--> 760 content = unicode(content, encoding, errors='replace')\n 761 except UnicodeError, TypeError:\n 762 pass\n\nTypeError: coercing to Unicode: need string or buffer, NoneType found\n```\n" ]
https://api.github.com/repos/psf/requests/issues/378
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/378/labels{/name}
https://api.github.com/repos/psf/requests/issues/378/comments
https://api.github.com/repos/psf/requests/issues/378/events
https://github.com/psf/requests/issues/378
2,926,889
MDU6SXNzdWUyOTI2ODg5
378
Should None values in data be handled differently?
{ "avatar_url": "https://avatars.githubusercontent.com/u/830800?v=4", "events_url": "https://api.github.com/users/johtso/events{/privacy}", "followers_url": "https://api.github.com/users/johtso/followers", "following_url": "https://api.github.com/users/johtso/following{/other_user}", "gists_url": "https://api.github.com/users/johtso/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johtso", "id": 830800, "login": "johtso", "node_id": "MDQ6VXNlcjgzMDgwMA==", "organizations_url": "https://api.github.com/users/johtso/orgs", "received_events_url": "https://api.github.com/users/johtso/received_events", "repos_url": "https://api.github.com/users/johtso/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johtso/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johtso/subscriptions", "type": "User", "url": "https://api.github.com/users/johtso", "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
19
2012-01-22T14:39:05Z
2021-09-09T06:00:46Z
2012-08-25T14:35:49Z
CONTRIBUTOR
resolved
Currently, if data contains `None` values they are passed on to `urllib.urlencode` as normal. The behaviour of `urllib.urlencode` is to always call `str()` on the key/value. This results in the following: ``` python urllib.urlencode({'key': None}) # 'key=None' ``` To me this seems like odd behaviour. If anything it would make sense for it to result in `'key='`. One option would be to do something like `v = v or ''` before encoding the data. Alternatively exceptions could be raised if a key or value is `None`. Does this sound like something that should be changed?
{ "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/378/reactions" }
https://api.github.com/repos/psf/requests/issues/378/timeline
null
completed
null
null
false
[ "Good idea but we should check for `None` instead of `v = v or ''` to support falsy values like `{'key': 0}`.\n", "@johtso Strange thing. I got notification about your post which begins with _Ah yes, of course, forgot about 0. What about False? if (v is None) or (v is False): v =_ but I don't see your post from notification...\n", "Ah, I deleted it while reconsidering the problem :) Sorry for the confusion..\n\nTranslating `None` to `''` seems to make sense, but `False` doesn't really have any obvious translation..\n", "@kennethreitz, what do you think? :)\n", "This should not be happening ;)\n", "Maybe keys with None value should not be present in the request at all?\nAs to True/False I think mapping them to 1/0 sounds reasonable.\nThis functionality could (should?) be implemented as a hook.\n", "Looks like I've misunderstood things a bit.\n\n`'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks', 'params', 'config'` all have keys with `None` values removed from them.\n\n`data` is the only kwarg that _doesn't_ have keys with `None` values removed from it, due to no merging going on. Hence seeing `urllib.urlencode` translating them to `key=None`.\n\nSo the only question is, do we want to remove keys with values of `None` from `data` as we do elsewhere, leave the current behaviour (`str(None)`), or replace `None` with `''`.\n", "The only purpose of removal upon `None` is because of kwarg merging when sessions are involved. This only matters for `params`. \n\nI'd like to not make any changes to the behavior of `urlencode` of possible. No surprises that way :)\n", "Yeah, I think that's probably wise. If you want keys without values in your data, convert `None`s to `''` before passing them to your request.\n", "> `data` is the only kwarg that doesn't have keys with `None` values removed from it, due to no merging going on.\n\nIf this is the case then I think it's wrong. The behavior should be consistent.\n", "I agree with @piotr-dobrogost, keys with `None` values should be removed like the other maps.\n", "> The only purpose of removal upon None is because of kwarg merging when sessions are involved. \n\nWell, regardless of the reason it's convenient and logical.\n\n> This only matters for params. \n\nAs this issue shows this matters not only for params. Current behavior of having `key=None` as a payload of request does not make sense.\n", "I vote that this should behave how every other browser behaves, which is to just send across an empty string. (Just spent an hour debugging this issue with James Cleary).\n\nCal Leeming\nSimplicity Media Ltd\n", "FYI - to anyone else who is having this issue, we hotfix'd it using the following:\n\n```\n\n @staticmethod\n def _encode_params(data):\n \"\"\"Encode parameters in a piece of data.\n\n If the data supplied is a dictionary, encodes each parameter in it, and\n returns a list of tuples containing the encoded parameters, and a urlencoded\n version of that.\n\n Otherwise, assumes the data is already encoded appropriately, and\n returns it twice.\n \"\"\"\n\n if hasattr(data, '__iter__') and not isinstance(data, str):\n data = dict(data)\n\n\n if hasattr(data, 'items'):\n result = []\n for k, vs in list(data.items()):\n for v in isinstance(vs, list) and vs or [vs]:\n # Hotfix to resolve https://github.com/kennethreitz/requests/issues/378\n if v == None:\n result.append((k.encode('utf-8') if isinstance(k, str) else k,\n \"\"))\n else:\n result.append((k.encode('utf-8') if isinstance(k, str) else k,\n v.encode('utf-8') if isinstance(v, str) else v))\n\n return result, urlencode(result, doseq=True)\n else:\n return data, data\n\n```\n", "@foxx If you want to send empty string as a value of some param you should set its value to empty string. Why should requests send `key=''` when you pass `key=None` and not skip this param altogether? \nbtw, using `==` when comparing with `None` is bad style.\n", "> Why should requests send key='' when you pass key=None and not skip this param altogether? \n\nGuess my reply is, why SHOULDN'T it? It's a 50/50 split, and really comes down to the decision of the core maintainer I guess.\n\n> using == when comparing with None is bad style.\n\nYou're right, I probably should have used \"is None\" - I'll patch our side - thanks.\n", "It's not 50/50 split if you take into consideration some other aspects. In case of params requests already deletes keys with value set to `None` so for sake of being uniform here it should delete them too.\n", "Seven months later, resolved by #805!\n", ":trollface:\n" ]
https://api.github.com/repos/psf/requests/issues/377
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/377/labels{/name}
https://api.github.com/repos/psf/requests/issues/377/comments
https://api.github.com/repos/psf/requests/issues/377/events
https://github.com/psf/requests/issues/377
2,926,597
MDU6SXNzdWUyOTI2NTk3
377
async - RuntimeError: The content for this response was already consumed
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-01-22T13:17:41Z
2021-09-09T09:00:38Z
2012-04-09T03:42:59Z
NONE
resolved
``` python from requests import async request = async.get('http://httpbin.org/get') response = async.map([request])[0] print response, len(response.content) ``` OUTPUT ``` pytb Traceback (most recent call last): File "C:\Users\Piotr\sandbox\python\requets_content_already_consumed.py", line 5, in <module> print response, len(response.content) File "c:\users\piotr\projects\requests\requests\models.py", line 719, in content 'The content for this response was already consumed') RuntimeError: The content for this response was already consumed ``` This error is **NON DETERMINISTIC** Tested on Windows Vista x64 with Python 2.7.2 x64, gevent 0.13.6 x64, requests 0.10.0
{ "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/377/reactions" }
https://api.github.com/repos/psf/requests/issues/377/timeline
null
completed
null
null
false
[ "I get the same error with requests 0.10.1, gevent 0.13.6, on ubuntu\n", "I have this error when the server I'm trying to make a request to is not reachable.\n", "I am seeing the same thing on centos with gevent 0.13.6.\n", "I have been having troubles with this as well.\n\nLooking at this, the problem is is that the [self._content is set to None when there is no content](https://github.com/kennethreitz/requests/blob/18591920f3599d34a8c50d371d58d0d33bd4623f/requests/models.py#L736) (for an error or something similar), however once the content has been checked the flag is set and then the next time someone looks at content they get this error. [Prefetch is set to true on the async modules](https://github.com/kennethreitz/requests/blob/18591920f3599d34a8c50d371d58d0d33bd4623f/requests/async.py#L71), so this error is more likely to be encountered on errors (someone checking content on a regular request will get None the first time and an error the subsequent times).\n\nI am going to create a pull request that makes the _content attribute on response False on initialization and check if content is False now. \n", "Fixed thanks to @newmaniese \n" ]
https://api.github.com/repos/psf/requests/issues/376
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/376/labels{/name}
https://api.github.com/repos/psf/requests/issues/376/comments
https://api.github.com/repos/psf/requests/issues/376/events
https://github.com/psf/requests/pull/376
2,926,491
MDExOlB1bGxSZXF1ZXN0NzIwNTg4
376
Instead of select, we should use poll.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1305819?v=4", "events_url": "https://api.github.com/users/computableinsights/events{/privacy}", "followers_url": "https://api.github.com/users/computableinsights/followers", "following_url": "https://api.github.com/users/computableinsights/following{/other_user}", "gists_url": "https://api.github.com/users/computableinsights/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/computableinsights", "id": 1305819, "login": "computableinsights", "node_id": "MDEyOk9yZ2FuaXphdGlvbjEzMDU4MTk=", "organizations_url": "https://api.github.com/users/computableinsights/orgs", "received_events_url": "https://api.github.com/users/computableinsights/received_events", "repos_url": "https://api.github.com/users/computableinsights/repos", "site_admin": false, "starred_url": "https://api.github.com/users/computableinsights/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/computableinsights/subscriptions", "type": "Organization", "url": "https://api.github.com/users/computableinsights", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-22T12:50:22Z
2021-09-08T14:00:51Z
2012-01-23T07:56:44Z
NONE
resolved
select only goes up to 1024 FDs. So once we have used more than that, this would fail. poll (or epoll) fixes this. This solution uses poll and seems to work. My only test has been using a single session to fetch 10**4 pages a few times. Is there a more robust testing tool (framework?) that I should use. PS: Ken et al, this is my first attempt at a pull request, so if this is not the right way to do it, please educate me. I have several more suggested changes that I'd like to put forward for your consideration.
{ "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/376/reactions" }
https://api.github.com/repos/psf/requests/issues/376/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/376.diff", "html_url": "https://github.com/psf/requests/pull/376", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/376.patch", "url": "https://api.github.com/repos/psf/requests/pulls/376" }
true
[ "Because urllib3 is package from outside (http://code.google.com/p/urllib3/) I think you should push this patch to them directly.\n" ]
https://api.github.com/repos/psf/requests/issues/375
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/375/labels{/name}
https://api.github.com/repos/psf/requests/issues/375/comments
https://api.github.com/repos/psf/requests/issues/375/events
https://github.com/psf/requests/issues/375
2,926,099
MDU6SXNzdWUyOTI2MDk5
375
Should standard tests be run in async mode - feedback needed
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2012-01-22T10:43:26Z
2021-09-09T09:00:46Z
2012-03-08T01:26:48Z
NONE
resolved
There's going to be new module test_requests_async with tests for requests.async module. Should tests from current test_requests be somehow included in this new module so that each "standard" test would be run in async mode as well? If so how to go about "reusing" these tests without coping them to the new test_requests_async (with changes needed due to the current difference between normal and async api - mainly the need to call map() in the latter case)? Sample code in issue #383
{ "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/375/reactions" }
https://api.github.com/repos/psf/requests/issues/375/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/374
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/374/labels{/name}
https://api.github.com/repos/psf/requests/issues/374/comments
https://api.github.com/repos/psf/requests/issues/374/events
https://github.com/psf/requests/issues/374
2,924,928
MDU6SXNzdWUyOTI0OTI4
374
which Gevent to install?
{ "avatar_url": "https://avatars.githubusercontent.com/u/751825?v=4", "events_url": "https://api.github.com/users/pengkui/events{/privacy}", "followers_url": "https://api.github.com/users/pengkui/followers", "following_url": "https://api.github.com/users/pengkui/following{/other_user}", "gists_url": "https://api.github.com/users/pengkui/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pengkui", "id": 751825, "login": "pengkui", "node_id": "MDQ6VXNlcjc1MTgyNQ==", "organizations_url": "https://api.github.com/users/pengkui/orgs", "received_events_url": "https://api.github.com/users/pengkui/received_events", "repos_url": "https://api.github.com/users/pengkui/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pengkui/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pengkui/subscriptions", "type": "User", "url": "https://api.github.com/users/pengkui", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-22T03:36:24Z
2021-09-09T10:00:45Z
2012-01-22T04:12:40Z
NONE
resolved
Requests.async relies on the Gevent package. Question: which Gevent should I install, 0.9.x or 1.x? (The 0.9.x branch of Gevent relies on libevent, but 1.x is based on libev. Does this have any consequence on requests.async? ## Pengkui
{ "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/374/reactions" }
https://api.github.com/repos/psf/requests/issues/374/timeline
null
completed
null
null
false
[ "It shouldn't matter. The latest is recommended though :)\n" ]
https://api.github.com/repos/psf/requests/issues/373
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/373/labels{/name}
https://api.github.com/repos/psf/requests/issues/373/comments
https://api.github.com/repos/psf/requests/issues/373/events
https://github.com/psf/requests/pull/373
2,922,897
MDExOlB1bGxSZXF1ZXN0NzE5NTg1
373
Wrong indent if docstring is correct
{ "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
false
null
[]
null
0
2012-01-21T19:06:56Z
2014-07-20T01:36:21Z
2012-01-23T07:56:55Z
NONE
null
{ "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/373/reactions" }
https://api.github.com/repos/psf/requests/issues/373/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/373.diff", "html_url": "https://github.com/psf/requests/pull/373", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/373.patch", "url": "https://api.github.com/repos/psf/requests/pulls/373" }
true
[]
https://api.github.com/repos/psf/requests/issues/372
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/372/labels{/name}
https://api.github.com/repos/psf/requests/issues/372/comments
https://api.github.com/repos/psf/requests/issues/372/events
https://github.com/psf/requests/pull/372
2,920,929
MDExOlB1bGxSZXF1ZXN0NzE5MDkx
372
Facilitate for multiple hooks
{ "avatar_url": "https://avatars.githubusercontent.com/u/195266?v=4", "events_url": "https://api.github.com/users/jgorset/events{/privacy}", "followers_url": "https://api.github.com/users/jgorset/followers", "following_url": "https://api.github.com/users/jgorset/following{/other_user}", "gists_url": "https://api.github.com/users/jgorset/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jgorset", "id": 195266, "login": "jgorset", "node_id": "MDQ6VXNlcjE5NTI2Ng==", "organizations_url": "https://api.github.com/users/jgorset/orgs", "received_events_url": "https://api.github.com/users/jgorset/received_events", "repos_url": "https://api.github.com/users/jgorset/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jgorset/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jgorset/subscriptions", "type": "User", "url": "https://api.github.com/users/jgorset", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-01-21T11:15:40Z
2021-09-08T14:00:50Z
2012-01-21T12:14:35Z
CONTRIBUTOR
resolved
I implemented support for multiple hooks by passing a list of callables: ``` requests.get( url = 'http://example.org', hooks = { 'args': [do_something, do_something_else] } ) ``` In the interest of backwards compatibility (but mostly just because I think it's practical), it remains possible to pass a single hook without encapsulating it in a list: ``` requests.get( url = 'http://example.org', hooks = { 'args': do_something } ) ```
{ "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/372/reactions" }
https://api.github.com/repos/psf/requests/issues/372/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/372.diff", "html_url": "https://github.com/psf/requests/pull/372", "merged_at": "2012-01-21T12:14:35Z", "patch_url": "https://github.com/psf/requests/pull/372.patch", "url": "https://api.github.com/repos/psf/requests/pulls/372" }
true
[ "You're the man! \n", "This probably a wise approach. I feel like there should ben an append-mechanism though. LIke a hook register.\n", "I'll add an `add_hook` method to `Request`. We can then have the top-levels just utilize that internally.\n", "`register_hook`.\n" ]
https://api.github.com/repos/psf/requests/issues/371
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/371/labels{/name}
https://api.github.com/repos/psf/requests/issues/371/comments
https://api.github.com/repos/psf/requests/issues/371/events
https://github.com/psf/requests/pull/371
2,920,690
MDExOlB1bGxSZXF1ZXN0NzE5MDM1
371
Default the encoding of "text" media subtypes to "ISO-8859-1"
{ "avatar_url": "https://avatars.githubusercontent.com/u/195266?v=4", "events_url": "https://api.github.com/users/jgorset/events{/privacy}", "followers_url": "https://api.github.com/users/jgorset/followers", "following_url": "https://api.github.com/users/jgorset/following{/other_user}", "gists_url": "https://api.github.com/users/jgorset/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jgorset", "id": 195266, "login": "jgorset", "node_id": "MDQ6VXNlcjE5NTI2Ng==", "organizations_url": "https://api.github.com/users/jgorset/orgs", "received_events_url": "https://api.github.com/users/jgorset/received_events", "repos_url": "https://api.github.com/users/jgorset/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jgorset/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jgorset/subscriptions", "type": "User", "url": "https://api.github.com/users/jgorset", "user_view_type": "public" }
[]
closed
true
null
[]
null
11
2012-01-21T10:09:51Z
2021-09-08T13:06:15Z
2012-01-21T11:44:51Z
CONTRIBUTOR
resolved
Ref. HyperText Transfer Protocol, [section 3.7.1](http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1) on Canonicalization and Text Defaults.
{ "avatar_url": "https://avatars.githubusercontent.com/u/195266?v=4", "events_url": "https://api.github.com/users/jgorset/events{/privacy}", "followers_url": "https://api.github.com/users/jgorset/followers", "following_url": "https://api.github.com/users/jgorset/following{/other_user}", "gists_url": "https://api.github.com/users/jgorset/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jgorset", "id": 195266, "login": "jgorset", "node_id": "MDQ6VXNlcjE5NTI2Ng==", "organizations_url": "https://api.github.com/users/jgorset/orgs", "received_events_url": "https://api.github.com/users/jgorset/received_events", "repos_url": "https://api.github.com/users/jgorset/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jgorset/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jgorset/subscriptions", "type": "User", "url": "https://api.github.com/users/jgorset", "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/371/reactions" }
https://api.github.com/repos/psf/requests/issues/371/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/371.diff", "html_url": "https://github.com/psf/requests/pull/371", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/371.patch", "url": "https://api.github.com/repos/psf/requests/pulls/371" }
true
[ "I'm going to merge this, but into the `redsea` branch.\n", "Merged.\n", "What is the `redsea` branch, exactly?\n", "It'll be 0.10.0 ;)\n\nIt makes `Response.content` bytes-only, and a new `Response.text` unicode-only.\n", "oh, that's awesome!\n", "so, you're +1 then?\n", "Yes; I already decode `response.content` all over the place. I would consider renaming `response.content` to `response.bytes` in an attempt make its differences from `response.text` more immediately obvious, but I can see why you might not want to do that for compatibility reasons.\n", "well `response.content` now is unicode when it can be, bytes when it can't.\n", "Hmm. What are your thoughts on keeping the current implementation of `response.content` in the interest of backwards compatibility and introducing `response.bytes` and `response.text` for its typed representations... too much?\n", "Too much. The whole point is because in python3, you can't mix the two ;(\n", "Yes; `response.content` would need to be deprecated and removed in due time, leaving `response.bytes` and `response.text` for the encoded and decoded representations of the response body, respectively.\n\nThen again, it's probably not worth breaking backwards compatibility for a fundamental part of the API over a naming preference that may even only pertain to myself. ;-)\n" ]
https://api.github.com/repos/psf/requests/issues/370
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/370/labels{/name}
https://api.github.com/repos/psf/requests/issues/370/comments
https://api.github.com/repos/psf/requests/issues/370/events
https://github.com/psf/requests/pull/370
2,917,198
MDExOlB1bGxSZXF1ZXN0NzE3NzA5
370
tiny map() refactoring
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-20T21:35:47Z
2021-09-08T14:00:50Z
2012-01-21T13:13:15Z
NONE
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/370/reactions" }
https://api.github.com/repos/psf/requests/issues/370/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/370.diff", "html_url": "https://github.com/psf/requests/pull/370", "merged_at": "2012-01-21T13:13:15Z", "patch_url": "https://github.com/psf/requests/pull/370.patch", "url": "https://api.github.com/repos/psf/requests/pulls/370" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/369
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/369/labels{/name}
https://api.github.com/repos/psf/requests/issues/369/comments
https://api.github.com/repos/psf/requests/issues/369/events
https://github.com/psf/requests/issues/369
2,912,641
MDU6SXNzdWUyOTEyNjQx
369
requests.get() URL Encode Issue
{ "avatar_url": "https://avatars.githubusercontent.com/u/83122?v=4", "events_url": "https://api.github.com/users/jerryji/events{/privacy}", "followers_url": "https://api.github.com/users/jerryji/followers", "following_url": "https://api.github.com/users/jerryji/following{/other_user}", "gists_url": "https://api.github.com/users/jerryji/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerryji", "id": 83122, "login": "jerryji", "node_id": "MDQ6VXNlcjgzMTIy", "organizations_url": "https://api.github.com/users/jerryji/orgs", "received_events_url": "https://api.github.com/users/jerryji/received_events", "repos_url": "https://api.github.com/users/jerryji/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerryji/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerryji/subscriptions", "type": "User", "url": "https://api.github.com/users/jerryji", "user_view_type": "public" }
[]
closed
true
null
[]
null
19
2012-01-20T15:40:11Z
2021-09-09T00:28:17Z
2012-07-27T06:04:13Z
NONE
resolved
Hi, I noticed URL encode issue in get() -- In [32]: r = requests.get(r'http://i.ebayimg.com/00/s/ODAzWDEyODA=/$%28KGrHqV,!o8E63YcElkoBPFMhH2vUQ~~60_1.JPG') In [33]: r.status_code Out[33]: 404 In [34]: r = urllib2.urlopen("http://i.ebayimg.com/00/s/ODAzWDEyODA=/$%28KGrHqV,!o8E63YcElkoBPFMhH2vUQ~~60_1.JPG") In [35]: r.getcode() Out[35]: 200 In Wireshark, I see that it's because requests further encodes the URL (path) to """/00/s/ODAzWDEyODA%3D/%24%28KGrHqV%2C%21o8E63YcElkoBPFMhH2vUQ%7E%7E60_1.JPG""" Is it a 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/369/reactions" }
https://api.github.com/repos/psf/requests/issues/369/timeline
null
completed
null
null
false
[ "No, escaping urls is proper. Someone's working on a patch to make this optional, though.\n", "Thanks Kenneth (though this implies the default behavior of urllib2.urlopen is improper...)\n", "I'm having this issue with a project I'm working on and would like the patch for this being optional. Do you know who that \"someone\" working on the change is? Otherwise I could give it a go - I'd just like to avoid any duplicate work.\n", "I'm pretty sure this is a bit wonky, somehow:\n\npassing the URL: http://localhost:6060/test/United Kingdom/\nhits the server as: [03/Feb/2012 09:41:27] GET /test/United%2520Kingdom/\n\npassing the URL: http://localhost:6060/test/United%20Kingdom/\nhits the server as: [03/Feb/2012 09:43:44] GET /test/United%2520Kingdom/\n\nBoth of which don't match what a browser sends, for example:\n[03/Feb/2012 09:45:14] GET /test/United%20Kingdom/\n", "In what way is this behaviour proper? It shouldn't be up to the library to re-encode parts of a URL, I'm pretty sure that doesn't even make sense.\n\nFor example, as far as I can tell it's impossible to GET any url with an escaped slash in it. e.g if I try to get \"/%2F_blah\", it will be escaped to \"/%252F_blah\", which is wrong.\n", "This case is reopened to support the \"canonical\" behavior.\n", "@stringfellow that's a bug. It's double-encoding. This happened when I added Python 3 support. I'm working on it.\n\n@gfxmonk as I said, someone's working on a patch to make the escaping optional.\n", "@kennethreitz but you seem to be indicating that it is correct behaviour for most (or even some) cases. I can't see how it could ever be right, so it bothers me to see it even implemented (regardless of whether you can turn it off).\n", "`somesite.com/ø`\n", "That's not a valid URL - this should be an error. The user _must_ encode their URL components before combining them, you can't possibly guess after the fact which characters were intended to be used literally and which weren't.\n\nIf you must support requesting a unicode URL, you should at least restrict the encoding to only affect non-ascii characters (since they couldn't have possibly be meant literally, and therefore encoding them is at least reasonable, if not strictly correct).\n", "@gfxmonk it's not a URL, it's an IRI. Quoting needs to be optimized and optional.\n", "@kennethreitz What do you mean by optimised? Quicker? Or restricted to non-ASCII characters?\n\nI admit I hadn't heard of IRIs before now, but from a quick skim of the spec converting IRIs sounds like it must not escape an existing percent character, which the current code is doing.\n", "That's exactly what I mean :)\n\nI'm going to look closely at what chrome does. It seems to do this as we all expect.\n", "Ahh ok, sounds good. Sorry for spamming the thread, but one last thing - you may want to look at: http://unspecified.wordpress.com/2012/02/12/how-do-you-escape-a-complete-uri/\nThis explains it pretty well, and with specifics. You should be able to construct a correct set of characters to pass in as quote's `safe` argument to achieve this.\n", "Awesome, thanks.\n\nYou're always welcome to implement of course :)\n", "Hi. I'm the author of the post @gfxmonk posted above. I've had a look at the requests library and fixed both of the bugs in this thread. My branch [py3-uri-encoding](https://github.com/mgiuca/requests/tree/py3-uri-encoding) contains both fixes, as well as test cases.\n\nThere are two separate issues: the double-encoding and the quoting of reserved characters. (Perhaps we should have two bugs and two branches, but I was short on time.)\n\nFirst, the double-encoding is only a problem on Python 3 for me. In Python 2, it works great -- it unquotes and then quotes the path, which means that any illegal characters (such as '<') become quoted (to \"%3C\"), while any already-quoted characters (such as \"%3E\") remain quoted. It works on Unicode characters too. However, in Python 3, it has completely different behaviour: it simply encodes the path to UTF-8 (not necessary, since Python 3's quote automatically does this if given a Unicode string) and then quotes it. This results in double-quoting: '<' becomes \"%3C\", but \"%3E\" becomes \"%253E\".\n\nMy fix was basically to remove the Python 3 specific code and make it work the same as Python 2. I had to make a quick fix to utils.requote_path, and then it worked. On Python 3, it now just does the unquote and the requote, and that works.\n\nAs for the quoting of reserved characters, that is a more tricky issue. It is essentially the same problem as I outlined in my [blog post](http://unspecified.wordpress.com/2012/02/12/how-do-you-escape-a-complete-uri/). For some reason, all of this only concerns the path (I'd have applied it to the full URI, but for now, I'm just addressing how the path is handled). The current behaviour is to quote every character in the path except for '/', '%' and most of the unreserved characters. That violates [RFC 3986](http://tools.ietf.org/html/rfc3986#section-2.2):\n\n> URIs that differ in the replacement of a reserved character with its\n> corresponding percent-encoded octet are not equivalent. Percent-\n> encoding a reserved character, or decoding a percent-encoded octet\n> that corresponds to a reserved character, will change how the URI is\n> interpreted by most applications. Thus, characters in the reserved\n> set are protected from normalization and are therefore safe to be\n> used by scheme-specific and producer-specific algorithms for\n> delimiting data subcomponents within a URI.\n\nYou should NOT be tampering with any reserved characters. But I understand the desire to a) encode illegal characters (such as spaces and non-ASCII characters) so they form a valid URI, and b) unencode unreserved characters (such as '-') so they are easier to read without changing the semantics of the URI.\n\nThis took a bit of work, but I have rewritten requote_path so that it behaves the following way:\n1. Unquote only the unreserved characters, leaving reserved and illegal characters as-is.\n2. Quote only illegal characters, leaving reserved and unreserved characters as-is.\n\nNote that I have also changed how the tilde ('~') character is treated -- for some reason Python treats it as a reserved character, which is wrong. It is unreserved, so it ought to be unquoted.\n\nThat means that percent-encoded unreserved characters will end up being unquoted (which is legal, because they are equivalent either way), illegal characters will end up being quoted (which is required for a valid URI), and reserved characters will remain exactly as they were. This solves the original problem of this bug report (I can successfully pull down that eBay URL) because the special characters in the path '=' and '$' are left unquoted.\n\nThere isn't any point in making this \"optional\" -- the current behaviour is a violation of the RFC and is erroneously tampering with valid URIs. If you must make it optional, you should make the correct behaviour the default, and add an option to quote all reserved characters in the path.\n\nI have included comprehensive test cases for all of the behaviour described above.\n\nP.S. As you mentioned you were interested, in my [blog post](http://unspecified.wordpress.com/2012/02/12/how-do-you-escape-a-complete-uri/) I described exactly how Chrome performs URI cleaning. It is largely the same as I have implemented here, but it has a few wonky characters that don't get escaped properly.\n", "Is this issue now resolved?\n", "Hopefully! I need to poke around a bit first.\n", "Has this been resolved? I'm using 0.13.3 and Python 3.2 and \"oauth_token=A%3\" gets sent as \"oauth_token=A%253\". Is there a way I can get round to it?\n" ]
https://api.github.com/repos/psf/requests/issues/368
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/368/labels{/name}
https://api.github.com/repos/psf/requests/issues/368/comments
https://api.github.com/repos/psf/requests/issues/368/events
https://github.com/psf/requests/pull/368
2,905,333
MDExOlB1bGxSZXF1ZXN0NzEzMDIy
368
Decode response URL to a unicode string.
{ "avatar_url": "https://avatars.githubusercontent.com/u/195266?v=4", "events_url": "https://api.github.com/users/jgorset/events{/privacy}", "followers_url": "https://api.github.com/users/jgorset/followers", "following_url": "https://api.github.com/users/jgorset/following{/other_user}", "gists_url": "https://api.github.com/users/jgorset/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jgorset", "id": 195266, "login": "jgorset", "node_id": "MDQ6VXNlcjE5NTI2Ng==", "organizations_url": "https://api.github.com/users/jgorset/orgs", "received_events_url": "https://api.github.com/users/jgorset/received_events", "repos_url": "https://api.github.com/users/jgorset/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jgorset/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jgorset/subscriptions", "type": "User", "url": "https://api.github.com/users/jgorset", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-19T23:36:19Z
2021-09-08T13:06:15Z
2012-01-19T23:42:28Z
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/368/reactions" }
https://api.github.com/repos/psf/requests/issues/368/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/368.diff", "html_url": "https://github.com/psf/requests/pull/368", "merged_at": "2012-01-19T23:42:28Z", "patch_url": "https://github.com/psf/requests/pull/368.patch", "url": "https://api.github.com/repos/psf/requests/pulls/368" }
true
[ "\\o/! \n\nI've been waiting for this ;)\n" ]
https://api.github.com/repos/psf/requests/issues/367
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/367/labels{/name}
https://api.github.com/repos/psf/requests/issues/367/comments
https://api.github.com/repos/psf/requests/issues/367/events
https://github.com/psf/requests/issues/367
2,905,282
MDU6SXNzdWUyOTA1Mjgy
367
Impossible to submit multiple query parameter values on a single key cleanly
{ "avatar_url": "https://avatars.githubusercontent.com/u/118035?v=4", "events_url": "https://api.github.com/users/MostAwesomeDude/events{/privacy}", "followers_url": "https://api.github.com/users/MostAwesomeDude/followers", "following_url": "https://api.github.com/users/MostAwesomeDude/following{/other_user}", "gists_url": "https://api.github.com/users/MostAwesomeDude/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MostAwesomeDude", "id": 118035, "login": "MostAwesomeDude", "node_id": "MDQ6VXNlcjExODAzNQ==", "organizations_url": "https://api.github.com/users/MostAwesomeDude/orgs", "received_events_url": "https://api.github.com/users/MostAwesomeDude/received_events", "repos_url": "https://api.github.com/users/MostAwesomeDude/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MostAwesomeDude/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MostAwesomeDude/subscriptions", "type": "User", "url": "https://api.github.com/users/MostAwesomeDude", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2012-07-12T21:19:34Z", "closed_issues": 12, "created_at": "2012-02-12T10:25:48Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/13", "id": 83414, "labels_url": "https://api.github.com/repos/psf/requests/milestones/13/labels", "node_id": "MDk6TWlsZXN0b25lODM0MTQ=", "number": 13, "open_issues": 0, "state": "closed", "title": "v0.10.2", "updated_at": "2012-07-12T21:19:34Z", "url": "https://api.github.com/repos/psf/requests/milestones/13" }
7
2012-01-19T23:32:17Z
2021-09-09T07:05:36Z
2012-07-12T21:18:29Z
NONE
resolved
Related is #179, which theoretically fixes this. If there are a bunch of query parameters all with the same key and differing values, it is impossible to cleanly pass them in using the `params` kwarg, because whatever object is passed in on that route is `dict`ified. Real use case: Ganeti's API has a few calls which expect URLs to be in the following format: ``` https://ganeti.example.org:5800/2/some/tag/modifying/api/modify?tag=spam&tag=eggs&tag=spam&tag=spam&tag=bacon ``` This is circumventable by prepacking the troublesome parameters onto the URL instead of as kwargs, but it's a bit cumbersome and a better remedy would be preferable.
{ "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/367/reactions" }
https://api.github.com/repos/psf/requests/issues/367/timeline
null
completed
null
null
false
[ "Actually, this is super simple :)\n\n``` python\nparams={'tag': ('spam', 'eggs', 'spam', 'spam', 'bacon')}\n```\n\nThis should be documented.\n", "Sorry for not confirming your fix yet; it was a long weekend. I'll close upon confirmation. Should I also submit a docs patch for this?\n", "No worries :)\n\nA pull request would be quite fantastic.\n", "I feel like it should go in the advanced section.\n", "Confirmed working. Thanks a bunch. Pull request for docs will follow in a bit.\n", "I don't see an obvious way to do this with files though. I assume the following, but it doesn't work. Looking through the code I don't see an obvious way to do it. \n\n```\nfiles={'attachment': [('name1', file1), ('name2', file2)]}\n```\n\nI now see #285 covers files.\n", "This should be solved soon. Requests will accept \" dictionary update sequences\" everywhere.\n" ]
https://api.github.com/repos/psf/requests/issues/366
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/366/labels{/name}
https://api.github.com/repos/psf/requests/issues/366/comments
https://api.github.com/repos/psf/requests/issues/366/events
https://github.com/psf/requests/pull/366
2,905,061
MDExOlB1bGxSZXF1ZXN0NzEyOTA4
366
Elaborate on how to help
{ "avatar_url": "https://avatars.githubusercontent.com/u/195266?v=4", "events_url": "https://api.github.com/users/jgorset/events{/privacy}", "followers_url": "https://api.github.com/users/jgorset/followers", "following_url": "https://api.github.com/users/jgorset/following{/other_user}", "gists_url": "https://api.github.com/users/jgorset/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jgorset", "id": 195266, "login": "jgorset", "node_id": "MDQ6VXNlcjE5NTI2Ng==", "organizations_url": "https://api.github.com/users/jgorset/orgs", "received_events_url": "https://api.github.com/users/jgorset/received_events", "repos_url": "https://api.github.com/users/jgorset/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jgorset/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jgorset/subscriptions", "type": "User", "url": "https://api.github.com/users/jgorset", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-19T23:14:02Z
2021-09-08T13:06:14Z
2012-01-19T23:42:55Z
CONTRIBUTOR
resolved
I couldn't get the tests to run without `gunicorn` and `httpbin` installed, so I thought I'd mention them in the documentation on how to contribute.
{ "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/366/reactions" }
https://api.github.com/repos/psf/requests/issues/366/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/366.diff", "html_url": "https://github.com/psf/requests/pull/366", "merged_at": "2012-01-19T23:42:55Z", "patch_url": "https://github.com/psf/requests/pull/366.patch", "url": "https://api.github.com/repos/psf/requests/pulls/366" }
true
[ "This is great! I'm going to change it slightly, but thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/365
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/365/labels{/name}
https://api.github.com/repos/psf/requests/issues/365/comments
https://api.github.com/repos/psf/requests/issues/365/events
https://github.com/psf/requests/issues/365
2,902,753
MDU6SXNzdWUyOTAyNzUz
365
Install Failed on CentOS 5.6 + Python 2.4
{ "avatar_url": "https://avatars.githubusercontent.com/u/989846?v=4", "events_url": "https://api.github.com/users/raullenchai/events{/privacy}", "followers_url": "https://api.github.com/users/raullenchai/followers", "following_url": "https://api.github.com/users/raullenchai/following{/other_user}", "gists_url": "https://api.github.com/users/raullenchai/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/raullenchai", "id": 989846, "login": "raullenchai", "node_id": "MDQ6VXNlcjk4OTg0Ng==", "organizations_url": "https://api.github.com/users/raullenchai/orgs", "received_events_url": "https://api.github.com/users/raullenchai/received_events", "repos_url": "https://api.github.com/users/raullenchai/repos", "site_admin": false, "starred_url": "https://api.github.com/users/raullenchai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/raullenchai/subscriptions", "type": "User", "url": "https://api.github.com/users/raullenchai", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-19T20:05:31Z
2021-09-09T10:00:45Z
2012-01-19T20:06:15Z
NONE
resolved
[root@raullen ~]# easy_install requests Searching for requests Reading http://cheeseshop.python.org/pypi/requests/ Reading http://python-requests.org Reading http://cheeseshop.python.org/pypi/requests/0.9.3 Best match: requests 0.9.3 Downloading http://pypi.python.org/packages/source/r/requests/requests-0.9.3.tar.gz#md5=b13b6fbfa8fc3fc3c25bae300748053f Processing requests-0.9.3.tar.gz Running requests-0.9.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jyVdnT/requests-0.9.3/egg-dist-tmp-8CYvTK Traceback (most recent call last): File "/usr/bin/easy_install", line 7, in ? sys.exit( File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1670, in main with_ei_usage(lambda: File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1674, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/usr/lib/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26, in run_setup DirectorySandbox(setup_dir).run( File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 63, in run return func() File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 29, in <lambda> {'**file**':setup_script, '**name**':'**main**'} File "setup.py", line 6, in ? File "/tmp/easy_install-jyVdnT/requests-0.9.3/requests/**init**.py", line 26 from . import utils ^ SyntaxError: invalid syntax I will probably take a look on that!
{ "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/365/reactions" }
https://api.github.com/repos/psf/requests/issues/365/timeline
null
completed
null
null
false
[ "Python 2.4 is not supported.\n", "If this is the case, it would be better to mention it explicitly in the README or other instructing sheets to avoid confusion.\n" ]
https://api.github.com/repos/psf/requests/issues/364
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/364/labels{/name}
https://api.github.com/repos/psf/requests/issues/364/comments
https://api.github.com/repos/psf/requests/issues/364/events
https://github.com/psf/requests/pull/364
2,901,906
MDExOlB1bGxSZXF1ZXN0NzExNTk2
364
Allow sessions and async requests to mix.
{ "avatar_url": "https://avatars.githubusercontent.com/u/35401?v=4", "events_url": "https://api.github.com/users/gthank/events{/privacy}", "followers_url": "https://api.github.com/users/gthank/followers", "following_url": "https://api.github.com/users/gthank/following{/other_user}", "gists_url": "https://api.github.com/users/gthank/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gthank", "id": 35401, "login": "gthank", "node_id": "MDQ6VXNlcjM1NDAx", "organizations_url": "https://api.github.com/users/gthank/orgs", "received_events_url": "https://api.github.com/users/gthank/received_events", "repos_url": "https://api.github.com/users/gthank/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gthank/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gthank/subscriptions", "type": "User", "url": "https://api.github.com/users/gthank", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-19T19:06:02Z
2021-09-08T13:06:14Z
2012-01-19T19:12:24Z
NONE
resolved
Before, you couldn't pass a `session` keyword param to an async request. Now, you can. There's no test attached because a quick scan didn't reveal any tests of the async functionality.
{ "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/364/reactions" }
https://api.github.com/repos/psf/requests/issues/364/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/364.diff", "html_url": "https://github.com/psf/requests/pull/364", "merged_at": "2012-01-19T19:12:24Z", "patch_url": "https://github.com/psf/requests/pull/364.patch", "url": "https://api.github.com/repos/psf/requests/pulls/364" }
true
[ "You're the best.\n" ]
https://api.github.com/repos/psf/requests/issues/363
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/363/labels{/name}
https://api.github.com/repos/psf/requests/issues/363/comments
https://api.github.com/repos/psf/requests/issues/363/events
https://github.com/psf/requests/pull/363
2,891,412
MDExOlB1bGxSZXF1ZXN0NzA3ODI1
363
Stop always verifying certs for same host that has verified once.
{ "avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4", "events_url": "https://api.github.com/users/gazpachoking/events{/privacy}", "followers_url": "https://api.github.com/users/gazpachoking/followers", "following_url": "https://api.github.com/users/gazpachoking/following{/other_user}", "gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gazpachoking", "id": 187133, "login": "gazpachoking", "node_id": "MDQ6VXNlcjE4NzEzMw==", "organizations_url": "https://api.github.com/users/gazpachoking/orgs", "received_events_url": "https://api.github.com/users/gazpachoking/received_events", "repos_url": "https://api.github.com/users/gazpachoking/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions", "type": "User", "url": "https://api.github.com/users/gazpachoking", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-19T00:59:34Z
2021-09-08T13:06:13Z
2012-01-19T01:19:43Z
CONTRIBUTOR
resolved
Once a session had verified certs for a host once, it continued to do so even when verify was set to False. (A Timeout error was actually thrown the second time, due to the way the errors were handled) This fixes the issue.
{ "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/363/reactions" }
https://api.github.com/repos/psf/requests/issues/363/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/363.diff", "html_url": "https://github.com/psf/requests/pull/363", "merged_at": "2012-01-19T01:19:43Z", "patch_url": "https://github.com/psf/requests/pull/363.patch", "url": "https://api.github.com/repos/psf/requests/pulls/363" }
true
[ "Thanks!\n", ":sparkles: :cake: :sparkles:\n" ]
https://api.github.com/repos/psf/requests/issues/362
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/362/labels{/name}
https://api.github.com/repos/psf/requests/issues/362/comments
https://api.github.com/repos/psf/requests/issues/362/events
https://github.com/psf/requests/issues/362
2,891,159
MDU6SXNzdWUyODkxMTU5
362
https requests over proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/1316841?v=4", "events_url": "https://api.github.com/users/vly/events{/privacy}", "followers_url": "https://api.github.com/users/vly/followers", "following_url": "https://api.github.com/users/vly/following{/other_user}", "gists_url": "https://api.github.com/users/vly/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vly", "id": 1316841, "login": "vly", "node_id": "MDQ6VXNlcjEzMTY4NDE=", "organizations_url": "https://api.github.com/users/vly/orgs", "received_events_url": "https://api.github.com/users/vly/received_events", "repos_url": "https://api.github.com/users/vly/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vly/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vly/subscriptions", "type": "User", "url": "https://api.github.com/users/vly", "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
15
2012-01-19T00:29:58Z
2021-09-09T06:00:48Z
2012-08-22T20:07:39Z
NONE
resolved
Have run into an issue while trying to access https over proxy. Have had no issues doing the same via curl. Here is a log of attempting to access https://github.com: ``` python PROXY_LIST = { 'http':'http://myproxy:80' , 'https':'http://myproxy:80' } connection = requests.get('https://github.com',proxies=PROXY_LIST) print connection.content ``` Outputs: ``` html <html> <head><title>400 The plain HTTP request was sent to HTTPS port</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> <center>The plain HTTP request was sent to HTTPS port</center> <hr><center>nginx/1.0.4</center> </body> </html> ``` Any suggestions would be appreciated.
{ "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/362/reactions" }
https://api.github.com/repos/psf/requests/issues/362/timeline
null
completed
null
null
false
[ "I too am getting hit by this issue. It appears that `requests` fails to send a CONNECT request for the SSL handshake before sending the GET request.\n", "http://stackoverflow.com/questions/8287628/proxies-with-python-requests-module\n", "http://stackoverflow.com/questions/8482896/making-http-requests-via-python-requests-module-not-working-via-proxy-where-curl\n", "Quick note, the following works using urllib2:\n\n```\nimport urllib2\n\nurl = 'https://google.com'\nproxy = urllib2.ProxyHandler({'https': '1.2.3.4:5678'})\nopener = urllib2.build_opener(proxy)\nurllib2.install_opener(opener)\nrequest = urllib2.Request(url)\nresponse = urllib2.urlopen(request)\n```\n", "To be clear, this is a bug.\n", "@shazow, we need to send `CONNECT` first.\n", "@kennethreitz For which? How do you implement proxies? Are you using ProxyManager?\n", "@shazow https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L447\n", "@kennethreitz Thanks! Hmm. The underlying HTTPSConnectionPool should be making a CONNECT.\n\nAre you sure you're actually setting it to HTTPS? Because if you look at the example...\n\n``` python\nPROXY_LIST = {\n 'http':'http://myproxy:80' ,\n 'https':'http://myproxy:80'\n}\n```\n\nBoth of the proxies are http and port 80, so urllib3 has no way of knowing it's HTTPS unless you do it explicitly.\n\nAnyways, if it is urllib3's fault, if someone writes a failing test in urllib3, I'll look into it this weekend. :)\n\nSomething between...\nhttps://github.com/shazow/urllib3/blob/master/test/with_dummyserver/test_https.py and\nhttps://github.com/shazow/urllib3/blob/master/test/with_dummyserver/test_socketlevel.py\n", "Ah, we're getting it from the scheme of the proxy, not the key in the dict. hmm.\n", "From what I can gather, the problem apperas when trying to use HTTP proxy to connect to the HTTPS destination (at least that's my use case, I think it fits the description of this issue).\n\nApparently, httplib does have support for HTTP Tunneling (ie. CONNECT), which is needed to do HTTPS over HTTP, but it was added only recently, in 2.7 (which kind of decreases the usefullness the hacks described). But it's not used automatically, it needs to be specifically set using set_tunnel()\n\nI tried to see how difficult it would be to hack the support in (modifying both urllib3 and requests), and ended up with the following:\n- Modified requests.models to pass the destination URL to poolmanager.proxy_from_url()\n- Modified poolmanager.proxy_from_url() to check whether the destination scheme is HTTPS, and if so, set a flag while calling connectionpool.connection_from_url()\n- Modified connectionpool.connection_from_url() to check this flag, and if it's set, and the scheme for the connection itself is HTTP, use HTTPSConnectionPool nevertheless and set a flag to tell it it's HTTPS over HTTP\n- Modified HTTPSConnectionPool._new_conn to check for this flag, and if it's HTTPS over HTTP, force usage of plain ol' HTTPSConnection instead of VerifiedHTTPSConnection\n- Modified HTTPConnectionPool._make_request() to check that url is not the same host, and the url scheme is https (meaning we're tunneling HTTPS), and use httlib's set_tunnel() \n\nI have no idea whether the above steps are a horrible, horrible hack, or a good way to solve this, but it does work for me.\n\nIf it sounds sane, I can make patches for requests and urllib3 to properly implement it. If there's a better way, please tell me :)\n", "@senko Hmm interesting. And this only works in 2.7 and silently passes in earlier versions?\n\nI'd love to see the actual changes, would be great if you sent a pull request to urllib3. HTTPS over HTTP is not something I considered before, so it's something I'd like to look into with your help. :-)\n\nBonus points if you include an HTTPS over HTTP unit test... (Might be challenging)\n", "(EDITED)\n\nHi guys,\n\nWe came up against this problem and have implemented a very bleeding edge fix, based on the original code from urllib2 - however it seems to be having issues.\n\nSoon as we've got something stable, we'll re-post here.\n", "Hi all,\n\nJust to let you know, we've now added SSL and SOCKS proxy support into our latest fork.\n\nIf you want to grab it whilst it's hot, see the following:\nhttps://github.com/kennethreitz/requests/pull/478\n\nHope this helps!\n\nCal\n", "I believe this is fixed and can be closed based upon the merge of https://github.com/kennethreitz/requests/pull/478 \n\nSimple smoke test\n\n``` sh\npip install mitmproxy\nmitmproxy\n```\n\n``` python\nPROXY_LIST = { 'https':'http://localhost:8080' }\nc = requests.get('https://github.com/', proxies=PROXY_LIST)\n```\n\nObserver connection in mitmproxy\n" ]
https://api.github.com/repos/psf/requests/issues/361
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/361/labels{/name}
https://api.github.com/repos/psf/requests/issues/361/comments
https://api.github.com/repos/psf/requests/issues/361/events
https://github.com/psf/requests/pull/361
2,876,681
MDExOlB1bGxSZXF1ZXN0NzAyMTM5
361
Added requests.Response.response_time
{ "avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4", "events_url": "https://api.github.com/users/btoews/events{/privacy}", "followers_url": "https://api.github.com/users/btoews/followers", "following_url": "https://api.github.com/users/btoews/following{/other_user}", "gists_url": "https://api.github.com/users/btoews/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/btoews", "id": 1144197, "login": "btoews", "node_id": "MDQ6VXNlcjExNDQxOTc=", "organizations_url": "https://api.github.com/users/btoews/orgs", "received_events_url": "https://api.github.com/users/btoews/received_events", "repos_url": "https://api.github.com/users/btoews/repos", "site_admin": false, "starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/btoews/subscriptions", "type": "User", "url": "https://api.github.com/users/btoews", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2012-01-17T23:47:44Z
2021-09-08T13:06:13Z
2012-01-23T07:59:22Z
CONTRIBUTOR
resolved
Added requests.Response.response_time to keep track of how long requests take. The user could keep track of this himself except for when he is using requests.async.
{ "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/361/reactions" }
https://api.github.com/repos/psf/requests/issues/361/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/361.diff", "html_url": "https://github.com/psf/requests/pull/361", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/361.patch", "url": "https://api.github.com/repos/psf/requests/pulls/361" }
true
[ "Two notes:\n1. `float(datetime.now().strftime(\"%s.%f\"))` is exceedingly inefficient compared to `time.time()`, which returns a float directly.\n2. I would measure the end time immediately before the response hook call so you don't measure other things than the actual request processing.\n", "updated\n", "ya know, it might be a good idea for me to run my code before pushing it :) . fixed and tested\n", "> ya know, it might be a good idea for me to run my code before pushing it :) \n\nNo, it's not enough to merely run code. You should run tests before submitting code.\n", "I am often times too much in the hacker state of mind and not enough in the developer state of mind. I wrote a test for the response_time and made sure that I didn't break anything else.\n", "Interesting.\n\nHolding off on this for now. Going to think about it ;)\n", "@kennethreitz Note that this would be a trivial user addition if multiple hooks were supported, which would be a nice way to add this for people who care without adding two syscalls (albeit an extremely cheap call on modern Unix variants) per request for everyone.\n", "@acdha multiple hooks would be huge. I want. Badly.\n", "@acdha multiple hooks are in!\n", "(Closing for hooks)\n\nMaybe it would be worthwhile having this hook be built in.\n" ]
https://api.github.com/repos/psf/requests/issues/360
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/360/labels{/name}
https://api.github.com/repos/psf/requests/issues/360/comments
https://api.github.com/repos/psf/requests/issues/360/events
https://github.com/psf/requests/pull/360
2,874,835
MDExOlB1bGxSZXF1ZXN0NzAxMzYx
360
Make requests.async.send asynchronous
{ "avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4", "events_url": "https://api.github.com/users/btoews/events{/privacy}", "followers_url": "https://api.github.com/users/btoews/followers", "following_url": "https://api.github.com/users/btoews/following{/other_user}", "gists_url": "https://api.github.com/users/btoews/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/btoews", "id": 1144197, "login": "btoews", "node_id": "MDQ6VXNlcjExNDQxOTc=", "organizations_url": "https://api.github.com/users/btoews/orgs", "received_events_url": "https://api.github.com/users/btoews/received_events", "repos_url": "https://api.github.com/users/btoews/repos", "site_admin": false, "starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/btoews/subscriptions", "type": "User", "url": "https://api.github.com/users/btoews", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-01-17T21:24:24Z
2021-09-08T23:05:25Z
2012-01-17T21:32:05Z
CONTRIBUTOR
resolved
The async.send method wasn't really doing anything useful. It was just calling the r.send() method of the Request object 'r'. It took an optional kwarg pools, and assigned it to r._pools which isn't used by anything. This situation was eaither broken or not fully implemented yet. I modified async.map to call r.send rather than send(r) and then modified async.send to actually make use of the pool that it is passed.
{ "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/360/reactions" }
https://api.github.com/repos/psf/requests/issues/360/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/360.diff", "html_url": "https://github.com/psf/requests/pull/360", "merged_at": "2012-01-17T21:32:05Z", "patch_url": "https://github.com/psf/requests/pull/360.patch", "url": "https://api.github.com/repos/psf/requests/pulls/360" }
true
[ "Love it. Thanks!\n", "Btw, any idea how http pools (provided by urllib3) mix with gevent pools?\n", "each request is handled separately, and an http pool is contained within each request.\n", "Hmm, actually, if the `session` argument was passed implicitly to each request as it was created, they'd all be using the same pool. We should do some tests.\n" ]
https://api.github.com/repos/psf/requests/issues/359
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/359/labels{/name}
https://api.github.com/repos/psf/requests/issues/359/comments
https://api.github.com/repos/psf/requests/issues/359/events
https://github.com/psf/requests/pull/359
2,871,178
MDExOlB1bGxSZXF1ZXN0Njk5ODY1
359
chunked streaming+line reading
{ "avatar_url": "https://avatars.githubusercontent.com/u/156838?v=4", "events_url": "https://api.github.com/users/RonnyPfannschmidt/events{/privacy}", "followers_url": "https://api.github.com/users/RonnyPfannschmidt/followers", "following_url": "https://api.github.com/users/RonnyPfannschmidt/following{/other_user}", "gists_url": "https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RonnyPfannschmidt", "id": 156838, "login": "RonnyPfannschmidt", "node_id": "MDQ6VXNlcjE1NjgzOA==", "organizations_url": "https://api.github.com/users/RonnyPfannschmidt/orgs", "received_events_url": "https://api.github.com/users/RonnyPfannschmidt/received_events", "repos_url": "https://api.github.com/users/RonnyPfannschmidt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RonnyPfannschmidt/subscriptions", "type": "User", "url": "https://api.github.com/users/RonnyPfannschmidt", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-17T16:46:28Z
2021-09-08T13:06:12Z
2012-01-19T02:55:12Z
CONTRIBUTOR
resolved
this branch adds custom reading for chunked responses that way the iter_content function has chunk boundaries as additional boundaries, additionally iter_lines will no longer keep a completed line in pending that way using requests for chunk streamed update notifications from couchdb gets actually usefull there are probably some rough edges i need to check, but the basic stuff works, please review and yell at me
{ "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/359/reactions" }
https://api.github.com/repos/psf/requests/issues/359/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/359.diff", "html_url": "https://github.com/psf/requests/pull/359", "merged_at": "2012-01-19T02:55:12Z", "patch_url": "https://github.com/psf/requests/pull/359.patch", "url": "https://api.github.com/repos/psf/requests/pulls/359" }
true
[ "Looks good. I'm about to release this. Objections?\n", "@RonnyPfannschmidt I'm looking into debugging issue #436 with generate_chunked and noticed you merged this. I was wondering if you had any insight on what the trouble is there?\n" ]
https://api.github.com/repos/psf/requests/issues/358
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/358/labels{/name}
https://api.github.com/repos/psf/requests/issues/358/comments
https://api.github.com/repos/psf/requests/issues/358/events
https://github.com/psf/requests/issues/358
2,862,235
MDU6SXNzdWUyODYyMjM1
358
Session prefetch parameter.
{ "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": "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
4
2012-01-16T23:58:33Z
2021-09-09T06:00:53Z
2012-08-09T17:44:45Z
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/358/reactions" }
https://api.github.com/repos/psf/requests/issues/358/timeline
null
completed
null
null
false
[ "Pull request made: https://github.com/kennethreitz/requests/pull/463\n", "Is this issue closed?\n\n(I am scraping to find something that I can fix :D )\n", "What's the state of this @kennethreitz ? Because it looks done to me...\n", "indeed, thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/357
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/357/labels{/name}
https://api.github.com/repos/psf/requests/issues/357/comments
https://api.github.com/repos/psf/requests/issues/357/events
https://github.com/psf/requests/pull/357
2,858,585
MDExOlB1bGxSZXF1ZXN0Njk1NDg2
357
testing against httpbin.org on Windows by default
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-01-16T18:32:58Z
2021-09-09T00:01:27Z
2012-01-20T20:54:22Z
NONE
resolved
use of new HTTPBIN_HOST environment variable platform specific import of envoy Caution, it's not tested under Linux.
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "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/357/reactions" }
https://api.github.com/repos/psf/requests/issues/357/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/357.diff", "html_url": "https://github.com/psf/requests/pull/357", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/357.patch", "url": "https://api.github.com/repos/psf/requests/pulls/357" }
true
[ "Why did you remove all of the idna and unicode url tests?\n", "I amended this commit. Should be good now.\n", "As you think of using standard http server I'm closing this.\n" ]
https://api.github.com/repos/psf/requests/issues/356
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/356/labels{/name}
https://api.github.com/repos/psf/requests/issues/356/comments
https://api.github.com/repos/psf/requests/issues/356/events
https://github.com/psf/requests/issues/356
2,834,454
MDU6SXNzdWUyODM0NDU0
356
Session + params giving a 411 error
{ "avatar_url": "https://avatars.githubusercontent.com/u/252257?v=4", "events_url": "https://api.github.com/users/maraujop/events{/privacy}", "followers_url": "https://api.github.com/users/maraujop/followers", "following_url": "https://api.github.com/users/maraujop/following{/other_user}", "gists_url": "https://api.github.com/users/maraujop/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maraujop", "id": 252257, "login": "maraujop", "node_id": "MDQ6VXNlcjI1MjI1Nw==", "organizations_url": "https://api.github.com/users/maraujop/orgs", "received_events_url": "https://api.github.com/users/maraujop/received_events", "repos_url": "https://api.github.com/users/maraujop/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maraujop/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maraujop/subscriptions", "type": "User", "url": "https://api.github.com/users/maraujop", "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
2
2012-01-13T18:07:23Z
2021-09-09T10:00:38Z
2012-02-12T10:20:31Z
NONE
resolved
One test in requests-oauth is failing and I think is due to requests itself. It's this one: https://github.com/maraujop/requests-oauth/blob/dev/tests/tests.py#L77 When passing parameters to a session, I'm getting a 411 Length Required error. I've sniffed the traffic and `Content-Length` is not in headers. Cheers, Miguel
{ "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/356/reactions" }
https://api.github.com/repos/psf/requests/issues/356/timeline
null
completed
null
null
false
[ "Same problem here:\n\n``` python\nimport requests\nfrom lxml.html import fromstring\n\n\ns = requests.session()\n\nlogin_req = s.get('http://music.google.com/')\nlogin_tree = fromstring(login_req.content)\nlogin_form = login_tree.forms[0]\nlogin_values = dict(login_form.form_values())\nlogin_values.update({'Email': '[email protected]', 'Passwd': 'ilovethepony'})\n\ng_music_req = s.post(login_form.action, data=login_values, allow_redirects=True)\nprint g_music_req.status_code\n# 411\n```\n", "Closing for #223\n" ]
https://api.github.com/repos/psf/requests/issues/355
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/355/labels{/name}
https://api.github.com/repos/psf/requests/issues/355/comments
https://api.github.com/repos/psf/requests/issues/355/events
https://github.com/psf/requests/pull/355
2,834,148
MDExOlB1bGxSZXF1ZXN0Njg3Nzk5
355
Added prefetch documentation for api
{ "avatar_url": "https://avatars.githubusercontent.com/u/51793?v=4", "events_url": "https://api.github.com/users/fkumro/events{/privacy}", "followers_url": "https://api.github.com/users/fkumro/followers", "following_url": "https://api.github.com/users/fkumro/following{/other_user}", "gists_url": "https://api.github.com/users/fkumro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fkumro", "id": 51793, "login": "fkumro", "node_id": "MDQ6VXNlcjUxNzkz", "organizations_url": "https://api.github.com/users/fkumro/orgs", "received_events_url": "https://api.github.com/users/fkumro/received_events", "repos_url": "https://api.github.com/users/fkumro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fkumro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fkumro/subscriptions", "type": "User", "url": "https://api.github.com/users/fkumro", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-13T17:40:34Z
2021-09-08T13:06:12Z
2012-01-13T22:38:09Z
CONTRIBUTOR
resolved
I read issue #354 and it was simple enough so I added the prefetch doc line to api.py. I believe that should take care of the issue.
{ "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/355/reactions" }
https://api.github.com/repos/psf/requests/issues/355/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/355.diff", "html_url": "https://github.com/psf/requests/pull/355", "merged_at": "2012-01-13T22:38:09Z", "patch_url": "https://github.com/psf/requests/pull/355.patch", "url": "https://api.github.com/repos/psf/requests/pulls/355" }
true
[ "Awesome, thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/354
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/354/labels{/name}
https://api.github.com/repos/psf/requests/issues/354/comments
https://api.github.com/repos/psf/requests/issues/354/events
https://github.com/psf/requests/issues/354
2,819,098
MDU6SXNzdWUyODE5MDk4
354
prefech param not documented in api.request
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-12T15:14:33Z
2021-09-09T10:00:44Z
2012-01-23T08:02:34Z
NONE
resolved
`api.request` calls `Session.request` forwarding kwargs to it. This makes it possible to pass `prefech` param used by the latter. In spite of this `prefech` is not documented as one of params of `api.request`
{ "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/354/reactions" }
https://api.github.com/repos/psf/requests/issues/354/timeline
null
completed
null
null
false
[ "You should send a pull request then ;)\n" ]
https://api.github.com/repos/psf/requests/issues/353
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/353/labels{/name}
https://api.github.com/repos/psf/requests/issues/353/comments
https://api.github.com/repos/psf/requests/issues/353/events
https://github.com/psf/requests/issues/353
2,803,099
MDU6SXNzdWUyODAzMDk5
353
'allow_redirects' cause a post request to hang
{ "avatar_url": "https://avatars.githubusercontent.com/u/221886?v=4", "events_url": "https://api.github.com/users/ksamuel/events{/privacy}", "followers_url": "https://api.github.com/users/ksamuel/followers", "following_url": "https://api.github.com/users/ksamuel/following{/other_user}", "gists_url": "https://api.github.com/users/ksamuel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ksamuel", "id": 221886, "login": "ksamuel", "node_id": "MDQ6VXNlcjIyMTg4Ng==", "organizations_url": "https://api.github.com/users/ksamuel/orgs", "received_events_url": "https://api.github.com/users/ksamuel/received_events", "repos_url": "https://api.github.com/users/ksamuel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ksamuel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ksamuel/subscriptions", "type": "User", "url": "https://api.github.com/users/ksamuel", "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
6
2012-01-11T11:06:54Z
2021-09-09T07:05:23Z
2012-07-27T06:05:18Z
NONE
resolved
I tried the following code: ``` response = requests.post(url, data=request.message, headers=request.headers, allow_redirects=True) ``` But it hangs forever (no error) while this works (I get redirected and got the finale response): ``` while status_code.startswith('3'): response = requests.post(url, data=request.message, headers=request.headers) status_code = str(response.status_code) url = response.headers.get('location', '') ``` More informations: - Initial Url is http, and it's redirected to https. The adresse remains the same. - The first request returns nothing but the redirection returns XLM. - This is tested in ipython only for now. I digged into the code, and it hangs here, in models.py: ``` # The inner try .. except re-raises certain exceptions as # internal exception types; the outer suppresses exceptions # when safe mode is set. try: # Send the request. r = conn.urlopen( method=self.method, url=self.path_url, body=body, headers=self.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=True, retries=self.config.get('max_retries', 0), timeout=self.timeout, ) ``` Some more info: ``` # arguments ipdb> dict( method=self.method, url=self.path_url, body=body, headers=self.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=True, retries=self.config.get('max_retries', 0), timeout=self.timeout) {'redirect': False, 'retries': 0, 'url': '/dir/doc.asmx', 'body': None, 'headers': {'Content-Length': '26337', 'Accept-Encoding': 'identity, deflate, compress, gzip', 'SOAPAction': u'"http://tempuri.org/Method"', 'Content-Type': 'text/xml; charset=utf-8', 'Accept': '*/*', 'User-Agent': 'python-requests/0.9.1'}, 'timeout': None, 'preload_content': False, 'assert_same_host': False, 'method': 'POST', 'decode_content': True} # local variables ipdb> locals() {'body': None, 'url': 'https://subdomain.domain.org/dir/doc.asmx', 'ipdb': <module 'ipdb' from '/home/me/.virtualenvs/project/local/lib/python2.7/site-packages/ipdb/__init__.pyc'>, 'self': <Request [POST]>, 'anyway': False, '_p': ParseResult(scheme='https', netloc='subdomain.domain.org', path='/dir/doc.asmx', params='', query='', fragment=''), 'cert_loc': '/home/me/.virtualenvs/project/local/lib/python2.7/site-packages/certifi/cacert.pem', 'proxy': None, 'content_type': None, 'conn': <requests.packages.urllib3.connectionpool.HTTPSConnectionPool object at 0x2bf9650>, 'prefetch': False} # platform ipdb> sys.version '2.7.2+ (default, Oct 4 2011, 20:06:09) \n[GCC 4.6.1]' ipdb> requests.__version__ '0.9.1' ``` I'm on Ubuntu 11.10 64 bits.)
{ "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/353/reactions" }
https://api.github.com/repos/psf/requests/issues/353/timeline
null
completed
null
null
false
[ "Sorry for the bug! I'll look into it. \n", "Is the URL that you were testing against public?\n", "It's publicly accessible, but I'd rather not post it on github. I can send it to you using a private message.\n", "That's fine. It'll help me debug :)\n", "Did you receive the email ?\n", "I did, thanks! I'll let you know when I have an update.\n" ]
https://api.github.com/repos/psf/requests/issues/352
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/352/labels{/name}
https://api.github.com/repos/psf/requests/issues/352/comments
https://api.github.com/repos/psf/requests/issues/352/events
https://github.com/psf/requests/pull/352
2,798,815
MDExOlB1bGxSZXF1ZXN0Njc0NDcw
352
Fix bug in HTTP-digest auth w/ URI having query string
{ "avatar_url": "https://avatars.githubusercontent.com/u/21773?v=4", "events_url": "https://api.github.com/users/tmoertel/events{/privacy}", "followers_url": "https://api.github.com/users/tmoertel/followers", "following_url": "https://api.github.com/users/tmoertel/following{/other_user}", "gists_url": "https://api.github.com/users/tmoertel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tmoertel", "id": 21773, "login": "tmoertel", "node_id": "MDQ6VXNlcjIxNzcz", "organizations_url": "https://api.github.com/users/tmoertel/orgs", "received_events_url": "https://api.github.com/users/tmoertel/received_events", "repos_url": "https://api.github.com/users/tmoertel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tmoertel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tmoertel/subscriptions", "type": "User", "url": "https://api.github.com/users/tmoertel", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-10T23:57:25Z
2021-09-08T13:06:11Z
2012-01-12T20:52:03Z
NONE
resolved
When there's a query string in the request URL, we need to separate it from the parsed path with a question mark when constructing the digest input. (Sorry, I didn't add a test case for the problem.)
{ "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/352/reactions" }
https://api.github.com/repos/psf/requests/issues/352/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/352.diff", "html_url": "https://github.com/psf/requests/pull/352", "merged_at": "2012-01-12T20:52:03Z", "patch_url": "https://github.com/psf/requests/pull/352.patch", "url": "https://api.github.com/repos/psf/requests/pulls/352" }
true
[ "I can confirm that this patch fixes a bug I ran into where all of my HTTP Digest Auth request calls worked except ones with query strings (like /whatever?foo=bar). I could observe this in wireshark where the query strings were being truncated by requests.\n", "Thanks a ton! \n" ]
https://api.github.com/repos/psf/requests/issues/351
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/351/labels{/name}
https://api.github.com/repos/psf/requests/issues/351/comments
https://api.github.com/repos/psf/requests/issues/351/events
https://github.com/psf/requests/issues/351
2,798,567
MDU6SXNzdWUyNzk4NTY3
351
unable to install requests on centos 5.5 with Python 2.4.3
{ "avatar_url": "https://avatars.githubusercontent.com/u/426822?v=4", "events_url": "https://api.github.com/users/kamal2222ahmed/events{/privacy}", "followers_url": "https://api.github.com/users/kamal2222ahmed/followers", "following_url": "https://api.github.com/users/kamal2222ahmed/following{/other_user}", "gists_url": "https://api.github.com/users/kamal2222ahmed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kamal2222ahmed", "id": 426822, "login": "kamal2222ahmed", "node_id": "MDQ6VXNlcjQyNjgyMg==", "organizations_url": "https://api.github.com/users/kamal2222ahmed/orgs", "received_events_url": "https://api.github.com/users/kamal2222ahmed/received_events", "repos_url": "https://api.github.com/users/kamal2222ahmed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kamal2222ahmed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kamal2222ahmed/subscriptions", "type": "User", "url": "https://api.github.com/users/kamal2222ahmed", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-10T23:35:39Z
2021-09-08T23:06:54Z
2012-01-10T23:38:10Z
NONE
resolved
sudo easy_install requests Searching for requests Reading http://pypi.python.org/simple/requests/ Reading https://github.com/kennethreitz/requests Reading http://python-requests.org Best match: requests 0.9.1 Downloading http://pypi.python.org/packages/source/r/requests/requests-0.9.1.tar.gz#md5=8ed4667edb5d57945b74a9137adbb8bd Processing requests-0.9.1.tar.gz Running requests-0.9.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8Rij8R/requests-0.9.1/egg-dist-tmp-ZBUU3m Traceback (most recent call last): File "/usr/bin/easy_install", line 7, in ? sys.exit( File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 1712, in main with_ei_usage(lambda: File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage return f() File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 1716, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/usr/lib64/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib64/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/usr/lib64/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 476, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/sandbox.py", line 61, in run_setup DirectorySandbox(setup_dir).run( File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/sandbox.py", line 105, in run return func() File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/sandbox.py", line 64, in <lambda> {'**file**':setup_script, '**name**':'**main**'} File "setup.py", line 6, in ? File "/tmp/easy_install-8Rij8R/requests-0.9.1/requests/**init**.py", line 26 from . import utils ^ SyntaxError: invalid syntax [kahmed@localhost JIRA-REST-HG-PLUGIN]$ uname -a Linux localhost.localdomain 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux [kahmed@localhost JIRA-REST-HG-PLUGIN]$ uname -m x86_64
{ "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/351/reactions" }
https://api.github.com/repos/psf/requests/issues/351/timeline
null
completed
null
null
false
[ "Python 2.4 is not supported. It came out 8 years ago. That's older than Youtube. Upgrade.\n", "While I agree that supporting Python 2.4 is inane, don't ever just _upgrade_ Python on RedHat relatives. Installing a newer Python package has a tendency to bring `yum` crashing down. You have to go through some convoluted, alternative install nonsense.\n" ]
https://api.github.com/repos/psf/requests/issues/350
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/350/labels{/name}
https://api.github.com/repos/psf/requests/issues/350/comments
https://api.github.com/repos/psf/requests/issues/350/events
https://github.com/psf/requests/pull/350
2,792,748
MDExOlB1bGxSZXF1ZXN0NjcyMDU2
350
fixes issue #349
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-10T15:54:02Z
2021-09-08T23:10:57Z
2012-01-10T19:07:46Z
NONE
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/350/reactions" }
https://api.github.com/repos/psf/requests/issues/350/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/350.diff", "html_url": "https://github.com/psf/requests/pull/350", "merged_at": "2012-01-10T19:07:46Z", "patch_url": "https://github.com/psf/requests/pull/350.patch", "url": "https://api.github.com/repos/psf/requests/pulls/350" }
true
[ "#349\n", "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/349
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/349/labels{/name}
https://api.github.com/repos/psf/requests/issues/349/comments
https://api.github.com/repos/psf/requests/issues/349/events
https://github.com/psf/requests/issues/349
2,784,655
MDU6SXNzdWUyNzg0NjU1
349
Wrong handling of params given as bytes object
{ "avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4", "events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}", "followers_url": "https://api.github.com/users/piotr-dobrogost/followers", "following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}", "gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piotr-dobrogost", "id": 92239, "login": "piotr-dobrogost", "node_id": "MDQ6VXNlcjkyMjM5", "organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs", "received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events", "repos_url": "https://api.github.com/users/piotr-dobrogost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions", "type": "User", "url": "https://api.github.com/users/piotr-dobrogost", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2012-01-10T12:51:30Z
2021-09-09T10:00:43Z
2012-01-23T08:03:40Z
NONE
resolved
``` python from collections import OrderedDict from urllib import urlencode import requests params = OrderedDict([('first', 1), ('second', 2), ('third', 3)]) requests.get('https://example.org/', params=urlencode(params)) ``` ends with `ValueError: dictionary update sequence element #0 has length 1; 2 is required` at `models.py", line 82` (`self.params = dict(params or []`)
{ "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/349/reactions" }
https://api.github.com/repos/psf/requests/issues/349/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/348
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/348/labels{/name}
https://api.github.com/repos/psf/requests/issues/348/comments
https://api.github.com/repos/psf/requests/issues/348/events
https://github.com/psf/requests/pull/348
2,782,178
MDExOlB1bGxSZXF1ZXN0NjcwODU3
348
Fixed code in 'Event Hooks' section
{ "avatar_url": "https://avatars.githubusercontent.com/u/912849?v=4", "events_url": "https://api.github.com/users/LucianU/events{/privacy}", "followers_url": "https://api.github.com/users/LucianU/followers", "following_url": "https://api.github.com/users/LucianU/following{/other_user}", "gists_url": "https://api.github.com/users/LucianU/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LucianU", "id": 912849, "login": "LucianU", "node_id": "MDQ6VXNlcjkxMjg0OQ==", "organizations_url": "https://api.github.com/users/LucianU/orgs", "received_events_url": "https://api.github.com/users/LucianU/received_events", "repos_url": "https://api.github.com/users/LucianU/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LucianU/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LucianU/subscriptions", "type": "User", "url": "https://api.github.com/users/LucianU", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-10T10:20:24Z
2021-09-08T13:06:11Z
2012-01-10T19:10:02Z
CONTRIBUTOR
resolved
Old code had a name error in 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/348/reactions" }
https://api.github.com/repos/psf/requests/issues/348/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/348.diff", "html_url": "https://github.com/psf/requests/pull/348", "merged_at": "2012-01-10T19:10:02Z", "patch_url": "https://github.com/psf/requests/pull/348.patch", "url": "https://api.github.com/repos/psf/requests/pulls/348" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/347
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/347/labels{/name}
https://api.github.com/repos/psf/requests/issues/347/comments
https://api.github.com/repos/psf/requests/issues/347/events
https://github.com/psf/requests/pull/347
2,782,005
MDExOlB1bGxSZXF1ZXN0NjcwODM2
347
Printing the entire traceback, instead of just a warning, when an except...
{ "avatar_url": "https://avatars.githubusercontent.com/u/912849?v=4", "events_url": "https://api.github.com/users/LucianU/events{/privacy}", "followers_url": "https://api.github.com/users/LucianU/followers", "following_url": "https://api.github.com/users/LucianU/following{/other_user}", "gists_url": "https://api.github.com/users/LucianU/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LucianU", "id": 912849, "login": "LucianU", "node_id": "MDQ6VXNlcjkxMjg0OQ==", "organizations_url": "https://api.github.com/users/LucianU/orgs", "received_events_url": "https://api.github.com/users/LucianU/received_events", "repos_url": "https://api.github.com/users/LucianU/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LucianU/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LucianU/subscriptions", "type": "User", "url": "https://api.github.com/users/LucianU", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-10T10:13:07Z
2021-09-08T13:06:10Z
2012-01-10T19:08:53Z
CONTRIBUTOR
resolved
Having just a warning when an exception is raised in a hook is unhelpful because the location of the error is not included. Printing the entire traceback fixes that.
{ "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/347/reactions" }
https://api.github.com/repos/psf/requests/issues/347/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/347.diff", "html_url": "https://github.com/psf/requests/pull/347", "merged_at": "2012-01-10T19:08:53Z", "patch_url": "https://github.com/psf/requests/pull/347.patch", "url": "https://api.github.com/repos/psf/requests/pulls/347" }
true
[ "This is great! thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/346
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/346/labels{/name}
https://api.github.com/repos/psf/requests/issues/346/comments
https://api.github.com/repos/psf/requests/issues/346/events
https://github.com/psf/requests/issues/346
2,780,731
MDU6SXNzdWUyNzgwNzMx
346
Check cookie's expiry time when using sessions
{ "avatar_url": "https://avatars.githubusercontent.com/u/25007?v=4", "events_url": "https://api.github.com/users/sajal/events{/privacy}", "followers_url": "https://api.github.com/users/sajal/followers", "following_url": "https://api.github.com/users/sajal/following{/other_user}", "gists_url": "https://api.github.com/users/sajal/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sajal", "id": 25007, "login": "sajal", "node_id": "MDQ6VXNlcjI1MDA3", "organizations_url": "https://api.github.com/users/sajal/orgs", "received_events_url": "https://api.github.com/users/sajal/received_events", "repos_url": "https://api.github.com/users/sajal/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sajal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sajal/subscriptions", "type": "User", "url": "https://api.github.com/users/sajal", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-10T08:31:50Z
2021-09-09T10:00:44Z
2012-01-23T08:03:04Z
NONE
resolved
Hi, Just stumbled across requests, makes things a lot easier for me. One thing i came across, was one site im trying to request, sets some expired cookies (along with genuine cookies). The set cookie would look something like this ``` '_xxxx=deleteMe; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/, yyyy="delete me"; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/, zzzzz="000000000000000000000"; Version=1; Max-Age=1799; Expires=Tue, 10-Jan-2012 08:36:05 GMT; Path=/, yyyy="delete me"; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ ``` and so on... In the case of request , it resends the Expired cookies, but real browsers do not! My guess is that this site uses such cookies to possibly detect non-browser users. In the above example only zzzz should be sent on subsequent request, cause other cookies expired 32 years ago. I built some very very ugly code to fetch the page using httplib2 and parse cookies myself, the code would only work on this particular site.. i thought requests may be a relief from my crappy code.
{ "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/346/reactions" }
https://api.github.com/repos/psf/requests/issues/346/timeline
null
completed
null
null
false
[ "Cookies are key/value only for now. I hope to change this soon.\n" ]
https://api.github.com/repos/psf/requests/issues/345
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/345/labels{/name}
https://api.github.com/repos/psf/requests/issues/345/comments
https://api.github.com/repos/psf/requests/issues/345/events
https://github.com/psf/requests/issues/345
2,780,206
MDU6SXNzdWUyNzgwMjA2
345
When using session objects, deleting a key from headers fails
{ "avatar_url": "https://avatars.githubusercontent.com/u/1317643?v=4", "events_url": "https://api.github.com/users/daVinci1980/events{/privacy}", "followers_url": "https://api.github.com/users/daVinci1980/followers", "following_url": "https://api.github.com/users/daVinci1980/following{/other_user}", "gists_url": "https://api.github.com/users/daVinci1980/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/daVinci1980", "id": 1317643, "login": "daVinci1980", "node_id": "MDQ6VXNlcjEzMTc2NDM=", "organizations_url": "https://api.github.com/users/daVinci1980/orgs", "received_events_url": "https://api.github.com/users/daVinci1980/received_events", "repos_url": "https://api.github.com/users/daVinci1980/repos", "site_admin": false, "starred_url": "https://api.github.com/users/daVinci1980/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/daVinci1980/subscriptions", "type": "User", "url": "https://api.github.com/users/daVinci1980", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-10T07:12:35Z
2021-09-09T07:05:20Z
2012-07-27T06:10:30Z
NONE
resolved
Using version 0.91, downloaded 1/09/12, this code produces the specified exception: > > > import requests > > > s = requests.session(headers={"foo": "bar"}) > > > s.get('http://httpbin.org/headers', headers={"foo": None}) > > > Traceback (most recent call last): > > > File "<stdin>", line 1, in <module> > > > File "C:\Python27\lib\site-packages\requests\sessions.py", line 217, in get > > > return self.request('get', url, **kwargs) > > > File "C:\Python27\lib\site-packages\requests\sessions.py", line 159, in request > > > headers[k] = header_expand(v) > > > File "C:\Python27\lib\site-packages\requests\utils.py", line 140, in header_expand > > > for i, (value, params) in enumerate(headers): > > > TypeError: 'NoneType' object is not iterable The problem is that expand_header, in requests/utils.py:140, because "None" is not enumerable. The fix I've patched in is to add 'elif headers is None: return headers' before enumerating the headers variable (part of the prior if/elif block). Great library, thanks!
{ "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/345/reactions" }
https://api.github.com/repos/psf/requests/issues/345/timeline
null
completed
null
null
false
[ "This is definitely a problem. Sorry for the bug!\n", "From my messing about, this also happens if you aren't using sessions:\n\n```\nimport requests\nr = requests.get('http://httpbin.org/headers, headers={\"foo\":None})\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"requests/sessions.py\", line 217, in get\n return self.request('get', url, **kwargs)\n File \"requests/sessions.py\", line 159, in request\n headers[k] = header_expand(v)\n File \"requests/utils.py\", line 157, in header_expand\n for i, (value, params) in enumerate(headers):\nTypeError: 'NoneType' object is not iterable\n```\n" ]
https://api.github.com/repos/psf/requests/issues/344
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/344/labels{/name}
https://api.github.com/repos/psf/requests/issues/344/comments
https://api.github.com/repos/psf/requests/issues/344/events
https://github.com/psf/requests/pull/344
2,765,305
MDExOlB1bGxSZXF1ZXN0NjY1NTcw
344
Do not pass over the `session` argument to `Session.request` method
{ "avatar_url": "https://avatars.githubusercontent.com/u/120119?v=4", "events_url": "https://api.github.com/users/sharat87/events{/privacy}", "followers_url": "https://api.github.com/users/sharat87/followers", "following_url": "https://api.github.com/users/sharat87/following{/other_user}", "gists_url": "https://api.github.com/users/sharat87/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sharat87", "id": 120119, "login": "sharat87", "node_id": "MDQ6VXNlcjEyMDExOQ==", "organizations_url": "https://api.github.com/users/sharat87/orgs", "received_events_url": "https://api.github.com/users/sharat87/received_events", "repos_url": "https://api.github.com/users/sharat87/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sharat87/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sharat87/subscriptions", "type": "User", "url": "https://api.github.com/users/sharat87", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-09T05:47:35Z
2021-09-08T13:06:10Z
2012-01-10T19:11:01Z
CONTRIBUTOR
resolved
The `request` method of `Session` class does not take a `session` argument. But `api.request` does. So, it has to be popped before you can send the whole `kwargs` dict to `Session.request` method.
{ "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/344/reactions" }
https://api.github.com/repos/psf/requests/issues/344/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/344.diff", "html_url": "https://github.com/psf/requests/pull/344", "merged_at": "2012-01-10T19:11:01Z", "patch_url": "https://github.com/psf/requests/pull/344.patch", "url": "https://api.github.com/repos/psf/requests/pulls/344" }
true
[ "Nice catch. Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/343
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/343/labels{/name}
https://api.github.com/repos/psf/requests/issues/343/comments
https://api.github.com/repos/psf/requests/issues/343/events
https://github.com/psf/requests/pull/343
2,758,502
MDExOlB1bGxSZXF1ZXN0NjYzODI5
343
urllib3 attribution in docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/6292?v=4", "events_url": "https://api.github.com/users/shazow/events{/privacy}", "followers_url": "https://api.github.com/users/shazow/followers", "following_url": "https://api.github.com/users/shazow/following{/other_user}", "gists_url": "https://api.github.com/users/shazow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shazow", "id": 6292, "login": "shazow", "node_id": "MDQ6VXNlcjYyOTI=", "organizations_url": "https://api.github.com/users/shazow/orgs", "received_events_url": "https://api.github.com/users/shazow/received_events", "repos_url": "https://api.github.com/users/shazow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shazow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shazow/subscriptions", "type": "User", "url": "https://api.github.com/users/shazow", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-07T23:23:50Z
2021-09-08T13:06:09Z
2012-01-07T23:28:17Z
CONTRIBUTOR
resolved
Added some mentions of urllib3 to the Requests docs and HISTORY file. I don't have strong feelings about the wording so feel free to suggest changes or just make them yourself. :)
{ "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/343/reactions" }
https://api.github.com/repos/psf/requests/issues/343/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/343.diff", "html_url": "https://github.com/psf/requests/pull/343", "merged_at": "2012-01-07T23:28:17Z", "patch_url": "https://github.com/psf/requests/pull/343.patch", "url": "https://api.github.com/repos/psf/requests/pulls/343" }
true
[ ":sparkles: :cake: :sparkles:\n" ]
https://api.github.com/repos/psf/requests/issues/342
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/342/labels{/name}
https://api.github.com/repos/psf/requests/issues/342/comments
https://api.github.com/repos/psf/requests/issues/342/events
https://github.com/psf/requests/pull/342
2,751,911
MDExOlB1bGxSZXF1ZXN0NjYxNjM2
342
Fix syntax error in last commit.
{ "avatar_url": "https://avatars.githubusercontent.com/u/726274?v=4", "events_url": "https://api.github.com/users/bjedwards/events{/privacy}", "followers_url": "https://api.github.com/users/bjedwards/followers", "following_url": "https://api.github.com/users/bjedwards/following{/other_user}", "gists_url": "https://api.github.com/users/bjedwards/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bjedwards", "id": 726274, "login": "bjedwards", "node_id": "MDQ6VXNlcjcyNjI3NA==", "organizations_url": "https://api.github.com/users/bjedwards/orgs", "received_events_url": "https://api.github.com/users/bjedwards/received_events", "repos_url": "https://api.github.com/users/bjedwards/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bjedwards/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bjedwards/subscriptions", "type": "User", "url": "https://api.github.com/users/bjedwards", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-06T20:53:09Z
2021-09-08T13:06:09Z
2012-01-06T20:53:56Z
CONTRIBUTOR
resolved
The last commit created a syntax error in the message. This commit fixes 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/342/reactions" }
https://api.github.com/repos/psf/requests/issues/342/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/342.diff", "html_url": "https://github.com/psf/requests/pull/342", "merged_at": "2012-01-06T20:53:56Z", "patch_url": "https://github.com/psf/requests/pull/342.patch", "url": "https://api.github.com/repos/psf/requests/pulls/342" }
true
[ "thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/341
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/341/labels{/name}
https://api.github.com/repos/psf/requests/issues/341/comments
https://api.github.com/repos/psf/requests/issues/341/events
https://github.com/psf/requests/pull/341
2,748,051
MDExOlB1bGxSZXF1ZXN0NjYwMTMz
341
Give a more useful error message when the URL supplied does not contain ...
{ "avatar_url": "https://avatars.githubusercontent.com/u/141122?v=4", "events_url": "https://api.github.com/users/ojii/events{/privacy}", "followers_url": "https://api.github.com/users/ojii/followers", "following_url": "https://api.github.com/users/ojii/following{/other_user}", "gists_url": "https://api.github.com/users/ojii/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ojii", "id": 141122, "login": "ojii", "node_id": "MDQ6VXNlcjE0MTEyMg==", "organizations_url": "https://api.github.com/users/ojii/orgs", "received_events_url": "https://api.github.com/users/ojii/received_events", "repos_url": "https://api.github.com/users/ojii/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ojii/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ojii/subscriptions", "type": "User", "url": "https://api.github.com/users/ojii", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-06T15:20:39Z
2021-09-08T13:06:08Z
2012-01-06T16:20:49Z
CONTRIBUTOR
resolved
...a schema.
{ "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/341/reactions" }
https://api.github.com/repos/psf/requests/issues/341/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/341.diff", "html_url": "https://github.com/psf/requests/pull/341", "merged_at": "2012-01-06T16:20:49Z", "patch_url": "https://github.com/psf/requests/pull/341.patch", "url": "https://api.github.com/repos/psf/requests/pulls/341" }
true
[ "That is much better. Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/340
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/340/labels{/name}
https://api.github.com/repos/psf/requests/issues/340/comments
https://api.github.com/repos/psf/requests/issues/340/events
https://github.com/psf/requests/issues/340
2,747,065
MDU6SXNzdWUyNzQ3MDY1
340
request.request doesn't accept bytes for params argument since 0.8 version
{ "avatar_url": "https://avatars.githubusercontent.com/u/548482?v=4", "events_url": "https://api.github.com/users/mishok13/events{/privacy}", "followers_url": "https://api.github.com/users/mishok13/followers", "following_url": "https://api.github.com/users/mishok13/following{/other_user}", "gists_url": "https://api.github.com/users/mishok13/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mishok13", "id": 548482, "login": "mishok13", "node_id": "MDQ6VXNlcjU0ODQ4Mg==", "organizations_url": "https://api.github.com/users/mishok13/orgs", "received_events_url": "https://api.github.com/users/mishok13/received_events", "repos_url": "https://api.github.com/users/mishok13/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mishok13/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mishok13/subscriptions", "type": "User", "url": "https://api.github.com/users/mishok13", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-01-06T13:21:46Z
2021-09-09T10:00:46Z
2012-01-06T16:24:41Z
NONE
resolved
In the latest versions of `requests`, passing bytes to `requests.request` and all helper functions (for example `requests.get('http://google.com', params='q=test%20me')`) will trigger the following error: ``` Traceback (most recent call last): File "<string>", line 1, in <module> File "/Library/Python/2.7/site-packages/requests/api.py", line 50, in get return request('get', url, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 38, in request return s.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 190, in request r = Request(**args) File "/Library/Python/2.7/site-packages/requests/models.py", line 86, in __init__ self.params = dict(params or []) ValueError: dictionary update sequence element #0 has length 1; 2 is required ``` The last known version of requests where code like this works fine is 0.7.6.
{ "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/340/reactions" }
https://api.github.com/repos/psf/requests/issues/340/timeline
null
completed
null
null
false
[ "Correct. It makes no sense for us to support bytes in query strings. You're more than welcome to add it to your url yourself, though.\n", "I'm not going to argue against closing, but http://docs.python-requests.org/en/latest/api/ needs a small update for description of params argument. `params – (optional) Dictionary or bytes to be sent in the query string for the Request.` should become `params – (optional) Dictionary to be sent in the query string for the Request.`\n" ]
https://api.github.com/repos/psf/requests/issues/339
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/339/labels{/name}
https://api.github.com/repos/psf/requests/issues/339/comments
https://api.github.com/repos/psf/requests/issues/339/events
https://github.com/psf/requests/issues/339
2,744,384
MDU6SXNzdWUyNzQ0Mzg0
339
ConnectionError in requests, not urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "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": "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
2
2012-01-06T05:18:41Z
2021-09-09T09:00:37Z
2012-04-12T22:53:39Z
NONE
resolved
``` >>> url = 'http://www.rpgwatch.com?rwsiteid=1' >>> len(urllib2.urlopen(url).read()) 112749 >>> len(requests.get(url).content) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 50, in get File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 38, in request File "build/bdist.macosx-10.7-intel/egg/requests/sessions.py", line 200, in request File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 498, in send requests.exceptions.ConnectionError: Max retries exceeded for url: /?rwsiteid=1 ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "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/339/reactions" }
https://api.github.com/repos/psf/requests/issues/339/timeline
null
completed
null
null
false
[ "Hmm, not sure about the specifics of URL rules, but 'http://www.rpgwatch.com/?rwsiteid=1' works fine. Maybe this is the same as #323\n", "Between then and now, this has been resolved. Unintentionally or not, I'm going to go ahead and close this as fixed. \n\n:cake:\n" ]
https://api.github.com/repos/psf/requests/issues/338
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/338/labels{/name}
https://api.github.com/repos/psf/requests/issues/338/comments
https://api.github.com/repos/psf/requests/issues/338/events
https://github.com/psf/requests/issues/338
2,744,340
MDU6SXNzdWUyNzQ0MzQw
338
LookupError in requests, not in urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "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": "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
11
2012-01-06T05:07:45Z
2021-09-09T09:00:43Z
2012-03-16T01:15:28Z
NONE
resolved
``` >>> url = 'http://dilbert.com' >>> len(urllib2.urlopen(url).read()) 30194 >>> len(requests.get(url).content) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 713, in content LookupError: unknown encoding: utf-8lias >>> ```
{ "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/338/reactions" }
https://api.github.com/repos/psf/requests/issues/338/timeline
null
completed
null
null
false
[ "Heh, some heavy testing here... :)\n", "What can I say, I run an RSS feed reader. I fetch millions of URLs a day. About half are ported over to requests, and I'd like to move the other half.\n", "It looks like they are sending this trash for at least 3 years now... :)\n\n> Posted by: Ryan | April 21, 2008 at 01:04 PM\n> Yeah, WTH is up with the new Dilbert.com page? Tell whoever it is that runs the server that \"text/html; charset=utf-8lias\" > is not a valid Content-Type response header.\n\nTaken from http://dilbertblog.typepad.com/the_dilbert_blog/2008/04/apr-for-houses/comments/page/2/\n\nFunny, someone already had a problem with parsing this in Python; see http://objectmix.com/python/784974-where-locate-existing-standard-encodings-python-2.html\n", "We should definitely be catching this.\n", "Looks like this is fixed?\n", "Not really. `res.content` is no more unicode that's why there's no encoding done when accessing it\n\n``` py\n>>> type(requests.get('http://dilbert.com').content)\n<type 'str'>\n```\n\nHowever the problem is still present with `res.text` which is unicode\n\n``` py\n>>> len(requests.get('http://dilbert.com').text)\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"c:\\requests\\requests\\models.py\", line 774, in text\n content = str(self.content, encoding, errors='replace')\nLookupError: unknown encoding: utf-8lias\n```\n\nThe error is present regardless of `chardet` module being installed or not.\n", "We currently have a pretty robust encoding detection system, but it's only a fallback for when the server doesn't specify an encoding.\n", "We're currently blindly trusting that the encoding that the server is responding with will exist.\n\nPerhaps a map of encodings (e.g. ISO-LATIN-1 => latin1) is best?\n", "> Perhaps a map of encodings (e.g. ISO-LATIN-1 => latin1) is best?\n\nWe can't keep adding misspelled and imaginary (ISO-LATIN-1 is not registered alias per http://www.iana.org/assignments/character-sets) encodings' names found by people on the Internet :)\nProviding a hook seems a better approach.\n", "I agree.\n\nYou're welcome to do `response.encoding = None`, and it'll use the built-in detection.\n", "so we should make sure that the encoding actually exists in the header detection step\n" ]
https://api.github.com/repos/psf/requests/issues/337
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/337/labels{/name}
https://api.github.com/repos/psf/requests/issues/337/comments
https://api.github.com/repos/psf/requests/issues/337/events
https://github.com/psf/requests/issues/337
2,744,334
MDU6SXNzdWUyNzQ0MzM0
337
TooManyRedirects in requests, not in urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "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": "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
9
2012-01-06T05:06:43Z
2021-08-31T00:06:55Z
2012-08-25T15:09:13Z
NONE
resolved
``` >>> url = 'http://fasel.soup.io/' >>> len(urllib2.urlopen(url).read()) 73331 >>> len(requests.get(url).content) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 50, in get File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 38, in request File "build/bdist.macosx-10.7-intel/egg/requests/sessions.py", line 200, in request File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 515, in send File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 209, in _build_response requests.exceptions.TooManyRedirects ```
{ "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/337/reactions" }
https://api.github.com/repos/psf/requests/issues/337/timeline
null
completed
null
null
false
[ "I have same problem with some FaceBook pages.\n", "This occurs only in case of HTTP 301 redirects. AFAIK, I guess this is because, upto version 0.7.5, the HTTPRedirectHandler in monkeys.py doesn't handle the exception. The chain which executes upon a HTTP 301 has nothing to do in the method responsible for it. You can add code to handle the 301 error and fetch content from the location pointed to by the response header. Correct me if i am wrong. \n", "Kenneth, since you asked, as of 0.11.1 this is still an issue:\n\n```\n>>> import requests, urllib2\n>>> requests.__version__\n'0.11.1'\n>>> url = 'http://fasel.soup.io/'\n>>> r = requests.get(url)\nApr 12 22:48:22: Starting new HTTP connection (1): fasel.soup.io\nApr 12 22:48:23: Starting new HTTP connection (1): www.soup.io\nTraceback (most recent call last):\n File \"<console>\", line 1, in <module>\n File \"/Library/Python/2.7/site-packages/requests-0.11.1-py2.7.egg/requests/api.py\", line 52, in get\n return request('get', url, **kwargs)\n File \"/Library/Python/2.7/site-packages/requests-0.11.1-py2.7.egg/requests/api.py\", line 40, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Library/Python/2.7/site-packages/requests-0.11.1-py2.7.egg/requests/sessions.py\", line 208, in request\n r.send(prefetch=prefetch)\n File \"/Library/Python/2.7/site-packages/requests-0.11.1-py2.7.egg/requests/models.py\", line 597, in send\n self._build_response(r)\n File \"/Library/Python/2.7/site-packages/requests-0.11.1-py2.7.egg/requests/models.py\", line 226, in _build_response\n raise TooManyRedirects()\nTooManyRedirects\n```\n", "Testing this same URL on 0.13.5 does not generate a `TooManyRedirects`. I think this makes the issue resolved, unless someone can still reproduce it somewhere else.\n", "Yeah, it's intermittent, which is the worst part. Still happens, but I noticed that it has to do with the headers I'm sending:\n\n```\nheaders = {\n 'User-Agent': 'NewsBlur Page Fetcher (%s subscriber%s) - %s '\n '(Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) '\n 'AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 '\n 'Safari/534.48.3)' % (\n self.feed.num_subscribers,\n 's' if self.feed.num_subscribers != 1 else '',\n settings.NEWSBLUR_URL\n ),\n 'Connection': 'close',\n}\ntry:\n response = requests.get(feed_link, headers=headers)\nexcept requests.exceptions.TooManyRedirects:\n response = requests.get(feed_link)\n```\n", "/frownyface\n\nI'm having real trouble reproducing the problem, even using your headers. How intermittent is intermittent? Can you give me an estimate of the frequency?\n", "I no longer keep track of the intermittency, but I can tell you that I was able to repro manually two weeks ago by hitting these urls:\n\nhttp://lifehacker.com\nhttp://jalopnik.com\nhttp://kotaku.com/pc/\nhttp://habrahabr.ru/\nhttp://www.interfluidity.com\n\nThe Gawker sites (those first three) started happening in the past 6 months when they moved to their weird URL redirect mechanism that I believe is part of their new comment system. Some of this oddity might be cookie based, as well.\n\nOn Jul 27, 2012, at 10:42 AM, Cory Benfield [email protected] wrote:\n\n> /frownyface\n> \n> I'm having real trouble reproducing the problem, even using your headers. How intermittent is intermittent? Can you give me an estimate of the frequency?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/337#issuecomment-7311451\n", "@samuelclay make sure you're using the latest release. I can't reproduce any of these :)\n", "I am using the current release, and I am receiving this error with www.freshdirect.com/api/login. I experienced it using the headers `\"User-Agent\": \"PostmanRuntime/7.24.1\",` and `'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36'`. I have repeatedly increased the max redirect using ` self.session.max_redirects = 500`. I am not getting this problem when I change my user-agent using the [Requestly Chrome Extension](https://requestly.in)" ]
https://api.github.com/repos/psf/requests/issues/336
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/336/labels{/name}
https://api.github.com/repos/psf/requests/issues/336/comments
https://api.github.com/repos/psf/requests/issues/336/events
https://github.com/psf/requests/issues/336
2,744,207
MDU6SXNzdWUyNzQ0MjA3
336
zlib error in Requests and not urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-06T04:33:22Z
2021-09-09T07:05:23Z
2012-07-27T06:05:57Z
NONE
resolved
``` >>> url = 'http://www.federaltimes.com/rss/' >>> len(urllib2.urlopen(url).read()) 70636 >>> requests.get(url) <Response [200]> >>> requests.get(url).content Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 693, in content File "build/bdist.macosx-10.7-intel/egg/requests/packages/urllib3/response.py", line 142, in read File "build/bdist.macosx-10.7-intel/egg/requests/packages/urllib3/response.py", line 33, in decode_deflate zlib.error: Error -3 while decompressing data: invalid block type >>> ```
{ "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/336/reactions" }
https://api.github.com/repos/psf/requests/issues/336/timeline
null
completed
null
null
false
[ "Fixed!\n" ]
https://api.github.com/repos/psf/requests/issues/335
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/335/labels{/name}
https://api.github.com/repos/psf/requests/issues/335/comments
https://api.github.com/repos/psf/requests/issues/335/events
https://github.com/psf/requests/issues/335
2,744,188
MDU6SXNzdWUyNzQ0MTg4
335
CookieError in requests and not in urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/44229?v=4", "events_url": "https://api.github.com/users/samuelclay/events{/privacy}", "followers_url": "https://api.github.com/users/samuelclay/followers", "following_url": "https://api.github.com/users/samuelclay/following{/other_user}", "gists_url": "https://api.github.com/users/samuelclay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/samuelclay", "id": 44229, "login": "samuelclay", "node_id": "MDQ6VXNlcjQ0MjI5", "organizations_url": "https://api.github.com/users/samuelclay/orgs", "received_events_url": "https://api.github.com/users/samuelclay/received_events", "repos_url": "https://api.github.com/users/samuelclay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/samuelclay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/samuelclay/subscriptions", "type": "User", "url": "https://api.github.com/users/samuelclay", "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": "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
29
2012-01-06T04:30:34Z
2021-09-09T09:00:44Z
2012-03-09T16:58:39Z
NONE
resolved
In `0.9.0`: ``` >>> import requests >>> import urllib2 >>> url = 'http://www.miniclip.com/games/en/' >>> len(urllib2.urlopen(url).read()) 111106 >>> requests.get(url) len(urllTraceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 50, in get File "build/bdist.macosx-10.7-intel/egg/requests/api.py", line 38, in request File "build/bdist.macosx-10.7-intel/egg/requests/sessions.py", line 200, in request File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 515, in send File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 197, in _build_response File "build/bdist.macosx-10.7-intel/egg/requests/models.py", line 177, in build File "build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/core.py", line 19, in dict_from_string File "build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py", line 641, in load File "build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py", line 674, in __ParseString File "build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py", line 594, in __set File "build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py", line 468, in set requests.packages.oreos.monkeys.CookieError: Illegal key value: ad_is_enabled-position2:homepage ```
{ "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/335/reactions" }
https://api.github.com/repos/psf/requests/issues/335/timeline
null
completed
null
null
false
[ "That's because urllib2 isn't reading the cookies unless you tell it to.\n", "Another url:\n\n```\n>>> url = 'https://partner.microsoft.com'\n>>> requests.get(url)\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"build/bdist.macosx-10.7-intel/egg/requests/api.py\", line 50, in get\n File \"build/bdist.macosx-10.7-intel/egg/requests/api.py\", line 38, in request\n File \"build/bdist.macosx-10.7-intel/egg/requests/sessions.py\", line 200, in request\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 515, in send\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 254, in _build_response\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 515, in send\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 197, in _build_response\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 177, in build\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/core.py\", line 19, in dict_from_string\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 641, in load\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 674, in __ParseString\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 594, in __set\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 468, in set\nrequests.packages.oreos.monkeys.CookieError: Illegal key value: 04:31:20&UserEBacExpression\n>>> len(urllib2.urlopen(url).read())\n25402\n```\n", "Apparently you can't have `:` in cookie keys. I'll try to add this to Oreos.\n", "```\n>>> url = 'http://www.swiss.com/'\n>>> len(requests.get(url).content)\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"build/bdist.macosx-10.7-intel/egg/requests/api.py\", line 50, in get\n File \"build/bdist.macosx-10.7-intel/egg/requests/api.py\", line 38, in request\n File \"build/bdist.macosx-10.7-intel/egg/requests/sessions.py\", line 200, in request\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 515, in send\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 197, in _build_response\n File \"build/bdist.macosx-10.7-intel/egg/requests/models.py\", line 177, in build\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/core.py\", line 19, in dict_from_string\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 641, in load\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 674, in __ParseString\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 594, in __set\n File \"build/bdist.macosx-10.7-intel/egg/requests/packages/oreos/monkeys.py\", line 468, in set\nrequests.packages.oreos.monkeys.CookieError: Illegal key value: ISAWPLB{34F3C496-0632-48BF-B442-6ADE6334837A}\n>>> len(urllib2.urlopen(url).read())\n79884\n>>> \n```\n", "Whew, there's plenty more. I'll stop there. :-)\n", "Clearly I need to catch cookie errors :)\n", "If you _really_ want me to, I can switch around my page fetching to record where requests fails and urllib2 succeeds, aggregate that over 2 hours (so every single page is fetched at least once), and report back with a number of discrepancies. It'll take some work, but if you're itching for broken test cases, there's no better dataset. Alternatively, you could hook this up yourself by just grabbing a list of URLs and running them through both, logging exceptions as they come through with discrepancies. And I can provide that dataset instead, ordered by popularity, of up to 1M urls if you like.\n", "A simple (massive) list of the failures would be fantastic!\n", "This really is a big headache\nOne more in the list!\n\n> > > requests.get('http://www.luisaviaroma.com').cookies\n> > > Traceback (most recent call last):\n> > > File \"<stdin>\", line 1, in <module>\n> > > File \"requests/api.py\", line 51, in get\n> > > return request('get', url, *_kwargs)\n> > > File \"requests/api.py\", line 39, in request\n> > > return s.request(method=method, url=url, *_kwargs)\n> > > File \"requests/sessions.py\", line 200, in request\n> > > r.send(prefetch=prefetch)\n> > > File \"requests/models.py\", line 513, in send\n> > > self._build_response(r)\n> > > File \"requests/models.py\", line 195, in _build_response\n> > > r = build(resp)\n> > > File \"requests/models.py\", line 175, in build\n> > > cookies = oreos.dict_from_string(cookie_header)\n> > > File \"requests/packages/oreos/core.py\", line 19, in dict_from_string\n> > > c.load(s)\n> > > File \"requests/packages/oreos/monkeys.py\", line 641, in load\n> > > self.__ParseString(rawdata)\n> > > File \"requests/packages/oreos/monkeys.py\", line 674, in __ParseString\n> > > self.__set(K, rval, cval)\n> > > File \"requests/packages/oreos/monkeys.py\", line 594, in __set\n> > > M.set(key, real_value, coded_value)\n> > > File \"requests/packages/oreos/monkeys.py\", line 468, in set\n> > > raise CookieError(\"Illegal key value: %s\" % key)\n> > > requests.packages.oreos.monkeys.CookieError: Illegal key value: 12:23:49&ladate\n", "Oh and btw, same url, same thing, same worked on my friends laptop everything the same :S\nI am so confused (and pissed)\n", "This issue was being discussed last year over on the main Python bug tracker: http://bugs.python.org/issue2193\n\nIn summary, the simplest fix (which I've implemented in my fork of requests) is to simply add the colon and curly braces into the allowed characters in cookie keys. This works fine, but makes it possible to create cookies that contain those values as well, which is technically against the relevant RFC (RFC 2109). Of course, we can just do it and let the receiving party deal with it. Testing this fix is difficult, because HTTPBin is RFC compliant and won't return cookie keys with these characters in them.\n\nThe ideal fix is to accept them in keys, but not send them out. This will complicate the code a bit more, but is probably not the end of the world to implement. I haven't looked hard enough at the oreos code to know, but if we're interested in doing that I can take another look.\n\nBasically, what is the consensus on the 'pythonic' thing to do? Do we fail, because the cookie we received is technically invalid; do we accept and send technically invalid cookies; or do we be liberal in what we accept and conservative in what we send?\n\n[NB: The current state of Oreos is to accept other characters that are supposed to be forbidden, namely the square brackets. So in a sense the implementation is already non-compliant.]\n", "Follow-up question. If we take the route of being liberal in what we accept but conservative in what we send, then what happens if we're redirected? For example, the http://www.swiss.com/ example above involves a redirect. We accept the malformed cookie, but trying to send it throws a CookieError.\n", "CookieErrors shouldn't be happening.. but they are. They should be caught.\n", "Just adding a \"Me too\" here - causing us some parsing problems at Readability.\n", "The latest release should make the CookieErrors far less common, but they still need to be caught.\n", "Ah, great. I updated to the latest version and I'm finding another issue though. I'll trawl the issues and if it doesn't exist already, report.\n", "Feel free to email me, as always.\n", "Hmmm, just encountered a CookieError =/, Is there any way to just ignore all cookie errors @kennethreitz? \n\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/Library/Python/2.6/site-packages/requests/api.py\", line 79, in get\n :param url: URL for the new :class:`Request` object.\n File \"/Library/Python/2.6/site-packages/requests/api.py\", line 66, in request\n \"\"\"Sends a HEAD request. Returns :class:`Response` object.\n File \"/Library/Python/2.6/site-packages/requests/sessions.py\", line 191, in request\n\n File \"/Library/Python/2.6/site-packages/requests/models.py\", line 462, in send\n r = self.proxy_auth(self)\n File \"/Library/Python/2.6/site-packages/requests/models.py\", line 242, in _build_response\n except KeyError:\n File \"/Library/Python/2.6/site-packages/requests/models.py\", line 462, in send\n r = self.proxy_auth(self)\n File \"/Library/Python/2.6/site-packages/requests/models.py\", line 186, in _build_response\n response.cookies = cookies\n File \"/Library/Python/2.6/site-packages/requests/models.py\", line 169, in build\n response.status_code = getattr(resp, 'status', None)\n File \"/Library/Python/2.6/site-packages/requests/packages/oreos/core.py\", line 19, in dict_from_string\n c.load(s)\n File \"/Library/Python/2.6/site-packages/requests/packages/oreos/monkeys.py\", line 641, in load\n map(Cookie.__setitem__, d.keys(), d.values())\n File \"/Library/Python/2.6/site-packages/requests/packages/oreos/monkeys.py\", line 674, in __ParseString\n M[ K ] = _unquote(V)\n File \"/Library/Python/2.6/site-packages/requests/packages/oreos/monkeys.py\", line 594, in __set\n def __set(self, key, real_value, coded_value):\n File \"/Library/Python/2.6/site-packages/requests/packages/oreos/monkeys.py\", line 468, in set\n if key.lower() in self._reserved:\nrequests.packages.oreos.monkeys.CookieError: Illegal key value: 10:54:14&CookieExpireDate\n", "@dalanmiller \nHow can we reproduce this?\n", "@piotr-dobrogost Here's at least one sample url: http://mylikes.com/l/1tsn6\n\nLike: \n\n```\n>>> import requests\n>>> requests.get(\"http://mylikes.com/l/1tsn6\")\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/api.py\", line 51, in get\n return request('get', url, **kwargs)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/api.py\", line 39, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/sessions.py\", line 200, in request\n r.send(prefetch=prefetch)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/models.py\", line 557, in send\n self._build_response(r)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/models.py\", line 263, in _build_response\n request.send()\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/models.py\", line 557, in send\n self._build_response(r)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/models.py\", line 203, in _build_response\n r = build(resp)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/models.py\", line 184, in build\n cookies = dict_from_string(cookie_header)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/utils.py\", line 30, in dict_from_string\n c.load(s)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/packages/oreos/monkeys.py\", line 644, in load\n self.__ParseString(rawdata)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/packages/oreos/monkeys.py\", line 677, in __ParseString\n self.__set(K, rval, cval)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/packages/oreos/monkeys.py\", line 597, in __set\n M.set(key, real_value, coded_value)\n File \"/Users/umbrae/Envs/rdb/lib/python2.6/site-packages/requests/packages/oreos/monkeys.py\", line 471, in set\n raise CookieError(\"Illegal key value: %s\" % key)\nrequests.packages.oreos.monkeys.CookieError: Illegal key value: Message(userRedirectUrl)\n```\n\nI can scrape up a couple more in a bit.\n", "One more: http://it.toolbox.com/blogs/db2zos/the-question-is-the-mainframe-still-the-right-answer-for-your-business-50380?ccy=us&cm=h&cpb=swg&cd=20120221&ct=tips&cr=buzzsheet&csr=systemz&cmp=smm\n", "I hate cookies.\n", "@piotr-dobrogost Try sending a get request with requests at http://nordstrom.com\n", "@dalanmiller What version of requests are you using? When I hit http://nordstrom.com/, I find the illegal cookie key to be \"13:05:29&CookieExpireDate\", which is illegal because it contains colons. This was fixed in commit f72c13f .\n", "@Lukasa According to pip I'm using Requests 0.10.4\n\n```\n...\nrequests==0.10.4\n...\n```\n\nAs well:\n\n```\nhelp(requests)\n```\n\nResults in \n\n```\n...\nVERSION\n 0.10.4\n...\n```\n\nI don't even need cookies for what I'm trying to do, is there anyway I can just set something to ignore them and errors?\n", "The two failures given by @umbrae fail because the first one contains parentheses and the second one contains a question mark. I'm reluctant to just keep patching up failures when they arise, I'd be more inclined to rewrite the code to correctly handle all of the cookies. I'm looking to get around to it sometime in the next few days, but if someone else wants to tackle it they're welcome.\n\n@dalanmiller Odd. If I launch a new virtualenv, pip install requests and then perform a get on http://nordstrom.com/ , I don't get a CookieError, and pip claims I'm running 0.10.4 as well.\n", "@Lukasa Tried using a new virtualenv, then installing requests via pip and everything worked perfectly fine like you did. \n\nGoing to try uninstalling / reinstalling requests.\n\nThank you for all your help! \n\np.s.\n\nA `pip uninstall requests` and then a `pip install requests --upgrade` did the trick! Now working! Thank you @Lukasa, @KennethReitz, @piotr-dobrogost. \n", "Fixed in d078b69aefc24ec6fc52fcaf4334c2573e5168fc\n", "Thank you! :cake:\n" ]
https://api.github.com/repos/psf/requests/issues/334
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/334/labels{/name}
https://api.github.com/repos/psf/requests/issues/334/comments
https://api.github.com/repos/psf/requests/issues/334/events
https://github.com/psf/requests/issues/334
2,737,699
MDU6SXNzdWUyNzM3Njk5
334
tests for multi-valued params
{ "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
1
2012-01-05T17:10:27Z
2021-09-09T07:05:21Z
2012-07-27T06:08:35Z
CONTRIBUTOR
resolved
data={'x': [5, 7]}
{ "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/334/reactions" }
https://api.github.com/repos/psf/requests/issues/334/timeline
null
completed
null
null
false
[ "This issue can be closed right? https://github.com/kennethreitz/requests/blob/develop/test_requests.py#L412\n" ]
https://api.github.com/repos/psf/requests/issues/333
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/333/labels{/name}
https://api.github.com/repos/psf/requests/issues/333/comments
https://api.github.com/repos/psf/requests/issues/333/events
https://github.com/psf/requests/pull/333
2,731,574
MDExOlB1bGxSZXF1ZXN0NjU0MTU0
333
Add eager mode for raising errors immediately.
{ "avatar_url": "https://avatars.githubusercontent.com/u/534177?v=4", "events_url": "https://api.github.com/users/bryanhelmig/events{/privacy}", "followers_url": "https://api.github.com/users/bryanhelmig/followers", "following_url": "https://api.github.com/users/bryanhelmig/following{/other_user}", "gists_url": "https://api.github.com/users/bryanhelmig/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bryanhelmig", "id": 534177, "login": "bryanhelmig", "node_id": "MDQ6VXNlcjUzNDE3Nw==", "organizations_url": "https://api.github.com/users/bryanhelmig/orgs", "received_events_url": "https://api.github.com/users/bryanhelmig/received_events", "repos_url": "https://api.github.com/users/bryanhelmig/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bryanhelmig/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bryanhelmig/subscriptions", "type": "User", "url": "https://api.github.com/users/bryanhelmig", "user_view_type": "public" }
[]
closed
true
null
[]
null
22
2012-01-05T04:10:35Z
2021-09-08T23:08:15Z
2012-01-06T06:04:11Z
CONTRIBUTOR
resolved
I'm not 100% on: 1. The name of the setting. Settled on `eager_mode`. 2. The placing of the `raise_for_status()` method call. Settled on the very end of `Request.send()`. Let me know if this is something you guys are interested in adding or not. It's pretty lightweight and I've included a test case. _PS: the test `test_invalid_content` was failing before and after I added this feature._
{ "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/333/reactions" }
https://api.github.com/repos/psf/requests/issues/333/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/333.diff", "html_url": "https://github.com/psf/requests/pull/333", "merged_at": "2012-01-06T06:04:11Z", "patch_url": "https://github.com/psf/requests/pull/333.patch", "url": "https://api.github.com/repos/psf/requests/pulls/333" }
true
[ "Hmm, interesting. I have some reservation about adding this, but it would save a lot of `raise_for_status` raising. Hmm..\n", "Yeah, I did a quick count and found 91 matches for `raise_for_status` in my code. This should cut that down substantially. :-) \n\nIf you have a different idea on implementing this, I'm happy to whip up another commit. Such a feature would definitely help me (and even more so when debugging while in a shell).\n", "Yeah, I vote for an option like this too. We currently use a subclass of Session, where we add a `raise_status` option that works similarly.\n\nOurs is on by default, and I must admit, I turn it off more often than I thought would be necessary, but the number of calls that raise still outnumber the number I don't want to. Not sure about the name `eager_mode` though..\n", "@gazpachoking Yeah, a bit torn on the name. `raise_status` or `always_raise` may be better.\n", "I like `eager_mode`. It complements `safe_mode` well.\n", "@bryanhelmig Heh, both of those name have actually been in my code at some point.\n@kennethreitz Yeah, now that you mention it as a complement to `safe_mode` I like it a bit better. I just feel like the name doesn't imply that it is going to raise errors. Feels more like it would do something like prefetch mode to me.\n", "Perhaps: `danger_mode`™\n", "+1 `danger_mode` ;-)\n", "`danger_mode` it is.\n", ":)\n", "@kennethreitz Let me know if this is enough accept the pull, I'm happy to do any additional legwork.\n", "@bryanhelmig I'd be happy to pull now, but I'll give you a sparkly piece of cake if you add it to the docs :)\n", "@kennethreitz I do love cake. :-) Where in the docs is this appropriate to mention? I assume the makefile will grab the appropriate docstring and add to http://docs.python-requests.org/en/latest/api/#configurations automatically?\n", "Possible name: `fail_fast`.\n", "I'd love to see a quick mention of it in the \"advanced\" section. \n", "@kennethreitz Would http://docs.python-requests.org/en/latest/user/quickstart/#errors-and-exceptions be appropriate?\n", "@bryanhelmig even better!\n", "@kennethreitz Added something rather minor.\n\nOn another note, it might be a good idea to flesh out the configuration section of the advanced page at some point in the future, as it just points to the API docs right now.\n", "`fail_fast` is nice and much better than `danger_mode`\n", "I haven't tried yet, but what happens if `safe_mode` and `danger_mode` are both on?\n", "Actually, that won't be a problem at all — they cover different error scenarios.\n\nBeautiful. Enjoy your cake!\n\n:sparkles: :cake: :sparkles:\n", "Perfect.\n" ]
https://api.github.com/repos/psf/requests/issues/332
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/332/labels{/name}
https://api.github.com/repos/psf/requests/issues/332/comments
https://api.github.com/repos/psf/requests/issues/332/events
https://github.com/psf/requests/issues/332
2,724,691
MDU6SXNzdWUyNzI0Njkx
332
Cookies are sent regardless to domain when redirecting
{ "avatar_url": "https://avatars.githubusercontent.com/u/1304175?v=4", "events_url": "https://api.github.com/users/csernazs/events{/privacy}", "followers_url": "https://api.github.com/users/csernazs/followers", "following_url": "https://api.github.com/users/csernazs/following{/other_user}", "gists_url": "https://api.github.com/users/csernazs/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/csernazs", "id": 1304175, "login": "csernazs", "node_id": "MDQ6VXNlcjEzMDQxNzU=", "organizations_url": "https://api.github.com/users/csernazs/orgs", "received_events_url": "https://api.github.com/users/csernazs/received_events", "repos_url": "https://api.github.com/users/csernazs/repos", "site_admin": false, "starred_url": "https://api.github.com/users/csernazs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/csernazs/subscriptions", "type": "User", "url": "https://api.github.com/users/csernazs", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-04T16:00:56Z
2021-09-09T10:00:44Z
2012-01-23T08:01:20Z
NONE
resolved
Assume an HTTP server which sets the following headers when a GET request is made to "http://example1.foo/bar.cgi": Location: http://example2.foo/bar.cgi Set-Cookie: mycookie=something; path=/ In the case of running: ``` requests.get("http://example1.foo/bar.cgi") ``` results sending the mycookie to example2.foo/bar.cgi. According to RFC 6265, I think the http client must not send the cookie in this case to example2.foo as example2.foo doesn't match the domain example1.foo (which is set implicitly by omitting the domain attribute in the Set-Cookie 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/332/reactions" }
https://api.github.com/repos/psf/requests/issues/332/timeline
null
completed
null
null
false
[ "Correct. Cookies are currently not tied to a domain. Having Cookiejar-backed cookies once again will solve this, but this isn't exactly trivial to do with httplib (As opposed to urllib2).\n" ]
https://api.github.com/repos/psf/requests/issues/331
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/331/labels{/name}
https://api.github.com/repos/psf/requests/issues/331/comments
https://api.github.com/repos/psf/requests/issues/331/events
https://github.com/psf/requests/pull/331
2,705,153
MDExOlB1bGxSZXF1ZXN0NjQ0OTU1
331
Refactor r.iter_lines to retrieve more than one byte at a time.
{ "avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4", "events_url": "https://api.github.com/users/gazpachoking/events{/privacy}", "followers_url": "https://api.github.com/users/gazpachoking/followers", "following_url": "https://api.github.com/users/gazpachoking/following{/other_user}", "gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gazpachoking", "id": 187133, "login": "gazpachoking", "node_id": "MDQ6VXNlcjE4NzEzMw==", "organizations_url": "https://api.github.com/users/gazpachoking/orgs", "received_events_url": "https://api.github.com/users/gazpachoking/received_events", "repos_url": "https://api.github.com/users/gazpachoking/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions", "type": "User", "url": "https://api.github.com/users/gazpachoking", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-01-02T21:27:17Z
2021-09-08T13:06:07Z
2012-01-06T06:11:31Z
CONTRIBUTOR
resolved
Fixes universal line ending handling, but takes away ability to specyfy custom line endings.
{ "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/331/reactions" }
https://api.github.com/repos/psf/requests/issues/331/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/331.diff", "html_url": "https://github.com/psf/requests/pull/331", "merged_at": "2012-01-06T06:11:31Z", "patch_url": "https://github.com/psf/requests/pull/331.patch", "url": "https://api.github.com/repos/psf/requests/pulls/331" }
true
[ "This looks pretty solid. \n" ]
https://api.github.com/repos/psf/requests/issues/330
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/330/labels{/name}
https://api.github.com/repos/psf/requests/issues/330/comments
https://api.github.com/repos/psf/requests/issues/330/events
https://github.com/psf/requests/issues/330
2,695,088
MDU6SXNzdWUyNjk1MDg4
330
Returning request.content in preferred format [feature request]
{ "avatar_url": "https://avatars.githubusercontent.com/u/311929?v=4", "events_url": "https://api.github.com/users/kracekumar/events{/privacy}", "followers_url": "https://api.github.com/users/kracekumar/followers", "following_url": "https://api.github.com/users/kracekumar/following{/other_user}", "gists_url": "https://api.github.com/users/kracekumar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kracekumar", "id": 311929, "login": "kracekumar", "node_id": "MDQ6VXNlcjMxMTkyOQ==", "organizations_url": "https://api.github.com/users/kracekumar/orgs", "received_events_url": "https://api.github.com/users/kracekumar/received_events", "repos_url": "https://api.github.com/users/kracekumar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kracekumar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kracekumar/subscriptions", "type": "User", "url": "https://api.github.com/users/kracekumar", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-12-31T17:26:35Z
2021-09-09T10:00:46Z
2011-12-31T17:30:44Z
CONTRIBUTOR
resolved
`r = requests.get("some api which results contents in json") type(r.content) => unicode.` `r = requests.get("some api which results contents in json", return_format = 'json") type(r.content) => json` In current scenario request will return r,content in unicode format even though api results json or xml contents. It will be easy for developer to mention return_type = 'json', so the request will convert unicode to json. *_Shortcoming: *_ If the api returns xml and user specifies return_type: json it is tedious to convert. If like to like conversion is possible it will be cool feature.
{ "avatar_url": "https://avatars.githubusercontent.com/u/311929?v=4", "events_url": "https://api.github.com/users/kracekumar/events{/privacy}", "followers_url": "https://api.github.com/users/kracekumar/followers", "following_url": "https://api.github.com/users/kracekumar/following{/other_user}", "gists_url": "https://api.github.com/users/kracekumar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kracekumar", "id": 311929, "login": "kracekumar", "node_id": "MDQ6VXNlcjMxMTkyOQ==", "organizations_url": "https://api.github.com/users/kracekumar/orgs", "received_events_url": "https://api.github.com/users/kracekumar/received_events", "repos_url": "https://api.github.com/users/kracekumar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kracekumar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kracekumar/subscriptions", "type": "User", "url": "https://api.github.com/users/kracekumar", "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/330/reactions" }
https://api.github.com/repos/psf/requests/issues/330/timeline
null
completed
null
null
false
[ "This would be a cool feature, but it's way out of scope for requests. I've considered it many a time, but it comes down to this: requests is an http library, not a json, html, xml, yaml, &c library. \n", "Yes, you are absolute correct. Converting unicode to json hardly takes few lines, I just thought it will be awesome out of box feature. \n", "We're on the same page. I think it would be neat too, but I think it would be the start of a bad trend.\n", "Fine. \n" ]
https://api.github.com/repos/psf/requests/issues/329
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/329/labels{/name}
https://api.github.com/repos/psf/requests/issues/329/comments
https://api.github.com/repos/psf/requests/issues/329/events
https://github.com/psf/requests/pull/329
2,693,313
MDExOlB1bGxSZXF1ZXN0NjQxNzI2
329
Refactor stream_decode_gzip and _deflate into one function, stream_decom...
{ "avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4", "events_url": "https://api.github.com/users/gazpachoking/events{/privacy}", "followers_url": "https://api.github.com/users/gazpachoking/followers", "following_url": "https://api.github.com/users/gazpachoking/following{/other_user}", "gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gazpachoking", "id": 187133, "login": "gazpachoking", "node_id": "MDQ6VXNlcjE4NzEzMw==", "organizations_url": "https://api.github.com/users/gazpachoking/orgs", "received_events_url": "https://api.github.com/users/gazpachoking/received_events", "repos_url": "https://api.github.com/users/gazpachoking/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions", "type": "User", "url": "https://api.github.com/users/gazpachoking", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-12-31T03:19:42Z
2021-09-08T13:06:08Z
2011-12-31T17:42:34Z
CONTRIBUTOR
resolved
...press. stream_decompress will now iterate over the raw data if there is a problem with decompression Remove gzip decoding from Response.content, as urllib3 was doing it anyway.
{ "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/329/reactions" }
https://api.github.com/repos/psf/requests/issues/329/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/329.diff", "html_url": "https://github.com/psf/requests/pull/329", "merged_at": "2011-12-31T17:42:34Z", "patch_url": "https://github.com/psf/requests/pull/329.patch", "url": "https://api.github.com/repos/psf/requests/pulls/329" }
true
[ "Love this. Thanks!\n" ]