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/1128
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1128/labels{/name}
https://api.github.com/repos/psf/requests/issues/1128/comments
https://api.github.com/repos/psf/requests/issues/1128/events
https://github.com/psf/requests/pull/1128
10,212,801
MDExOlB1bGxSZXF1ZXN0Mzc5MDQ1MQ==
1,128
Updating urllib3 to current master
{ "avatar_url": "https://avatars.githubusercontent.com/u/74642?v=4", "events_url": "https://api.github.com/users/mvid/events{/privacy}", "followers_url": "https://api.github.com/users/mvid/followers", "following_url": "https://api.github.com/users/mvid/following{/other_user}", "gists_url": "https://api.github.com/users/mvid/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mvid", "id": 74642, "login": "mvid", "node_id": "MDQ6VXNlcjc0NjQy", "organizations_url": "https://api.github.com/users/mvid/orgs", "received_events_url": "https://api.github.com/users/mvid/received_events", "repos_url": "https://api.github.com/users/mvid/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mvid/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mvid/subscriptions", "type": "User", "url": "https://api.github.com/users/mvid", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-22T22:41:48Z
2021-09-08T23:06:17Z
2013-01-23T01:45:01Z
CONTRIBUTOR
resolved
The urllib3 changeset includes some changes related to issue #1008. As this is only an update to the dep, I don't feel that I should add myself to the AUTHORS file. If you disagree, please let me know.
{ "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/1128/reactions" }
https://api.github.com/repos/psf/requests/issues/1128/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1128.diff", "html_url": "https://github.com/psf/requests/pull/1128", "merged_at": "2013-01-23T01:45:01Z", "patch_url": "https://github.com/psf/requests/pull/1128.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1128" }
true
[ "thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1127
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1127/labels{/name}
https://api.github.com/repos/psf/requests/issues/1127/comments
https://api.github.com/repos/psf/requests/issues/1127/events
https://github.com/psf/requests/pull/1127
10,212,310
MDExOlB1bGxSZXF1ZXN0Mzc5MDIwOQ==
1,127
A simple fix
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-22T22:28:45Z
2021-09-08T18:01:24Z
2013-01-23T01:53:16Z
CONTRIBUTOR
resolved
I swear the tests pass this time ;) Ref: #1126
{ "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/1127/reactions" }
https://api.github.com/repos/psf/requests/issues/1127/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1127.diff", "html_url": "https://github.com/psf/requests/pull/1127", "merged_at": "2013-01-23T01:53:16Z", "patch_url": "https://github.com/psf/requests/pull/1127.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1127" }
true
[ ":cake:\n" ]
https://api.github.com/repos/psf/requests/issues/1126
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1126/labels{/name}
https://api.github.com/repos/psf/requests/issues/1126/comments
https://api.github.com/repos/psf/requests/issues/1126/events
https://github.com/psf/requests/issues/1126
10,206,969
MDU6SXNzdWUxMDIwNjk2OQ==
1,126
AttributeError when // is missing (eg. 'http:www.guardian.co.uk')
{ "avatar_url": "https://avatars.githubusercontent.com/u/225897?v=4", "events_url": "https://api.github.com/users/santagada/events{/privacy}", "followers_url": "https://api.github.com/users/santagada/followers", "following_url": "https://api.github.com/users/santagada/following{/other_user}", "gists_url": "https://api.github.com/users/santagada/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/santagada", "id": 225897, "login": "santagada", "node_id": "MDQ6VXNlcjIyNTg5Nw==", "organizations_url": "https://api.github.com/users/santagada/orgs", "received_events_url": "https://api.github.com/users/santagada/received_events", "repos_url": "https://api.github.com/users/santagada/repos", "site_admin": false, "starred_url": "https://api.github.com/users/santagada/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/santagada/subscriptions", "type": "User", "url": "https://api.github.com/users/santagada", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-22T19:59:00Z
2021-09-09T05:00:49Z
2013-01-23T08:21:38Z
NONE
resolved
Requests fail with an AttributeError instead of a LocationParseError when the url misses the '//'. Also LocationParseError maybe should be a top level exception of Requests, not buried inside urllib3. the complete error: AttributeError: 'NoneType' object has no attribute 'encode'
{ "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/1126/reactions" }
https://api.github.com/repos/psf/requests/issues/1126/timeline
null
completed
null
null
false
[ "This is a better traceback:\n\n```\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/usr/lib64/python2.6/site-packages/requests/api.py\", line 55, in g\n return request('get', url, **kwargs)\n File \"/usr/lib64/python2.6/site-packages/requests/api.py\", line 44, in r\n return session.request(method=method, url=url, **kwargs)\n File \"/usr/lib64/python2.6/site-packages/requests/sessions.py\", line 279equest\n resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, ert, proxies=proxies)\n File \"/usr/lib64/python2.6/site-packages/requests/sessions.py\", line 374end\n r = adapter.send(request, **kwargs)\n File \"/usr/lib64/python2.6/site-packages/requests/adapters.py\", line 174end\n timeout=timeout\n File \"/usr/lib64/python2.6/site-packages/requests/packages/urllib3/conneool.py\", line 422, in urlopen\n body=body, headers=headers)\n File \"/usr/lib64/python2.6/site-packages/requests/packages/urllib3/conneool.py\", line 274, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/usr/lib64/python2.6/httplib.py\", line 914, in request\n self._send_request(method, url, body, headers)\n File \"/usr/lib64/python2.6/httplib.py\", line 931, in _send_request\n self.putrequest(method, url, **skips)\n File \"/usr/lib64/python2.6/httplib.py\", line 858, in putrequest\n host_enc = self.host.encode(\"ascii\")\nAttributeError: 'NoneType' object has no attribute 'encode'\n```\n\nThe reason for this is that `urlparse` detects the scheme but not the `netloc`. I'm pretty sure this could easily be fixed by checking `if not (scheme and netloc)` the line after the url is parsed.\n", "Resolved by #1127. Thanks for raising the issue! =)\n" ]
https://api.github.com/repos/psf/requests/issues/1125
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1125/labels{/name}
https://api.github.com/repos/psf/requests/issues/1125/comments
https://api.github.com/repos/psf/requests/issues/1125/events
https://github.com/psf/requests/pull/1125
10,196,421
MDExOlB1bGxSZXF1ZXN0Mzc4MjE5Mw==
1,125
HTTPDigestAuth: missing algorithm field
{ "avatar_url": "https://avatars.githubusercontent.com/u/554079?v=4", "events_url": "https://api.github.com/users/juanriaza/events{/privacy}", "followers_url": "https://api.github.com/users/juanriaza/followers", "following_url": "https://api.github.com/users/juanriaza/following{/other_user}", "gists_url": "https://api.github.com/users/juanriaza/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/juanriaza", "id": 554079, "login": "juanriaza", "node_id": "MDQ6VXNlcjU1NDA3OQ==", "organizations_url": "https://api.github.com/users/juanriaza/orgs", "received_events_url": "https://api.github.com/users/juanriaza/received_events", "repos_url": "https://api.github.com/users/juanriaza/repos", "site_admin": false, "starred_url": "https://api.github.com/users/juanriaza/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/juanriaza/subscriptions", "type": "User", "url": "https://api.github.com/users/juanriaza", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2013-01-22T15:39:42Z
2021-09-08T18:01:23Z
2013-01-23T03:43:50Z
CONTRIBUTOR
resolved
While I was testing a digest auth provider I found that the algorithm field was missing at the Authorization Request Header. Following the [RFC](http://pretty-rfc.herokuapp.com/RFC2617#the.authorization.request.header): > The values of the opaque and algorithm fields must be those supplied in the WWW-Authenticate response 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/1125/reactions" }
https://api.github.com/repos/psf/requests/issues/1125/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1125.diff", "html_url": "https://github.com/psf/requests/pull/1125", "merged_at": "2013-01-23T03:43:50Z", "patch_url": "https://github.com/psf/requests/pull/1125.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1125" }
true
[ "@sigmavirus24, all good?\n", "Seems it to me. I'm convinced it does what he says.\n\nKenneth Reitz [email protected] wrote:\n\n> @sigmavirus24, all good?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/1125#issuecomment-12579122\n", ":cake:\n" ]
https://api.github.com/repos/psf/requests/issues/1124
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1124/labels{/name}
https://api.github.com/repos/psf/requests/issues/1124/comments
https://api.github.com/repos/psf/requests/issues/1124/events
https://github.com/psf/requests/issues/1124
10,179,657
MDU6SXNzdWUxMDE3OTY1Nw==
1,124
SSLError from imgur API, however proper cert appears via Chrome
{ "avatar_url": "https://avatars.githubusercontent.com/u/74351?v=4", "events_url": "https://api.github.com/users/maxcountryman/events{/privacy}", "followers_url": "https://api.github.com/users/maxcountryman/followers", "following_url": "https://api.github.com/users/maxcountryman/following{/other_user}", "gists_url": "https://api.github.com/users/maxcountryman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maxcountryman", "id": 74351, "login": "maxcountryman", "node_id": "MDQ6VXNlcjc0MzUx", "organizations_url": "https://api.github.com/users/maxcountryman/orgs", "received_events_url": "https://api.github.com/users/maxcountryman/received_events", "repos_url": "https://api.github.com/users/maxcountryman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maxcountryman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maxcountryman/subscriptions", "type": "User", "url": "https://api.github.com/users/maxcountryman", "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
12
2013-01-22T03:01:58Z
2021-09-09T00:01:11Z
2013-02-10T22:37:55Z
CONTRIBUTOR
resolved
``` python >>> import requests; requests.get('https://api.imgur.com') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/requests/api.py", line 55, in get return request('get', url, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 279, in request resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 374, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 213, in send raise SSLError(e) requests.exceptions.SSLError: hostname 'api.imgur.com' doesn't match 'imgur.com' ```
{ "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/1124/reactions" }
https://api.github.com/repos/psf/requests/issues/1124/timeline
null
completed
null
null
false
[ "You could use `verify=False`\n", "It's pretty trivial to get around, but if this isn't on imgur's end then I think it merits further investigation on requests' end. If the certs are installed correctly then it seems like this shouldn't happen and would indicate a bug.\n", "This may be a bug somewhere in the chain because upon further investigation, it does have a valid certificate (according to firefox). I have no clue where the problem may lie though.\n", "Using my crazy Raymond Chen-esque mind powers, I deduce that you are running a version of Python less than 3.2, and are therefore being hit by #749.\n\nUnfortunately, resolving #749 on these earlier versions of Python requires some serious changes to urllib3, which no-one has gotten around to making yet.\n", "@Lukasa you are absolutely correct in your deduction: I am in fact using Python 2.7.x.\n\nThat is terribly unfortunate apropos of urllib3 and a little surprising considering how widespread Python 2.x usage still is...\n", "You could replace the bundled urllib3 with the one from the branch from my latest pull request to urllib3 (see above your post).\nThen do something along the line of http://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/ but setting the `verify_hostname` parameter to `PoolManager` / adding a function which changes this only for imgur.\n", "@maxcountryman: The reason the changes have not yet been made in urllib3 is that the SNI hostname parameter is not exposed in the default library ssl module before Python 3.2. To implement this behaviour would require doing something intelligent with PyOpenSSL, a third party module. I'm beginning to think about doing this, but I certainly won't start before the weekend. =)\n", "@Lukasa you're right. It is exclusive to python 2.x (I tested on 2.6). Testing again on python 3.2 works just fine.\n", "The cacert.pem needs to be updated.\n\nIn my PIP environment /<projectroot>/lib/python2.7/site-packages/requests/ the cacert.pem is oooooooold need to update\n", "Actually - scratch my response - this SSL error is different to the one I'm seeing - but I'll keep my comment in case anyone googles it/looks for it.\n", "Also, the cert is being updated in #1149. We just need to remove any blacklisted certs that are in there. /ping @nacht ;)\n", "closing, we need to update our certs again\n" ]
https://api.github.com/repos/psf/requests/issues/1123
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1123/labels{/name}
https://api.github.com/repos/psf/requests/issues/1123/comments
https://api.github.com/repos/psf/requests/issues/1123/events
https://github.com/psf/requests/pull/1123
10,176,326
MDExOlB1bGxSZXF1ZXN0Mzc3MjU1NQ==
1,123
Fixes DigestAuth with Sessions
{ "avatar_url": "https://avatars.githubusercontent.com/u/575533?v=4", "events_url": "https://api.github.com/users/andrewjesaitis/events{/privacy}", "followers_url": "https://api.github.com/users/andrewjesaitis/followers", "following_url": "https://api.github.com/users/andrewjesaitis/following{/other_user}", "gists_url": "https://api.github.com/users/andrewjesaitis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andrewjesaitis", "id": 575533, "login": "andrewjesaitis", "node_id": "MDQ6VXNlcjU3NTUzMw==", "organizations_url": "https://api.github.com/users/andrewjesaitis/orgs", "received_events_url": "https://api.github.com/users/andrewjesaitis/received_events", "repos_url": "https://api.github.com/users/andrewjesaitis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andrewjesaitis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andrewjesaitis/subscriptions", "type": "User", "url": "https://api.github.com/users/andrewjesaitis", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2013-01-21T23:56:28Z
2021-09-08T18:01:22Z
2013-01-26T05:00:33Z
CONTRIBUTOR
resolved
Currently if you try to use digest auth with a bad username and password, you will enter a infinite loop of 401s. I think this is due to the handle_401 method overwriting the current registered hook, which in the context of #1106 is the correct behavior. This means that we can't just count the registered hooks. I added a counter to the request object, but am not sure if this fits with the way the rest of the library is structured since I am not too familiar with the rest of the codebase. If you have better idea of how this should be implemented, I'd be happy to do 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/1123/reactions" }
https://api.github.com/repos/psf/requests/issues/1123/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1123.diff", "html_url": "https://github.com/psf/requests/pull/1123", "merged_at": "2013-01-26T05:00:33Z", "patch_url": "https://github.com/psf/requests/pull/1123.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1123" }
true
[ "Definitely don't store the counter on the Request, that feels really weird. Putting it on the function suits me fine, particularly because it makes it really hard for end users to find and try to use. =D\n", "In Python 2.x I don't think you can directly set attributes on instance methods. I think the counter needs to be stored at instance level, since you could foresee having multiple sessions with with multiple HTTPDigestAuth instances and you don't want to counter to be shared. We could move the handle_401 into the init, eg:\n\n``` python\nclass HTTPDigestAuth(AuthBase):\n \"\"\"Attaches HTTP Digest Authentication to the given Request object.\"\"\"\n def __init__(self, username, password):\n # ...\n def handle_401(self, r, _num_401_calls=[1]):\n # ...\n if 'digest' in s_auth.lower() and _num_401_calls[0] < 2:\n # ...\n _num_401_calls[0] = _num_401_calls[0] + 1\n # ...\n self.handle_401 = functools.partial(handle_401, self)\n```\n\nI'm not a huge fan of this syntax though.\n\nMy other thought was to derive the state at runtime by looking at the history on the request, but the history seems to be overwritten. But, maybe I'm interpreting what the contents of request.history should be incorrectly.\n", "Andrew you can. I write primarily in 2.6 (which is the lowest requests bothers with) and test across most everything upwards. As such, I understand your concern between requests. If you want to reset the counter after receiving a 200 or on the second (or more) call to the handler, do this before returning `r` (not `_r`, the inner return statement): \n\n``` python\n\nsetattr(self.handle_401, 'num_401_calls', 1)\nreturn r\n```\n", "Someone let me know when this is ready to merge :)\n", "Hey Ian, I tried implementing it the way you suggested yesterday (and double checked it this morning) and it raises an AttributeError on 2.7 (and 3.2):\n\n```\nFile \"../requests/auth.py\", line 157, in handle_401\n setattr(self.handle_401, 'num_401_calls', num_401_calls + 1)\nAttributeError: 'instancemethod' object has no attribute 'num_401_calls'\n```\n\nMaybe I've made some other typo, but I don't see it.\n\nWe could store the counter on the HTTPDigestAuth instance ie: `setattr(self, 'num_401_calls', num_401_calls + 1)`\n", "@andrewjesaitis, I have to look up where I think I did this then, because I'm getting the same thing on 2.6. :/ Sorry for the confusion.\n\nAnd yeah, placing it on the auth in the pattern I mentioned above would work. Inside the if-statement you increment it by one, outside you set it to 1. That way if the auth is passed around (say in a session) it won't have incorrect counts.\n", "No problem. I thought I was going crazy for a second... Thanks for the help! \n", "@kennethreitz looks good to me. :+1:\n", ":sparkles: @sigmavirus24 has spoken! :sparkles:\n" ]
https://api.github.com/repos/psf/requests/issues/1122
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1122/labels{/name}
https://api.github.com/repos/psf/requests/issues/1122/comments
https://api.github.com/repos/psf/requests/issues/1122/events
https://github.com/psf/requests/pull/1122
10,171,904
MDExOlB1bGxSZXF1ZXN0Mzc3MDI4Ng==
1,122
Decrease default line length for iter_lines
{ "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
0
2013-01-21T21:17:17Z
2021-09-08T23:06:17Z
2013-01-22T13:09:12Z
MEMBER
resolved
Improve the responsiveness of `iter_lines` when called by unsuspecting users. =) Belatedly changed in response to #989. Obviously, feel free to pick a different number if you think this is no good.
{ "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/1122/reactions" }
https://api.github.com/repos/psf/requests/issues/1122/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1122.diff", "html_url": "https://github.com/psf/requests/pull/1122", "merged_at": "2013-01-22T13:09:12Z", "patch_url": "https://github.com/psf/requests/pull/1122.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1122" }
true
[]
https://api.github.com/repos/psf/requests/issues/1121
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1121/labels{/name}
https://api.github.com/repos/psf/requests/issues/1121/comments
https://api.github.com/repos/psf/requests/issues/1121/events
https://github.com/psf/requests/pull/1121
10,169,571
MDExOlB1bGxSZXF1ZXN0Mzc2OTEyOQ==
1,121
Small typo fixes.
{ "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
0
2013-01-21T20:00:06Z
2021-09-08T18:01:21Z
2013-01-22T14:40:24Z
MEMBER
resolved
Resolves #1118.
{ "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/1121/reactions" }
https://api.github.com/repos/psf/requests/issues/1121/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1121.diff", "html_url": "https://github.com/psf/requests/pull/1121", "merged_at": "2013-01-22T14:40:24Z", "patch_url": "https://github.com/psf/requests/pull/1121.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1121" }
true
[]
https://api.github.com/repos/psf/requests/issues/1120
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1120/labels{/name}
https://api.github.com/repos/psf/requests/issues/1120/comments
https://api.github.com/repos/psf/requests/issues/1120/events
https://github.com/psf/requests/pull/1120
10,168,555
MDExOlB1bGxSZXF1ZXN0Mzc2ODYyOA==
1,120
Add py3.3 testing back
{ "avatar_url": "https://avatars.githubusercontent.com/u/292606?v=4", "events_url": "https://api.github.com/users/spulec/events{/privacy}", "followers_url": "https://api.github.com/users/spulec/followers", "following_url": "https://api.github.com/users/spulec/following{/other_user}", "gists_url": "https://api.github.com/users/spulec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/spulec", "id": 292606, "login": "spulec", "node_id": "MDQ6VXNlcjI5MjYwNg==", "organizations_url": "https://api.github.com/users/spulec/orgs", "received_events_url": "https://api.github.com/users/spulec/received_events", "repos_url": "https://api.github.com/users/spulec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/spulec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/spulec/subscriptions", "type": "User", "url": "https://api.github.com/users/spulec", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-21T19:26:44Z
2021-09-08T18:01:22Z
2013-01-21T19:27:41Z
CONTRIBUTOR
resolved
It looks like Travis had issues with 3.3 in the past(https://travis-ci.org/kennethreitz/requests/jobs/3703119), but it seems to have been 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/1120/reactions" }
https://api.github.com/repos/psf/requests/issues/1120/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1120.diff", "html_url": "https://github.com/psf/requests/pull/1120", "merged_at": "2013-01-21T19:27:41Z", "patch_url": "https://github.com/psf/requests/pull/1120.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1120" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1119
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1119/labels{/name}
https://api.github.com/repos/psf/requests/issues/1119/comments
https://api.github.com/repos/psf/requests/issues/1119/events
https://github.com/psf/requests/pull/1119
10,152,797
MDExOlB1bGxSZXF1ZXN0Mzg1MzA0Mg==
1,119
Better diagnostics when trying to send unprepared 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
24
2013-01-21T10:59:23Z
2021-09-08T19:00:42Z
2013-02-10T22:06:38Z
NONE
resolved
When trying to send unprepared request like ``` import requests requests.Session().send(requests.Request(url='http://example.com')) ``` one gets rather meaningless error ``` Traceback (most recent call last): File "y.py", line 3, in <module> requests.Session().send(requests.Request(url='http://example.com')) File "c:\python\venvs\sandbox\lib\site-packages\requests\sessions.py", line 374, in send r = adapter.send(request, **kwargs) File "c:\python\venvs\sandbox\lib\site-packages\requests\adapters.py", line 158, in send url = self.request_url(request, proxies) File "c:\python\venvs\sandbox\lib\site-packages\requests\adapters.py", line 148, in request_url url = request.path_url AttributeError: 'Request' object has no attribute 'path_url' ``` It would be nice to check if the request is prepared before trying to send and inform user what's wrong if the request is not prepared.
{ "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/1119/reactions" }
https://api.github.com/repos/psf/requests/issues/1119/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1119.diff", "html_url": "https://github.com/psf/requests/pull/1119", "merged_at": "2013-02-10T22:06:38Z", "patch_url": "https://github.com/psf/requests/pull/1119.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1119" }
true
[ "+1\n", "When writing the code for this, I considered automatically preparing unprepared requests. \n\nThoughts?\n", "I'm not keen on it. If you're separating requests from sending in such a way that you can submit an unprepared request to a transport adapter, you're probably doing something with the prepared request. The above error suggests a code path where you don't prepare the request, and that code path is probably also missing the other stuff you wanted to do to the prepared request.\n\nIt would actually be worse to throw no error in this case than to throw the meaningless one above\n", "That kind of preserves pre 1.x behaviour right? And the code for that should be simple, e.g., \n\n```\nprepare = getattr(request, 'prepare', None)\nif prepare and isinstance(prepare, Callable):\n request = request.prepare()\n```\n\nThen yeah, that makes sense. Seems a bit too convenient, but I wouldn't fight against it.\n", "@sigmavirus24 that's exactly what i was thinking.\n\nNeed to think about if more. @Lukasa makes a point.\n", "I agree with @Lukasa 's point, and we've already broken the pre 1.x behaviour, so restoring it is not a must. Raising a `ValueError` seems to be the pythonic thing to do here, otherwise.\n", "@kennethreitz: You didn't seem to have checked in any code for this, so I decided to give you an easy option. =)\n\nI feel like the `getattr` check is overbroad, users might want to use custom PreparedRequest objects where the `prepare()` method simply mutates the current object as opposed to returning a new one. Normally I wouldn't use it, but as we're testing for 'user makes a boo-boo', maybe we should use it.\n", "The test failures are arbitrary: the `test_links` test case is failing with a `KeyError`. Pretty sure it's transient.\n", "So, over two test runs all versions of Python passed. I call that a win.\n", "Victory!\n", "Can you rebase?\n", "also, this functionality should be in session.send i think, not the adapter.\n", "@Lukasa I rebased and made the changes for you [here](https://github.com/sigmavirus24/requests/tree/lukasa/diags)\n", "I meant to bring this up yesterday and got stuck in traffic: I wasn't sure that this should be in `Session.send()`. It seemed like any user accidentally `Session.send`ing an unprepared Request could just as easily `HTTPAdapter.send` it by accident. This way we catch both cases.\n", "This failure isn't my fault, this is totally mergeable. =D\n", "should this be happening at the session level\n", "I don't think so. It seems to me that if you're manually preparing requests, it's quite possible that you're going to immediately plug them into a Transport Adapter, and not just try to session.send() them. In fact, I feel like if you're going to hit `prepare()` you're _way_ more likely to use a transport adapter instead of the session. This way catches both.\n", "basically, if you're using an unmounted transport adapter, you're going to be working at a really low level, and will know that it needs to be prepared already.\n\nI also don't want everyone who creates a connection adapter to have to implement this.\n", "Fair enough, I'll take another swing at this tomorrow as well. =)\n", "Hooray, moved code! :grin:\n", "@Lukasa rebase again please? ;P\n", "Done. =)\n", "Merging, but changing this.\n", "Go for it. =)\n" ]
https://api.github.com/repos/psf/requests/issues/1118
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1118/labels{/name}
https://api.github.com/repos/psf/requests/issues/1118/comments
https://api.github.com/repos/psf/requests/issues/1118/events
https://github.com/psf/requests/issues/1118
10,145,396
MDU6SXNzdWUxMDE0NTM5Ng==
1,118
typo
{ "avatar_url": "https://avatars.githubusercontent.com/u/122914?v=4", "events_url": "https://api.github.com/users/softside/events{/privacy}", "followers_url": "https://api.github.com/users/softside/followers", "following_url": "https://api.github.com/users/softside/following{/other_user}", "gists_url": "https://api.github.com/users/softside/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/softside", "id": 122914, "login": "softside", "node_id": "MDQ6VXNlcjEyMjkxNA==", "organizations_url": "https://api.github.com/users/softside/orgs", "received_events_url": "https://api.github.com/users/softside/received_events", "repos_url": "https://api.github.com/users/softside/repos", "site_admin": false, "starred_url": "https://api.github.com/users/softside/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/softside/subscriptions", "type": "User", "url": "https://api.github.com/users/softside", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-21T03:32:22Z
2021-09-09T05:00:51Z
2013-01-22T17:58:12Z
NONE
resolved
there is a typo in https://github.com/kennethreitz/requests/blob/master/docs/user/advanced.rst#streaming-uploads request ?? requests
{ "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/1118/reactions" }
https://api.github.com/repos/psf/requests/issues/1118/timeline
null
completed
null
null
false
[ "You mean in the code examples in that section and the chunk-encoded requests section?\n", "Resolved by #1121. \n" ]
https://api.github.com/repos/psf/requests/issues/1117
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1117/labels{/name}
https://api.github.com/repos/psf/requests/issues/1117/comments
https://api.github.com/repos/psf/requests/issues/1117/events
https://github.com/psf/requests/pull/1117
10,126,860
MDExOlB1bGxSZXF1ZXN0Mzc1MTkzMA==
1,117
Fix #1106
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-19T16:51:33Z
2021-09-08T18:01:22Z
2013-01-23T02:48:32Z
CONTRIBUTOR
resolved
The only place it makes sense to call `dispatch_hook` is in the session. Having them performed in the adapter does nothing as is and would be inconsistent across other adapters (ostensibly written by others).
{ "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/1117/reactions" }
https://api.github.com/repos/psf/requests/issues/1117/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1117.diff", "html_url": "https://github.com/psf/requests/pull/1117", "merged_at": "2013-01-23T02:48:32Z", "patch_url": "https://github.com/psf/requests/pull/1117.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1117" }
true
[ "This also in part is relying on #1099. \n", "Use case was digest auth with a prepared request sent through a connection not installed in a session.\n\n---\n\nYou are right :)\n" ]
https://api.github.com/repos/psf/requests/issues/1116
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1116/labels{/name}
https://api.github.com/repos/psf/requests/issues/1116/comments
https://api.github.com/repos/psf/requests/issues/1116/events
https://github.com/psf/requests/pull/1116
10,124,376
MDExOlB1bGxSZXF1ZXN0Mzc1MTE5OA==
1,116
Correct type of Content-Length headers.
{ "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
8
2013-01-19T12:10:47Z
2021-09-08T18:01:21Z
2013-01-23T02:51:17Z
MEMBER
resolved
This should resolve #1113. A test is included, but the test relies on StringIO - if you want to avoid that import, I can remove the test. As a side note, the type of the Content-Length header is now always unicode, which feels pretty weird. Should I add in a call to `encode('ascii')`?
{ "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/1116/reactions" }
https://api.github.com/repos/psf/requests/issues/1116/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1116.diff", "html_url": "https://github.com/psf/requests/pull/1116", "merged_at": "2013-01-23T02:51:17Z", "patch_url": "https://github.com/psf/requests/pull/1116.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1116" }
true
[ "Updated this because the test doesn't (and can't) run on Python3. Stupid new StringIO.\n", "@Lukasa just use the `io` module. It has `StringIO` in it in python 2.6-3.3\n", "@sigmavirus24:\n\n``` python\nPython 3.3.0 (default, Oct 20 2012, 09:48:02) \n[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> from io import StringIO\n>>> a = StringIO('abc')\n>>> a.fileno()\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\nio.UnsupportedOperation: fileno\n```\n\nThe problem isn't in my code, it's that stupid StringIO _does_ have the method, but unconditionally throws exceptions. Given that Requests tries to use it, that's a problem. =P\n", "Should have read the test I guess :P. Kind of distracted by trying to fix my \napp on Heroku.\n", "thanks!\n", "@Lukasa \n\nAs to type of this header, I agree, it should not be unicode. More generally no header should be unicode. Actually, thinking of it, no header in prepared request should be unicode; there could be some value in leaving unicode in unprepared request.\n", "also keep python3 in mind\n", "@kennethreitz Yeah, I was wondering about that. It seems like headers on the `Request` object should be free to be either unicode or bytes. With that said, somewhere before urllib3 we should get rid of any unicode headers, in order to avoid problems like #1082. Maybe `prepare_headers` should turn them into bytes?\n" ]
https://api.github.com/repos/psf/requests/issues/1115
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1115/labels{/name}
https://api.github.com/repos/psf/requests/issues/1115/comments
https://api.github.com/repos/psf/requests/issues/1115/events
https://github.com/psf/requests/pull/1115
10,119,851
MDExOlB1bGxSZXF1ZXN0Mzc0OTUyOQ==
1,115
request.json is attribute not function
{ "avatar_url": "https://avatars.githubusercontent.com/u/446889?v=4", "events_url": "https://api.github.com/users/corydolphin/events{/privacy}", "followers_url": "https://api.github.com/users/corydolphin/followers", "following_url": "https://api.github.com/users/corydolphin/following{/other_user}", "gists_url": "https://api.github.com/users/corydolphin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/corydolphin", "id": 446889, "login": "corydolphin", "node_id": "MDQ6VXNlcjQ0Njg4OQ==", "organizations_url": "https://api.github.com/users/corydolphin/orgs", "received_events_url": "https://api.github.com/users/corydolphin/received_events", "repos_url": "https://api.github.com/users/corydolphin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/corydolphin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/corydolphin/subscriptions", "type": "User", "url": "https://api.github.com/users/corydolphin", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-19T01:40:44Z
2021-09-08T18:01:19Z
2013-01-19T02:38:43Z
NONE
resolved
The documentation describes request.json as a function, but in `'0.14.2' it is a property. This appears to be changed in master, which is correct and future compatible? The`@property` decorator produces nice syntactic sugar, and I would support the continued use of it to make accessing the json body even easier.
{ "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/1115/reactions" }
https://api.github.com/repos/psf/requests/issues/1115/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1115.diff", "html_url": "https://github.com/psf/requests/pull/1115", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1115.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1115" }
true
[ "Requests v1.0.0 changed this to a method. \n" ]
https://api.github.com/repos/psf/requests/issues/1114
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1114/labels{/name}
https://api.github.com/repos/psf/requests/issues/1114/comments
https://api.github.com/repos/psf/requests/issues/1114/events
https://github.com/psf/requests/pull/1114
10,097,643
MDExOlB1bGxSZXF1ZXN0MzczNzg5OQ==
1,114
Keep-alive support for http proxies
{ "avatar_url": "https://avatars.githubusercontent.com/u/1771332?v=4", "events_url": "https://api.github.com/users/vlaci/events{/privacy}", "followers_url": "https://api.github.com/users/vlaci/followers", "following_url": "https://api.github.com/users/vlaci/following{/other_user}", "gists_url": "https://api.github.com/users/vlaci/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vlaci", "id": 1771332, "login": "vlaci", "node_id": "MDQ6VXNlcjE3NzEzMzI=", "organizations_url": "https://api.github.com/users/vlaci/orgs", "received_events_url": "https://api.github.com/users/vlaci/received_events", "repos_url": "https://api.github.com/users/vlaci/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vlaci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vlaci/subscriptions", "type": "User", "url": "https://api.github.com/users/vlaci", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-18T13:02:41Z
2021-09-08T18:01:20Z
2013-01-18T13:40:26Z
CONTRIBUTOR
resolved
Fixing https://github.com/kennethreitz/requests/issues/1112
{ "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/1114/reactions" }
https://api.github.com/repos/psf/requests/issues/1114/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1114.diff", "html_url": "https://github.com/psf/requests/pull/1114", "merged_at": "2013-01-18T13:40:26Z", "patch_url": "https://github.com/psf/requests/pull/1114.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1114" }
true
[ "<3\n" ]
https://api.github.com/repos/psf/requests/issues/1113
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1113/labels{/name}
https://api.github.com/repos/psf/requests/issues/1113/comments
https://api.github.com/repos/psf/requests/issues/1113/events
https://github.com/psf/requests/issues/1113
10,096,697
MDU6SXNzdWUxMDA5NjY5Nw==
1,113
Type of Content-Length header changes when type of data changes
{ "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
4
2013-01-18T12:26:06Z
2021-09-09T05:00:50Z
2013-01-23T08:20:49Z
NONE
resolved
``` import requests import StringIO req1 = requests.Request(url='http://example.com', data=StringIO.StringIO('abc')).prepare() req2 = requests.Request(url='http://example.com', data='abc').prepare() assert type(req1.headers['content-length']) == type(req2.headers['content-length']) ```
{ "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/1113/reactions" }
https://api.github.com/repos/psf/requests/issues/1113/timeline
null
completed
null
null
false
[ "This is a feature not a bug.\n\nhttp://docs.python-requests.org/en/latest/user/advanced/#chunk-encoded-requests\n", "I don't think using different transfer encoding should change **Python's type** of some header's value.\n", "Ah. It should always be a string.\n", "Resolved by #1116.\n" ]
https://api.github.com/repos/psf/requests/issues/1112
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1112/labels{/name}
https://api.github.com/repos/psf/requests/issues/1112/comments
https://api.github.com/repos/psf/requests/issues/1112/events
https://github.com/psf/requests/issues/1112
10,095,750
MDU6SXNzdWUxMDA5NTc1MA==
1,112
Keep-alive doesn't work over http proxy (again)
{ "avatar_url": "https://avatars.githubusercontent.com/u/1771332?v=4", "events_url": "https://api.github.com/users/vlaci/events{/privacy}", "followers_url": "https://api.github.com/users/vlaci/followers", "following_url": "https://api.github.com/users/vlaci/following{/other_user}", "gists_url": "https://api.github.com/users/vlaci/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vlaci", "id": 1771332, "login": "vlaci", "node_id": "MDQ6VXNlcjE3NzEzMzI=", "organizations_url": "https://api.github.com/users/vlaci/orgs", "received_events_url": "https://api.github.com/users/vlaci/received_events", "repos_url": "https://api.github.com/users/vlaci/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vlaci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vlaci/subscriptions", "type": "User", "url": "https://api.github.com/users/vlaci", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-18T11:47:26Z
2021-09-09T05:00:54Z
2013-01-18T12:24:07Z
CONTRIBUTOR
resolved
Proposed solution: ``` diff diff --git a/requests/adapters.py b/requests/adapters.py index 5f9d9c7..099a001 100644 --- a/requests/adapters.py +++ b/requests/adapters.py @@ -11,7 +11,7 @@ and maintain connections. import socket from .models import Response -from .packages.urllib3.poolmanager import PoolManager, proxy_from_url +from .packages.urllib3.poolmanager import PoolManager, ProxyManager from .packages.urllib3.response import HTTPResponse from .hooks import dispatch_hook from .compat import urlparse, basestring, urldefrag @@ -120,7 +120,7 @@ class HTTPAdapter(BaseAdapter): if proxy: proxy = prepend_scheme_if_needed(proxy, urlparse(url).scheme) - conn = proxy_from_url(proxy) + conn = ProxyManager(self.poolmanager.connection_from_url(proxy)) else: conn = self.poolmanager.connection_from_url(url) ``` BTW I once implemented this. How could it disappear? What happened with the tests covering 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/1112/reactions" }
https://api.github.com/repos/psf/requests/issues/1112/timeline
null
completed
null
null
false
[ "the entire codebase was re-written. send a pull request.\n" ]
https://api.github.com/repos/psf/requests/issues/1111
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1111/labels{/name}
https://api.github.com/repos/psf/requests/issues/1111/comments
https://api.github.com/repos/psf/requests/issues/1111/events
https://github.com/psf/requests/issues/1111
10,089,963
MDU6SXNzdWUxMDA4OTk2Mw==
1,111
Licensing questions
{ "avatar_url": "https://avatars.githubusercontent.com/u/115275?v=4", "events_url": "https://api.github.com/users/saschpe/events{/privacy}", "followers_url": "https://api.github.com/users/saschpe/followers", "following_url": "https://api.github.com/users/saschpe/following{/other_user}", "gists_url": "https://api.github.com/users/saschpe/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/saschpe", "id": 115275, "login": "saschpe", "node_id": "MDQ6VXNlcjExNTI3NQ==", "organizations_url": "https://api.github.com/users/saschpe/orgs", "received_events_url": "https://api.github.com/users/saschpe/received_events", "repos_url": "https://api.github.com/users/saschpe/repos", "site_admin": false, "starred_url": "https://api.github.com/users/saschpe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saschpe/subscriptions", "type": "User", "url": "https://api.github.com/users/saschpe", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2013-01-18T07:50:27Z
2021-09-09T05:29:55Z
2013-01-18T08:02:00Z
CONTRIBUTOR
resolved
The openSUSE legal team stumbled upon some licensing questions: https://bugzilla.novell.com/show_bug.cgi?id=799119 Distributions have to be exact here, so maybe can comment and clarify the situation.
{ "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/1111/reactions" }
https://api.github.com/repos/psf/requests/issues/1111/timeline
null
completed
null
null
false
[ "I am not going to create an account.\n\nCan you share a screenshot or transcript or something?\n", "Uhm, damn legal bugs aren't public, sorry... Here's the report:\n\nThe NOTICE file shows that the package uses various components under MIT,\nBSD-3-Clause and LGPL-2.1+. The LICENSE file states:\n\nCopyright 2013 Kenneth Reitz\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n```\n http://www.apache.org/licenses/LICENSE-2.0\n```\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\nThe Apache-2.0 license seems to be confirmed by the setup.py file.\n\nHowever, our spec file states ISC. The Fedora spec file also states MIT and ISC\n\nPlease confirm...\n", "The project was previously released under MIT. It has since changed Apache 2. \n\nSee NOTICES file for clarification for embedded Python modules.\n" ]
https://api.github.com/repos/psf/requests/issues/1110
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1110/labels{/name}
https://api.github.com/repos/psf/requests/issues/1110/comments
https://api.github.com/repos/psf/requests/issues/1110/events
https://github.com/psf/requests/pull/1110
10,087,401
MDExOlB1bGxSZXF1ZXN0MzczMzMwOQ==
1,110
Remove support for certifi
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-18T04:43:26Z
2021-09-08T18:01:19Z
2013-01-18T12:39:41Z
CONTRIBUTOR
resolved
As per #1105, certifi is being end-of-lifed. Requests will use either its own vendored bundle, or possibly (when packaged with OS distributions) an externally packaged bundle, which can be enabled by patching requests.certs.where().
{ "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/1110/reactions" }
https://api.github.com/repos/psf/requests/issues/1110/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1110.diff", "html_url": "https://github.com/psf/requests/pull/1110", "merged_at": "2013-01-18T12:39:41Z", "patch_url": "https://github.com/psf/requests/pull/1110.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1110" }
true
[ "wow, I didn't realize that was still there. thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/1109
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1109/labels{/name}
https://api.github.com/repos/psf/requests/issues/1109/comments
https://api.github.com/repos/psf/requests/issues/1109/events
https://github.com/psf/requests/pull/1109
10,086,134
MDExOlB1bGxSZXF1ZXN0MzczMjczNw==
1,109
add file scheme support
{ "avatar_url": "https://avatars.githubusercontent.com/u/101?v=4", "events_url": "https://api.github.com/users/jvantuyl/events{/privacy}", "followers_url": "https://api.github.com/users/jvantuyl/followers", "following_url": "https://api.github.com/users/jvantuyl/following{/other_user}", "gists_url": "https://api.github.com/users/jvantuyl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jvantuyl", "id": 101, "login": "jvantuyl", "node_id": "MDQ6VXNlcjEwMQ==", "organizations_url": "https://api.github.com/users/jvantuyl/orgs", "received_events_url": "https://api.github.com/users/jvantuyl/received_events", "repos_url": "https://api.github.com/users/jvantuyl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jvantuyl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jvantuyl/subscriptions", "type": "User", "url": "https://api.github.com/users/jvantuyl", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2013-01-18T03:15:57Z
2021-09-08T10:01:09Z
2013-01-18T03:19:49Z
CONTRIBUTOR
resolved
Adds file://... support. It's unnaturally complete for what it does. - methods for GET / HEAD / PUT / POST / DELETE - turns symlinks into redirects - appropriate HTTP errors for access-denied, missing file, etc. - streaming support for large files - guesses content-types / encodings from filenames - date, last-modified, content-length, and other headers Since this is potentially dangerous, it's not enabled by default. A few rudimentary tests are provided. For those who are wondering why anyone would want this, I use it for bootstrapping some of our HTTP clients (i.e. I have a list of URLs for fall-back, with a file://... URL at the end) and of testing (i.e. it's easier to just change the API base URI to file: than it is to mock out requests everywhere).
{ "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/1109/reactions" }
https://api.github.com/repos/psf/requests/issues/1109/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1109.diff", "html_url": "https://github.com/psf/requests/pull/1109", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1109.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1109" }
true
[ "First off, thanks for the contribution. Very bold :)\n\nThat being said: I will never accept this. This is one of the biggest conceptual flaws in urllib2. This also adds a tremendous amount of code to the codebase, which should aways be avoided if possible.\n\nHowever, this is awesome, and exactly the type of thing that I was hoping people would make with Connection Adapters. It just doesn't belong in Requests itself, but another module.\n", "Perhaps 'requests-fs' or something ;)\n", "But... but... I disabled it by default! And it doesn't touch any core code at all! And I wrote tests!\n\n![Okay...](http://alltheragefaces.com/img/faces/png/okay-okay.png)\n", "pip install requests-fs. it'll be awesome :)\n", "@kennethreitz : I just came across this while looking for a way to do this. Can you explain why allowing requests to open file scheme URLs would be a \"conceptual flaw\"?\n", "That's easy: because requests is a HTTP library!\n\nRequests is not about opening arbitrary URLs, it's about making HTTP requests. File URLs don't involve HTTP at all. They are simply out of scope for the library. Adding support for them adds complexity and mess to a codebase that simply doesn't need it. \n", "They are also a big security risk for people that expecting to be able to trust that this is an HTTP library :)\n\nMany thanks, @Lukasa :)\n" ]
https://api.github.com/repos/psf/requests/issues/1108
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1108/labels{/name}
https://api.github.com/repos/psf/requests/issues/1108/comments
https://api.github.com/repos/psf/requests/issues/1108/events
https://github.com/psf/requests/pull/1108
10,080,519
MDExOlB1bGxSZXF1ZXN0MzczMDQxMg==
1,108
wrote response xml handler mimicking json
{ "avatar_url": "https://avatars.githubusercontent.com/u/1778611?v=4", "events_url": "https://api.github.com/users/rickeyvisinski-kanban/events{/privacy}", "followers_url": "https://api.github.com/users/rickeyvisinski-kanban/followers", "following_url": "https://api.github.com/users/rickeyvisinski-kanban/following{/other_user}", "gists_url": "https://api.github.com/users/rickeyvisinski-kanban/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rickeyvisinski-kanban", "id": 1778611, "login": "rickeyvisinski-kanban", "node_id": "MDQ6VXNlcjE3Nzg2MTE=", "organizations_url": "https://api.github.com/users/rickeyvisinski-kanban/orgs", "received_events_url": "https://api.github.com/users/rickeyvisinski-kanban/received_events", "repos_url": "https://api.github.com/users/rickeyvisinski-kanban/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rickeyvisinski-kanban/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rickeyvisinski-kanban/subscriptions", "type": "User", "url": "https://api.github.com/users/rickeyvisinski-kanban", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-17T23:35:29Z
2021-09-08T18:01:18Z
2013-01-18T03:50:19Z
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/1108/reactions" }
https://api.github.com/repos/psf/requests/issues/1108/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1108.diff", "html_url": "https://github.com/psf/requests/pull/1108", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1108.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1108" }
true
[ "Json is the only format we will ever support.\n" ]
https://api.github.com/repos/psf/requests/issues/1107
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1107/labels{/name}
https://api.github.com/repos/psf/requests/issues/1107/comments
https://api.github.com/repos/psf/requests/issues/1107/events
https://github.com/psf/requests/pull/1107
10,071,453
MDExOlB1bGxSZXF1ZXN0MzcyNTk0NQ==
1,107
Correct broken cookies example
{ "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
2013-01-17T19:30:34Z
2021-09-08T23:07:22Z
2013-01-18T03:50:55Z
MEMBER
resolved
The cookies example in the docs is wrong. This fixes it so it demonstrates correct behaviour, though it is no longer something you can type into your own shell to see. If we need that functionality, we might need to adjust httpbin's behaviour. Let me know if you'd rather do that. Addresses #1069 (a whole month later).
{ "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/1107/reactions" }
https://api.github.com/repos/psf/requests/issues/1107/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1107.diff", "html_url": "https://github.com/psf/requests/pull/1107", "merged_at": "2013-01-18T03:50:55Z", "patch_url": "https://github.com/psf/requests/pull/1107.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1107" }
true
[ "What change in httpbin do you envision?\n", "Have httpbin return the cookies on the 200 after the redirect.\n" ]
https://api.github.com/repos/psf/requests/issues/1106
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1106/labels{/name}
https://api.github.com/repos/psf/requests/issues/1106/comments
https://api.github.com/repos/psf/requests/issues/1106/events
https://github.com/psf/requests/issues/1106
10,062,136
MDU6SXNzdWUxMDA2MjEzNg==
1,106
Result of 'response' hook is stored in session.response and not returned
{ "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
2
2013-01-17T15:27:54Z
2021-09-09T05:00:50Z
2013-01-23T02:48:32Z
CONTRIBUTOR
resolved
https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L298 Should the result of `dispatch_hook` actually be returned? Seems to make no sense to store it as a property of the session object. The documentation states: > "If the callback function returns a value, it is assumed that it is to replace the data that was passed in. If the function doesn’t return anything, nothing else is effected." Another thing I've noticed, and don't quite understand, is that [hooks are executed by the adapter as well](https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L113), and that hooks are not preserved when the `PreparedRequest` is being generated.
{ "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/1106/reactions" }
https://api.github.com/repos/psf/requests/issues/1106/timeline
null
completed
null
null
false
[ "This pull request is very relevant: https://github.com/kennethreitz/requests/pull/1099\n", "I'll fix this in a bit.\n" ]
https://api.github.com/repos/psf/requests/issues/1105
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1105/labels{/name}
https://api.github.com/repos/psf/requests/issues/1105/comments
https://api.github.com/repos/psf/requests/issues/1105/events
https://github.com/psf/requests/pull/1105
10,051,541
MDExOlB1bGxSZXF1ZXN0MzcxNjc3NQ==
1,105
refresh CA certificates
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2013-01-17T09:53:10Z
2021-09-08T23:01:09Z
2013-01-17T10:51:52Z
CONTRIBUTOR
resolved
In order to resolve the TURKTRUST compromise, and to catch any other issues that may have fallen through the cracks, I'm changing the certificate bundle to match the /etc/pki/tls/certs/ca-bundle.crt on my system, from Fedora 18's package ca-certificates-2012.87-1.fc18.noarch. See #1102 for some discussion. As per `yum info`, the certificate file is public-domain: $ sudo yum info ca-certificates Loaded plugins: changelog, langpacks, presto, refresh-packagekit Installed Packages Name : ca-certificates Arch : noarch Version : 2012.87 Release : 1.fc18 Size : 1.6 M Repo : installed From repo : updates Summary : The Mozilla CA root certificate bundle URL : http://www.mozilla.org/ License : Public Domain Description : This package contains the set of CA certificates chosen by the : Mozilla Foundation for use with the Internet PKI.
{ "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/1105/reactions" }
https://api.github.com/repos/psf/requests/issues/1105/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1105.diff", "html_url": "https://github.com/psf/requests/pull/1105", "merged_at": "2013-01-17T10:51:52Z", "patch_url": "https://github.com/psf/requests/pull/1105.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1105" }
true
[ "The file appears to have grown from 210K to 697K :-\\\n", "I'd prefer to stick with our existing CA bundle.\n", "Cool, if you're sure we have all the relevant revocations covered. This diff just removes the TURKTRUST roots.\n\nDoes certifi require an analogous pull request? Is certifi being end-of-lifed now that it's vendored here?\n", "Yeah, I'll move it to my archive account. Thanks for this!\n", "https://github.com/kennethreitz-archive/certifi\n" ]
https://api.github.com/repos/psf/requests/issues/1104
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1104/labels{/name}
https://api.github.com/repos/psf/requests/issues/1104/comments
https://api.github.com/repos/psf/requests/issues/1104/events
https://github.com/psf/requests/issues/1104
10,041,647
MDU6SXNzdWUxMDA0MTY0Nw==
1,104
Support for custom http pool sizes removed
{ "avatar_url": "https://avatars.githubusercontent.com/u/486199?v=4", "events_url": "https://api.github.com/users/c00w/events{/privacy}", "followers_url": "https://api.github.com/users/c00w/followers", "following_url": "https://api.github.com/users/c00w/following{/other_user}", "gists_url": "https://api.github.com/users/c00w/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/c00w", "id": 486199, "login": "c00w", "node_id": "MDQ6VXNlcjQ4NjE5OQ==", "organizations_url": "https://api.github.com/users/c00w/orgs", "received_events_url": "https://api.github.com/users/c00w/received_events", "repos_url": "https://api.github.com/users/c00w/repos", "site_admin": false, "starred_url": "https://api.github.com/users/c00w/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/c00w/subscriptions", "type": "User", "url": "https://api.github.com/users/c00w", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2013-01-17T00:23:51Z
2021-09-09T05:29:56Z
2013-01-17T09:34:47Z
NONE
resolved
The following worked previously config = {'pool_maxsize':1000} session = requests.session(config=config) Obviously the interface has changed slightly. However there is no way to modify the default mounted http adapter to have a higher connection pool size. This should be possible because a limit of 10 is extremely small if you are using it in a proxy connecting to a single server. If there is a preferred way to do this I am open to suggestions
{ "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/1104/reactions" }
https://api.github.com/repos/psf/requests/issues/1104/timeline
null
completed
null
null
false
[ "``` python\nfrom requests import HTTPAdapter\n\nadapter = HTTPAdapter(max_poolsize=1000)\n\ns = session()\ns.mount(\"http://\", adapter)\ns.mount(\"https://\", adapter)\n```\n", "What I did was\n\n```\nsession = requests.Session()\nsession.mount('http://', requests.adapters.HTTPAdapter(pool_connections=1000, pool_maxsize=1000))\nsession.mount('https://', requests.adapters.HTTPAdapter(pool_connections=1000, pool_maxsize=1000))\n```\n", "@c00w if you fixed it, close this issue please? \n" ]
https://api.github.com/repos/psf/requests/issues/1103
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1103/labels{/name}
https://api.github.com/repos/psf/requests/issues/1103/comments
https://api.github.com/repos/psf/requests/issues/1103/events
https://github.com/psf/requests/pull/1103
10,031,371
MDExOlB1bGxSZXF1ZXN0MzcwNjcwOQ==
1,103
Restore the ability to use a list of 2-tuples for the data keyword argument with requests.post.
{ "avatar_url": "https://avatars.githubusercontent.com/u/614430?v=4", "events_url": "https://api.github.com/users/dmckeone/events{/privacy}", "followers_url": "https://api.github.com/users/dmckeone/followers", "following_url": "https://api.github.com/users/dmckeone/following{/other_user}", "gists_url": "https://api.github.com/users/dmckeone/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dmckeone", "id": 614430, "login": "dmckeone", "node_id": "MDQ6VXNlcjYxNDQzMA==", "organizations_url": "https://api.github.com/users/dmckeone/orgs", "received_events_url": "https://api.github.com/users/dmckeone/received_events", "repos_url": "https://api.github.com/users/dmckeone/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dmckeone/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dmckeone/subscriptions", "type": "User", "url": "https://api.github.com/users/dmckeone", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2013-01-16T19:13:48Z
2021-09-08T23:05:59Z
2013-01-26T05:02:01Z
NONE
resolved
As of [commit ef8563a](https://github.com/kennethreitz/requests/commit/ef8563ab36c6b52834ee9c35f6f75a424cd9ceef) the ability to pass a keyword argument like `data=[('key', 'value'), ('key', 'value2')]` was broken because the `is_stream` detection in `PreparedRequest.prepare_body(self, data, files)` fails to look for a list of 2-tuples. Just in case this is deemed to be an unnecessary change (because the calling code could switch to using a dict), Il'l make note here that this is required in order to pass POST parameters where the key is the same, but values are different. ``` form_data = [('item', 1), ('item', 2), ('item', 3)] resp = requests.post('http://www.example.com', data=form_data) ```
{ "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/1103/reactions" }
https://api.github.com/repos/psf/requests/issues/1103/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1103.diff", "html_url": "https://github.com/psf/requests/pull/1103", "merged_at": "2013-01-26T05:02:01Z", "patch_url": "https://github.com/psf/requests/pull/1103.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1103" }
true
[ "Actually, the proper syntax for that is slightly different.\n\n``` python\nform_data = {'item': [1, 2, 3]}\nresp = requests.post('http://www.example.com', data=form_data)\n```\n", "I see the syntactical niceness of that example for simple cases(thanks for showing it, I didn't realize I could do that), but I'd still like to make my case for the way that it worked previously.\n\nI'm currently using Werkzeug `OrderedMultiDict` to hold the parameters that eventually make it into the `data` argument. Some of my uses can have quite a few parameters and, since it's ordered, the order of the parameters does matter in the POST data (working with a legacy system).\n\nWIth a list of 2-tuples I can do: `data=ordered_multi_dict_instance.items(multi=true)`. So the 2-tuple is quite easy to create from a dict-like object that iterates. I may be wrong, but this new syntax deviates in such a way that I'd have to marshall all the data into it and maintain the order at the same time. \n\nI also face an issue with the fact that this legacy system I'm working with requires not just multiple keys but ordered multiple keys. Something like: `Item=1&Value=10&OtherValue=100&Item=2&Value=200&OtherValue=200&Item=3&Value=30&OtherValue=300`. Presumably, that would result in `form_data = {'Item': [1, 2, 3], 'Value': [10, 20, 30], 'OtherValue': [100, 200, 300]}` in the new syntax, which would likely re-order the parameters based on the names of Item, Value and OtherValue, and not in the repeating ordered sequence: Item, Value, OtherValue.\n", "Related: issue #522 \n", "We need to support MultiDict. This is long overdue.\n", "Accepting MultiDict for the `data=` keyword would be acceptable for me.\n", "So, moving this forward. \n\nAs it stands [commit ef8563a](https://github.com/kennethreitz/requests/commit/ef8563ab36c6b52834ee9c35f6f75a424cd9ceef) is a breaking change from 1.0X to 1.10 for my particular use case. The workaround I have is:\n\n```\nform_data = RequestEncodingMixin._encode_params(request.values.items(multi=True))\nresp = requests.post('http://www.example.com', data=form_data)\n```\n\nIs this particular pull request viable as a stop-gap between now and MultiDict support or is passing a 2-tuple list into `data=` a no-go for the future?\n", "Merged.\n" ]
https://api.github.com/repos/psf/requests/issues/1102
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1102/labels{/name}
https://api.github.com/repos/psf/requests/issues/1102/comments
https://api.github.com/repos/psf/requests/issues/1102/events
https://github.com/psf/requests/issues/1102
9,975,242
MDU6SXNzdWU5OTc1MjQy
1,102
address compromised TURKTRUST certificates
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "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
2013-01-15T11:30:17Z
2021-09-09T05:00:48Z
2013-01-17T10:53:19Z
CONTRIBUTOR
resolved
It seems likely that `requests/cacerts.pem` is affected by the recent compromise of TURKTRUST certificates. However, I'm not sure what exactly we need to do to fix this. Removing both of the root certs we currently have in there is probably wrong. Maybe @saschpe can advise?
{ "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/1102/reactions" }
https://api.github.com/repos/psf/requests/issues/1102/timeline
null
completed
null
null
false
[ "Hmm, I tried to follow the instructions here: [https://gist.github.com/996292]\n\nbut the URL given there for certdata.txt points to a file dated December 29, 2012, and it doesn't change the status of any TURKTRUST certificates. I'll ask around.\n", "Hmm, OK. The December 29th file ([https://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1] ) has the changes we need at the very end, but they take the form of blacklisting the affected intermediate certificates rather than removing the root certificates. The process of converting this to a .pem seems to lose this information.\n", "yeah, i always remove them by hand. Care to send a PR with the CA removed?\n", "My current understanding is that Python's ssl module lacks support for blacklisting intermediate certificates, it can only whitelist roots. Thus the file I'm submitting in the pull request removes the TURKTRUST roots entirely.\n", "Please note that most browsers still trust the TURKTRUST root CA, so this patch will cause some mismatch to what browsers do.\nMozilla, for example, has only blacklisted the intermediate certificates that TURKTRUST wrongly issued. See https://blog.mozilla.org/security/2013/01/03/revoking-trust-in-two-turktrust-certficates/\n", "Agreed, this is suboptimal. We're doing this because Python's ssl module doesn't seem to support this kind of sophisticated blacklisting behavior.\n\nPython's ssl module is weird; there's a baseline of documented functionality, and then some platforms appear to have undocumented extensions. See #629 for an issue of this kind.\n" ]
https://api.github.com/repos/psf/requests/issues/1101
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1101/labels{/name}
https://api.github.com/repos/psf/requests/issues/1101/comments
https://api.github.com/repos/psf/requests/issues/1101/events
https://github.com/psf/requests/issues/1101
9,955,763
MDU6SXNzdWU5OTU1NzYz
1,101
Session object no longer pickleable
{ "avatar_url": "https://avatars.githubusercontent.com/u/1093140?v=4", "events_url": "https://api.github.com/users/sjbooher/events{/privacy}", "followers_url": "https://api.github.com/users/sjbooher/followers", "following_url": "https://api.github.com/users/sjbooher/following{/other_user}", "gists_url": "https://api.github.com/users/sjbooher/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sjbooher", "id": 1093140, "login": "sjbooher", "node_id": "MDQ6VXNlcjEwOTMxNDA=", "organizations_url": "https://api.github.com/users/sjbooher/orgs", "received_events_url": "https://api.github.com/users/sjbooher/received_events", "repos_url": "https://api.github.com/users/sjbooher/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sjbooher/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sjbooher/subscriptions", "type": "User", "url": "https://api.github.com/users/sjbooher", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-14T20:11:52Z
2021-09-09T05:29:56Z
2013-01-14T22:21:48Z
NONE
resolved
After upgrading to 1.1.0, I now get this error when trying to pickle the Session object: File "/Library/Python/2.6/site-packages/requests/sessions.py", line 397, in **getstate** return dict((attr, getattr(self, attr, None)) for attr in self.**attrs**) AttributeError: 'Session' object has no attribute '**attrs**'
{ "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/1101/reactions" }
https://api.github.com/repos/psf/requests/issues/1101/timeline
null
completed
null
null
false
[ "Duplicate of issue #1088 \n", "Quite right. =) Let's move all discussion to there.\n" ]
https://api.github.com/repos/psf/requests/issues/1100
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1100/labels{/name}
https://api.github.com/repos/psf/requests/issues/1100/comments
https://api.github.com/repos/psf/requests/issues/1100/events
https://github.com/psf/requests/pull/1100
9,951,442
MDExOlB1bGxSZXF1ZXN0MzY2Nzg3MA==
1,100
Call hooks when following redirects
{ "avatar_url": "https://avatars.githubusercontent.com/u/1726610?v=4", "events_url": "https://api.github.com/users/jimothyGator/events{/privacy}", "followers_url": "https://api.github.com/users/jimothyGator/followers", "following_url": "https://api.github.com/users/jimothyGator/following{/other_user}", "gists_url": "https://api.github.com/users/jimothyGator/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jimothyGator", "id": 1726610, "login": "jimothyGator", "node_id": "MDQ6VXNlcjE3MjY2MTA=", "organizations_url": "https://api.github.com/users/jimothyGator/orgs", "received_events_url": "https://api.github.com/users/jimothyGator/received_events", "repos_url": "https://api.github.com/users/jimothyGator/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jimothyGator/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jimothyGator/subscriptions", "type": "User", "url": "https://api.github.com/users/jimothyGator", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2013-01-14T18:05:49Z
2021-09-08T23:08:23Z
2013-01-25T04:37:17Z
NONE
resolved
See https://github.com/kennethreitz/requests/pull/965 . However, this no longer appears to be working in Requests 1.1. This pull request is against 1.1.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1726610?v=4", "events_url": "https://api.github.com/users/jimothyGator/events{/privacy}", "followers_url": "https://api.github.com/users/jimothyGator/followers", "following_url": "https://api.github.com/users/jimothyGator/following{/other_user}", "gists_url": "https://api.github.com/users/jimothyGator/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jimothyGator", "id": 1726610, "login": "jimothyGator", "node_id": "MDQ6VXNlcjE3MjY2MTA=", "organizations_url": "https://api.github.com/users/jimothyGator/orgs", "received_events_url": "https://api.github.com/users/jimothyGator/received_events", "repos_url": "https://api.github.com/users/jimothyGator/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jimothyGator/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jimothyGator/subscriptions", "type": "User", "url": "https://api.github.com/users/jimothyGator", "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/1100/reactions" }
https://api.github.com/repos/psf/requests/issues/1100/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1100.diff", "html_url": "https://github.com/psf/requests/pull/1100", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1100.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1100" }
true
[ "This should be working now after #1099. Can you test from the repo and confirm @jimothyGator?\n", "Confirmed:\n\n``` python\nimport requests\n\ndef print_respone(resp):\n print resp.status_code, resp.url\n\nhooks = dict(response=print_respone)\n\nrequests.get('http://httpbin.org/redirect/3', hooks=hooks)\n```\n\nOutput:\n\n```\n302 http://httpbin.org/redirect/3\n302 http://httpbin.org/redirect/2\n302 http://httpbin.org/redirect/1\n200 http://httpbin.org/get\n```\n", "Awesome. Thanks for your fix as well.\n" ]
https://api.github.com/repos/psf/requests/issues/1099
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1099/labels{/name}
https://api.github.com/repos/psf/requests/issues/1099/comments
https://api.github.com/repos/psf/requests/issues/1099/events
https://github.com/psf/requests/pull/1099
9,914,911
MDExOlB1bGxSZXF1ZXN0MzY1MzEyOA==
1,099
Make hooks work with prepared requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/110295?v=4", "events_url": "https://api.github.com/users/sprt/events{/privacy}", "followers_url": "https://api.github.com/users/sprt/followers", "following_url": "https://api.github.com/users/sprt/following{/other_user}", "gists_url": "https://api.github.com/users/sprt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sprt", "id": 110295, "login": "sprt", "node_id": "MDQ6VXNlcjExMDI5NQ==", "organizations_url": "https://api.github.com/users/sprt/orgs", "received_events_url": "https://api.github.com/users/sprt/received_events", "repos_url": "https://api.github.com/users/sprt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sprt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sprt/subscriptions", "type": "User", "url": "https://api.github.com/users/sprt", "user_view_type": "public" }
[]
closed
true
null
[]
null
16
2013-01-12T21:00:08Z
2021-09-08T23:05:15Z
2013-01-24T18:00:25Z
CONTRIBUTOR
resolved
:heart:
{ "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/1099/reactions" }
https://api.github.com/repos/psf/requests/issues/1099/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1099.diff", "html_url": "https://github.com/psf/requests/pull/1099", "merged_at": "2013-01-24T18:00:24Z", "patch_url": "https://github.com/psf/requests/pull/1099.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1099" }
true
[ ":+1: This is a prerequisite for #1117 (or co-requisite)\n", "@kennethreitz this is definitely a pull request you should merge. It complements #1117 which you already merged.\n", "@sprt can you update this? It's a bit out of date now :)\n", "Unfortunately, this isn't going to work because we made incompatible changes as I relied on the fact that the adapter would call `dispatch_hook()`.\n\nI'm not sure how to handle this; when using sessions `Session.send()` should call `dispatch_hook()` and when using connection adapters directly, `BaseAdapter.send()` should.\n", "@sprt, I'll work on this.\n", "@kennethreitz, @sprt makes a valid point. My concern is dispatching a hook more than once. Someone using requests in @sprt's case has a valid reason to believe the hook should be called which makes it the responsibility of either the adapter's `send` or the session's `send` method. The former also catches the case where a user just instantiates the adapter and uses that directly (which is a bad idea). The latter would allow the hook to be dispatched once, and would remove it from the `Session.request` and `<Adapter>.send`. This I see as being the preferable option, but I wanted to make sure this is okay.\n\nThe problem, of course, is that only `request` has the hooks passed by the user. Naturally, this shouldn't be a problem because the prepared request has those hooks and the auth hooks generated by the authentication handler, so we can just rely on that. No where in between are hooks removed. A rogue adapter may do this in its `send` method, but that would be author's problem, not ours.\n", "The changes are in [sigmavirus24/requests@pr/1099](https://github.com/sigmavirus24/requests/tree/pr/1099)\n", "@sprt those changes pass with your tests. If you like them merge them into your branch, they'll be added to this pull and @kennethreitz could accept it.\n", "Done, sorry for the FF\n\nWhat about adapters though? \n", "Sorry, I meant merge it from the branch I specified above (`git pull git://github.com/sigmavirus24/requests pr/1099`).\n\nMy patch places the dispatch after the request is returned from the adapter in `Session.send`. This satisfies your test and regular hooks as well.\n", "Merged!\n", "Ah, I missed the merge. Disregard my comment above.\n", "@sigmavirus24 was this not ready? send another pr :)\n", "So what's the consensus on instantiating the adapter and using that directly? Because this is still broken. Should hooks be dispatched in the adapter's `send()` method too or should users be told to use sessions?\n", "Users _should_ uses sessions. If they want custom adapters they should mount \nthem on the session.\n\nIf the user wants to use Adapters directly, and they're writing their own, \nthey can use `dispatch_hook` themselves.\n", "Ah indeed, forgot about mounting!\n\nThen I suggest @kennethreitz edit [his blog post](http://www.kennethreitz.com/announcing-requests-v100.html) (cf. \"Connection Adapters\") :)\n" ]
https://api.github.com/repos/psf/requests/issues/1098
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1098/labels{/name}
https://api.github.com/repos/psf/requests/issues/1098/comments
https://api.github.com/repos/psf/requests/issues/1098/events
https://github.com/psf/requests/issues/1098
9,905,650
MDU6SXNzdWU5OTA1NjUw
1,098
"timeout" not a Session option anymore?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1938957?v=4", "events_url": "https://api.github.com/users/shadowing/events{/privacy}", "followers_url": "https://api.github.com/users/shadowing/followers", "following_url": "https://api.github.com/users/shadowing/following{/other_user}", "gists_url": "https://api.github.com/users/shadowing/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shadowing", "id": 1938957, "login": "shadowing", "node_id": "MDQ6VXNlcjE5Mzg5NTc=", "organizations_url": "https://api.github.com/users/shadowing/orgs", "received_events_url": "https://api.github.com/users/shadowing/received_events", "repos_url": "https://api.github.com/users/shadowing/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shadowing/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shadowing/subscriptions", "type": "User", "url": "https://api.github.com/users/shadowing", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-12T05:54:56Z
2021-09-09T05:29:57Z
2013-01-12T06:46:47Z
NONE
resolved
I checked the document and sessions.py in source repo, found it is specifically not merged into Request object. Is this a deliberate left out?
{ "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/1098/reactions" }
https://api.github.com/repos/psf/requests/issues/1098/timeline
null
completed
null
null
false
[ "this is an argument used when sending a request. Not a connection-wide timeout.\n", "OK, I could understand the principal. But the thing is, I used \"timeout\", \"cookies\" and \"config\" parameter a lot in my current code, with these important parameters suddenly deprecated, what suggestions do you have for situations like me? Thanks.\n" ]
https://api.github.com/repos/psf/requests/issues/1097
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1097/labels{/name}
https://api.github.com/repos/psf/requests/issues/1097/comments
https://api.github.com/repos/psf/requests/issues/1097/events
https://github.com/psf/requests/pull/1097
9,892,712
MDExOlB1bGxSZXF1ZXN0MzY0NTQ3Mw==
1,097
Resolves the parts of #1096 in requests proper.
{ "avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4", "events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}", "followers_url": "https://api.github.com/users/matthewlmcclure/followers", "following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}", "gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/matthewlmcclure", "id": 470362, "login": "matthewlmcclure", "node_id": "MDQ6VXNlcjQ3MDM2Mg==", "organizations_url": "https://api.github.com/users/matthewlmcclure/orgs", "received_events_url": "https://api.github.com/users/matthewlmcclure/received_events", "repos_url": "https://api.github.com/users/matthewlmcclure/repos", "site_admin": false, "starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions", "type": "User", "url": "https://api.github.com/users/matthewlmcclure", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-11T20:06:37Z
2021-09-08T23:07:32Z
2013-01-22T13:11:14Z
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/1097/reactions" }
https://api.github.com/repos/psf/requests/issues/1097/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1097.diff", "html_url": "https://github.com/psf/requests/pull/1097", "merged_at": "2013-01-22T13:11:14Z", "patch_url": "https://github.com/psf/requests/pull/1097.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1097" }
true
[ "Looks solid to me ;)\n" ]
https://api.github.com/repos/psf/requests/issues/1096
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1096/labels{/name}
https://api.github.com/repos/psf/requests/issues/1096/comments
https://api.github.com/repos/psf/requests/issues/1096/events
https://github.com/psf/requests/issues/1096
9,891,947
MDU6SXNzdWU5ODkxOTQ3
1,096
OAuth 1 requests with BODY signature_type send no body data and set Content-Length: 0
{ "avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4", "events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}", "followers_url": "https://api.github.com/users/matthewlmcclure/followers", "following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}", "gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/matthewlmcclure", "id": 470362, "login": "matthewlmcclure", "node_id": "MDQ6VXNlcjQ3MDM2Mg==", "organizations_url": "https://api.github.com/users/matthewlmcclure/orgs", "received_events_url": "https://api.github.com/users/matthewlmcclure/received_events", "repos_url": "https://api.github.com/users/matthewlmcclure/repos", "site_admin": false, "starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions", "type": "User", "url": "https://api.github.com/users/matthewlmcclure", "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
1
2013-01-11T19:44:55Z
2021-09-09T05:00:41Z
2013-02-10T22:55:13Z
CONTRIBUTOR
resolved
Expected: OAuth params in the body and corresponding non-zero Content-Length header. Actual: No body in the request and Content-Length: 0. Notes: 1. As of kennethreitz/requests@8f86ff633a2646442f2d8976046b5c0025e772c1 (2012-11-28) the Content-Length was computed after applying auth. In 34917618d80580fafec98641b213c453d7f3fb39 (2013-01-11), `prepare_body` computes Content-Length before `prepare_auth` computes the OAuth parameters. 2. requests/requests-oauthlib@ba2ea5938dd4da30c963158a33f1a83c3e7d362c assigns the body data to a `data` attribute, but kennethreitz/requests@8f86ff633a2646442f2d8976046b5c0025e772c1 expects it in a `body` attribute.
{ "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/1096/reactions" }
https://api.github.com/repos/psf/requests/issues/1096/timeline
null
completed
null
null
false
[ "Here's the requests-oauthlib portion of the fix: https://github.com/requests/requests-oauthlib/pull/13\n" ]
https://api.github.com/repos/psf/requests/issues/1095
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1095/labels{/name}
https://api.github.com/repos/psf/requests/issues/1095/comments
https://api.github.com/repos/psf/requests/issues/1095/events
https://github.com/psf/requests/pull/1095
9,885,946
MDExOlB1bGxSZXF1ZXN0MzY0MjA3OA==
1,095
Fix spacing in setup.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/12308?v=4", "events_url": "https://api.github.com/users/Jud/events{/privacy}", "followers_url": "https://api.github.com/users/Jud/followers", "following_url": "https://api.github.com/users/Jud/following{/other_user}", "gists_url": "https://api.github.com/users/Jud/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Jud", "id": 12308, "login": "Jud", "node_id": "MDQ6VXNlcjEyMzA4", "organizations_url": "https://api.github.com/users/Jud/orgs", "received_events_url": "https://api.github.com/users/Jud/received_events", "repos_url": "https://api.github.com/users/Jud/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Jud/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jud/subscriptions", "type": "User", "url": "https://api.github.com/users/Jud", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-11T16:42:28Z
2021-09-08T18:01:18Z
2013-01-22T13:10:19Z
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/1095/reactions" }
https://api.github.com/repos/psf/requests/issues/1095/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1095.diff", "html_url": "https://github.com/psf/requests/pull/1095", "merged_at": "2013-01-22T13:10:19Z", "patch_url": "https://github.com/psf/requests/pull/1095.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1095" }
true
[ "thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1094
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1094/labels{/name}
https://api.github.com/repos/psf/requests/issues/1094/comments
https://api.github.com/repos/psf/requests/issues/1094/events
https://github.com/psf/requests/pull/1094
9,875,458
MDExOlB1bGxSZXF1ZXN0MzYzNjc4Mg==
1,094
Add support for generators as a body of the request.
{ "avatar_url": "https://avatars.githubusercontent.com/u/247452?v=4", "events_url": "https://api.github.com/users/slaff/events{/privacy}", "followers_url": "https://api.github.com/users/slaff/followers", "following_url": "https://api.github.com/users/slaff/following{/other_user}", "gists_url": "https://api.github.com/users/slaff/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slaff", "id": 247452, "login": "slaff", "node_id": "MDQ6VXNlcjI0NzQ1Mg==", "organizations_url": "https://api.github.com/users/slaff/orgs", "received_events_url": "https://api.github.com/users/slaff/received_events", "repos_url": "https://api.github.com/users/slaff/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slaff/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slaff/subscriptions", "type": "User", "url": "https://api.github.com/users/slaff", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-11T10:28:33Z
2021-09-08T23:08:24Z
2013-01-11T13:46:50Z
NONE
resolved
The code assumes that we have only file like objects or strings as body of the request. With this change also generators can be set as a body of the request.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/1094/reactions" }
https://api.github.com/repos/psf/requests/issues/1094/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1094.diff", "html_url": "https://github.com/psf/requests/pull/1094", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1094.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1094" }
true
[ "It's already done - see issue #952. As there's no info which commit it was done in you'll have to find this yourself.\n", "If I had to guess, I'd say that it was ef8563a. Just a guess. :wink:\n\nFor what it's worth, this PR would have needed updating anyway. If you're not supplying the `Content-Length` header you really need to supply `Transfer Encoding`, which this PR does not.\n\nThanks for the contribution though! :smile:\n" ]
https://api.github.com/repos/psf/requests/issues/1093
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1093/labels{/name}
https://api.github.com/repos/psf/requests/issues/1093/comments
https://api.github.com/repos/psf/requests/issues/1093/events
https://github.com/psf/requests/pull/1093
9,865,506
MDExOlB1bGxSZXF1ZXN0MzYzMTg5OA==
1,093
Add a simple test for #1092
{ "avatar_url": "https://avatars.githubusercontent.com/u/1527821?v=4", "events_url": "https://api.github.com/users/jianli/events{/privacy}", "followers_url": "https://api.github.com/users/jianli/followers", "following_url": "https://api.github.com/users/jianli/following{/other_user}", "gists_url": "https://api.github.com/users/jianli/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jianli", "id": 1527821, "login": "jianli", "node_id": "MDQ6VXNlcjE1Mjc4MjE=", "organizations_url": "https://api.github.com/users/jianli/orgs", "received_events_url": "https://api.github.com/users/jianli/received_events", "repos_url": "https://api.github.com/users/jianli/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jianli/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jianli/subscriptions", "type": "User", "url": "https://api.github.com/users/jianli", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2013-01-11T00:15:56Z
2021-09-08T18:01:17Z
2013-01-22T13:10:47Z
CONTRIBUTOR
resolved
Also, some minor PEP 8 fixes.
{ "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/1093/reactions" }
https://api.github.com/repos/psf/requests/issues/1093/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1093.diff", "html_url": "https://github.com/psf/requests/pull/1093", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1093.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1093" }
true
[ "these aren't pep8 fixes :)\n", "huh? why not?\n\n``` shell\n~/requests (master) > pep8 --version\n1.4.1\n~/requests (master) > pep8 test_requests.py \ntest_requests.py:21:1: E302 expected 2 blank lines, found 1\n...\ntest_requests.py:64:5: E303 too many blank lines (2)\n...\ntest_requests.py:71:13: E128 continuation line under-indented for visual indent\n...\n```\n", "I disagree with '\" E128 continuation line under-indented for visual indent\", and will defend it until the day i die :)\n", "haha, fair enough :)\n", "There are ways around it (spoken as a pep8 contributor and flake8 maintainer).\n" ]
https://api.github.com/repos/psf/requests/issues/1092
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1092/labels{/name}
https://api.github.com/repos/psf/requests/issues/1092/comments
https://api.github.com/repos/psf/requests/issues/1092/events
https://github.com/psf/requests/pull/1092
9,832,101
MDExOlB1bGxSZXF1ZXN0MzYxNTkxMQ==
1,092
Make merge_kwargs case-insensitive when looking up keys.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1527821?v=4", "events_url": "https://api.github.com/users/jianli/events{/privacy}", "followers_url": "https://api.github.com/users/jianli/followers", "following_url": "https://api.github.com/users/jianli/following{/other_user}", "gists_url": "https://api.github.com/users/jianli/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jianli", "id": 1527821, "login": "jianli", "node_id": "MDQ6VXNlcjE1Mjc4MjE=", "organizations_url": "https://api.github.com/users/jianli/orgs", "received_events_url": "https://api.github.com/users/jianli/received_events", "repos_url": "https://api.github.com/users/jianli/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jianli/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jianli/subscriptions", "type": "User", "url": "https://api.github.com/users/jianli", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2013-01-10T05:42:44Z
2021-09-08T18:01:17Z
2013-01-10T07:07:46Z
CONTRIBUTOR
resolved
This GET request spuriously returns a 400 ``` python >>> import requests >>> url = "http://www.stackoverflow.com" >>> headers ={"User-agent": "Mozilla/5.0"} >>> response = requests.get(url, headers=headers) >>> print response.status_code 400 ``` This is because ever since a776e7cb3e57e56a2d9974b730e6f5e7776751a4, ``` python headers = merge_kwargs(headers, self.headers) ``` causes the LHS to have two keys for user-agent when the user-supplied version is incorrectly capitalized: ``` python >>> headers.keys() ['Accept-Encoding', 'Accept', 'User-Agent', 'User-agent'] ``` A solution is to, instead of using `dict.update`, iterate through each key and update manually using a case-insensitive key lookup. This feels kinda hacky, so please let me know if there is a cleaner way to fix 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/1092/reactions" }
https://api.github.com/repos/psf/requests/issues/1092/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1092.diff", "html_url": "https://github.com/psf/requests/pull/1092", "merged_at": "2013-01-10T07:07:46Z", "patch_url": "https://github.com/psf/requests/pull/1092.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1092" }
true
[ "@kennethreitz Are you closing/reopening in order to restart the Travis build?\n", "Yes :(\n", "Passes! :cake: Thanks :)\n", ":tada: \n" ]
https://api.github.com/repos/psf/requests/issues/1091
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1091/labels{/name}
https://api.github.com/repos/psf/requests/issues/1091/comments
https://api.github.com/repos/psf/requests/issues/1091/events
https://github.com/psf/requests/pull/1091
9,830,361
MDExOlB1bGxSZXF1ZXN0MzYxNTIwMA==
1,091
Allow for explicit file content type support
{ "avatar_url": "https://avatars.githubusercontent.com/u/616742?v=4", "events_url": "https://api.github.com/users/vinodc/events{/privacy}", "followers_url": "https://api.github.com/users/vinodc/followers", "following_url": "https://api.github.com/users/vinodc/following{/other_user}", "gists_url": "https://api.github.com/users/vinodc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vinodc", "id": 616742, "login": "vinodc", "node_id": "MDQ6VXNlcjYxNjc0Mg==", "organizations_url": "https://api.github.com/users/vinodc/orgs", "received_events_url": "https://api.github.com/users/vinodc/received_events", "repos_url": "https://api.github.com/users/vinodc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vinodc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vinodc/subscriptions", "type": "User", "url": "https://api.github.com/users/vinodc", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-10T03:35:38Z
2021-09-08T18:01:17Z
2013-01-10T07:02:47Z
CONTRIBUTOR
resolved
urllib3 allows for explicit content types to be specified for file data: https://github.com/kennethreitz/requests/blob/master/requests/packages/urllib3/filepost.py#L70 This patch allows that functionality to be exposed. A test is included.
{ "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/1091/reactions" }
https://api.github.com/repos/psf/requests/issues/1091/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1091.diff", "html_url": "https://github.com/psf/requests/pull/1091", "merged_at": "2013-01-10T07:02:47Z", "patch_url": "https://github.com/psf/requests/pull/1091.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1091" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1090
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1090/labels{/name}
https://api.github.com/repos/psf/requests/issues/1090/comments
https://api.github.com/repos/psf/requests/issues/1090/events
https://github.com/psf/requests/issues/1090
9,781,104
MDU6SXNzdWU5NzgxMTA0
1,090
OAuth 1.0 header params ignored by netflix rest api
{ "avatar_url": "https://avatars.githubusercontent.com/u/1385621?v=4", "events_url": "https://api.github.com/users/mikofski/events{/privacy}", "followers_url": "https://api.github.com/users/mikofski/followers", "following_url": "https://api.github.com/users/mikofski/following{/other_user}", "gists_url": "https://api.github.com/users/mikofski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mikofski", "id": 1385621, "login": "mikofski", "node_id": "MDQ6VXNlcjEzODU2MjE=", "organizations_url": "https://api.github.com/users/mikofski/orgs", "received_events_url": "https://api.github.com/users/mikofski/received_events", "repos_url": "https://api.github.com/users/mikofski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mikofski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mikofski/subscriptions", "type": "User", "url": "https://api.github.com/users/mikofski", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2013-01-08T20:05:21Z
2021-09-09T05:29:57Z
2013-01-10T20:59:48Z
NONE
resolved
**preamble:** First, and I hope you're not tired of hearing this, but Requests is awesome! I cannot tell you how much I appreciate Requests after wrangling with urllib and urllib2 just to do basic authentication. Second congratulations on graduating to version 1.0! That's fantastic. Before long this will be included in the Python basic distribution! **expected but observed:** I am new to OAuth 1.0, but the issue I'm having is that I'm passing several header params, but some of them are being ignored. For example if I pass 3 parameters along with the oauth1 params: `"output": "json", "term":"star wars", "max_results": "10"`, but the `max_results` is always ignored, so is `start_index` if I include it, otherwise everything else works perfectly. **additional info:** Maybe it's related to this issue: https://github.com/kennethreitz/requests/pull/684 **Specifics:** Requests 0.12.1 (or Requests 0.14.2) I tried both python 2.7.3 ubuntu 12.10 netflix REST api 1.5 **Sample Code:** https://gist.github.com/4249412 **other code:** I know there are a couple of python packages out there that do this ... https://github.com/amalakar/pyflix2 http://code.google.com/p/pyflix/ https://github.com/michaelhelmick/python-netflix https://github.com/ryszard/python-netflix ... but I was wondering why this didn't work out of the box. I'm sure it's some n00bie mistake I'm making, but I've searched for a few days, and I can't figure it out. Sorry if it turns out to be something stupid on my part.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1385621?v=4", "events_url": "https://api.github.com/users/mikofski/events{/privacy}", "followers_url": "https://api.github.com/users/mikofski/followers", "following_url": "https://api.github.com/users/mikofski/following{/other_user}", "gists_url": "https://api.github.com/users/mikofski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mikofski", "id": 1385621, "login": "mikofski", "node_id": "MDQ6VXNlcjEzODU2MjE=", "organizations_url": "https://api.github.com/users/mikofski/orgs", "received_events_url": "https://api.github.com/users/mikofski/received_events", "repos_url": "https://api.github.com/users/mikofski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mikofski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mikofski/subscriptions", "type": "User", "url": "https://api.github.com/users/mikofski", "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/1090/reactions" }
https://api.github.com/repos/psf/requests/issues/1090/timeline
null
completed
null
null
false
[ "This is definitely the same issue as #684. If I use:\n\n```\nheaders = {'max_results': '10', 'start_index':'100', 'output': 'json', 'term':term}\nurl = URL + '?' + urllib.urlencode(headers)\nreturn requests.get(url, auth=self.headeroauth) \n```\n\ninstead of\n\n```\nreturn requests.get(url, auth=self.headeroauth,\n headers = {'max_results': '10',\n 'start_index':'100',\n 'output': 'json',\n 'term':term})\n```\n\nit works fine.\n\nThe extra params are not being included in the auth header, which I believe oauth requires.\n\nDoes this mean that #684 is not merged from the development branch into master? or that #684 should be reopened?\n", "@mikofski no you're just doing it wrong. You should be doing\n\n``` python\nreturn requests.get(url, params={'max_results': '10', 'start_index': '100', 'output': 'json', 'term': term},\n auth=self.headeroauth)\n```\n", "To be clear @mikofski there's a difference between headers and parameters. In your first example, you're encoding what you call headers to be used as parameters and then you append them to `URL`. If you look at the [docs](http://python-requests.org) you'll see headers are entirely different from parameters. If the Netflix API is calling them headers in their documentation then they need to be corrected.\n", "WOW! Thank you @sigmavirus24! I am a moron! The netflix api does call them params, it was my stupid mistake. I can't believe how long I was stymied by this, when as usual the answer was right in front of me.\n", "@mikofski don't beat yourself up. We all mistakes. I could probably go on for a couple hours about the mistakes I've made that held me up for days or weeks on end. If you have any future questions, feel free to email me directly or the mailing list. I'll answer on either. Cheers!\n" ]
https://api.github.com/repos/psf/requests/issues/1089
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1089/labels{/name}
https://api.github.com/repos/psf/requests/issues/1089/comments
https://api.github.com/repos/psf/requests/issues/1089/events
https://github.com/psf/requests/pull/1089
9,743,239
MDExOlB1bGxSZXF1ZXN0MzU3MzE5Mg==
1,089
Clarify support for alternative distributions
{ "avatar_url": "https://avatars.githubusercontent.com/u/494159?v=4", "events_url": "https://api.github.com/users/PaulMcMillan/events{/privacy}", "followers_url": "https://api.github.com/users/PaulMcMillan/followers", "following_url": "https://api.github.com/users/PaulMcMillan/following{/other_user}", "gists_url": "https://api.github.com/users/PaulMcMillan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PaulMcMillan", "id": 494159, "login": "PaulMcMillan", "node_id": "MDQ6VXNlcjQ5NDE1OQ==", "organizations_url": "https://api.github.com/users/PaulMcMillan/orgs", "received_events_url": "https://api.github.com/users/PaulMcMillan/received_events", "repos_url": "https://api.github.com/users/PaulMcMillan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PaulMcMillan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PaulMcMillan/subscriptions", "type": "User", "url": "https://api.github.com/users/PaulMcMillan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-07T18:37:18Z
2021-09-08T18:01:16Z
2013-01-07T18:41:33Z
NONE
resolved
Make the text slightly less hostile to downstream distributions, and clarify WHY they aren't supported. Antagonism isn't a good way to get downstream to do what we want, which is package the latest versions of requests without changes.
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/1089/reactions" }
https://api.github.com/repos/psf/requests/issues/1089/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1089.diff", "html_url": "https://github.com/psf/requests/pull/1089", "merged_at": "2013-01-07T18:41:33Z", "patch_url": "https://github.com/psf/requests/pull/1089.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1089" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1088
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1088/labels{/name}
https://api.github.com/repos/psf/requests/issues/1088/comments
https://api.github.com/repos/psf/requests/issues/1088/events
https://github.com/psf/requests/issues/1088
9,702,636
MDU6SXNzdWU5NzAyNjM2
1,088
Session pickling support is broken and tests for it are removed
{ "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" }
[ { "color": "02e10c", "default": false, "description": null, "id": 76800, "name": "Feature Request", "node_id": "MDU6TGFiZWw3NjgwMA==", "url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request" } ]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" } ]
null
3
2013-01-05T05:16:43Z
2021-09-09T04:00:46Z
2013-03-28T03:32:01Z
CONTRIBUTOR
resolved
The commit 42b029552190f6639642d0f62d27abcd1ceed51e removes the `__attrs__` attribute of the `Session` class, which is used in the pickle protocol's `__getstate__` method. The tests that are testing this functionality (functions `test_session_pickling` and `test_unpickled_session_requests` in the once present `tests/test_requests.py`) are also removed. The commit messages don't seem to indicate any reason for this, and I can't find anything searching in the issues. If it is intended that pickling of Session objects not be supported, could you give the reason? And may be the `__getstate__` and `__setstate__` methods should be removed too, as they might send a wrong message. If this is unintended (which is what I think is the case), I can work on a pull request to fix this. Please confirm. Thank you.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/1088/reactions" }
https://api.github.com/repos/psf/requests/issues/1088/timeline
null
completed
null
null
false
[ "I am also getting a `AttributeError: 'Session' object has no attribute '__attrs__'` traceback when trying to pickle Session objects after upgrading to requests ver 1.0.*.\n\nWould love to have this functionality back.\n", "In general, making `Session` objects pickle-able is good. Bear in mind that you will likely need to be able to pickle the transport adapters too.\n", "Forgot that this was taken care of.\n" ]
https://api.github.com/repos/psf/requests/issues/1087
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1087/labels{/name}
https://api.github.com/repos/psf/requests/issues/1087/comments
https://api.github.com/repos/psf/requests/issues/1087/events
https://github.com/psf/requests/issues/1087
9,700,039
MDU6SXNzdWU5NzAwMDM5
1,087
Encodings from content
{ "avatar_url": "https://avatars.githubusercontent.com/u/306444?v=4", "events_url": "https://api.github.com/users/akavlie/events{/privacy}", "followers_url": "https://api.github.com/users/akavlie/followers", "following_url": "https://api.github.com/users/akavlie/following{/other_user}", "gists_url": "https://api.github.com/users/akavlie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akavlie", "id": 306444, "login": "akavlie", "node_id": "MDQ6VXNlcjMwNjQ0NA==", "organizations_url": "https://api.github.com/users/akavlie/orgs", "received_events_url": "https://api.github.com/users/akavlie/received_events", "repos_url": "https://api.github.com/users/akavlie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akavlie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akavlie/subscriptions", "type": "User", "url": "https://api.github.com/users/akavlie", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2013-01-05T01:07:11Z
2021-09-09T00:34:20Z
2013-01-10T06:56:54Z
NONE
resolved
Requests has a `get_encodings_from_content()` function, but it doesn't seem to be used anywhere -- only `get_encoding_from_headers()` is used. Any reason why? I'd think on most pages, trying for the meta tag encoding declaration first will produce better results. See The Verge, for one example (the meta tag declares encoding as utf-8, but Requests detects as ISO-8895-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/1087/reactions" }
https://api.github.com/repos/psf/requests/issues/1087/timeline
null
completed
null
null
false
[ "At first I thought this was an issue with [charade](/sigmavirus24/charade), but it seems you're right that this is taking place in requests proper. From what I can tell, The Verge might not be setting the encoding in a way requests expects to see it. Could you post the headers from your response for better debugging? (Alternatively, post the URL you used.) For the sake of satiating my curiousity, could you also use: `apparent_encoding` and see what that returns? (It is an attribute, not a method)\n", "Related #156, especially [this](https://github.com/kennethreitz/requests/issues/156#issuecomment-4856384) comment.\n", "@sigmavirus24 I noticed the issue with the title of this article:\n\nhttp://www.theverge.com/2013/1/4/3836944/robot-band-compressorhead-plays-motorhead-ace-of-spades\n\na few days ago, it was reporting an encoding of `iso-8859-1`. I don't see the issue now, however. It would be a little weird if they just happened to fix the issue since I last looked... but I don't have a better explanation. Content-Type is now:\n\n`Content-Type: text/html; charset=utf-8`\n", "Hm. I'll try to reproduce it later. The server just could have been \nmisbehaving and they identified and fixed it. _shrug_\n\nThanks for following up though, it's very helpful\n", "We do not parse HTML. We did in the past. That's why the function exists, for those who feel like they need it.\n", "@kennethreitz understood after reviewing your comments in #156. A mention of the function in the docs would be useful.\n" ]
https://api.github.com/repos/psf/requests/issues/1086
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1086/labels{/name}
https://api.github.com/repos/psf/requests/issues/1086/comments
https://api.github.com/repos/psf/requests/issues/1086/events
https://github.com/psf/requests/pull/1086
9,695,799
MDExOlB1bGxSZXF1ZXN0MzU1NDYxNw==
1,086
Update the link headers doc to match the code
{ "avatar_url": "https://avatars.githubusercontent.com/u/413772?v=4", "events_url": "https://api.github.com/users/graingert/events{/privacy}", "followers_url": "https://api.github.com/users/graingert/followers", "following_url": "https://api.github.com/users/graingert/following{/other_user}", "gists_url": "https://api.github.com/users/graingert/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/graingert", "id": 413772, "login": "graingert", "node_id": "MDQ6VXNlcjQxMzc3Mg==", "organizations_url": "https://api.github.com/users/graingert/orgs", "received_events_url": "https://api.github.com/users/graingert/received_events", "repos_url": "https://api.github.com/users/graingert/repos", "site_admin": false, "starred_url": "https://api.github.com/users/graingert/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/graingert/subscriptions", "type": "User", "url": "https://api.github.com/users/graingert", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2013-01-04T21:46:25Z
2021-09-08T18:01:15Z
2013-01-07T18:41:51Z
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/1086/reactions" }
https://api.github.com/repos/psf/requests/issues/1086/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1086.diff", "html_url": "https://github.com/psf/requests/pull/1086", "merged_at": "2013-01-07T18:41:51Z", "patch_url": "https://github.com/psf/requests/pull/1086.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1086" }
true
[ "Oddly that's not returning Unicode \n", "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1085
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1085/labels{/name}
https://api.github.com/repos/psf/requests/issues/1085/comments
https://api.github.com/repos/psf/requests/issues/1085/events
https://github.com/psf/requests/pull/1085
9,695,438
MDExOlB1bGxSZXF1ZXN0MzU1NDQyOA==
1,085
Update the advanced doc to use the r.json method
{ "avatar_url": "https://avatars.githubusercontent.com/u/413772?v=4", "events_url": "https://api.github.com/users/graingert/events{/privacy}", "followers_url": "https://api.github.com/users/graingert/followers", "following_url": "https://api.github.com/users/graingert/following{/other_user}", "gists_url": "https://api.github.com/users/graingert/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/graingert", "id": 413772, "login": "graingert", "node_id": "MDQ6VXNlcjQxMzc3Mg==", "organizations_url": "https://api.github.com/users/graingert/orgs", "received_events_url": "https://api.github.com/users/graingert/received_events", "repos_url": "https://api.github.com/users/graingert/repos", "site_admin": false, "starred_url": "https://api.github.com/users/graingert/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/graingert/subscriptions", "type": "User", "url": "https://api.github.com/users/graingert", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2013-01-04T21:33:56Z
2021-09-08T23:01:12Z
2013-01-07T18:42:14Z
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/1085/reactions" }
https://api.github.com/repos/psf/requests/issues/1085/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1085.diff", "html_url": "https://github.com/psf/requests/pull/1085", "merged_at": "2013-01-07T18:42:14Z", "patch_url": "https://github.com/psf/requests/pull/1085.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1085" }
true
[ "Awesome. I'm +1 on this. The broken tests aren't your fault. =D\n", "+1 as well\n", "Heh, good catch. Would have been good if @Lukasa or I had actually looked at the PR. ;)\n", "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1084
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1084/labels{/name}
https://api.github.com/repos/psf/requests/issues/1084/comments
https://api.github.com/repos/psf/requests/issues/1084/events
https://github.com/psf/requests/issues/1084
9,687,066
MDU6SXNzdWU5Njg3MDY2
1,084
POST and PUT on 307 redirect will re-POST without body
{ "avatar_url": "https://avatars.githubusercontent.com/u/308610?v=4", "events_url": "https://api.github.com/users/jaraco/events{/privacy}", "followers_url": "https://api.github.com/users/jaraco/followers", "following_url": "https://api.github.com/users/jaraco/following{/other_user}", "gists_url": "https://api.github.com/users/jaraco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jaraco", "id": 308610, "login": "jaraco", "node_id": "MDQ6VXNlcjMwODYxMA==", "organizations_url": "https://api.github.com/users/jaraco/orgs", "received_events_url": "https://api.github.com/users/jaraco/received_events", "repos_url": "https://api.github.com/users/jaraco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jaraco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jaraco/subscriptions", "type": "User", "url": "https://api.github.com/users/jaraco", "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
13
2013-01-04T16:55:35Z
2021-09-09T04:00:42Z
2013-03-31T05:21:52Z
CONTRIBUTOR
resolved
With requests 1.0.4, if one makes a POST or PUT request to a resource which returns a 307 temporary redirect (section 10.3.8 in the [RFC](http://www.faqs.org/rfcs/rfc2616.html)), requests will automatically submit the same request to the redirect target, but without any body. The RFC states: ``` If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued. ``` Therefore, I believe requests should raise an exception in these cases, or otherwise require that the request be configured to "re-post on 307". I suspect the author has already considered some of these issues, so I post this bug to raise awareness of the issue and document the intended behavior, or to alter the behavior to better suit expectations. Please let us know if there's anything we can do to help (demonstrate behavior, write tests, supply patch).
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/1084/reactions" }
https://api.github.com/repos/psf/requests/issues/1084/timeline
null
completed
null
null
false
[ "This has gone a bit without comment it seems. If I understand correctly, the behaviour on redirect should be that we don't follow the redirect but instead just return the 307 response to the user, correct?\n\nAre there any other cases like this? \n", "@sigmavirus24\n\n> If I understand correctly, the behaviour on redirect should be that we don't follow the redirect but instead just return the 307 response to the user, correct?\n\nNot quite. Section [`7.4. Redirection 3xx`](http://trac.tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4) in the current draft from httpbis working group states\n\n> This class of status code indicates that further action needs to be\n> taken by the user agent in order to fulfill the request. If the\n> required action involves a subsequent HTTP request, it MAY be carried\n> out by the user agent without interaction with the user if and only\n> if the method used in the second request is known to be \"safe\", as\n> defined in Section 5.2.1.\n\nSo speaking simply in case of 307 status code in reply to request with unsafe method (method other than the GET, HEAD, OPTIONS, and TRACE) we MAY NOT carry the redirect without interaction with the user. Now, the question is how to define _interaction with the user_ for http library. I agree with @jaraco saying that we should _require that the request be configured to \"re-post on 307\"._\n\n> Are there any other cases like this? \n\nYes, soon to be accepted 308 status code - look for `draft-reschke-http-status-308-07.txt` at http://www.rfc-editor.org/cluster_info.php?cid=C160\n\n```\n +-------------------------------------------+-----------+-----------+\n | | Permanent | Temporary |\n +-------------------------------------------+-----------+-----------+\n | Allows changing the request method from | 301 | 302 |\n | POST to GET | | |\n | Does not allow changing the request | 308 | 307 |\n | method from POST to GET | | |\n +-------------------------------------------+-----------+-----------+\n```\n\nSide note: using `codes.moved, codes.found` etc. in the source code instead of codes' numeric values does not help in quickly identifying these codes.\n", "@piotr-dobrogost my comment was in the context of a POST or PUT request. Otherwise, my opinion is that POST or PUTs should return the 307 as our way of interacting with the user, otherwise follow it. It seems that the decision has been made that `allow_redirects` should be set to False, otherwise requests understands the interaction to be that it should re-POST/PUT the data, which seems reasonable to me (in the case the user is expecting a 307).\n\n**Edit**: I'm clearly too busy. I conflated the #975 with this.\n", "> Otherwise, my opinion is that POST or PUTs should return the 307 as our way of interacting with the user, otherwise follow it.\n\nReturning 307/308 status code as a way of interacting with the user seems like the cleanest solution, indeed. The only _problem_ with this is that in cases people wanted to follow such redirects they would have to implement it themselves. If user could pass a callback called upon receiving 307/308 status codes this callback's return value would represent _user's decision_ on weather or not follow a redirect.\n", "> Returning 307/308 status code as a way of interacting with the user seems \n> like the cleanest solution, indeed. The only _problem_ with this is that in \n> cases people wanted to follow such redirects they would have to implement it \n> themselves. If user could pass a callback called upon receiving 307/308 \n> status codes this callback's return value would represent _user's decision_ \n> on weather or not follow a redirect.\n\nAnd by implementing it themselves, they could use hooks. Hooks now are \ndispatched before the redirects are detected. One could write a hook that \nchanges a 307 to a 301 (or 302) on which requests would (and should) happily \nredirect. It's far from the best API, but it is security minded, which I \npersonally would prefer.\n", "It would be great if clients could register a call-back or set an option to select the desired redirect behavior. Even though it's a bad idea, there are reasons that people will want to follow redirects including POSTing to the new location.\n\nWriting a hook doesn't work if you want to follow redirected POST requests - and continue POSTing to the new location. The reason is the call to the request method in lines 122-135 of sessions.py doesn't propagate the body of the original request. It doesn't set the data parameter, which instead defaults to None.\n", "@cbare you're correct about that call to `request` not being complete.\n\nSo let me just walk through the steps of the request before submitting a pull request to fix that.\n\nIn a normal case (not chunked encoding), the user calls `requests.post(url, data={'key': 'value'}, files={'foo': open('foo', 'rb')})`. In this case, the `Request` object is created and prepared turning into a `PreparedRequest` which is what we receive as `req` in `resolve_redirects`. This is stored in `req.body`. Since this is prepared, we can do this (in `resolve_redirects`):\n\n``` python\nresp = self.request(\n url=url,\n method=method,\n headers=headers,\n data=req.body,\n # ...\n)\n```\n\nThis works because when `data` receives a string, it sends that.\n\nThe problematic case is when the user is using chunked encoding (I think). The problem is, I'm not entirely sure what happens with chunked encoding at the moment. Maybe @kennethreitz can explain how that works because I haven't presently looked at it at all.\n\nI could be wrong and it could all be handled as one case though.\n", "So I found the chunked requests [commit](https://github.com/kennethreitz/requests/commit/ef8563a). Assuming data is a generator, then sending request.body would produce a `StopIteration` anyway and your data wouldn't be sent. This is an annoyance that needs to be dealt with carefully and I'm not sure of a clean way of dealing with chunked requests besides simply returning the 307 and requiring the user to know that they have to re-POST their data on a 307, which seems very ... awkward.\n", "@sigmavirus24 \n\n> And by implementing it themselves, they could use hooks\n\nHooks are for custom actions not mandated by any RFC. We should not force users to write/use hooks to accomplish something specified in the RFC. Also there's no collection of commonly needed hooks packaged with Requests which makes any solution based on hooks more problematic for users.\n\n@cbare\n\n> the call to the request method in lines 122-135 of sessions.py doesn't propagate the body of the original request\n\nBody will have to be kept when supporting 307/308.\n", "this should only happen if allow_redirects=True, that's why it exists. To allow the user to specify that they want that action to occur.\n", "@kennethreitz \n\n`allow_redirects` is about allowing redirects in general but in case of 307/308 status codes web browser asks user about permission that's why we have to similarly \"ask\" user of the library.\n", "So with my second to last pull request merged, we now re-post the data on 307. I missed that it should also be on 308, so if @kennethreitz doesn't mind I might just push the one-line fix for that instead of issuing a PR.\n\nIf I understand correctly, this issue would then be fixed. If users want to be \"asked\" they will just have to pass False to `allow_redirects` which will need to be documented. \n", "@sigmavirus24 \n\nAs I wrote in my last comment \n\n> `allow_redirects` is about allowing redirects in general but in case of 307/308 status codes web browser asks user about permission that's why we have to similarly \"ask\" user of the library.\n\nWe need another param to let users decide if they want to follow 307/308 with unsafe http method.\n" ]
https://api.github.com/repos/psf/requests/issues/1083
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1083/labels{/name}
https://api.github.com/repos/psf/requests/issues/1083/comments
https://api.github.com/repos/psf/requests/issues/1083/events
https://github.com/psf/requests/issues/1083
9,645,298
MDU6SXNzdWU5NjQ1Mjk4
1,083
OpenSSL 1.0.1c and TLSv1 Handshake Failures
{ "avatar_url": "https://avatars.githubusercontent.com/u/1222137?v=4", "events_url": "https://api.github.com/users/jasonamyers/events{/privacy}", "followers_url": "https://api.github.com/users/jasonamyers/followers", "following_url": "https://api.github.com/users/jasonamyers/following{/other_user}", "gists_url": "https://api.github.com/users/jasonamyers/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jasonamyers", "id": 1222137, "login": "jasonamyers", "node_id": "MDQ6VXNlcjEyMjIxMzc=", "organizations_url": "https://api.github.com/users/jasonamyers/orgs", "received_events_url": "https://api.github.com/users/jasonamyers/received_events", "repos_url": "https://api.github.com/users/jasonamyers/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jasonamyers/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jasonamyers/subscriptions", "type": "User", "url": "https://api.github.com/users/jasonamyers", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2013-01-03T14:57:50Z
2021-09-08T06:00:32Z
2013-01-03T19:45:04Z
NONE
resolved
I've been using requests in our application for a while; however, recently we've been working on interfacing with payment providers. We've been running into an issue where they use and older firewall/proxy combination that only allows TLSv1, in openssl versions prior to 1 this wasn't a big deal as it would initiate with a TLSv1 request. Beginning in OpenSSL version 1.0 this is no longer the case, and the negotiation process begins with SSL3, this causes these older devices and web servers (older apache) to just throw an EOF or fail the handshake. We need a way to specify an ssl version or negotiation starting point, so we can directly use requests with these older devices. This isn't probably much of a problem for many people; however, I did see a past issues #900, #851, #701, and #606. This isn't a problem on Mac OS X mountain lion unless you install openssl 1.0.1c (security needs), but it's now present by default on Windows and most Linux/Unix variants. A more through explanation of my problem with code and detailed errors is available at: http://stackoverflow.com/questions/14102416/python-requests-requests-exceptions-sslerror-errno-8-ssl-c504-eof-occurred
{ "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/1083/reactions" }
https://api.github.com/repos/psf/requests/issues/1083/timeline
null
completed
null
null
false
[ "Requests uses shazow/urllib3# for handling this kind of things and you should start with finding out the way to do what you want in urllib3 and then return here and opt for exposing this functionality in Requests.\n", "So urllib3 supports this already by enabled you to specify the SSL_Version when you wrap a socket for example in connectionpool.py:\n\n```\ndef connect(self):\n # Add certificate verification\n sock = socket.create_connection((self.host, self.port), self.timeout)\n\n # Wrap socket using verification with the root certs in\n # trusted_root_certs\n self.sock = ssl_wrap_socket(sock, self.key_file, self.cert_file,\n cert_reqs=self.cert_reqs,\n ca_certs=self.ca_certs,\n server_hostname=self.host,\n ssl_version=self.ssl_version)\n```\n\nto:\n\n```\ndef connect(self):\n # Add certificate verification\n sock = socket.create_connection((self.host, self.port), self.timeout)\n\n # Wrap socket using verification with the root certs in\n # trusted_root_certs\n self.sock = ssl_wrap_socket(sock, self.key_file, self.cert_file,\n cert_reqs=self.cert_reqs,\n ca_certs=self.ca_certs,\n server_hostname=self.host,\n ssl_version=ssl.PROTOCOL_TLSv1)\n```\n\nNOTE: this was supply by Favoretti on the Stack Overflow answer\n", "Requests' does not support doing this before version 1. Subsequent to version 1, you are expected to subclass the HTTPAdapter, like so:\n\n``` python\nfrom requests.adapters import HTTPAdapter\nfrom requests.packages.urllib3.poolmanager import PoolManager\nimport ssl\n\nclass MyAdapter(HTTPAdapter):\n def init_poolmanager(self, connections, maxsize):\n self.poolmanager = PoolManager(num_pools=connections,\n maxsize=maxsize, \n ssl_version=ssl.PROTOCOL_TLSv1)\n```\n\nWhen you've done that, you can do this:\n\n``` python\nimport requests\ns = requests.Session()\ns.mount('https://', MyAdapter())\n```\n\nAny request through that session object will then use TLSv1.\n\nMight have to write up some documentation for doing that. =)\n\nEDIT: Authors note: I have not tried this code, I've only written it in here, so it might not be perfect.\n", "You sir win an internet! Thank you so much!\n", "Glad I could help. =) Thanks for raising an issue!\n", "thanks Lukasa. I forked and patched: https://github.com/serdarakarca/requests\n\nto use:\npip install --upgrade -e git+https://github.com/serdarakarca/requests#egg=requests\n", "@Lukasa I tried the fix which you provided but still i am observing the same issue. Here's the error log \r\nrequests.exceptions.SSLError: HTTPSConnectionPool(host='xxxx', port=xxxx): Max retries exceeded with url: /rest/api/content/(Caused by SSLError(SSLError(8, '_ssl.c:504: EOF occurred in violation of protocol'),))\r\n\r\nWhat am I missing here?\r\nPS : I am using windows system where request version is 2.18.4 and Python Version is 2.7.5. I cannot upgrade my Python Version , as there is a constraint." ]
https://api.github.com/repos/psf/requests/issues/1082
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1082/labels{/name}
https://api.github.com/repos/psf/requests/issues/1082/comments
https://api.github.com/repos/psf/requests/issues/1082/events
https://github.com/psf/requests/issues/1082
9,640,819
MDU6SXNzdWU5NjQwODE5
1,082
UnicodeDecodeError on unicode headers key vs non-ascii data bytes.
{ "avatar_url": "https://avatars.githubusercontent.com/u/855988?v=4", "events_url": "https://api.github.com/users/denis-ryzhkov/events{/privacy}", "followers_url": "https://api.github.com/users/denis-ryzhkov/followers", "following_url": "https://api.github.com/users/denis-ryzhkov/following{/other_user}", "gists_url": "https://api.github.com/users/denis-ryzhkov/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/denis-ryzhkov", "id": 855988, "login": "denis-ryzhkov", "node_id": "MDQ6VXNlcjg1NTk4OA==", "organizations_url": "https://api.github.com/users/denis-ryzhkov/orgs", "received_events_url": "https://api.github.com/users/denis-ryzhkov/received_events", "repos_url": "https://api.github.com/users/denis-ryzhkov/repos", "site_admin": false, "starred_url": "https://api.github.com/users/denis-ryzhkov/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/denis-ryzhkov/subscriptions", "type": "User", "url": "https://api.github.com/users/denis-ryzhkov", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2013-01-03T11:27:56Z
2021-09-09T00:01:00Z
2013-02-10T22:45:46Z
CONTRIBUTOR
resolved
Tested with requests==1.0.4, newest at the time of writing. Please note how it fails in the case of u'Content-Type': ``` import requests assert requests.__version__ == '1.0.4' assert requests.put('http://httpbin.org/put', headers={'Content-Type': 'application/octet-stream'}, data='\xff').status_code == 200 assert requests.put('http://httpbin.org/put', headers={u'Content-Type': 'application/octet-stream'}, data='\xff').status_code == 200 """ Traceback (most recent call last): File "./test1.py", line 6, in <module> assert requests.put('http://httpbin.org/put', headers={u'Content-Type': 'application/octet-stream'}, data='\xff').status_code == 200 File "./requests/requests/api.py", line 98, in put return request('put', url, data=data, **kwargs) File "./requests/requests/api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "./requests/requests/sessions.py", line 269, in request resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) File "./requests/requests/sessions.py", line 364, in send r = adapter.send(request, **kwargs) File "./requests/requests/adapters.py", line 171, in send timeout=timeout, File "./requests/requests/packages/urllib3/connectionpool.py", line 422, in urlopen body=body, headers=headers) File "./requests/requests/packages/urllib3/connectionpool.py", line 274, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python2.7/httplib.py", line 958, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 992, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 954, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 812, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) """ ```
{ "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/1082/reactions" }
https://api.github.com/repos/psf/requests/issues/1082/timeline
null
completed
null
null
false
[ "Ugh, god, I hate character encodings. Is it too much to simply ask you not to do that? =P\n\nI don't have time to look into this right now, but my best guess is that we aren't considering that the headers might be `unicode` objects and encoding them into bytes. Not entirely sure where we should do that, but if someone wants to take a look they should feel free. =)\n", "Related issues: #390, #400, #409, #421, #424.\n#400 seems to have the most information.\n\n@kennethreitz\nWhy was `test_unicode_headers` test (see #400) and other valuable tests removed?\n", "It's urllib3 not requests\n\nCory Benfield [email protected] wrote:\n\n> Ugh, god, I hate character encodings. Is it too much to simply ask you\n> not to do that? =P\n> \n> I don't have time to look into this right now, but my best guess is\n> that we aren't considering that the headers might be `unicode` objects\n> and encoding them into bytes. Not entirely sure where we should do\n> that, but if someone wants to take a look they should feel free. =)\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/1082#issuecomment-11854324\n", "@kennethreitz\nThis issue is still reproducible with current `requests==1.1.0` and `python==2.7.3`.\n\nI have created a pull-request #1181 that fixes the issue, please check it.\n" ]
https://api.github.com/repos/psf/requests/issues/1081
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1081/labels{/name}
https://api.github.com/repos/psf/requests/issues/1081/comments
https://api.github.com/repos/psf/requests/issues/1081/events
https://github.com/psf/requests/issues/1081
9,633,992
MDU6SXNzdWU5NjMzOTky
1,081
Generate multipart posts without a file
{ "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
36
2013-01-03T01:53:04Z
2021-09-07T00:06:10Z
2013-01-06T19:27:57Z
NONE
resolved
Currently, the only way to have a multipart form request is `r = requests.post(url, data=payload, files=files)` which may have a component ``` --3eeaadbfda0441b8be821bbed2962e4d Content-Disposition: form-data; name="file"; filename="filename.txt" Content-Type: text/plain content --3eeaadbfda0441b8be821bbed2962e4d-- ``` However, I run into instances where posts are required to be in a multipart format without an associated file, like: ``` --3eeaadbfda0441b8be821bbed2962e4d Content-Disposition: form-data; name="key1" value1 --3eeaadbfda0441b8be821bbed2962e4d ``` but the latter is impossible to generate without the former. Perhaps we can add a flag like `r = requests.post(url, data=payload, multipart=True)` that forces a post to be multipart, even without a file. I am happy to work on implementing this if it sounds like a good idea.
{ "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/1081/reactions" }
https://api.github.com/repos/psf/requests/issues/1081/timeline
null
completed
null
null
false
[ "This has been discussed before. It would represent a significant change to the API which I'm not sure @kennethreitz would like.\n\nPersonally, I would be more in favor of exposing a function to generate multipart data from dictioniaries (lists of tuples, etc) in the API so users can use that and just pass the generated data to requests. Ostensibly, if they're not using files, there shouldn't be a huge memory hit, but even so, they already have one huge string in memory, the second won't really kill them and it would be their fault, not ours.\n\nPerhaps @kennethreitz would be more amenable to the second solution. I don't think it fits in with requests' design philosophy either and would be extraordinarily bizarre given the rest of the API, but _shrug_ who knows.\n", "Indeed, current API does not support sending multipart data other than files and this is a bad thing. See issue #935 and shazow/urllib3/issues/120\n", "Maybe I'm missing something, but the changes seem rather minor to me. I forked the repository and have a proposed change in my version here: https://github.com/spacecase/requests/commit/45b0b3ce1e76b241b323570a5fc88ae2089c3c3d\n(if there's a better way to do this let me know? I'm rather new to github).\n\nIt might need a couple unittests and would need a change in a docstring in api.py, but is something like this reasonable?\n", "The issue with the change isn't that it's complicated to implement, it's that it's a divergence in the API. I'm kind of on the fence in this ongoing discussion: I think it would probably be useful to have a good way to upload multipart form-data, but I also think the current `files` API is a very good one. I _don't_ think that adding `multipart` to the `Request` API is the way to go though.\n", "Honestly, I would personally rather control it through the content type header but that would likely be 100x more error prone and confusing to new users than what we currently do. I'm on the fence about this as well, but I would still err on the side of not doing this.\n\nWhy? If we accept this feature request, then it becomes more likely that someone will complain about not having a json parameter. And I'm sure other people could come up with even more parameters they'd love to see added. As it is now, the API does exactly what it should and has little to no kruft. One way of looking at this is KISS. This makes the requests and returns a great object that makes using the response easy and natural. It does what is advertised and you do the rest. It does advertise multipart encoding and does it through its documented design. It may look awkward but it is documented and it works.\n", "_(...) someone will complain about not having a json parameter_\n\nThere would be no ground for such a complain because json is a subtype of `application` media type ([rfc4627](http://tools.ietf.org/html/rfc4627)) not `multipart` media type ([httpbis draft 21](http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-3.1.1.4))\n\n_It may look awkward (...)_\n\nIt is awkward whereas it should not be.\n\nAfter reading previous comments I'd like to reiterate my position: `multipart/form-data` is the most common multipart MIME type currently used (citation needed :)) and not supporting it is a gross omission.\n", "@piotr-dobrogost: Despite what I said above, I don't find the argument you just made even slightly compelling.\n\nRequests does not support MIME types, it supports use cases. This viewpoint makes both your comments above seem weird. For instance, the complaint about not having a JSON parameter will be because uploading JSON-formatted data is very common - probably more common amongst users of Requests than uploading non-file multipart data. Arguing that we won't provide it because 'we only special-case subtypes of `multipart`' just seems like a bizarre thing to say.\n\nRegardless, the core of the issue is this: the API is the whole point of this library. If you can't come up with a _beautiful_ way to implement this functionality, it will not happen.\n", "> There would be no ground for such a complain [sic]\n\n@piotr-dobrogost you have more hope for the future of developers than I do. Beyond that, the requested parameter is inexact. It would need to be called something more like `form_data` than `multipart`. As you note, (although indirectly) `multipart` could refer to plenty of different media types.\n\n> It is awkward whereas it should not be.\n\nNot all things can be elegant (even in python).\n\n> and not supporting it\n\nBut it is supported. But that aside, we have `data` for `application/x-www-form-urlencoded`, `files` (or `files+data`) for `multipart/form-data`, why do we need yet another parameter for just `multipart/form-data` when we have it?\n\nYou don't need to use a combination of `data` and `files` to get the intended result. You can do something akin to: `requests.post('http://example.com/', files=[('key1', 'param1'), ('key2', 'param2')])` without having an actual file there.\n\nAnd if we were to be exact, `form_data` might not be entirely obvious, so why not use the parameter `multipart_form_data`, but now that's clumsy as well. It's explicit, yes, and PEP 8 calls for explicity, but the existing behaviour is **well documented**. If @kennethreitz does decide to accept this feature request, all the parameter will need to do is act as an alias to the files parameter. But considering the behaviour is already **supported** I don't think it is necessary.\n", "@sigmavirus24 and @Lukasa summed this up perfectly.\n", "@piotr-dobrogost your contributions are appreciated, but not your tone. Please stop making firm assertions against our project and it's goals.\n", "From my perspective it is quite frustrating that requests already has support for multi-part posts, but does not give the user access to that without using a file. @sigmavirus24 's suggestion to just stick a file in there is not adequate. The web applications I work with will return error codes if something like this is tried.\n\nI suspect this will continue to be a problem for users in the future, and I am a little confused why there doesn't seem to be an effort to address this.\n", "See my response to #935 \n", "Oh, thanks. I look forward to it!\n", "@Lukasa \n\n_Requests does not support MIME types, it supports use cases._\n\nSending `multipart/form-data` data is a common use case.\n\n_(...) uploading JSON-formatted data is very common (...)_\n\nWe can't compare sending json with sending `multipart/form-data`. Sending json is easy; you set `Content-type`, encode data in one line using built-in module and that's it. Sending `multipart/form-data` is more complex because the request's body has to have specific structure. In other words sending json is kind of transparent as much as HTTP is concerned but sending `multipart/form-data` is not. As Requests is the HTTP library it should take care of creating such a structure.\n\n_If you can't come up with a beautiful way to implement this functionality, it will not happen._\n\nHaving current `files` param to send `multipart/form-data` which has NOTHING to do with files is not beautiful in any way (it's ugly), yet it somehow managed to get into codebase :). Coming up with something less ugly is really easy :)\n\n@sigmavirus24 \n\n_(...) but the existing behaviour is well documented._\n\nNo amount of documentation makes good API out of bad API. The better the API the less it needs documentation. \n\n_You can do something akin to (...)_\n\nRight, but this is very misleading and unintuitive. I described what's wrong with using `files` param for this in my [previous](https://github.com/kennethreitz/requests/issues/935#issuecomment-10257582) comment.\n\nBottom line: to come up with something better we need to admit the current api is bad in respect to sending `multipart/form-data` data.\n\n@spacecase\n\n_From my perspective it is quite frustrating that requests already has support for multi-part posts, but does not give the user access to that without using a file_\n\nI agree and that's why I created issue #935.\n", "This issue is closed.\n", "Forgive me @kennethreitz but @spacecase I did not use a file anywhere in that example. I used the files parameter to do exactly what you want. Had I used a file you would have seen `open('filename')`.\n", "@sigmavirus24, Unfortunately that is not what I want. It's not a matter of whether the client is reading from a file or not. It's what is being told to the server. In your example, the post body is\n\n```\n--2f8732ee35564115a6c6e0c1032773e8\nContent-Disposition: form-data; name=\"key1\"; filename=\"key1\"\nContent-Type: application/octet-stream\n\nparam1\n--2f8732ee35564115a6c6e0c1032773e8\nContent-Disposition: form-data; name=\"key2\"; filename=\"key2\"\nContent-Type: application/octet-stream\n\nparam2\n--2f8732ee35564115a6c6e0c1032773e8--\n```\n\nNote the use of `filename=`. It's telling the server a file is being sent. In the web apps I work with this incorrect behavior results in an error.\n\nI'm sorry, but for you to be so presumptuous to tell me that is exactly what I want offends me. I came to offer ideas and help, and it sounds like you don't want either in this case. That is fine, but please don't make me feel talked down to.\n", "Hm, seems I remembered the behavior incorrectly. Sorry about that. It wasn't my intention to offend you at all or make you feel talked down to. That's definitely enough to make me sway to needing a better way to handle `multipart/form-data`, but for now I still disagree that the ideas for the API are not at all elegant.\n", "@spacecase please see my response to #935. Things will be better. Your feedback is important and much appreciated. :)\n", "@spacecase as a gesture to show that your opinion does matter, check out sigmavirus24/requests-data-schemes as a stop-gap measure. You'll have to set your own `Content-Type` header, but that may be a minor annoyance.\n", "Thanks @sigmavirus24 , I'll try it out. It looks like it will do the trick.\nI appreciate that you didn't mean to offend me. I feel better about that and I don't hold anything against you or the project.\n", "Yeah, it seems I come off as brash to some people, so I guess I need to refine what I write on the internet. I don't understand it and others have agreed with me, but I'm working on it. I guess I just need a sample size large enough to realize what's offensive to people without my intending it to be (besides my making an ass of myself by remembering something working a way in which it doesn't).\n", "I have a file and some key-values to post. So what is the correct way to send such a mutilpart-form request? I hope you can help me.\n\n```\n-----------------------------7dee5302248e\nContent-Disposition: form-data; name=\"up\"; filename=\"aa.PNG\"\nContent-Type: image/png\n\nfile data\n---------------------------7dee5302248e\nContent-Disposition: form-data; name=\"exp\"\n\n\n-----------------------------7dee5302248e\nContent-Disposition: form-data; name=\"ptext\"\n\ntext\n-----------------------------7dee5302248e\nContent-Disposition: form-data; name=\"board\"\n\nDV_Studio\n-----------------------------7dee5302248e--\n\nI tried this way but only got a 504 error.\nmyfile=[('file',open('bb.jpg')),('exp','python'),('ptext',''),('board','DV_Studio')]\nr = requests.post(url,files=myfile)\n```\n", "@deerstalker for questions please use [StackOverflow](http://stackoverflow.com/questions/tagged/python-requests). To answer your question though, there is a project underway to address this problem [sigmavirus24/requests-toolbelt](/sigmavirus24/requests-toolbelt)\n", "Also note that I've answered this question before on StackOverflow, as you can see [here](https://stackoverflow.com/questions/19965453/multipart-post-using-python-requests/19974452#19974452).\n", "I have the same issue of generating multipart posts without a file. At the moment, it makes no difference if you do `requests.post(url, data=data_dict)` or `requests.post(url, data=data_dict, files={})`. But, since the `files` keyword defaults to `None`, we should be able to have two distinct behaviours. A `multipart/form-data` when `files={}` is specified, and `application/x-www-form-urlencoded` when not.\n\nDid I miss something?\n", "@jwoillez Did you follow the stack overflow link I posted?\n", "I think so, but your answer over there deals with Multipart POST with one file. I went back to the original issue: Multipart POST with no file.\n", "The file object is allowed to be a string. =) That should provide you with the information you wanted.\n", "But if I follow your suggestion, won't I end-up with something like this:\n\n```\n--3eeaadbfda0441b8be821bbed2962e4d\nContent-Disposition: form-data; name=\"file\"; filename=\"filename.txt\"\nContent-Type: text/plain\n\ncontent\n--3eeaadbfda0441b8be821bbed2962e4d--\n```\n\nwhere `content` is the string that you invite me to use instead of the file?\n\nI'm really after this only:\n\n```\n--3eeaadbfda0441b8be821bbed2962e4d\nContent-Disposition: form-data; name=\"key1\"\n\nvalue1\n--3eeaadbfda0441b8be821bbed2962e4d\n```\n" ]
https://api.github.com/repos/psf/requests/issues/1080
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1080/labels{/name}
https://api.github.com/repos/psf/requests/issues/1080/comments
https://api.github.com/repos/psf/requests/issues/1080/events
https://github.com/psf/requests/pull/1080
9,624,700
MDExOlB1bGxSZXF1ZXN0MzUyNDY0NQ==
1,080
Fix #1079
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-02T19:27:27Z
2021-09-08T18:01:16Z
2013-01-07T18:42:30Z
CONTRIBUTOR
resolved
Restore the functionality from here: https://github.com/kennethreitz/requests/blob/v0.14.2/requests/models.py#L884
{ "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/1080/reactions" }
https://api.github.com/repos/psf/requests/issues/1080/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1080.diff", "html_url": "https://github.com/psf/requests/pull/1080", "merged_at": "2013-01-07T18:42:30Z", "patch_url": "https://github.com/psf/requests/pull/1080.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1080" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1079
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1079/labels{/name}
https://api.github.com/repos/psf/requests/issues/1079/comments
https://api.github.com/repos/psf/requests/issues/1079/events
https://github.com/psf/requests/issues/1079
9,615,691
MDU6SXNzdWU5NjE1Njkx
1,079
r.reason is always None (1.0.4)
{ "avatar_url": "https://avatars.githubusercontent.com/u/49397?v=4", "events_url": "https://api.github.com/users/markokr/events{/privacy}", "followers_url": "https://api.github.com/users/markokr/followers", "following_url": "https://api.github.com/users/markokr/following{/other_user}", "gists_url": "https://api.github.com/users/markokr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/markokr", "id": 49397, "login": "markokr", "node_id": "MDQ6VXNlcjQ5Mzk3", "organizations_url": "https://api.github.com/users/markokr/orgs", "received_events_url": "https://api.github.com/users/markokr/received_events", "repos_url": "https://api.github.com/users/markokr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/markokr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/markokr/subscriptions", "type": "User", "url": "https://api.github.com/users/markokr", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2013-01-02T13:30:50Z
2021-09-09T05:29:59Z
2013-01-07T18:42:31Z
NONE
resolved
``` python >>> import requests >>> r = requests.get('http://python.org/qweqwe') >>> r.status_code 404 >>> repr(r.reason) 'None' ```
{ "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/1079/reactions" }
https://api.github.com/repos/psf/requests/issues/1079/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/1078
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1078/labels{/name}
https://api.github.com/repos/psf/requests/issues/1078/comments
https://api.github.com/repos/psf/requests/issues/1078/events
https://github.com/psf/requests/issues/1078
9,611,644
MDU6SXNzdWU5NjExNjQ0
1,078
Cookie example doesn't work
{ "avatar_url": "https://avatars.githubusercontent.com/u/321947?v=4", "events_url": "https://api.github.com/users/wong2/events{/privacy}", "followers_url": "https://api.github.com/users/wong2/followers", "following_url": "https://api.github.com/users/wong2/following{/other_user}", "gists_url": "https://api.github.com/users/wong2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wong2", "id": 321947, "login": "wong2", "node_id": "MDQ6VXNlcjMyMTk0Nw==", "organizations_url": "https://api.github.com/users/wong2/orgs", "received_events_url": "https://api.github.com/users/wong2/received_events", "repos_url": "https://api.github.com/users/wong2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wong2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wong2/subscriptions", "type": "User", "url": "https://api.github.com/users/wong2", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2013-01-02T09:10:14Z
2021-09-09T05:29:59Z
2013-01-03T18:30:41Z
NONE
resolved
Hi, I noticed that after I update requests to version 1.0.4, the [simple example](http://docs.python-requests.org/en/latest/user/quickstart/#cookies) on requests site doesn't work. ``` >>> import requests >>> requests.__version__ '1.0.4' >>> url = 'http://httpbin.org/cookies/set/requests-is/awesome' >>> r = requests.get(url) >>> r.cookies['requests-is'] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/requests-1.0.4-py2.7.egg/requests/cookies.py", line 243, in __getitem__ return self._find_no_duplicates(name) File "/Library/Python/2.7/site-packages/requests-1.0.4-py2.7.egg/requests/cookies.py", line 284, in _find_no_duplicates raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='requests-is', domain=None, path=None" >>> ```
{ "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/1078/reactions" }
https://api.github.com/repos/psf/requests/issues/1078/timeline
null
completed
null
null
false
[ "This is directly related to #1069, so we'll try to keep the discussion in there. Thanks for raising the issue! =D\n" ]
https://api.github.com/repos/psf/requests/issues/1077
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1077/labels{/name}
https://api.github.com/repos/psf/requests/issues/1077/comments
https://api.github.com/repos/psf/requests/issues/1077/events
https://github.com/psf/requests/pull/1077
9,591,898
MDExOlB1bGxSZXF1ZXN0MzUxMTk3OQ==
1,077
Skip otherwise mandatory headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/101238?v=4", "events_url": "https://api.github.com/users/kanzure/events{/privacy}", "followers_url": "https://api.github.com/users/kanzure/followers", "following_url": "https://api.github.com/users/kanzure/following{/other_user}", "gists_url": "https://api.github.com/users/kanzure/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kanzure", "id": 101238, "login": "kanzure", "node_id": "MDQ6VXNlcjEwMTIzOA==", "organizations_url": "https://api.github.com/users/kanzure/orgs", "received_events_url": "https://api.github.com/users/kanzure/received_events", "repos_url": "https://api.github.com/users/kanzure/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kanzure/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kanzure/subscriptions", "type": "User", "url": "https://api.github.com/users/kanzure", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-31T11:42:07Z
2021-09-08T18:01:14Z
2012-12-31T11:45:19Z
NONE
resolved
This adds support for skip_host and skip_accept_encoding. I bet there are a lot of ways this could be refactored to not be completely all over the place. This enables a feature in httplib and http.client from all the way back in py2.4 to enable/disable the "Host" and "Accept-Encoding" headers. This breaks a test in urllib3 and the same problem appears in the requests tests. Hopefully someone can help look into why this test is failing in both cases.
{ "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/1077/reactions" }
https://api.github.com/repos/psf/requests/issues/1077/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1077.diff", "html_url": "https://github.com/psf/requests/pull/1077", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1077.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1077" }
true
[ "This is related to shazow/urllib3#138 where I have submitted the underlying urllib3 changes.\n", "Thanks for the pull request, but this is unnecessary. \n\nIf you really want to enable this functinality for yourself, you can create a new connection adapter to behave exactly as you expect.\n" ]
https://api.github.com/repos/psf/requests/issues/1076
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1076/labels{/name}
https://api.github.com/repos/psf/requests/issues/1076/comments
https://api.github.com/repos/psf/requests/issues/1076/events
https://github.com/psf/requests/pull/1076
9,587,303
MDExOlB1bGxSZXF1ZXN0MzUxMDMzMw==
1,076
Remove (safe|danger)_mode references from docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-31T00:48:47Z
2021-09-08T18:01:15Z
2012-12-31T07:49:44Z
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/1076/reactions" }
https://api.github.com/repos/psf/requests/issues/1076/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1076.diff", "html_url": "https://github.com/psf/requests/pull/1076", "merged_at": "2012-12-31T07:49:44Z", "patch_url": "https://github.com/psf/requests/pull/1076.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1076" }
true
[ "thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/1075
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1075/labels{/name}
https://api.github.com/repos/psf/requests/issues/1075/comments
https://api.github.com/repos/psf/requests/issues/1075/events
https://github.com/psf/requests/pull/1075
9,584,017
MDExOlB1bGxSZXF1ZXN0MzUwOTMyNw==
1,075
Support x.y.z.w/prefix form in no_proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/1036517?v=4", "events_url": "https://api.github.com/users/amotoki/events{/privacy}", "followers_url": "https://api.github.com/users/amotoki/followers", "following_url": "https://api.github.com/users/amotoki/following{/other_user}", "gists_url": "https://api.github.com/users/amotoki/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amotoki", "id": 1036517, "login": "amotoki", "node_id": "MDQ6VXNlcjEwMzY1MTc=", "organizations_url": "https://api.github.com/users/amotoki/orgs", "received_events_url": "https://api.github.com/users/amotoki/received_events", "repos_url": "https://api.github.com/users/amotoki/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amotoki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amotoki/subscriptions", "type": "User", "url": "https://api.github.com/users/amotoki", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-12-30T17:21:56Z
2021-09-08T18:01:14Z
2013-01-09T22:48:28Z
NONE
resolved
CIDR format is usually used in no_proxy environment varilable. Now requests modules supports only domain suffix form (.mydomain.example.net) for no_proxy. I believe it is useful to support CIDR format in no_proxy. After this commit, we can use no_proxy such as "no_proxy=127.0.0.0/8,192.168.0.0/16,10.0.0.0/8,.mydomain.example.net" This patch uses 'netaddr' module. I am not sure using a third party module is acceptable in requests module policy. In addition, I cannot find unit tests in the repo. Any feedback will be appreciated. Thanks, Akihiro
{ "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/1075/reactions" }
https://api.github.com/repos/psf/requests/issues/1075/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1075.diff", "html_url": "https://github.com/psf/requests/pull/1075", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1075.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1075" }
true
[ "Personally, I'm -1 on adding `netparse` as a requirement. Not sure what @kennethreitz will think though.\n", "Correct.\n", "@kennethreitz \nLet me clarify the reason In my understanding the reason is my patch has a dependency on \"netaddr\" module. Is it correct? If so this is the policy of this module and I am happy to honor that.\n\nLastly, do you have a plan to support x.y.z.w/prefix form in no_proxy?\n" ]
https://api.github.com/repos/psf/requests/issues/1074
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1074/labels{/name}
https://api.github.com/repos/psf/requests/issues/1074/comments
https://api.github.com/repos/psf/requests/issues/1074/events
https://github.com/psf/requests/issues/1074
9,580,550
MDU6SXNzdWU5NTgwNTUw
1,074
Proxy support broken
{ "avatar_url": "https://avatars.githubusercontent.com/u/503018?v=4", "events_url": "https://api.github.com/users/mishari/events{/privacy}", "followers_url": "https://api.github.com/users/mishari/followers", "following_url": "https://api.github.com/users/mishari/following{/other_user}", "gists_url": "https://api.github.com/users/mishari/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mishari", "id": 503018, "login": "mishari", "node_id": "MDQ6VXNlcjUwMzAxOA==", "organizations_url": "https://api.github.com/users/mishari/orgs", "received_events_url": "https://api.github.com/users/mishari/received_events", "repos_url": "https://api.github.com/users/mishari/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mishari/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mishari/subscriptions", "type": "User", "url": "https://api.github.com/users/mishari", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2012-12-30T06:32:42Z
2021-09-09T05:00:53Z
2013-01-19T12:13:47Z
NONE
resolved
I am using Python Requests with Polipo, after I updated Requests to the latest version, when I do a get, rather than giving me the output of the content of the website, I get a page that is equivalent to performing a request to http://localhost:8123 Update 1: Wireshark gives me the following output for the request header. GET / HTTP/1.1 Host: 127.0.0.1:8123 Content-Length: 0 Accept-Encoding: gzip, deflate, compress Accept: _/_
{ "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/1074/reactions" }
https://api.github.com/repos/psf/requests/issues/1074/timeline
null
completed
null
null
false
[ "I am having the same issue. Wrote a script in Perl to download a file (http://live.sysinternals.com/streams.exe) and one in Python using 'requests' to do the same thing.\n\nHere's the Python script I'm using (fiddler is acting as my proxy on 127.0.0.1:8888). The file fails to download.\n\n```\n#!/usr/bin/env python\nimport sys\nimport requests\nimport os\n\nurl = 'http://live.sysinternals.com/streams.exe'\nhttp_proxy = \"http://127.0.0.1:8888\"\n\nfilename = 'c://temp//streams.exe'\n\nproxyDict = {\n \"http\" : http_proxy,\n #\"https\" : https_proxy,\n #\"ftp\" : ftp_proxy\n}\n\nr = requests.get(url, proxies=proxyDict)\n\nwith open(filename, 'wb') as fp:\nfp.write(r.content)\n```\n\nFor my Python script using 'requests', Fiddler shows GET request as if it were requesting \"streams.exe\" directly from my proxy server:\n\n```\nGET /streams.exe HTTP/1.1\nHost: 127.0.0.1:8888\nContent-Length: 0\nAccept-Encoding: gzip, deflate, compress\nAccept: */*\nUser-Agent: python-requests/1.0.4 CPython/2.7.2 Windows/7\n```\n\nThe Perl script (using LWP::UserAgent) works correctly by downloading the file and shows the following in Fiddler:\n\n```\nGET /streams.exe HTTP/1.1\nTE: deflate,gzip;q=0.3\nConnection: TE, close\nHost: live.sysinternals.com\nUser-Agent: libwww-perl/6.04\n```\n\nHere's that Perl script:\n\n```\n#!/usr/bin/env perl\nuse strict;\nrequire LWP::UserAgent;\n\nmy $ua = LWP::UserAgent->new();\n\n$ua->proxy( [ 'http', 'ftp', 'https' ], 'http://127.0.0.1:8888' );\n\nmy $url = \"http://live.sysinternals.com/streams.exe\";\nmy $response = $ua->get($url);\nmy $filename = \"c://temp//streams.exe\";\n\nif ( $response->is_success ) {\n open( my $fh, '>', $filename );\n print $fh $response->decoded_content;\n close $fh;\n}\nelse {\n die $response->status_line;\n}\n```\n", "I'm having the same issue. When proxying a request through Charles Proxy I get a \"503 Malformed request URL \"/\"\" error. requests seems to work fine when not using proxies.\n", "Just downloaded the library to test it out....ran into the same issue trying to proxy through fiddler.....requests turns 'http://someurl.com/api/v1' into 'http://127.0.0.1:888/api/v1' when using {'http':'127.0.0.1:8888'} as proxy.\n", "This appears to ultimately be a problem with urllib3, which requests uses:\nhttps://github.com/kennethreitz/requests/issues/905\n\nAccording to this comment (https://github.com/kennethreitz/requests/issues/905#issuecomment-10726393), Kenneth Reitz is \"working on a rewrite using transport adapters.\".\n\nUltimately, urllib3 needs to be patched in order to get proxy support working as-is with requests.\n\nI just switched to urllib2 for my small project and everything is working fine in regard to the proxy support.\n", "@MicksMix: You've actually confused two different issues, which is totally understandable. =)\n\n#905 is specifically a problem with HTTPS over proxies: in particular, urllib3 does not use the CONNECT verb. _This_ issue is affecting all proxies, and is a result of the refactor.\n\n@trentvb, @erikcw, @mishari, @MicksMix: Some similar issues were raised earlier: see #1056 and #1058. I submitted a fix for those in PR #1060, which has not yet made it to PyPI. Try using the version of Requests from `master` and see if that solves your problem.\n", "@Lukasa Thanks!\n", "Based on the lack of further complaints, I'm assuming that #1060 resolved the issue. Let me know if you're still suffering. Thanks for your contribution!\n" ]
https://api.github.com/repos/psf/requests/issues/1073
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1073/labels{/name}
https://api.github.com/repos/psf/requests/issues/1073/comments
https://api.github.com/repos/psf/requests/issues/1073/events
https://github.com/psf/requests/issues/1073
9,570,321
MDU6SXNzdWU5NTcwMzIx
1,073
Stop connection
{ "avatar_url": "https://avatars.githubusercontent.com/u/59826?v=4", "events_url": "https://api.github.com/users/lardissone/events{/privacy}", "followers_url": "https://api.github.com/users/lardissone/followers", "following_url": "https://api.github.com/users/lardissone/following{/other_user}", "gists_url": "https://api.github.com/users/lardissone/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lardissone", "id": 59826, "login": "lardissone", "node_id": "MDQ6VXNlcjU5ODI2", "organizations_url": "https://api.github.com/users/lardissone/orgs", "received_events_url": "https://api.github.com/users/lardissone/received_events", "repos_url": "https://api.github.com/users/lardissone/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lardissone/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lardissone/subscriptions", "type": "User", "url": "https://api.github.com/users/lardissone", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2012-12-29T04:26:18Z
2021-09-09T00:10:05Z
2013-01-19T12:14:10Z
NONE
resolved
Is there a way to cancel current request? I'm testing a bunch of URLs that streams video, and I need to output to console the ones that aren't working. I can catch the `status_code` but it's just returned once connection ended and data is received. I can catch the code using a hook, but is there a way to kill the requests instance from the hook method?
{ "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/1073/reactions" }
https://api.github.com/repos/psf/requests/issues/1073/timeline
null
completed
null
null
false
[ "You might be able to stream the requests in this instance.\n", "Yes, but I just don't want to stream the request, just need to know the video stream is OK, and continue testing the rest of the URLs from my list. \nAnd as I'm doing now, when it founds a valid stream, it keeps connected to it until I cancel it.\n\nI would like to close the stream and continue.\n", "Related: shazow/urllib3/issues/132\n", "@lardissone, @piotr-dobrogost is correct. You can use what I did in that pull request to close it yourself. There just isn't a clean API for it in requests unfortunately.\n\nTo recapitulate, look into `stream=True` and then after checking the status_code use `Response.raw` and work from there to incorporate the changes in the PR @piotr-dobrogost referenced above.\n", "Awesome. Thanks!\n\nI'll give it a try later.\n", "Hm, something similar is confusing me. Is partially reading responses by chunks somehow interfering with keeping the session alive?\n\nThis is what I am trying to do:\n\n```\nresponse = session.get(url, stream=True)\nwhile True:\n chunk = response.raw.read(1024)\n if not chunk:\n break\n parser.feed(chunk)\n if parser.image:\n response.raw._fp.close()\n return parser.image.size\n```\n\nI want to only read enough of the image to be able to parse it using PIL and detect its size - and then cancel the current request, but keep the session alive, because I need to do it for all images on a website. Still, each time I call this snippet (with the same session) a new SSL handshake is established. Did I understand @piotr-dobrogost's PR wrong?\n", "Nope, just what you're doing there doesn't return the connection to the pool. You should be doing this:\n\n``` python\nresponse = session.get(url, stream=True)\nwhile True:\n chunk = response.raw.read(1024)\n if not chunk:\n break\n parser.feed(chunk)\n if parser.image:\n response.close()\n return parser.image.size\n```\n\nThat will handle returning the connection to the pool.\n", "Ah, OK, great. Thanks for the help!\n" ]
https://api.github.com/repos/psf/requests/issues/1072
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1072/labels{/name}
https://api.github.com/repos/psf/requests/issues/1072/comments
https://api.github.com/repos/psf/requests/issues/1072/events
https://github.com/psf/requests/issues/1072
9,561,718
MDU6SXNzdWU5NTYxNzE4
1,072
1.0.4 cannot access request params from response
{ "avatar_url": "https://avatars.githubusercontent.com/u/1000575?v=4", "events_url": "https://api.github.com/users/brandonlogan/events{/privacy}", "followers_url": "https://api.github.com/users/brandonlogan/followers", "following_url": "https://api.github.com/users/brandonlogan/following{/other_user}", "gists_url": "https://api.github.com/users/brandonlogan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/brandonlogan", "id": 1000575, "login": "brandonlogan", "node_id": "MDQ6VXNlcjEwMDA1NzU=", "organizations_url": "https://api.github.com/users/brandonlogan/orgs", "received_events_url": "https://api.github.com/users/brandonlogan/received_events", "repos_url": "https://api.github.com/users/brandonlogan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/brandonlogan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brandonlogan/subscriptions", "type": "User", "url": "https://api.github.com/users/brandonlogan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-28T16:42:07Z
2021-09-09T05:29:59Z
2012-12-28T16:43:19Z
NONE
resolved
Notice that params is not in the list in 1.0.4 but is in 1.0.3 1.0.3: > > > import requests > > > r = requests.get('http://www.google.com', params={'foo': 'bar'}) > > > dir(r.request) > > > ['**class**', '**delattr**', '**dict**', '**doc**', '**format**', '**getattribute**', '**hash**', '**init**', '**module**', '**new**', '**reduce**', '**reduce_ex**', '**repr**', '**setattr**', '**sizeof**', '**str**', '**subclasshook**', '**weakref**', '_encode_files', '_encode_params', 'allow_redirects', 'auth', 'body', 'deregister_hook', 'headers', 'hooks', 'method', 'params', 'path_url', 'prepare_auth', 'prepare_body', 'prepare_cookies', 'prepare_headers', 'prepare_method', 'prepare_url', 'proxies', 'register_hook', 'url'] 1.0.4: > > > import requests > > > r = requests.get('http://www.google.com', params={'foo': 'bar'}) > > > dir(r.request) > > > ['**class**', '**delattr**', '**dict**', '**doc**', '**format**', '**getattribute**', '**hash**', '**init**', '**module**', '**new**', '**reduce**', '**reduce_ex**', '**repr**', '**setattr**', '**sizeof**', '**str**', '**subclasshook**', '**weakref**', '_encode_files', '_encode_params', 'body', 'deregister_hook', 'headers', 'hooks', 'method', 'path_url', 'prepare_auth', 'prepare_body', 'prepare_cookies', 'prepare_headers', 'prepare_method', 'prepare_url', 'register_hook', 'url']
{ "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/1072/reactions" }
https://api.github.com/repos/psf/requests/issues/1072/timeline
null
completed
null
null
false
[ "This is intentional. As far as a PreparedRequest is concerned, params are just part of the URL.\n" ]
https://api.github.com/repos/psf/requests/issues/1071
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1071/labels{/name}
https://api.github.com/repos/psf/requests/issues/1071/comments
https://api.github.com/repos/psf/requests/issues/1071/events
https://github.com/psf/requests/pull/1071
9,537,960
MDExOlB1bGxSZXF1ZXN0MzQ5MDgyMw==
1,071
Proxies should have schemes.
{ "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
3
2012-12-27T13:39:40Z
2021-09-08T18:01:13Z
2012-12-28T15:41:55Z
MEMBER
resolved
This resolves #997, sort of. There are no tests here, because it felt weird adding tests for this to the tiny, tiny test suite. If you want tests, they're easy to write and I'm happy to do it, just ask. =)
{ "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/1071/reactions" }
https://api.github.com/repos/psf/requests/issues/1071/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1071.diff", "html_url": "https://github.com/psf/requests/pull/1071", "merged_at": "2012-12-28T15:41:55Z", "patch_url": "https://github.com/psf/requests/pull/1071.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1071" }
true
[ "@Lukasa I'll merge if you remove the print statement :)\n", "Yeah, that happened.\n\nLet's pretend it didn't. =D\n", ":cake:\n" ]
https://api.github.com/repos/psf/requests/issues/1070
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1070/labels{/name}
https://api.github.com/repos/psf/requests/issues/1070/comments
https://api.github.com/repos/psf/requests/issues/1070/events
https://github.com/psf/requests/issues/1070
9,504,360
MDU6SXNzdWU5NTA0MzYw
1,070
On redirect (302) params are doubled
{ "avatar_url": "https://avatars.githubusercontent.com/u/188258?v=4", "events_url": "https://api.github.com/users/alefnula/events{/privacy}", "followers_url": "https://api.github.com/users/alefnula/followers", "following_url": "https://api.github.com/users/alefnula/following{/other_user}", "gists_url": "https://api.github.com/users/alefnula/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alefnula", "id": 188258, "login": "alefnula", "node_id": "MDQ6VXNlcjE4ODI1OA==", "organizations_url": "https://api.github.com/users/alefnula/orgs", "received_events_url": "https://api.github.com/users/alefnula/received_events", "repos_url": "https://api.github.com/users/alefnula/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alefnula/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alefnula/subscriptions", "type": "User", "url": "https://api.github.com/users/alefnula", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-12-24T18:47:44Z
2021-09-09T05:29:58Z
2013-01-10T07:13:09Z
NONE
resolved
When the servers redirects (302) and the redirect url already has params in it, requests just adds the params once more, doubling them: session.py: 82 ``` python url = resp.headers['location'] ``` it already contains the params in it: session.py: 111 ``` python resp = self.request( url=url, method=method, headers=headers, params=req.params, ... ``` now it glues them again on the url.
{ "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/1070/reactions" }
https://api.github.com/repos/psf/requests/issues/1070/timeline
null
completed
null
null
false
[ "Yeah, I'm not sure if we need to re-pass the parameters. This is a good catch @alefnula. If you want to ready a commit that removes this, feel free to. I'm sure @Lukasa or @kennethreitz will weigh in after the holidays.\n", "Eh, this is weird.\n\nIn principle, the server can put whatever query parameters it likes in the url. This leads to three possible behaviours:\n1. Keep the server's query parameters and drop our own (assumes server persists the parameters).\n2. Throw away the server's ones and add our own (assumes server is stupid).\n3. Merge both ours and the server's. (Still assumes the server is stupid, but less so).\n", "I'm mostly erring on the side of doing (1).\n", "Let's do #1\n", "done\n" ]
https://api.github.com/repos/psf/requests/issues/1069
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1069/labels{/name}
https://api.github.com/repos/psf/requests/issues/1069/comments
https://api.github.com/repos/psf/requests/issues/1069/events
https://github.com/psf/requests/issues/1069
9,498,448
MDU6SXNzdWU5NDk4NDQ4
1,069
Cookies lost on redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/907021?v=4", "events_url": "https://api.github.com/users/leechou/events{/privacy}", "followers_url": "https://api.github.com/users/leechou/followers", "following_url": "https://api.github.com/users/leechou/following{/other_user}", "gists_url": "https://api.github.com/users/leechou/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leechou", "id": 907021, "login": "leechou", "node_id": "MDQ6VXNlcjkwNzAyMQ==", "organizations_url": "https://api.github.com/users/leechou/orgs", "received_events_url": "https://api.github.com/users/leechou/received_events", "repos_url": "https://api.github.com/users/leechou/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leechou/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leechou/subscriptions", "type": "User", "url": "https://api.github.com/users/leechou", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2012-12-24T10:02:16Z
2021-09-09T05:29:55Z
2013-01-17T19:30:44Z
NONE
resolved
The new version of requests seems to have problems passing cookies after a redirect. The response is wrong in the new version unless I use a session() to send the request. **Version 1.0.3** ``` python >>> import requests >>> requests.__version__ '1.0.3' >>> r = requests.post(url, data=data) >>> len(dict(r.cookies).keys()) 0 >>> len(r.text) 3889 >>> r.history (<Response [302]>, <Response [302]>) >>> r.history[0].headers['set-cookie'] 'a=123; Path=/, b=345; Path=/, c=245; Path=/' >>> r.history[1].headers['set-cookie'] >>> ``` **Version 0.14.2** ``` python >>> import requests >>> requests.__version__ '0.14.2' >>> r = requests.post(url, data=data) >>> len(dict(r.cookies).keys()) 3 >>> len(r.text) 9069 >>> r.history [<Response [302]>, <Response [302]>] >>> r.history[0].headers['set-cookie'] 'a=123; Path=/, b=345; Path=/, c=245; Path=/' >>> r.history[1].headers['set-cookie'] >>> ```
{ "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/1069/reactions" }
https://api.github.com/repos/psf/requests/issues/1069/timeline
null
completed
null
null
false
[ "You're right that Requests is misbehaving, though your particular code example doesn't entirely demonstrate that:\n\n``` python\n>>> import requests\n>>> requests.__version__\n'1.0.4'\n>>> r = requests.get('http://www.google.com/') # I get a redirect here because I'm in the UK\n>>> r.history\n(<Response 302>,)\n>>> print dict(r.history[0]cookies()).keys()\n['PREF', 'NID']\n>>> print r.request.headers['Cookie']\nNone\n```\n", "Hmm, wonder if `requests.get` should return the cookies of the session rather than the request. \n", "It's not just that, I don't think the cookies are being sent to second url, I'm getting a different response using requests.post vs session.post \n", "The plot thickens:\n\n``` python\n>>> import requests\n>>> requests.__version\n'1.0.4'\n>>> cookies = {'cookies': 'are awesome'}\n>>> r = requests.get('http://httpbin.org/redirect/1', cookies=cookies)\n>>> r.history\n(<Response [302]>,)\n>>> r.request.headers['Cookie']\n'cookies=are awesome'\n```\n\nTell me, @leechou, are you being redirected to a different domain or path?\n", "same domain, different path. \n", "It seems to happen with redirects and cookies being set at the same time.\nThe example from the docs(issue #1078) currently fails because of this.\nThe cookies are set on the first response(accessible through response.history) but not the response from the redirect.\n\n```\nimport requests\nurl = 'http://httpbin.org/cookies/set/requests-is/awesome'\nr = requests.get(url)\nprint r.history[0].cookies['requests-is'] # This works\nprint r.cookies['requests-is'] # This one fails\n```\n", "So, I've looked into this a bit more and I don't think there's a bug here, at least not as of v1.1.0.\n\n``` python\n>>> import requests\n>>> url = 'http://httpbin.org/cookies/set/requests-is/awesome'\n>>> r = requests.get(url)\n>>> r.cookies # This will be empty.\n<<class 'requests.cookies.RequestsCookieJar'>[]>\n>>> r.request.headers # The cookie, however, was sent\n{'Content-Length': '0', 'Cookie': 'requests-is=awesome',\n'Accept-Encoding': 'gzip, deflate, compress', 'Accept': '*/*',\n'User-Agent': 'python-requests/1.1.0 CPython/2.7.2 Darwin/12.2.0'}\n```\n\nAs you can see, the cookie _was_ sent to the server, it's just that httpbin doesn't echo it back. We can see that here:\n\n``` python\n>>> print r.text\n{\n \"cookies\": {\n \"requests-is\": \"awesome\"\n }\n}\n```\n\nSo, either this wasn't a bug or it got fixed. =) We _do_ need to update the documentation, but that's cool.\n", "Actually, I retract that, what I just said was nonsense. There's still a bug. =)\n", "No, I was right the first time, no bug. Final proof, I simulated the behaviour in Chrome. Check the headers on the 200 after the redirect:\n![Screen Shot 2013-01-17 at 19 19 37](https://f.cloud.github.com/assets/1382556/75903/7eee106c-60db-11e2-97f1-8fca9c959c3d.png)\n\nI'll fix up the documentation.\n", "Thanks. 1.1.0 worked for me, still hope the response.cookies are the session cookies though. \n" ]
https://api.github.com/repos/psf/requests/issues/1068
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1068/labels{/name}
https://api.github.com/repos/psf/requests/issues/1068/comments
https://api.github.com/repos/psf/requests/issues/1068/events
https://github.com/psf/requests/issues/1068
9,495,542
MDU6SXNzdWU5NDk1NTQy
1,068
test_HTTP_302_ALLOW_REDIRECT_POST fails
{ "avatar_url": "https://avatars.githubusercontent.com/u/656294?v=4", "events_url": "https://api.github.com/users/Arfrever/events{/privacy}", "followers_url": "https://api.github.com/users/Arfrever/followers", "following_url": "https://api.github.com/users/Arfrever/following{/other_user}", "gists_url": "https://api.github.com/users/Arfrever/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Arfrever", "id": 656294, "login": "Arfrever", "node_id": "MDQ6VXNlcjY1NjI5NA==", "organizations_url": "https://api.github.com/users/Arfrever/orgs", "received_events_url": "https://api.github.com/users/Arfrever/received_events", "repos_url": "https://api.github.com/users/Arfrever/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Arfrever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Arfrever/subscriptions", "type": "User", "url": "https://api.github.com/users/Arfrever", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-12-24T03:09:42Z
2021-09-09T05:30:01Z
2012-12-24T03:13:17Z
NONE
resolved
requests-1.0.4 introduced new test (RequestsTestCase.test_HTTP_302_ALLOW_REDIRECT_POST), which fails with all versions of Python. ``` $ python2.7 test_requests.py -v test_BASICAUTH_TUPLE_HTTP_200_OK_GET (__main__.RequestsTestCase) ... ok test_DIGESTAUTH_WRONG_HTTP_401_GET (__main__.RequestsTestCase) ... ok test_DIGEST_HTTP_200_OK_GET (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_GET (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_GET_ALTERNATIVE (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_GET_WITH_MIXED_PARAMS (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_GET_WITH_PARAMS (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_HEAD (__main__.RequestsTestCase) ... ok test_HTTP_200_OK_PUT (__main__.RequestsTestCase) ... ok test_HTTP_302_ALLOW_REDIRECT_GET (__main__.RequestsTestCase) ... ok test_HTTP_302_ALLOW_REDIRECT_POST (__main__.RequestsTestCase) ... FAIL test_POSTBIN_GET_POST_FILES (__main__.RequestsTestCase) ... ok test_POSTBIN_GET_POST_FILES_WITH_DATA (__main__.RequestsTestCase) ... ok test_assertion (__main__.RequestsTestCase) ... ok test_basic_building (__main__.RequestsTestCase) ... ok test_decompress_gzip (__main__.RequestsTestCase) ... ok test_different_encodings_dont_break_post (__main__.RequestsTestCase) ... ok test_entry_points (__main__.RequestsTestCase) ... ok test_invalid_url (__main__.RequestsTestCase) ... ok test_params_are_added_before_fragment (__main__.RequestsTestCase) ... ok test_path_is_not_double_encoded (__main__.RequestsTestCase) ... ok test_request_ok_set (__main__.RequestsTestCase) ... ok test_status_raising (__main__.RequestsTestCase) ... ok test_unicode_get (__main__.RequestsTestCase) ... ok test_urlencoded_get_query_multivalued_param (__main__.RequestsTestCase) ... ok test_user_agent_transfers (__main__.RequestsTestCase) ... ok ====================================================================== FAIL: test_HTTP_302_ALLOW_REDIRECT_POST (__main__.RequestsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_requests.py", line 91, in test_HTTP_302_ALLOW_REDIRECT_POST self.assertEqual(r.status_code, 200) AssertionError: 405 != 200 ---------------------------------------------------------------------- Ran 26 tests in 12.686s FAILED (failures=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/1068/reactions" }
https://api.github.com/repos/psf/requests/issues/1068/timeline
null
completed
null
null
false
[ "Yep.\n", "Intentional.\n", "Do you plan to fix it somewhen?\n", "It's not an issue with requests, it's an issue with the server that we're testing against. The test needs to be removed.\n" ]
https://api.github.com/repos/psf/requests/issues/1067
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1067/labels{/name}
https://api.github.com/repos/psf/requests/issues/1067/comments
https://api.github.com/repos/psf/requests/issues/1067/events
https://github.com/psf/requests/issues/1067
9,491,539
MDU6SXNzdWU5NDkxNTM5
1,067
Allow configuring connection pool params for a session's adapters
{ "avatar_url": "https://avatars.githubusercontent.com/u/164362?v=4", "events_url": "https://api.github.com/users/tlotze/events{/privacy}", "followers_url": "https://api.github.com/users/tlotze/followers", "following_url": "https://api.github.com/users/tlotze/following{/other_user}", "gists_url": "https://api.github.com/users/tlotze/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tlotze", "id": 164362, "login": "tlotze", "node_id": "MDQ6VXNlcjE2NDM2Mg==", "organizations_url": "https://api.github.com/users/tlotze/orgs", "received_events_url": "https://api.github.com/users/tlotze/received_events", "repos_url": "https://api.github.com/users/tlotze/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tlotze/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tlotze/subscriptions", "type": "User", "url": "https://api.github.com/users/tlotze", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-23T16:52:39Z
2021-09-09T05:30:02Z
2012-12-23T16:54:36Z
NONE
resolved
The HTTPAdapter's initialisation code takes two optional parameters, pool_connections and pool_maxsize. The Session, however, doesn't ever use these when creating its HTTP adapters. It would be helpful to be able to influence these parameters when working with a session instead of relying on the DEFAULT_POOLSIZE value.
{ "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/1067/reactions" }
https://api.github.com/repos/psf/requests/issues/1067/timeline
null
completed
null
null
false
[ "The intended action is for you to create a new instance of the HTTPAdapter and mount it to the session.\n" ]
https://api.github.com/repos/psf/requests/issues/1066
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1066/labels{/name}
https://api.github.com/repos/psf/requests/issues/1066/comments
https://api.github.com/repos/psf/requests/issues/1066/events
https://github.com/psf/requests/pull/1066
9,489,545
MDExOlB1bGxSZXF1ZXN0MzQ3MDczNg==
1,066
adapter for dataurl
{ "avatar_url": "https://avatars.githubusercontent.com/u/646451?v=4", "events_url": "https://api.github.com/users/binux/events{/privacy}", "followers_url": "https://api.github.com/users/binux/followers", "following_url": "https://api.github.com/users/binux/following{/other_user}", "gists_url": "https://api.github.com/users/binux/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/binux", "id": 646451, "login": "binux", "node_id": "MDQ6VXNlcjY0NjQ1MQ==", "organizations_url": "https://api.github.com/users/binux/orgs", "received_events_url": "https://api.github.com/users/binux/received_events", "repos_url": "https://api.github.com/users/binux/repos", "site_admin": false, "starred_url": "https://api.github.com/users/binux/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/binux/subscriptions", "type": "User", "url": "https://api.github.com/users/binux", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-23T11:27:08Z
2021-09-08T18:01:13Z
2012-12-23T11:38:48Z
NONE
resolved
adapter is a great feature, and i try to add this adapter for [dataurl](http://tools.ietf.org/html/rfc2397). but the interface of adapter has some problem: - the interface is only suit to HTTPAdapter with urllib3 - some modal like Response.close is depend on urllib3, it's hard to change a backend just with an adapter. - Request.prepare() did so much for other scheme, maybe. requests is great, i would like with requests with tornado.AsyncHTTPClient long time ago, maybe adapter is the best 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/1066/reactions" }
https://api.github.com/repos/psf/requests/issues/1066/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1066.diff", "html_url": "https://github.com/psf/requests/pull/1066", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1066.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1066" }
true
[ "Close can simply do nothing.\n", "I don't agree with any of your points, but I appreciate your feedback.\n\nI won't be merging this because there's obviously no need for this in the codebase. This looks pretty awesome though! You should make a module for it :)\n" ]
https://api.github.com/repos/psf/requests/issues/1065
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1065/labels{/name}
https://api.github.com/repos/psf/requests/issues/1065/comments
https://api.github.com/repos/psf/requests/issues/1065/events
https://github.com/psf/requests/pull/1065
9,489,326
MDExOlB1bGxSZXF1ZXN0MzQ3MDY3Mw==
1,065
clean up code support for OS certificate bundles
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-23T10:44:14Z
2021-09-09T00:01:19Z
2012-12-23T10:49:02Z
CONTRIBUTOR
resolved
Given the discussion on #1033, I removed the code support for OS certificate bundles entirely, and indicated where packagers can modify the code to support their environments. Travis will fail, but that's just because it's red ever since #1064. The tests pass locally. cc @sagarun @saschpe
{ "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/1065/reactions" }
https://api.github.com/repos/psf/requests/issues/1065/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1065.diff", "html_url": "https://github.com/psf/requests/pull/1065", "merged_at": "2012-12-23T10:49:02Z", "patch_url": "https://github.com/psf/requests/pull/1065.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1065" }
true
[ "Beautiful!\n" ]
https://api.github.com/repos/psf/requests/issues/1064
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1064/labels{/name}
https://api.github.com/repos/psf/requests/issues/1064/comments
https://api.github.com/repos/psf/requests/issues/1064/events
https://github.com/psf/requests/pull/1064
9,488,102
MDExOlB1bGxSZXF1ZXN0MzQ3MDI0OQ==
1,064
fix POST redirects
{ "avatar_url": "https://avatars.githubusercontent.com/u/707505?v=4", "events_url": "https://api.github.com/users/rascalking/events{/privacy}", "followers_url": "https://api.github.com/users/rascalking/followers", "following_url": "https://api.github.com/users/rascalking/following{/other_user}", "gists_url": "https://api.github.com/users/rascalking/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rascalking", "id": 707505, "login": "rascalking", "node_id": "MDQ6VXNlcjcwNzUwNQ==", "organizations_url": "https://api.github.com/users/rascalking/orgs", "received_events_url": "https://api.github.com/users/rascalking/received_events", "repos_url": "https://api.github.com/users/rascalking/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rascalking/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rascalking/subscriptions", "type": "User", "url": "https://api.github.com/users/rascalking", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-23T05:59:29Z
2021-09-08T23:05:13Z
2012-12-23T06:06:12Z
CONTRIBUTOR
resolved
the redirect handling logic compares then method to upper-case strings, so make sure the method gets upper-cased as well. add a test to POST to /status/302 on httpbin, which fails against httpbin.org right now. i'm submitting a pull request over there to fix that right after this one. once that's accepted, the new test verifies that the fix 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/1064/reactions" }
https://api.github.com/repos/psf/requests/issues/1064/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1064.diff", "html_url": "https://github.com/psf/requests/pull/1064", "merged_at": "2012-12-23T06:06:12Z", "patch_url": "https://github.com/psf/requests/pull/1064.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1064" }
true
[ "Thanks! \n" ]
https://api.github.com/repos/psf/requests/issues/1063
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1063/labels{/name}
https://api.github.com/repos/psf/requests/issues/1063/comments
https://api.github.com/repos/psf/requests/issues/1063/events
https://github.com/psf/requests/issues/1063
9,488,085
MDU6SXNzdWU5NDg4MDg1
1,063
Docs unclear on how to pass session configuration options
{ "avatar_url": "https://avatars.githubusercontent.com/u/50300?v=4", "events_url": "https://api.github.com/users/scyclops/events{/privacy}", "followers_url": "https://api.github.com/users/scyclops/followers", "following_url": "https://api.github.com/users/scyclops/following{/other_user}", "gists_url": "https://api.github.com/users/scyclops/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/scyclops", "id": 50300, "login": "scyclops", "node_id": "MDQ6VXNlcjUwMzAw", "organizations_url": "https://api.github.com/users/scyclops/orgs", "received_events_url": "https://api.github.com/users/scyclops/received_events", "repos_url": "https://api.github.com/users/scyclops/repos", "site_admin": false, "starred_url": "https://api.github.com/users/scyclops/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/scyclops/subscriptions", "type": "User", "url": "https://api.github.com/users/scyclops", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-23T05:55:08Z
2021-09-09T05:30:02Z
2012-12-23T06:10:22Z
NONE
resolved
I was trying to figure out how to disable Keep-Alive in sessions but the docs don't say where exactly the config dictionary can be passed. http://docs.python-requests.org/en/latest/api/#configurations
{ "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/1063/reactions" }
https://api.github.com/repos/psf/requests/issues/1063/timeline
null
completed
null
null
false
[ "this is in progress right now :)\n" ]
https://api.github.com/repos/psf/requests/issues/1062
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1062/labels{/name}
https://api.github.com/repos/psf/requests/issues/1062/comments
https://api.github.com/repos/psf/requests/issues/1062/events
https://github.com/psf/requests/pull/1062
9,486,810
MDExOlB1bGxSZXF1ZXN0MzQ2OTg1OQ==
1,062
Using 'master' branch for development
{ "avatar_url": "https://avatars.githubusercontent.com/u/97612?v=4", "events_url": "https://api.github.com/users/philfreo/events{/privacy}", "followers_url": "https://api.github.com/users/philfreo/followers", "following_url": "https://api.github.com/users/philfreo/following{/other_user}", "gists_url": "https://api.github.com/users/philfreo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/philfreo", "id": 97612, "login": "philfreo", "node_id": "MDQ6VXNlcjk3NjEy", "organizations_url": "https://api.github.com/users/philfreo/orgs", "received_events_url": "https://api.github.com/users/philfreo/received_events", "repos_url": "https://api.github.com/users/philfreo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/philfreo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/philfreo/subscriptions", "type": "User", "url": "https://api.github.com/users/philfreo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-22T21:46:18Z
2021-09-08T18:01:12Z
2012-12-22T22:10:17Z
CONTRIBUTOR
resolved
I'm assuming you're no longer using a 'develop' branch, as I don't see one on GitHub.
{ "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/1062/reactions" }
https://api.github.com/repos/psf/requests/issues/1062/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1062.diff", "html_url": "https://github.com/psf/requests/pull/1062", "merged_at": "2012-12-22T22:10:17Z", "patch_url": "https://github.com/psf/requests/pull/1062.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1062" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1061
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1061/labels{/name}
https://api.github.com/repos/psf/requests/issues/1061/comments
https://api.github.com/repos/psf/requests/issues/1061/events
https://github.com/psf/requests/pull/1061
9,486,798
MDExOlB1bGxSZXF1ZXN0MzQ2OTg1NQ==
1,061
Fixes url to AUTHORS.rst
{ "avatar_url": "https://avatars.githubusercontent.com/u/97612?v=4", "events_url": "https://api.github.com/users/philfreo/events{/privacy}", "followers_url": "https://api.github.com/users/philfreo/followers", "following_url": "https://api.github.com/users/philfreo/following{/other_user}", "gists_url": "https://api.github.com/users/philfreo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/philfreo", "id": 97612, "login": "philfreo", "node_id": "MDQ6VXNlcjk3NjEy", "organizations_url": "https://api.github.com/users/philfreo/orgs", "received_events_url": "https://api.github.com/users/philfreo/received_events", "repos_url": "https://api.github.com/users/philfreo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/philfreo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/philfreo/subscriptions", "type": "User", "url": "https://api.github.com/users/philfreo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-22T21:44:54Z
2021-09-08T18:01:12Z
2012-12-22T22:10:30Z
CONTRIBUTOR
resolved
and also mention using 'master' as development branch now.
{ "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/1061/reactions" }
https://api.github.com/repos/psf/requests/issues/1061/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1061.diff", "html_url": "https://github.com/psf/requests/pull/1061", "merged_at": "2012-12-22T22:10:30Z", "patch_url": "https://github.com/psf/requests/pull/1061.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1061" }
true
[ "Thanks again :)\n" ]
https://api.github.com/repos/psf/requests/issues/1060
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1060/labels{/name}
https://api.github.com/repos/psf/requests/issues/1060/comments
https://api.github.com/repos/psf/requests/issues/1060/events
https://github.com/psf/requests/pull/1060
9,483,660
MDExOlB1bGxSZXF1ZXN0MzQ2ODg4Nw==
1,060
Provide full URL to proxies.
{ "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
7
2012-12-22T13:37:31Z
2021-09-08T23:10:54Z
2012-12-27T11:24:56Z
MEMBER
resolved
This resolves #1056 and #1058.
{ "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/1060/reactions" }
https://api.github.com/repos/psf/requests/issues/1060/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1060.diff", "html_url": "https://github.com/psf/requests/pull/1060", "merged_at": "2012-12-27T11:24:56Z", "patch_url": "https://github.com/psf/requests/pull/1060.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1060" }
true
[ "I couldn't think of a good reproducible way to test this, but I'm open to ideas.\n", "This is how you could reproduce it.\n\nSet up a proxy (this one is very useful for debugging):\n\n```\npip install mitmproxy\n```\n\nRun it:\n\n```\nmitmproxy -a 127.0.0.1 \n```\n\nThen dispatch a request using requests:\n\n```\nimport requests\n\ns = requests.session()\n\ns.proxies = {\n 'http': '127.0.0.1:8080',\n 'https': '127.0.0.1:8080',\n}\n\ns.get('http://google.de')\ns.get('https://google.de', verify=False)\n```\n\nThe current release results in error 400 (malformed request).\n", "Bit much to ask of someone running the test suite though, surely?\n", "Agreed @lukasa\n", "You could use the test server introduced in https://github.com/kennethreitz/requests/pull/982\n", "Rebased to allow automerging. =)\n", "Looks good to me!\n" ]
https://api.github.com/repos/psf/requests/issues/1059
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1059/labels{/name}
https://api.github.com/repos/psf/requests/issues/1059/comments
https://api.github.com/repos/psf/requests/issues/1059/events
https://github.com/psf/requests/pull/1059
9,482,911
MDExOlB1bGxSZXF1ZXN0MzQ2ODYzMg==
1,059
Update session documentation.
{ "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-12-22T11:07:32Z
2021-09-08T23:05:17Z
2012-12-22T11:08:47Z
MEMBER
resolved
This commit should alleviate some of the influx of issues about the change in the session API. This 'resolves' #1034, #1038, #1039, #1040, #1042 and #1057.
{ "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/1059/reactions" }
https://api.github.com/repos/psf/requests/issues/1059/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1059.diff", "html_url": "https://github.com/psf/requests/pull/1059", "merged_at": "2012-12-22T11:08:47Z", "patch_url": "https://github.com/psf/requests/pull/1059.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1059" }
true
[ "<3\n" ]
https://api.github.com/repos/psf/requests/issues/1058
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1058/labels{/name}
https://api.github.com/repos/psf/requests/issues/1058/comments
https://api.github.com/repos/psf/requests/issues/1058/events
https://github.com/psf/requests/issues/1058
9,477,919
MDU6SXNzdWU5NDc3OTE5
1,058
HTTP Proxies broken
{ "avatar_url": "https://avatars.githubusercontent.com/u/859697?v=4", "events_url": "https://api.github.com/users/leoluk/events{/privacy}", "followers_url": "https://api.github.com/users/leoluk/followers", "following_url": "https://api.github.com/users/leoluk/following{/other_user}", "gists_url": "https://api.github.com/users/leoluk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leoluk", "id": 859697, "login": "leoluk", "node_id": "MDQ6VXNlcjg1OTY5Nw==", "organizations_url": "https://api.github.com/users/leoluk/orgs", "received_events_url": "https://api.github.com/users/leoluk/received_events", "repos_url": "https://api.github.com/users/leoluk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leoluk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leoluk/subscriptions", "type": "User", "url": "https://api.github.com/users/leoluk", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-21T22:54:17Z
2021-09-09T05:30:02Z
2012-12-22T12:12:55Z
NONE
resolved
The HTTP proxy support in the current release (1.0.3) is broken. A valid request sent to the proxy would be: ``` GET http://google.de/ HTTP/1.1\r\n- ``` Requests, however, does this: ``` GET / HTTP/1.1\r\n- ``` Obviously, this won't work. Previous versions (0.14, for example) are not affected.
{ "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/1058/reactions" }
https://api.github.com/repos/psf/requests/issues/1058/timeline
null
completed
null
null
false
[ "Duplicate #1056\n", "@sigmavirus24 is right. I've just posted a possible fix in #1056, so please follow the discussion there. Thanks for the report!\n" ]
https://api.github.com/repos/psf/requests/issues/1057
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1057/labels{/name}
https://api.github.com/repos/psf/requests/issues/1057/comments
https://api.github.com/repos/psf/requests/issues/1057/events
https://github.com/psf/requests/issues/1057
9,466,179
MDU6SXNzdWU5NDY2MTc5
1,057
Session constructor does not take headers nor auth as parameters
{ "avatar_url": "https://avatars.githubusercontent.com/u/657600?v=4", "events_url": "https://api.github.com/users/naktinis/events{/privacy}", "followers_url": "https://api.github.com/users/naktinis/followers", "following_url": "https://api.github.com/users/naktinis/following{/other_user}", "gists_url": "https://api.github.com/users/naktinis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/naktinis", "id": 657600, "login": "naktinis", "node_id": "MDQ6VXNlcjY1NzYwMA==", "organizations_url": "https://api.github.com/users/naktinis/orgs", "received_events_url": "https://api.github.com/users/naktinis/received_events", "repos_url": "https://api.github.com/users/naktinis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/naktinis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/naktinis/subscriptions", "type": "User", "url": "https://api.github.com/users/naktinis", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-21T14:29:03Z
2021-09-09T05:30:03Z
2012-12-22T11:06:53Z
NONE
resolved
Documentation of 1.0.0 (http://docs.python-requests.org/en/v1.0.0/user/advanced/) says `requests.session(auth=auth, headers=headers)` is a legitimate statement. However, reading the code I see that session(), nor Session.**init** do not take any arguments. https://github.com/kennethreitz/requests/blob/master/requests/sessions.py So if I have not misread anything, the docs should be fixed demonstrating the way to set persistent session-specific headers, auth etc.
{ "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/1057/reactions" }
https://api.github.com/repos/psf/requests/issues/1057/timeline
null
completed
null
null
false
[ "This is a duplicate of #1034 and rejected patch #1039 which might be used as an example to work around this.\n", "Yeah, the docs are wrong. I've been meaning to change it for ages, but my life keeps getting in the way. I should have a PR for this today though.\n" ]
https://api.github.com/repos/psf/requests/issues/1056
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1056/labels{/name}
https://api.github.com/repos/psf/requests/issues/1056/comments
https://api.github.com/repos/psf/requests/issues/1056/events
https://github.com/psf/requests/issues/1056
9,463,070
MDU6SXNzdWU5NDYzMDcw
1,056
Proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/3097956?v=4", "events_url": "https://api.github.com/users/python273/events{/privacy}", "followers_url": "https://api.github.com/users/python273/followers", "following_url": "https://api.github.com/users/python273/following{/other_user}", "gists_url": "https://api.github.com/users/python273/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/python273", "id": 3097956, "login": "python273", "node_id": "MDQ6VXNlcjMwOTc5NTY=", "organizations_url": "https://api.github.com/users/python273/orgs", "received_events_url": "https://api.github.com/users/python273/received_events", "repos_url": "https://api.github.com/users/python273/repos", "site_admin": false, "starred_url": "https://api.github.com/users/python273/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/python273/subscriptions", "type": "User", "url": "https://api.github.com/users/python273", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2012-12-21T12:10:46Z
2021-09-09T05:30:01Z
2012-12-27T11:26:17Z
NONE
resolved
![ ](https://f.cloud.github.com/assets/3097956/27000/6b5f71fa-4b67-11e2-914d-7afec0cc9fab.png)
{ "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/1056/reactions" }
https://api.github.com/repos/psf/requests/issues/1056/timeline
null
completed
null
null
false
[ "![ ](https://f.cloud.github.com/assets/3097956/27020/97a4ec7a-4b69-11e2-89b1-d1c051803e62.png)\n", "The second problem is easy: as of Requests v1.0.0, `requests.Session()` does not take arguments in its constructor.\n", "import requests as http\n\ns = http.Session()\ns.proxies = {'http': '127.0.0.1:8888'}\n\nAnd so works.\n", "Yup, this is a duplicate of #997.\n\nEdit for clarity:\n\nTry:\n\n``` python\nimport requests\n\nrequests.get('http://google.ru', proxies={'http': 'http://127.0.0.1:8888'})\n```\n", "![ ](https://f.cloud.github.com/assets/3097956/27056/a40c36a6-4b6b-11e2-8144-d4f5ae555e4d.png)\n\n:(\n", "Header \"Host\" must equal \"google.ru\"\n", "So, I've got a branch with a possible fix for this issue [here](https://github.com/Lukasa/requests/tree/proxy). @python273 and @leoluk, would you like to try downloading it and making the same request? If it works, I'll submit a Pull Request.\n", "Sure. Works fine now, both HTTP and HTTPS.\n", "Awesome, thanks for that. =)\n", "Resolved by #1060.\n" ]
https://api.github.com/repos/psf/requests/issues/1055
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1055/labels{/name}
https://api.github.com/repos/psf/requests/issues/1055/comments
https://api.github.com/repos/psf/requests/issues/1055/events
https://github.com/psf/requests/pull/1055
9,447,053
MDExOlB1bGxSZXF1ZXN0MzQ1MDgzNA==
1,055
Fixed typo in comment.
{ "avatar_url": "https://avatars.githubusercontent.com/u/763388?v=4", "events_url": "https://api.github.com/users/michaelwheeler/events{/privacy}", "followers_url": "https://api.github.com/users/michaelwheeler/followers", "following_url": "https://api.github.com/users/michaelwheeler/following{/other_user}", "gists_url": "https://api.github.com/users/michaelwheeler/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/michaelwheeler", "id": 763388, "login": "michaelwheeler", "node_id": "MDQ6VXNlcjc2MzM4OA==", "organizations_url": "https://api.github.com/users/michaelwheeler/orgs", "received_events_url": "https://api.github.com/users/michaelwheeler/received_events", "repos_url": "https://api.github.com/users/michaelwheeler/repos", "site_admin": false, "starred_url": "https://api.github.com/users/michaelwheeler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/michaelwheeler/subscriptions", "type": "User", "url": "https://api.github.com/users/michaelwheeler", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-20T20:45:49Z
2021-09-08T23:05:18Z
2012-12-20T20:55:51Z
CONTRIBUTOR
resolved
The comment was useful to me when trying to figure out why my auth wasn't working, so it seemed like it might be worth a quick fix.
{ "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/1055/reactions" }
https://api.github.com/repos/psf/requests/issues/1055/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1055.diff", "html_url": "https://github.com/psf/requests/pull/1055", "merged_at": "2012-12-20T20:55:51Z", "patch_url": "https://github.com/psf/requests/pull/1055.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1055" }
true
[ "thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1054
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1054/labels{/name}
https://api.github.com/repos/psf/requests/issues/1054/comments
https://api.github.com/repos/psf/requests/issues/1054/events
https://github.com/psf/requests/issues/1054
9,443,072
MDU6SXNzdWU5NDQzMDcy
1,054
Adding parameter 'cert' to `requests.post()` raises `TypeError` exception
{ "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
5
2012-12-20T18:43:34Z
2021-09-09T05:00:42Z
2013-02-10T22:46:08Z
NONE
resolved
Hi _First & foremost, great module!!!_ I am having an issue when I add `cert` parameter into class method `requests.post()`, because only if I add it does the call raises exception `TypeError`. Without `cert` parameter, `requests.post()` works fine, but I would like to add cert PEM reference. Here is the calling code, and the filepath to the PEM file is valid: ``` try: url = self.__path payload = self.__request_json headers = {'Content-Type':'application/json', 'charset':'utf-8'} certpath = '/usr/local/lib/python3.2/dist-packages/mymodule-0.9.0-py3.2.egg/mymodule/cacert.pem' self.__response_object = requests.post( url , data=payload , headers=headers , cert=certpath ) success = True except Exception as exc: sys.stderr.write("Exception ({})".format(exc)) ``` Exception message raised: ``` TypeError (__init__() takes exactly 1 positional argument (2 given)) ``` Thank you for your assistance Jeff in Seattle
{ "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/1054/reactions" }
https://api.github.com/repos/psf/requests/issues/1054/timeline
null
completed
null
null
false
[ "I can't reproduce this. I have two questions:\n1. What version of Requests are you using?\n2. Can you give me a traceback please?\n", "Hi and Happy Holidays\n1. Using latest version\n\ncertca.pem file attached\n\ncode:\n try:\n url = self.__path\n payload = self.__request_json\n headers = {'Content-Type':'application/json',\n'charset':'utf-8'}\n certpath = self.whereCert\n print(certpath)\n self.__response_object = requests.post( url\n , data=payload\n , headers=headers\n , cert=certpath\n )\n success = True\n except Exception as exc:\n raise TangoCardSdkException( \"Failed to post request:\n{0}\".format(exc) )\n1. traceback:\n\n**\\* print_exception:\nTraceback (most recent call last):\n File\n\"/usr/local/lib/python3.2/dist-packages/requests-0.14.2-py3.2.egg/requests/packages/urllib3/connectionpool.py\",\nline 415, in urlopen\n body=body, headers=headers)\n File\n\"/usr/local/lib/python3.2/dist-packages/requests-0.14.2-py3.2.egg/requests/packages/urllib3/connectionpool.py\",\nline 267, in _make_request\n conn.request(method, url, **httplib_request_kw)\nssl.SSLError: [Errno 336265225] _ssl.c:1651: error:140B0009:SSL\nroutines:SSL_CTX_use_PrivateKey_file:PEM lib\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File\n\"/usr/local/lib/python3.2/dist-packages/requests-0.14.2-py3.2.egg/requests/models.py\",\nline 633, in send\n timeout=self.timeout,\n File\n\"/usr/local/lib/python3.2/dist-packages/requests-0.14.2-py3.2.egg/requests/packages/urllib3/connectionpool.py\",\nline 446, in urlopen\n raise SSLError(e)\nrequests.packages.urllib3.exceptions.SSLError: [Errno 336265225]\n_ssl.c:1651: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib\n\nOn Sat, Dec 22, 2012 at 2:53 AM, Cory Benfield [email protected]:\n\n> I can't reproduce this. I have two questions:\n> 1. What version of Requests are you using?\n> 2. Can you give me a traceback please?\n> \n> —\n> Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/requests/issues/1054#issuecomment-11636035.\n", "Happy Holidays to you too. =)\n\nSo, this is not the same exception you posted earlier. This newer exception is being thrown by the deeply unpleasant SSL library.\n\nOut of interest, is your PEM file encrypted? (Put another way, do you have to use a passphrase with it?)\n", "The cacert.pem is not encrypted, see attachment in previous email.\n\nYes, different exception entirely.\n\nJeff\n\nOn Sat, Dec 22, 2012 at 11:42 AM, Cory Benfield [email protected]:\n\n> Happy Holidays to you too. =)\n> \n> So, this is not the same exception you posted earlier. This newer\n> exception is being thrown by the deeply unpleasant SSL library.\n> \n> Out of interest, is your PEM file encrypted? (Put another way, do you have\n> to use a passphrase with it?)\n> \n> —\n> Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/requests/issues/1054#issuecomment-11640562.\n", "Ideas on how to resolve the SSL issue?\n\nThanks\n\nJeff in Seattle\n" ]
https://api.github.com/repos/psf/requests/issues/1053
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1053/labels{/name}
https://api.github.com/repos/psf/requests/issues/1053/comments
https://api.github.com/repos/psf/requests/issues/1053/events
https://github.com/psf/requests/issues/1053
9,441,063
MDU6SXNzdWU5NDQxMDYz
1,053
TooManyRedirect on pypi.python.org
{ "avatar_url": "https://avatars.githubusercontent.com/u/293337?v=4", "events_url": "https://api.github.com/users/toxinu/events{/privacy}", "followers_url": "https://api.github.com/users/toxinu/followers", "following_url": "https://api.github.com/users/toxinu/following{/other_user}", "gists_url": "https://api.github.com/users/toxinu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toxinu", "id": 293337, "login": "toxinu", "node_id": "MDQ6VXNlcjI5MzMzNw==", "organizations_url": "https://api.github.com/users/toxinu/orgs", "received_events_url": "https://api.github.com/users/toxinu/received_events", "repos_url": "https://api.github.com/users/toxinu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toxinu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toxinu/subscriptions", "type": "User", "url": "https://api.github.com/users/toxinu", "user_view_type": "public" }
[]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "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" } ]
null
17
2012-12-20T17:35:10Z
2021-09-09T05:00:42Z
2013-02-10T22:41:40Z
NONE
resolved
I have an issue when I want to request the cheeseshop API, maybe I forget something since the new `0.1` release. Requests return to me a `TooManyRedirects` exception. This is my output: https://gist.github.com/4347012
{ "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/1053/reactions" }
https://api.github.com/repos/psf/requests/issues/1053/timeline
null
completed
null
null
false
[ "Uh...I can't reproduce this. In fact, I don't get redirects at all. Can you try reinstalling Requests?\n", "I think it's because i'm a behind a firewall and proxies army, but I want to understand why with a simple `curl` cli there is no problem and not with `requests`.\n\nCan you give me some information about debugging to try to understand what's happens ?\n", "Certainly, what would you like to know? =)\n", "I see some issues about redirect and proxy problem. So I think it's more reasonable to wait before taking this seriously.\nBut basicely, I just want to understand why `curl` success it and not `requests`.\n\nHow to start to debug it ?\n", "> How to start to debug it ?\n\nuse 'curl -v' and see exactly what curl is doing\n\nLook at http://docs.python-requests.org/en/latest/user/quickstart/#redirection-and-history and explore the response history of your redirects within requests.\n\nCompare the first request object in your response history with the request and response headers from 'curl -v' and that should give you more insight into what's happening.\n\nI suspect that curl is using a different proxy from requests, or the proxy is handling the request differently for some reason, but that's just a guess.\n", "Thanks @dttocs !\nSo I catch it, `curl` set a `> Host: pypi.python.org` in header that `requests` doesn't.\nWhen I set it manually it works.\n\nAnd another thing, `requests` failed to auth on proxy, I have to set myself the `Proxy-Authorization` header.\nFor information I set proxy like that:\n\n```\n s.get('http://pypi.python.org/pypi/requests/json', proxies={'http':'http://user:pass@myproxy'})\n```\n\nMy password have some specials characters like `$` for information.\n\nI think it's something already mentionned in another issue. \nI will test with git version of `requests`.\n\nMany thanks.\nsocketubs.\n", "Taking another look at this, I think this fix might belong in urllib3. The `urllib3.poolmanger.ProxyManager` class has a `_set_proxy_headers` method which should probably set the Host header. Does that sound right, @shazow? If it does, I can offer you a PR with the fix.\n", "@Lukasa There are a bunch of other outstanding pulls, some of which may address this. I haven't gone through my backlog in a while. :( But you're welcome to throw something in just in case.\n", "It's now `1.1.0` and I still have a bug that I failed to identify.\nThe fact is that is the exactly same situation it works with `requests 0.14.2` and not with the last version.\n\nRequests take my proxy but failed the authentication.\nI try to set the proxy in `proxies` argument but same result.\n\nhttps://gist.github.com/4690235\n\nMaybe I have to create new issue, cause title reflect a fixed bug.\n", "For information I just test it with the `master` (head: 113b67c069) and I have the same issue.\n", "Yes, sorry, I let this slip through my fingers. I'll take another look tonight. =)\n", "@socketubs, I think @Lukasa is close to fixing this for you. (Just to keep you up to date)\n", "Yes! I'll check it very soon and keep you up to date too!\nMany thanks guys! :smile: \n", "I think we're just waiting for @shazow to merge a change over on urllib3 before we pull that in.\n", "Done.\n", ":heart:\n", "Closing\n" ]
https://api.github.com/repos/psf/requests/issues/1052
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1052/labels{/name}
https://api.github.com/repos/psf/requests/issues/1052/comments
https://api.github.com/repos/psf/requests/issues/1052/events
https://github.com/psf/requests/pull/1052
9,435,858
MDExOlB1bGxSZXF1ZXN0MzQ0NTA1OA==
1,052
Small tweak to API docs to indicate that file-like object supported for data param.
{ "avatar_url": "https://avatars.githubusercontent.com/u/391939?v=4", "events_url": "https://api.github.com/users/hozn/events{/privacy}", "followers_url": "https://api.github.com/users/hozn/followers", "following_url": "https://api.github.com/users/hozn/following{/other_user}", "gists_url": "https://api.github.com/users/hozn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hozn", "id": 391939, "login": "hozn", "node_id": "MDQ6VXNlcjM5MTkzOQ==", "organizations_url": "https://api.github.com/users/hozn/orgs", "received_events_url": "https://api.github.com/users/hozn/received_events", "repos_url": "https://api.github.com/users/hozn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hozn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hozn/subscriptions", "type": "User", "url": "https://api.github.com/users/hozn", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-20T14:49:40Z
2021-09-08T18:01:11Z
2012-12-20T17:09:24Z
CONTRIBUTOR
resolved
Recently I have been playing with requests (what a fanstastic library) and needed to send potentially large files via PUT requests. I discovered that passing a file-like objects works just fine here, as it is supported by the underlying httplib layer, so I figured it would be helpful to indicate this in the doc string. Hope this is helpful -- and accurate :)
{ "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/1052/reactions" }
https://api.github.com/repos/psf/requests/issues/1052/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1052.diff", "html_url": "https://github.com/psf/requests/pull/1052", "merged_at": "2012-12-20T17:09:24Z", "patch_url": "https://github.com/psf/requests/pull/1052.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1052" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1051
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1051/labels{/name}
https://api.github.com/repos/psf/requests/issues/1051/comments
https://api.github.com/repos/psf/requests/issues/1051/events
https://github.com/psf/requests/issues/1051
9,432,801
MDU6SXNzdWU5NDMyODAx
1,051
requests.get is ALWAYS sending content length
{ "avatar_url": "https://avatars.githubusercontent.com/u/1191861?v=4", "events_url": "https://api.github.com/users/orenbarzilai/events{/privacy}", "followers_url": "https://api.github.com/users/orenbarzilai/followers", "following_url": "https://api.github.com/users/orenbarzilai/following{/other_user}", "gists_url": "https://api.github.com/users/orenbarzilai/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/orenbarzilai", "id": 1191861, "login": "orenbarzilai", "node_id": "MDQ6VXNlcjExOTE4NjE=", "organizations_url": "https://api.github.com/users/orenbarzilai/orgs", "received_events_url": "https://api.github.com/users/orenbarzilai/received_events", "repos_url": "https://api.github.com/users/orenbarzilai/repos", "site_admin": false, "starred_url": "https://api.github.com/users/orenbarzilai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/orenbarzilai/subscriptions", "type": "User", "url": "https://api.github.com/users/orenbarzilai", "user_view_type": "public" }
[]
closed
true
null
[]
null
17
2012-12-20T12:38:48Z
2021-09-09T05:00:48Z
2013-01-26T04:58:20Z
NONE
resolved
Hi, It seems like that request.get always adds 'content-length' header to the request. I think that the right behavior is not to add this header automatically in GET requests or add the possibility to not send it. For example http://amazon.com returns 503 for every get request that contains 'content-length' header. Thanks, Oren
{ "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/1051/reactions" }
https://api.github.com/repos/psf/requests/issues/1051/timeline
null
completed
null
null
false
[ "This was done in issue #957 - Attach Content-Length to everything.\n", "OK, I don't think it's the right solution.\nimho GET requests shouldn't contain by default 'content-length' header.\n", "Related: geemus/excon/pull/113\n", "There's nothing stopping you from sending data in a GET request.\n", "At the moment the following code:\nrequests.get('http://amazon.com') returns 503, because the package automatically adds the header content length to the request.\n\nIf I remove that header it works fine. The thing is that currently since issue #957 this header is added automaticlly to every request and that's the cause of the problem.\n", "Hmm, let's find some more URLs that do this.\n", "It isn't against the HTTP/1.1 spec last I saw so I don't see why Amazon is returning a 503\n", "GET requests don't normally include data payload in the body, and I presume their server assumes that it does because there is a content-length, but it doesn't handle the empty edge case.\n", "It's semantically ambiguous - does a request with a Content-Length header mean \"zero length body\" or does it mean \"no body was included in this message\"?\n\nI believe that Requests should follow the conventional wisdom, which is that most UAs do not send the Content-Length header for GET requests.\n", "I tried to reproduce this and got weird behavior, sometimes it does work:\n\n```\n>>> r = requests.get('https://amazon.com', allow_redirects=False)\n>>> print r.text\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>301 Moved Permanently</title>\n</head><body>\n<h1>Moved Permanently</h1>\n<p>The document has moved <a href=\"https://www.amazon.com/\">here</a>.</p>\n</body></html>\n\n>>> print r.status_code\n301\n```\n\nbut sometimes it doesn't:\n\n```\n>>> print requests.get('https://amazon.com', allow_redirects=False).status_code\n503\n\n>>> print requests.get('https://amazon.com', allow_redirects=False).text\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>301 Moved Permanently</title>\n</head><body>\n<h1>Moved Permanently</h1>\n<p>The document has moved <a href=\"https://www.amazon.com/\">here</a>.</p>\n</body></html>\n```\n\nIn fact, sometimes it seems like it might be an Amazon bug:\n\n```\n>>> print requests.get('https://amazon.com', allow_redirects=False).status_code\n503\n>>> print requests.get('http://amazon.com', allow_redirects=False).status_code\n301\n>>> print requests.get('http://amazon.com', allow_redirects=False).status_code\n503\n>>> print requests.get('http://amazon.com', allow_redirects=False).status_code\n503\n```\n\nI'm not sure if it's relevant that I switched from ssl to plain http when I got that 301.\n\n```\n>>> print requests.__version__\n1.0.3\n```\n", "Try allowing for redirects. The 301 would be followed otherwise. Printing the text for a 503 would be helpful too.\n", "sigmavirus24: yeah, I explicitly added the allow_redirects to see what would happen: in the rare-ish cases where I get a 301 it actually does work.\n\nAnd, sorry about the double-301 text, I copied the wrong thing. This is what the 503 page looks like:\n\n```\n>>> r = requests.get('http://amazon.com') ; print r.text\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=iso-8859-1\"/>\n<title>500 Service Unavailable Error</title>\n</head>\n<body style=\"padding:1% 10%;font-family:Verdana,Arial,Helvetica,sans-serif\">\n <a href=\"http://www.amazon.com/\"><img src=\"https://images-na.ssl-images-amazon.com/images/G/01/img09/x-site/other/a_com_logo_200x56.gif\" alt=\"Amazon.com\" width=\"200\" height=\"56\" border=\"0\"/></a>\n <table>\n <tr>\n <td valign=\"top\" style=\"width:52%;font-size:10pt\"><br/><h2 style=\"color:#E47911\">Oops!</h2><p>We're very sorry, but we're having trouble doing what you just asked us to do. Please give us another chance--click the Back button on your browser and try your request again. Or start from the beginning on our <a href=\"http://www.amazon.com/\">homepage</a>.</p></td>\n <th><img src=\"https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/errors-alerts/product-fan-500.jpg\" alt=\"product collage\"/></th>\n </tr>\n </table>\n</body>\n</html>\n>>> r.status_code\n503\n```\n\nBut, also, isn't 503 the wrong error code for a malformed request? [503 means](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) \"unable to process request due to high load\". I feel like if Amazon was doing this intentionally they would return a 400 or at least something in the 4xx range.\n\nNot that I'm saying you should ignore a problem with one of the top-10 websites on earth just because they might be being crazy.\n", "I'm not saying we ignore it, I'm just saying it isn't against spec. And yeah, I agree that the 503 looks like it's a malformed request error. I'll mock up conditional addition for GETs tonight and see if @kennethreitz wouldn't mind the minor extra complexity.\n", "Is there a decision or any progress with this issue?\n", "I have encountered other sensitive servers that barf because of headers. While it would be best to get something merged into requests upstream, another option is to look at [careful-requests](https://github.com/kanzure/careful-requests) which aims to handle requests that need sensitive headers (it just monkeypatches requests). At the moment this doesn't include Content-Length on GET but that is trivial to add, I think. I hope this helps.\n", "I frankly forgot about this, but I'll get to it tonight or tomorrow I hope. \n", "I'm going to go ahead and give this a shot; sigmavirus24 is going to take #1133 in the meantime.\n" ]
https://api.github.com/repos/psf/requests/issues/1050
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1050/labels{/name}
https://api.github.com/repos/psf/requests/issues/1050/comments
https://api.github.com/repos/psf/requests/issues/1050/events
https://github.com/psf/requests/issues/1050
9,415,497
MDU6SXNzdWU5NDE1NDk3
1,050
PUT should always send Content-Length header
{ "avatar_url": "https://avatars.githubusercontent.com/u/494159?v=4", "events_url": "https://api.github.com/users/PaulMcMillan/events{/privacy}", "followers_url": "https://api.github.com/users/PaulMcMillan/followers", "following_url": "https://api.github.com/users/PaulMcMillan/following{/other_user}", "gists_url": "https://api.github.com/users/PaulMcMillan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PaulMcMillan", "id": 494159, "login": "PaulMcMillan", "node_id": "MDQ6VXNlcjQ5NDE1OQ==", "organizations_url": "https://api.github.com/users/PaulMcMillan/orgs", "received_events_url": "https://api.github.com/users/PaulMcMillan/received_events", "repos_url": "https://api.github.com/users/PaulMcMillan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PaulMcMillan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PaulMcMillan/subscriptions", "type": "User", "url": "https://api.github.com/users/PaulMcMillan", "user_view_type": "public" }
[]
closed
true
null
[]
null
13
2012-12-19T21:29:53Z
2021-09-03T00:10:52Z
2013-01-24T12:37:48Z
NONE
resolved
I'm attempting to PUT with a zero-length content body. My target HTTP server is (rightly) rejecting the request because requests is not sending a Content-Length header, and the server is interpreting the request as having no body. By my reading of the RFC, requests should always send a Content-Length header with PUT methods, even if it is 0, as in this case. http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html Even if requests does not always send a Content-Length header with PUT, it should send one if the content being sent is a zero-length string. I suspect instead of checking for None, or whatever the default body value is, it's checking for "truthy".
{ "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/1050/reactions" }
https://api.github.com/repos/psf/requests/issues/1050/timeline
null
completed
null
null
false
[ "https://github.com/kennethreitz/requests/blob/master/requests/models.py#L309\n\n``` python\nimport requests\n\nr = requests.put('http://httpbin.org/put', data='')\nr.json['headers']['Content-Length']\n```\n\nThat prints `u'0'` for me. What version of requests are you using?\n", "Easier yet:\n\n``` pycon\n>>>import requests\n>>>req = requests.Request('PUT', 'http://httpbin.org/put', data='').prepare()\n>>>req.headers['Content-Length']\n'0'\n```\n", "Hmm... maybe my issue is that I'm manually specifying one header, and was expecting the Content-Length header to be automatically set.\n", "Shouldn't interfere. What version of requests are you using?\n", "14.2\n", "@kennethreitz I love this refactor more and more.\n\n@PaulMcMillan can you post the call you're making or an example of it? This fix was introduced ~0.14.1\n\nAnd by example, I mean: fake header and fake URI\n", "My call looks like this:\n\n```\nrequests.request(method='PUT', url='https://myserver/myendpoint', headers={'Content-Type': 'application/json'}, data='', verify=False)\n```\n\nand the relevant nginx debug log looks like this:\n\n```\n2012/12/19 22:04:39 [debug] 21390#0: *38 http request line: \"PUT /myendpoint HTTP/1.1\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http uri: \"/myendpoint\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http args: \"\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http exten: \"\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http process request header line\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header: \"Host: myserver\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header: \"Content-Type: application/json\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header: \"Accept-Encoding: gzip, deflate, compress\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header: \"Accept: */*\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header: \"User-Agent: python-requests/0.14.2 CPython/2.7.3 Linux/3.2.0-31-generic\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http header done\n2012/12/19 22:04:39 [info] 21390#0: *38 client sent PUT method without \"Content-Length\" header while reading client request headers, client: myserver, server: _, request: \"PUT /myendpoint HTTP/1.1\", host: \"myserver\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http finalize request: 411, \"/myendpoint?\" a:1, c:1\n2012/12/19 22:04:39 [debug] 21390#0: *38 event timer del: 18: 1355954739281\n2012/12/19 22:04:39 [debug] 21390#0: *38 http special response: 411, \"/myendpoint?\"\n2012/12/19 22:04:39 [debug] 21390#0: *38 http set discard body\n2012/12/19 22:04:39 [debug] 21390#0: *38 xslt filter header\n2012/12/19 22:04:39 [debug] 21390#0: *38 HTTP/1.1 411 Length Required\nServer: nginx/1.2.3\nDate: Wed, 19 Dec 2012 22:04:39 GMT\nContent-Type: text/html\nContent-Length: 180\nConnection: close\n```\n\nIs something automatically generating that header when you look for it?\n", "Definitely not.\n", "I officially cannot reproduce this behaviour on v1.0.4:\n\n``` python\n>>> import requests\n>>> requests.__version__\n'1.0.4'\n>>> r = requests.request(method='PUT', url='http://httpbin.org/put', data='', headers={'Content-Type': 'application/json'})\n>>> r.json()['headers']['Content-Length']\nu'0'\n```\n\nWant to try updating to v1.0.4?\n", "I agree looking at the (much cleaner and nicer) 1.0.4 code, that this is unlikely to be an issue in that codebase. I'm just concerned about breaking existing usage throughout the rest of my application since so much changed (and last I looked) the docs weren't updated. It's not heartening to see so many revs so quickly, especially without an alpha period. 14.2 worked other than this issue, I'm not sure about upgrading to code that is clearly not in any kind of final state. \n\nIs there any kind of promise about support for 1.0.X api compatibility beyond \"upgrade to the latest and greatest and fix your code because the API changed\"? Are the docs updated? I can see about updating my application, but it would sure be nice to know that the code I was updating to was well tested, reliable, and not going to break everything again... It sucks be debugging framework problems.\n", "The docs have been updated. There are no plans to change the API in any way until 2.0.\n", "I'm closing this as resolved by v1.0.4. =) @PaulMcMillan, I understand your worries about the maturity of v1, but there's not much I can do about it other than to say that any bugs that are in v0.14 will never be fixed. Bugs in v1 will be. =) Thanks for raising this issue!\n", "I'm working on the conditional addition of the header for the other related issue\n" ]
https://api.github.com/repos/psf/requests/issues/1049
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1049/labels{/name}
https://api.github.com/repos/psf/requests/issues/1049/comments
https://api.github.com/repos/psf/requests/issues/1049/events
https://github.com/psf/requests/pull/1049
9,413,137
MDExOlB1bGxSZXF1ZXN0MzQzMzg0MA==
1,049
Correctly identify certificate filenames.
{ "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
9
2012-12-19T20:13:02Z
2021-09-08T23:01:16Z
2012-12-22T11:05:51Z
MEMBER
resolved
Resolves issue #1046. I have not tested this, so...yeah.
{ "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/1049/reactions" }
https://api.github.com/repos/psf/requests/issues/1049/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1049.diff", "html_url": "https://github.com/psf/requests/pull/1049", "merged_at": "2012-12-22T11:05:51Z", "patch_url": "https://github.com/psf/requests/pull/1049.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1049" }
true
[ "basestring doesn't exist in python 3\n", "Wasn't basestring in compat?\n", "Yeah, need to import it.\n", "@Lukasa import it :) \n", "C'mon @Lukasa you need some sleep brother.\n", "I need a holiday. Got a week off on Friday though, that'll help!\n", "@Lukasa take a break from everything, you deserve it. :fistbump:\n", "@kennethreitz, what's the state of this? Got `basestring` in now, so all should be good. =)\n", "Merged :)\n" ]
https://api.github.com/repos/psf/requests/issues/1048
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1048/labels{/name}
https://api.github.com/repos/psf/requests/issues/1048/comments
https://api.github.com/repos/psf/requests/issues/1048/events
https://github.com/psf/requests/pull/1048
9,412,947
MDExOlB1bGxSZXF1ZXN0MzQzMzcyNw==
1,048
Swap prepare_auth and body
{ "avatar_url": "https://avatars.githubusercontent.com/u/1165819?v=4", "events_url": "https://api.github.com/users/ib-lundgren/events{/privacy}", "followers_url": "https://api.github.com/users/ib-lundgren/followers", "following_url": "https://api.github.com/users/ib-lundgren/following{/other_user}", "gists_url": "https://api.github.com/users/ib-lundgren/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ib-lundgren", "id": 1165819, "login": "ib-lundgren", "node_id": "MDQ6VXNlcjExNjU4MTk=", "organizations_url": "https://api.github.com/users/ib-lundgren/orgs", "received_events_url": "https://api.github.com/users/ib-lundgren/received_events", "repos_url": "https://api.github.com/users/ib-lundgren/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ib-lundgren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ib-lundgren/subscriptions", "type": "User", "url": "https://api.github.com/users/ib-lundgren", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-19T20:06:30Z
2021-09-08T18:01:11Z
2012-12-19T21:12:03Z
CONTRIBUTOR
resolved
Context in https://github.com/requests/requests-oauthlib/pull/4
{ "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/1048/reactions" }
https://api.github.com/repos/psf/requests/issues/1048/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1048.diff", "html_url": "https://github.com/psf/requests/pull/1048", "merged_at": "2012-12-19T21:12:03Z", "patch_url": "https://github.com/psf/requests/pull/1048.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1048" }
true
[ "Can elaborate more if needed.\n", "thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1047
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1047/labels{/name}
https://api.github.com/repos/psf/requests/issues/1047/comments
https://api.github.com/repos/psf/requests/issues/1047/events
https://github.com/psf/requests/issues/1047
9,410,974
MDU6SXNzdWU5NDEwOTc0
1,047
JSON response content as a Python property
{ "avatar_url": "https://avatars.githubusercontent.com/u/83319?v=4", "events_url": "https://api.github.com/users/jpadilla/events{/privacy}", "followers_url": "https://api.github.com/users/jpadilla/followers", "following_url": "https://api.github.com/users/jpadilla/following{/other_user}", "gists_url": "https://api.github.com/users/jpadilla/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jpadilla", "id": 83319, "login": "jpadilla", "node_id": "MDQ6VXNlcjgzMzE5", "organizations_url": "https://api.github.com/users/jpadilla/orgs", "received_events_url": "https://api.github.com/users/jpadilla/received_events", "repos_url": "https://api.github.com/users/jpadilla/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jpadilla/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jpadilla/subscriptions", "type": "User", "url": "https://api.github.com/users/jpadilla", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-19T19:00:56Z
2021-09-09T05:30:04Z
2012-12-19T19:02:19Z
NONE
resolved
I think that the JSON response method is missing the `@property` decorator. Calling it like `r.json` obviously returns `<bound method Response.json of <Response [200]>>`. https://github.com/kennethreitz/requests/blob/master/requests/models.py#L522
{ "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/1047/reactions" }
https://api.github.com/repos/psf/requests/issues/1047/timeline
null
completed
null
null
false
[ "It is not, this change was intentional. See #1028.\n" ]
https://api.github.com/repos/psf/requests/issues/1046
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1046/labels{/name}
https://api.github.com/repos/psf/requests/issues/1046/comments
https://api.github.com/repos/psf/requests/issues/1046/events
https://github.com/psf/requests/issues/1046
9,407,794
MDU6SXNzdWU5NDA3Nzk0
1,046
potential cert bug
{ "avatar_url": "https://avatars.githubusercontent.com/u/602685?v=4", "events_url": "https://api.github.com/users/SmithSamuelM/events{/privacy}", "followers_url": "https://api.github.com/users/SmithSamuelM/followers", "following_url": "https://api.github.com/users/SmithSamuelM/following{/other_user}", "gists_url": "https://api.github.com/users/SmithSamuelM/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SmithSamuelM", "id": 602685, "login": "SmithSamuelM", "node_id": "MDQ6VXNlcjYwMjY4NQ==", "organizations_url": "https://api.github.com/users/SmithSamuelM/orgs", "received_events_url": "https://api.github.com/users/SmithSamuelM/received_events", "repos_url": "https://api.github.com/users/SmithSamuelM/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SmithSamuelM/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SmithSamuelM/subscriptions", "type": "User", "url": "https://api.github.com/users/SmithSamuelM", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-12-19T17:18:46Z
2021-09-09T05:30:03Z
2012-12-22T11:14:26Z
NONE
resolved
This code in adapters.py ``` python if cert: if len(cert) == 2: conn.cert_file = cert[0] conn.key_file = cert[1] else: conn.cert_file = cert ``` Would fail erroneously if a the cert file name were two characters long. Safer would be to test if cert is a string such as ``` python if cert: if hasattr(cert, 'strip'): conn.cert_file = cert else: conn.cert_file = cert[0] conn.key_file = cert[1] ```
{ "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/1046/reactions" }
https://api.github.com/repos/psf/requests/issues/1046/timeline
null
completed
null
null
false
[ "Nice catch \n\nSamuel Smith [email protected] wrote:\n\n> This code in adapters.py\n> \n> if cert:\n> if len(cert) == 2:\n> conn.cert_file = cert[0]\n> conn.key_file = cert[1]\n> else:\n> conn.cert_file = cert\n> \n> Would fail erroneously if a the cert file name were two characters\n> long.\n> Safer would be to test if cert is a string\n> such as\n> \n> if cert:\n> if hasattr(cert, 'strip'):\n> conn.cert_file = cert\n> else:\n> conn.cert_file = cert[0]\n> conn.key_file = cert[1]\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/1046\n", "Happy to help. Really like the direction Requests is headed in.\n", "Thanks for reporting this! This has been resolved by #1049.\n" ]
https://api.github.com/repos/psf/requests/issues/1045
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1045/labels{/name}
https://api.github.com/repos/psf/requests/issues/1045/comments
https://api.github.com/repos/psf/requests/issues/1045/events
https://github.com/psf/requests/issues/1045
9,402,092
MDU6SXNzdWU5NDAyMDky
1,045
Cookies with empty values are ignored and are not parsed properly from the 'set-cookie' HTTP response header
{ "avatar_url": "https://avatars.githubusercontent.com/u/1191541?v=4", "events_url": "https://api.github.com/users/odedgolan/events{/privacy}", "followers_url": "https://api.github.com/users/odedgolan/followers", "following_url": "https://api.github.com/users/odedgolan/following{/other_user}", "gists_url": "https://api.github.com/users/odedgolan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/odedgolan", "id": 1191541, "login": "odedgolan", "node_id": "MDQ6VXNlcjExOTE1NDE=", "organizations_url": "https://api.github.com/users/odedgolan/orgs", "received_events_url": "https://api.github.com/users/odedgolan/received_events", "repos_url": "https://api.github.com/users/odedgolan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/odedgolan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/odedgolan/subscriptions", "type": "User", "url": "https://api.github.com/users/odedgolan", "user_view_type": "public" }
[]
closed
true
null
[]
null
11
2012-12-19T14:40:15Z
2021-09-09T05:30:04Z
2012-12-19T20:31:49Z
NONE
resolved
The following cookie header is not parsed properly and the response CookieJar remains empty: Set-Cookie: 'reddit_session=; Domain=reddit.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/' It is taken from Reddit's logout url: > > > response = requests.post('http://www.reddit.com/logout', cookies=... headers=...) > > > > > > response.cookies > > > <<class 'requests.cookies.RequestsCookieJar'[] > > > > > > response.headers > > > {'content-length': '0', 'set-cookie': 'reddit_session=; Domain=reddit.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/', 'vary': 'Accept-Encoding', 'connection': 'keep-alive', 'location': 'http://www.reddit.com/'}
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/1045/reactions" }
https://api.github.com/repos/psf/requests/issues/1045/timeline
null
completed
null
null
false
[ "Odd. I 404 on that URL, but that's obviously because I'm not logging in. if I do a GET on the home page it works fine for me.\n\nWhat version of Requests are you running?\n", "I'm using version 1.0.3 (latest).\nYes, it is hard to recreate it with Reddit since it needs all the exact headers and cookies.\nA better way to approach it will be if you can simulate this exact header:\n\nSet-Cookie:reddit_session=; Domain=reddit.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/ \n\nput it in a mock response and see it is not parsed properly and the cookieJar (response.cookies) remains empty. \n\nIf this answer does not help, please tell, maybe we can figure another way.\n\nThanks!\n", "This cookie is set to expire in the past --- this is the standard mechanism for directing the client to remove a cookie, right? If my understanding is correct, the cookie should not be added to the jar, rather removed if present.\n", "@slingamn :heart: \n\nQuite right, the cookiejar should be empty. I clearly need to take a nap. Or a holiday.\n\nNot a bug! Thanks for the report, @odedgolan, I'm now closing this. =)\n", "True, it is the standard mechanism for deleting cookies. \nThis is why it needs to be included in the CookieJar so it can be sent in turn to a browser, and the browser can delete its local cookie.\n\nI do not wish to use Requests as a full implementation of a browser but as a vessel for HTTP requests. \n@Lukasa @slingamn What do you think? Don't you think I'm right on this?\n\nThank you,\nOded.\n", "I'm not sure I understand how you want this to work. Are you intending to use Requests as an HTTP server?\n", "Nope, I'm using it as a proxy. \n\nWeb Browser --> python requests --> websites\n(and back), \n\nsee http://betterinternet.co (I'm the CTO)\n", "@odedgolan no offense, but that looks sketchy as hell.\n\nEven so, are the cookie settings not left in `Response.headers`? Why not just pass them along from there?\n", "+1 for @sigmavirus24 here; it sounds like you want to pass through the original headers, including the Cookie header.\n\nHowever, if you really want to do this via `CookieJar`, you can write your own `CookieJar` class that implements the policy you want and then pass it in to Requests via the `cookies` kwarg. Requests has its own `RequestsCookieJar` but it's only a way to provide a convenient external API, internally we should be able to work with any `CookieJar` subclass.\n", "@sigmavirus24 non taken, no worries. \n\nI cannot just pass the header, I need some manipulation ability on the cookies.\n\nSubclassing CookieJar sounds like the right solution but passing it to Requests via cookies kwarg will set the \"to send\" CookieJar, not the \"to receive\" CookieJar.\n", "I'm not sure I understand this send/receive distinction. But yeah, you have access to the original headers as well as our `CookieJar`, so I'm sure you'll be able to implement the behavior you want.\n" ]
https://api.github.com/repos/psf/requests/issues/1044
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1044/labels{/name}
https://api.github.com/repos/psf/requests/issues/1044/comments
https://api.github.com/repos/psf/requests/issues/1044/events
https://github.com/psf/requests/pull/1044
9,401,084
MDExOlB1bGxSZXF1ZXN0MzQyNzY0OQ==
1,044
#1043: redirect POST data upon POST redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/365086?v=4", "events_url": "https://api.github.com/users/alonho/events{/privacy}", "followers_url": "https://api.github.com/users/alonho/followers", "following_url": "https://api.github.com/users/alonho/following{/other_user}", "gists_url": "https://api.github.com/users/alonho/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alonho", "id": 365086, "login": "alonho", "node_id": "MDQ6VXNlcjM2NTA4Ng==", "organizations_url": "https://api.github.com/users/alonho/orgs", "received_events_url": "https://api.github.com/users/alonho/received_events", "repos_url": "https://api.github.com/users/alonho/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alonho/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alonho/subscriptions", "type": "User", "url": "https://api.github.com/users/alonho", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2012-12-19T14:03:45Z
2021-09-08T23:05:13Z
2012-12-19T21:12:13Z
NONE
resolved
Is there a simpler way to say: "this pull request solves issue X"? I hope putting it's number in the title links them together.
{ "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/1044/reactions" }
https://api.github.com/repos/psf/requests/issues/1044/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1044.diff", "html_url": "https://github.com/psf/requests/pull/1044", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1044.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1044" }
true
[ "It doesn't, but this does: #1043.\n", "I removed this intentionally. Why would you want to do that?\n", "I don't think this is a bug. We follow POST redirects with a GET, like a web browser does.\n", "\"Note: When automatically redirecting a POST request after\nreceiving a 301 status code, some existing HTTP/1.0 user agents\nwill erroneously change it into a GET request.\"\n\nfrom: http://tools.ietf.org/html/rfc2616\n\nAnd FYI: because of these ambiguities two new redirect codes we're added: 303 and 307 for indicating whether the request should change to a GET or stay as it was respectively.\n", "@alonho \nThis spec is soon to be obsolete by new version - see http://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0103.html\n\n[7.4.2 301 Moved Permanently](http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4.2)\n\n> Note: For historic reasons, user agents MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, status code 307 (Temporary Redirect) can be used instead.\n\nSee issue #269 where this topic was discussed.\n", "Yes, I had spec-compliant behavior for a long time, but eventually gave in.\n\nIf you don't want this behavior, simply `allow_redirects=False`\n" ]
https://api.github.com/repos/psf/requests/issues/1043
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1043/labels{/name}
https://api.github.com/repos/psf/requests/issues/1043/comments
https://api.github.com/repos/psf/requests/issues/1043/events
https://github.com/psf/requests/issues/1043
9,399,025
MDU6SXNzdWU5Mzk5MDI1
1,043
POST redirect doesn't redirect the data
{ "avatar_url": "https://avatars.githubusercontent.com/u/365086?v=4", "events_url": "https://api.github.com/users/alonho/events{/privacy}", "followers_url": "https://api.github.com/users/alonho/followers", "following_url": "https://api.github.com/users/alonho/following{/other_user}", "gists_url": "https://api.github.com/users/alonho/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alonho", "id": 365086, "login": "alonho", "node_id": "MDQ6VXNlcjM2NTA4Ng==", "organizations_url": "https://api.github.com/users/alonho/orgs", "received_events_url": "https://api.github.com/users/alonho/received_events", "repos_url": "https://api.github.com/users/alonho/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alonho/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alonho/subscriptions", "type": "User", "url": "https://api.github.com/users/alonho", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-19T12:34:44Z
2021-09-09T05:30:00Z
2012-12-27T11:58:38Z
NONE
resolved
I bumped into this while using Flask. When registering a rule that ends with a slash but the client accesses the url without the slash, flask redirects it WITH the slash. (other webservers do the same) I don't mind fixing it myself, Is this really a bug?
{ "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/1043/reactions" }
https://api.github.com/repos/psf/requests/issues/1043/timeline
null
completed
null
null
false
[ "I don't think this is a bug. We follow POST redirects with a GET, like a web browser does.\n" ]
https://api.github.com/repos/psf/requests/issues/1042
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1042/labels{/name}
https://api.github.com/repos/psf/requests/issues/1042/comments
https://api.github.com/repos/psf/requests/issues/1042/events
https://github.com/psf/requests/issues/1042
9,393,379
MDU6SXNzdWU5MzkzMzc5
1,042
new api to sessions breaks old code, even official documentation is broke (duplicate of #1040)
{ "avatar_url": "https://avatars.githubusercontent.com/u/648627?v=4", "events_url": "https://api.github.com/users/illuminatedwax/events{/privacy}", "followers_url": "https://api.github.com/users/illuminatedwax/followers", "following_url": "https://api.github.com/users/illuminatedwax/following{/other_user}", "gists_url": "https://api.github.com/users/illuminatedwax/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/illuminatedwax", "id": 648627, "login": "illuminatedwax", "node_id": "MDQ6VXNlcjY0ODYyNw==", "organizations_url": "https://api.github.com/users/illuminatedwax/orgs", "received_events_url": "https://api.github.com/users/illuminatedwax/received_events", "repos_url": "https://api.github.com/users/illuminatedwax/repos", "site_admin": false, "starred_url": "https://api.github.com/users/illuminatedwax/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/illuminatedwax/subscriptions", "type": "User", "url": "https://api.github.com/users/illuminatedwax", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-12-19T08:09:29Z
2021-09-09T05:30:05Z
2012-12-19T08:10:56Z
NONE
resolved
Please don't make this bug a WONTFIX because it breaks at least one library out there that are dependent on the old sessions API.
{ "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/1042/reactions" }
https://api.github.com/repos/psf/requests/issues/1042/timeline
null
completed
null
null
false
[ "V1.0.0 is an API breaking change. This is intentional. The 3rd party library can remain on v0.14.2 if it cannot be rewritten.\n", "This is not a bug. Release 1.0 is not backwards compatible.\n", "Will you at least indicate these differences in the online documentation? It's definitely not readily visible.\n", "Absolutely.\n", "Duplicate of #1034 and rejected patch #1039 which might be used as an example to work around this.\n" ]
https://api.github.com/repos/psf/requests/issues/1041
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1041/labels{/name}
https://api.github.com/repos/psf/requests/issues/1041/comments
https://api.github.com/repos/psf/requests/issues/1041/events
https://github.com/psf/requests/issues/1041
9,382,183
MDU6SXNzdWU5MzgyMTgz
1,041
Setting stream=False does not immediately result in a closed connection
{ "avatar_url": "https://avatars.githubusercontent.com/u/48100?v=4", "events_url": "https://api.github.com/users/bboe/events{/privacy}", "followers_url": "https://api.github.com/users/bboe/followers", "following_url": "https://api.github.com/users/bboe/following{/other_user}", "gists_url": "https://api.github.com/users/bboe/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bboe", "id": 48100, "login": "bboe", "node_id": "MDQ6VXNlcjQ4MTAw", "organizations_url": "https://api.github.com/users/bboe/orgs", "received_events_url": "https://api.github.com/users/bboe/received_events", "repos_url": "https://api.github.com/users/bboe/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bboe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bboe/subscriptions", "type": "User", "url": "https://api.github.com/users/bboe", "user_view_type": "public" }
[]
closed
true
null
[]
null
23
2012-12-18T21:19:51Z
2021-09-09T05:00:49Z
2013-01-23T18:09:53Z
CONTRIBUTOR
resolved
When making a request to a server, if the server response contains a `Connection: close` header the TCP connection should be closed when the request ends, thus resulting in a `tcp:fin` being sent from the client to the server. This behavior is not happening. I'll note that the connection is not available for additional HTTP requests because it has been closed on the server side. After looking through the past issues I discovered issue #520 which lead me to believe this behavior would occur when adding `prefetch=True` for requests version < 1.0 and now `stream=False` for version >= 1.0. However, it seems that neither of these methods actually result in the closing of the TCP connection on the client side. Also, one thing the #520 issue discussion neglected to consider (maybe the code does) is that many load balancers explicitly close the TCP connection and send the `connection: close` in spite of what headers the client sends. This is the issue I'm running into as the load balancer (haproxy) will not allow me to make additional requests until my previous connection is properly closed. I realize this probably extends into urllib3, however since I'm using requests directly I'll initially file the issue here. Is there something I am missing? Assuming not, and for the time being, how can I forcefully close the TCP connection from a response object?
{ "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/1041/reactions" }
https://api.github.com/repos/psf/requests/issues/1041/timeline
null
completed
null
null
false
[ "Thanks for the report; we're definitely interested in investigating and fixing problems like this.\n\nThis is the test case from #520: [https://gist.github.com/4332611]\n\nI do not observe a problem when running it under master. Could you see if you experience a problem? And if not, could you try and modify it (or write a new test using similar techniques) that reproduces the bug?\n", "Took me awhile to find a server with a load balancer that behaves similarly to my local setup. Replace the `requests.head` line with `requests.get(\"http://appfolio.com\", prefetch=True)` to see connections in the CLOSE_WAIT state for version `0.14.2`.\n\nI'm trying to find an example that works with `1.0.3`. I actually discovered that when testing locally, `requests.get` appears to block in `1.0.3` until the connection closes, but I've yet to find a globally-reachable server that shows the behavior.\n", "Hmm, doesn't reproduce for me against `0.14.2`: [https://gist.github.com/4479f51af35453402a9c]\n", "Oh, I botched the URL: it reproduces for me with `http://appfolio.com`. I'll take a look later.\n", "Personally I'm not really too concerned with the `0.14.2` behavior as I intend on using `1.0.3`. Unfortunately for `1.0.3` I have yet to be able to reproduce the error other than when haproxy is used in my virtualbox VM in-front of a paste uswsgi server. When I tried installing haproxy locally with a similar configuration I was not able to reproduce. This behavior leads me to believe it may be an issue with virtualbox. I'll continue to look around.\n", "Yeah, that makes sense. I think the connection management architecture (inside urllib3) hasn't changed much between those versions, so if I can diagnose the issue on 0.14.2 it may illuminate a problem on 1.x.\n", "After some attempts, I was finally able to reproduce the blocking behavior with requests `1.0.3`. I wrote a simple HTTP server that behaves similarly to the setup that I'm testing against. Primarily it responds with `HTTP/1.0` indicating that the connection cannot be reused, and more over the server doesn't process additional connections until all previous connections are terminated properly. That is the client closes their end of the connection ([server source](https://gist.github.com/4333673)).\n\nAfter running the server, the client code that demonstrates the blocking is:\n\n```\nimport requests\n\nfor x in range(5):\n print 'Making request %d' % x\n tmp = requests.get(\"http://127.0.0.1:8000/\", stream=False)\n print 'Done making request %d' % x\n```\n\nThis example demonstrates the importance of not waiting until garbage collection to close connections. With `HTTP/1.0` or `HTTP/1.1` + `Connection: close` headers, the connections should be immediately closed when EOF is received.\n", "I was tracking through how a request is sent earlier. I think we need to call `release_conn` on `Response.raw` when we know we can close the connection\n", "@bboe your server and your test works fine.\n", "@sigmavirus24 Do you mean you are unable to reproduce the problem?\n", "@bboe exact opposite. I was just going to edit that since I realized it was a bit vague. Even calling release_conn doesn't work.\n", "@sigmavirus24 Oh okay good. I was hoping I wouldn't have to find the set of platform specific settings to reproduce :) Does this mean you are going to look into this a bit then?\n", "@bboe looking into it right now.\n", "This looks like it might be urllib3. If you modify your loop to do:\n\n``` python\n\nfor x in range(5):\n print \"Request %d started\" % x\n t = requests.get('http://localhost:8000', stream=False)\n t.raw._fp.close()\n print \"Request %d finished\" % x\n```\n\nThen it won't block. We can probably fix it ourselves, but that becomes ugly.\n", "@sigmavirus24 Thanks for the quick fix. I'll use that for now.\n", "@bboe glad to help. I'm trying to figure out what the best approach might be with urllib3 for now and how to test it.\n", "We could add on to this: https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L172 that line to close it.\n\nI'm in the process of adding a close method to a urllib3 HTTPResponse to make that cleaner and nicer.\n", "Pending shazow/urllib3#132 we can add that line I mentioned after calling `release_conn` and `r.raw.close()`. This should solve the issue completely.\n\nThe other thing is that `Response.close()` doesn't return anything since `release_conn` doesn't return anything. If we want, we can also stick `self.raw.close()` in there. Any objections @kennethreitz ?\n", "@sigmavirus24 I'm thinking the issue should be fixed in urllib3. See https://github.com/kennethreitz/requests/blob/master/requests/models.py#L466\n\nIt seems that the entire content is received by requests, thus urllib3 should be aware of whether or not the connection is reusable as this point. If the connection is not re-usable, the socket should be closed.\n", "See the pull request I referenced. @shazow and I are discussing whether this \nbehaviour should implicitly be part of the `release_conn` method.\n", "PR shazow/urllib3#133 fixes this issue, and as it turns out will also fix issue #771 for all python releases prior to December 15, 2012 (that includes current releases).\n", "@bboe your PR on urllib3 was accepted and we just updated urllib3 in requests, care to close this? \n", "Awesome, thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1040
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1040/labels{/name}
https://api.github.com/repos/psf/requests/issues/1040/comments
https://api.github.com/repos/psf/requests/issues/1040/events
https://github.com/psf/requests/issues/1040
9,379,300
MDU6SXNzdWU5Mzc5MzAw
1,040
TypeError in requests.session() when using auth
{ "avatar_url": "https://avatars.githubusercontent.com/u/2047144?v=4", "events_url": "https://api.github.com/users/jfroco/events{/privacy}", "followers_url": "https://api.github.com/users/jfroco/followers", "following_url": "https://api.github.com/users/jfroco/following{/other_user}", "gists_url": "https://api.github.com/users/jfroco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jfroco", "id": 2047144, "login": "jfroco", "node_id": "MDQ6VXNlcjIwNDcxNDQ=", "organizations_url": "https://api.github.com/users/jfroco/orgs", "received_events_url": "https://api.github.com/users/jfroco/received_events", "repos_url": "https://api.github.com/users/jfroco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jfroco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jfroco/subscriptions", "type": "User", "url": "https://api.github.com/users/jfroco", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2012-12-18T19:42:56Z
2021-09-09T05:30:04Z
2012-12-18T19:44:32Z
NONE
resolved
Hello, Cant create session with auth object after upgrading to 1.0.3 used to work in 0.14.2 (This is an interactive session, I replaced < and > with //) Python 2.7.2+ (default, Oct 4 2011, 20:03:08) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. > import requests > requests.**version** > '1.0.3' > > auth = requests.auth.HTTPDigestAuth('admin','1234') > auth > //requests.auth.HTTPDigestAuth object at 0xb715c9ec// > > requests.session(auth=auth) > Traceback (most recent call last): > File "//stdin//", line 1, in //module// > File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 385, in session > return Session(**kwargs) > TypeError: **init**() got an unexpected keyword argument 'auth' > > requests.session() > //requests.sessions.Session object at 0xb715c9cc// > > auth=('user', 'pass') > auth > ('user', 'pass') > > requests.session(auth=auth) > Traceback (most recent call last): > File "//stdin//", line 1, in //module// > File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 385, in session > return Session(**kwargs) > TypeError: **init**() got an unexpected keyword argument 'auth'
{ "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/1040/reactions" }
https://api.github.com/repos/psf/requests/issues/1040/timeline
null
completed
null
null
false
[ "`session()` no longer takes parameters in its constructor. Replace the code with:\n\n``` python\nauth = requests.auth.HTTPDigestAuth('admin', '1234')\ns = requests.session()\ns.auth = auth\n```\n", "That was fast. Thank you!!!\n", "```\ns = requests.Session()\ns.auth = requests.auth.HTTPDigestAuth('admin', '1234')\n```\n", "Duplicate of #1034 and rejected patch #1039.\n" ]
https://api.github.com/repos/psf/requests/issues/1039
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1039/labels{/name}
https://api.github.com/repos/psf/requests/issues/1039/comments
https://api.github.com/repos/psf/requests/issues/1039/events
https://github.com/psf/requests/pull/1039
9,378,095
MDExOlB1bGxSZXF1ZXN0MzQxNTg0MA==
1,039
Missing safeguard in previous patch; related to #1034
{ "avatar_url": "https://avatars.githubusercontent.com/u/142113?v=4", "events_url": "https://api.github.com/users/florentx/events{/privacy}", "followers_url": "https://api.github.com/users/florentx/followers", "following_url": "https://api.github.com/users/florentx/following{/other_user}", "gists_url": "https://api.github.com/users/florentx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/florentx", "id": 142113, "login": "florentx", "node_id": "MDQ6VXNlcjE0MjExMw==", "organizations_url": "https://api.github.com/users/florentx/orgs", "received_events_url": "https://api.github.com/users/florentx/received_events", "repos_url": "https://api.github.com/users/florentx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/florentx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/florentx/subscriptions", "type": "User", "url": "https://api.github.com/users/florentx", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-18T19:08:10Z
2021-09-08T23:11:00Z
2012-12-18T19:52:28Z
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/1039/reactions" }
https://api.github.com/repos/psf/requests/issues/1039/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1039.diff", "html_url": "https://github.com/psf/requests/pull/1039", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1039.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1039" }
true
[ "No.\n" ]
https://api.github.com/repos/psf/requests/issues/1038
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1038/labels{/name}
https://api.github.com/repos/psf/requests/issues/1038/comments
https://api.github.com/repos/psf/requests/issues/1038/events
https://github.com/psf/requests/pull/1038
9,377,647
MDExOlB1bGxSZXF1ZXN0MzQxNTU4OQ==
1,038
Restore the requests.session(...) helper pre-1.0 for #1034
{ "avatar_url": "https://avatars.githubusercontent.com/u/142113?v=4", "events_url": "https://api.github.com/users/florentx/events{/privacy}", "followers_url": "https://api.github.com/users/florentx/followers", "following_url": "https://api.github.com/users/florentx/following{/other_user}", "gists_url": "https://api.github.com/users/florentx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/florentx", "id": 142113, "login": "florentx", "node_id": "MDQ6VXNlcjE0MjExMw==", "organizations_url": "https://api.github.com/users/florentx/orgs", "received_events_url": "https://api.github.com/users/florentx/received_events", "repos_url": "https://api.github.com/users/florentx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/florentx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/florentx/subscriptions", "type": "User", "url": "https://api.github.com/users/florentx", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2012-12-18T18:54:27Z
2021-09-08T18:01:10Z
2012-12-18T18:56:23Z
NONE
resolved
A lightweight change to keep the stuff simple for developers.
{ "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/1038/reactions" }
https://api.github.com/repos/psf/requests/issues/1038/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1038.diff", "html_url": "https://github.com/psf/requests/pull/1038", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1038.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1038" }
true
[]
https://api.github.com/repos/psf/requests/issues/1037
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1037/labels{/name}
https://api.github.com/repos/psf/requests/issues/1037/comments
https://api.github.com/repos/psf/requests/issues/1037/events
https://github.com/psf/requests/pull/1037
9,369,640
MDExOlB1bGxSZXF1ZXN0MzQxMTI5Mw==
1,037
Fix #1036
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2012-12-18T14:46:00Z
2021-09-08T18:01:10Z
2012-12-18T18:09:33Z
CONTRIBUTOR
resolved
I can only assume that the only possible thing to close on a session are the adapters. As such, I wrote the close method for a session object which closes all possible adapters.
{ "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/1037/reactions" }
https://api.github.com/repos/psf/requests/issues/1037/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1037.diff", "html_url": "https://github.com/psf/requests/pull/1037", "merged_at": "2012-12-18T18:09:33Z", "patch_url": "https://github.com/psf/requests/pull/1037.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1037" }
true
[ "+1, let's also add a `passing`close` method to the base adapter\n", "Instead of raising `NotImplementedError`?\n", "We could do that. My thought was that some connection adapters won't need to close.\n", "I'm still unsure what you meant, sorry.\n", "nevermind, it's fine as-is :)\n" ]
https://api.github.com/repos/psf/requests/issues/1036
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1036/labels{/name}
https://api.github.com/repos/psf/requests/issues/1036/comments
https://api.github.com/repos/psf/requests/issues/1036/events
https://github.com/psf/requests/issues/1036
9,367,306
MDU6SXNzdWU5MzY3MzA2
1,036
session as context manager does not work properly
{ "avatar_url": "https://avatars.githubusercontent.com/u/373249?v=4", "events_url": "https://api.github.com/users/rslinckx/events{/privacy}", "followers_url": "https://api.github.com/users/rslinckx/followers", "following_url": "https://api.github.com/users/rslinckx/following{/other_user}", "gists_url": "https://api.github.com/users/rslinckx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rslinckx", "id": 373249, "login": "rslinckx", "node_id": "MDQ6VXNlcjM3MzI0OQ==", "organizations_url": "https://api.github.com/users/rslinckx/orgs", "received_events_url": "https://api.github.com/users/rslinckx/received_events", "repos_url": "https://api.github.com/users/rslinckx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rslinckx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rslinckx/subscriptions", "type": "User", "url": "https://api.github.com/users/rslinckx", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-18T13:31:42Z
2021-09-09T05:30:06Z
2012-12-18T18:09:34Z
NONE
resolved
``` s = requests.session() with s: print s ``` This gives: AttributeError: 'Session' object has no attribute 'close' I see in the code that it does self.close() but there is no such method. My guess is that it is supposed to call something like: ``` for adapter in self.adapters.itervalues(): adapter.close() ``` but i'm not sure about thread-safety of this approach...
{ "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/1036/reactions" }
https://api.github.com/repos/psf/requests/issues/1036/timeline
null
completed
null
null
false
[ "This is fixed now\n" ]
https://api.github.com/repos/psf/requests/issues/1035
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1035/labels{/name}
https://api.github.com/repos/psf/requests/issues/1035/comments
https://api.github.com/repos/psf/requests/issues/1035/events
https://github.com/psf/requests/issues/1035
9,362,450
MDU6SXNzdWU5MzYyNDUw
1,035
Broken cookies persistence in version 1.0.2
{ "avatar_url": "https://avatars.githubusercontent.com/u/961059?v=4", "events_url": "https://api.github.com/users/kr41/events{/privacy}", "followers_url": "https://api.github.com/users/kr41/followers", "following_url": "https://api.github.com/users/kr41/following{/other_user}", "gists_url": "https://api.github.com/users/kr41/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kr41", "id": 961059, "login": "kr41", "node_id": "MDQ6VXNlcjk2MTA1OQ==", "organizations_url": "https://api.github.com/users/kr41/orgs", "received_events_url": "https://api.github.com/users/kr41/received_events", "repos_url": "https://api.github.com/users/kr41/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kr41/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kr41/subscriptions", "type": "User", "url": "https://api.github.com/users/kr41", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2012-12-18T09:57:00Z
2021-09-09T05:30:07Z
2012-12-18T18:03:30Z
NONE
resolved
I've just updated from 0.14.2 to 1.0.2 and got broken code, which is depended on cookies persistence. ``` session = requests.session() response = session.get('http://example.com/page-1') print 'Request 1' print response.request.headers print '------------------------------------------------' response = session.get('http://example.com/page-2') print 'Request 2' print response.request.headers print '------------------------------------------------' ``` In version 0.14.2 I got: ``` Request 1 {'Accept-Encoding': 'gzip, deflate, compress', 'Accept': '*/*', 'User-Agent': 'python-requests/0.14.2 CPython/2.7.3 Linux/3.2.0-34-amd64'} ------------------------------------------------ Request 2 {'Cookie': '...', 'Accept-Encoding': 'gzip, deflate, compress', 'Accept': '*/*', 'User-Agent': 'python-requests/0.14.2 CPython/2.7.3 Linux/3.2.0-34-amd64'} ------------------------------------------------ ``` But in version 1.0.2 output is: ``` Request 1 {'Content-Length': '0', 'Accept-Encoding': 'gzip, deflate, compress', 'Accept': '*/*', 'User-Agent': 'python-requests/1.0.2 CPython/2.7.3 Linux/3.2.0-34-amd64'} ------------------------------------------------ Request 2 {'Content-Length': '0', 'Accept-Encoding': 'gzip, deflate, compress', 'Accept': '*/*', 'User-Agent': 'python-requests/1.0.2 CPython/2.7.3 Linux/3.2.0-34-amd64'} ```
{ "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/1035/reactions" }
https://api.github.com/repos/psf/requests/issues/1035/timeline
null
completed
null
null
false
[ "This has been fixed but the fix hasn't been released yet\n", "Actually I may have spoken too soon. Looks like @kennethreitz just tagged v1.0.3 which means it is probably on PyPI. Try doing `pip install -U requests` and let us know if this is resolved (which it should be).\n", "Yep, It's fixed. Thanks guys!\n" ]
https://api.github.com/repos/psf/requests/issues/1034
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1034/labels{/name}
https://api.github.com/repos/psf/requests/issues/1034/comments
https://api.github.com/repos/psf/requests/issues/1034/events
https://github.com/psf/requests/issues/1034
9,359,913
MDU6SXNzdWU5MzU5OTEz
1,034
__init__() got an unexpected keyword argument 'verify'
{ "avatar_url": "https://avatars.githubusercontent.com/u/142113?v=4", "events_url": "https://api.github.com/users/florentx/events{/privacy}", "followers_url": "https://api.github.com/users/florentx/followers", "following_url": "https://api.github.com/users/florentx/following{/other_user}", "gists_url": "https://api.github.com/users/florentx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/florentx", "id": 142113, "login": "florentx", "node_id": "MDQ6VXNlcjE0MjExMw==", "organizations_url": "https://api.github.com/users/florentx/orgs", "received_events_url": "https://api.github.com/users/florentx/received_events", "repos_url": "https://api.github.com/users/florentx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/florentx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/florentx/subscriptions", "type": "User", "url": "https://api.github.com/users/florentx", "user_view_type": "public" }
[]
closed
true
null
[]
null
25
2012-12-18T08:01:01Z
2014-10-13T13:41:54Z
2012-12-18T09:46:06Z
NONE
null
``` requests.session(**kwargs) Returns a Session for context-management. ``` This not longer works: ``` session = requests.Session(verify=not staging) TypeError: __init__() got an unexpected keyword argument 'verify' ```
{ "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/1034/reactions" }
https://api.github.com/repos/psf/requests/issues/1034/timeline
null
completed
null
null
false
[ "`Session` no longer takes arguments in its constructor. Currently the documentation is out of date on this.\n\nTo achieve the same effect, replace your code with this:\n\n``` python\nsession = requests.Session()\nsession.verify = False\n```\n\nLeaving this open for a docs fix.\n", "Indeed, the documentation needs fixing.\nIt was changed with rev 92355ada54a3a19341f7fbc65a8bc50816858c63.\n\nWhat is the rationale for this change? It seems that the kwargs initialization is a common pattern.\nWith regard to the principle of least surprise, I would maintain the feature.\n", "v1.0.0 is a breaking change, there's no requirement to maintain the API. =) Kenneth thinks this API is better/cleaner.\n", "Nitpicking, it seems that this change is post-1.0. when I look at the commit history :-)\n\nBy the way, the second example on this page becomes obsolete. And the replacement is less elegant.\nhttp://docs.python-requests.org/en/v1.0.0/user/advanced/#session-objects\n", "This was not post-1.0.\n", "Yeah, it was part of the refactoring pre-1.0.\n\nAny chance to update the documentation before closing this ?\nAnd there's a left-over helper which does not help anymore in requests/sessions.py at the very end.\n\nIf the decision is definitive, it should be removed to avoid confusion.\n\n```\ndef session(**kwargs):\n \"\"\"Returns a :class:`Session` for context-management.\"\"\"\n\n return Session(**kwargs)\n```\n\nThank you.\n", "Nice catch, thanks.\n", "Yeah, I still want to take a pass at the Sessions documentation, it's wrong. Don't need the issue open for it though.\n", "fixed\n", "Not in `advanced.rst` it isn't. ;) First section, entitled **Session Objects** needs a rewrite.\n", "Not the docs, the **kwargs\n", "Oh, balls. :frowning:\n", "> Kenneth thinks this API is better/cleaner.\n\n@kennethreitz \n\nDo you, really? If yes, can you reference any articles proposing this or libraries doing this?\n", "@piotr-dobrogost: can you stop harassing me?\n", "I'm not convinced at all of the benefit of this particular change of the API 1.0...\nIt makes some usage less simple without an obvious explanation.\nAnd we need to freeze the dependency to requests 0.14.2 to keep the code simple.\n\nFor example this example from the documentation becomes less elegant (in my opinion)\n\n```\nheaders = {'x-test': 'true'}\nauth = ('user', 'pass')\n\nwith requests.session(auth=auth, headers=headers) as c:\n\n # both 'x-test' and 'x-test2' are sent\n c.get('http://httpbin.org/headers', headers={'x-test2': 'true'})\n```\n", "This is not up for debate. \n", "... said the Benevolent Dictator of Requests, without further comment.\n\n;)\n", "Essentially, the old code was quite complicated, hard to maintain, and included a _lot_ of duplication. Now it doesn't.\n", "This proposal is an uncomplicated patch to make the thing more convenient for simple use cases.\n", "No.\n", "> can you stop harassing me?\n\n@kennethreitz \n\nI can't stop doing something I never started :) Relax. Whenever somebody states (Lukasa in this case) what the other person thinks (you in this case) I want to confirm if it's really the case. That's the reason I asked if you really think this API is better/cleaner. Not using parameters in a constructor of rather complex object in object orientated language is novelty to me. That's the reason I asked about some references. As everybody can see both questions are natural and I have no idea why did you come up with this harassment thing.\n", "@piotr-dobrogost While I do not like that decisison either API design is mainly based on a subjective point of view so there is nothing to discuss here. I have now read multiple issues in requests within the range of a few years and in all of them (!) you are trolling. Please stop doing that you are not helpful.\n", "_I have now read multiple issues in requests within the range of a few years and in all of them (!) you are trolling._\nI do not agree with your assessment but nevertheless I'm sad to hear this. Everything I write I do with good faith and if somebody feels offended in any way then I sincerely apologize. Please notice that I post in a few projects here on github and only in this one I met with negative reactions to my posts. I would like to ask you to refrain from making such generalizations in the future as they are most of the time false (this one is such a case). Also I find the word \"trolling\" meaningless and instead of using it I would rather describe what exactly and why do I find inappropriate.\nI do find your posts and work in this project valuable and would like to remember you based on what I've seen so far and try to forget about this comment.\n", "Thanks the two of you, but can you take this off the issue? I'm locking the issue down because it's closed and two years old.\n", "@schlamar I would also remind you of the fact that attacks on other contributors are not welcome here. If you aren't going to be cordial towards @piotr-dobrogost and every other contributor to requests, you will not [be welcomed](http://www.kennethreitz.org/essays/be-cordial-or-be-on-your-way) here. No contributor to this project has the right to attack another and it will not be tolerated.\n" ]
https://api.github.com/repos/psf/requests/issues/1033
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1033/labels{/name}
https://api.github.com/repos/psf/requests/issues/1033/comments
https://api.github.com/repos/psf/requests/issues/1033/events
https://github.com/psf/requests/pull/1033
9,359,879
MDExOlB1bGxSZXF1ZXN0MzQwNjQ1NA==
1,033
restore old certificate bundle behavior
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-18T07:59:10Z
2021-09-08T23:06:25Z
2012-12-23T10:32:26Z
CONTRIBUTOR
resolved
Since a CA bundle started being vendored inside Requests, it always overrides the OS bundle. This changes the preference order to be packaged certifi, then the OS bundle, then the vendored bundle, allowing managed environments to use their system bundles by simply omitting a certifi package. References: #557
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "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/1033/reactions" }
https://api.github.com/repos/psf/requests/issues/1033/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1033.diff", "html_url": "https://github.com/psf/requests/pull/1033", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/1033.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1033" }
true
[ "This will cause bugs for many users. I'd rather just provide a nice documented way for them to disable the built in one.\n", "Hmm, something went wrong. I'll fix this up and make a new pull request (it doesn't seem to like the rebase either).\n" ]
https://api.github.com/repos/psf/requests/issues/1032
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1032/labels{/name}
https://api.github.com/repos/psf/requests/issues/1032/comments
https://api.github.com/repos/psf/requests/issues/1032/events
https://github.com/psf/requests/issues/1032
9,354,757
MDU6SXNzdWU5MzU0NzU3
1,032
restore test coverage post-1.x
{ "avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4", "events_url": "https://api.github.com/users/slingamn/events{/privacy}", "followers_url": "https://api.github.com/users/slingamn/followers", "following_url": "https://api.github.com/users/slingamn/following{/other_user}", "gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/slingamn", "id": 376448, "login": "slingamn", "node_id": "MDQ6VXNlcjM3NjQ0OA==", "organizations_url": "https://api.github.com/users/slingamn/orgs", "received_events_url": "https://api.github.com/users/slingamn/received_events", "repos_url": "https://api.github.com/users/slingamn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/slingamn/subscriptions", "type": "User", "url": "https://api.github.com/users/slingamn", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-18T01:28:54Z
2021-09-09T05:00:42Z
2013-02-10T22:41:21Z
CONTRIBUTOR
resolved
It looks like a lot of tests didn't make it into 1.x, in particular, the cookie tests in `tests/test_cookies.py`. Compare #1027.
{ "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/1032/reactions" }
https://api.github.com/repos/psf/requests/issues/1032/timeline
null
completed
null
null
false
[ "The test suite was something I hated. It was overly complex. I'm much happier with the new one.\n\nLet's keep adding things into test_requests.py\n", "Cool, I'll plan to send pull requests adding back some of the removed tests.\n" ]
https://api.github.com/repos/psf/requests/issues/1031
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1031/labels{/name}
https://api.github.com/repos/psf/requests/issues/1031/comments
https://api.github.com/repos/psf/requests/issues/1031/events
https://github.com/psf/requests/pull/1031
9,354,649
MDExOlB1bGxSZXF1ZXN0MzQwNDAyOA==
1,031
Just a bit of linting
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2012-12-18T01:21:33Z
2021-09-08T18:01:10Z
2012-12-18T05:44:56Z
CONTRIBUTOR
resolved
Mostly removed a whole bunch of unused imports.
{ "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/1031/reactions" }
https://api.github.com/repos/psf/requests/issues/1031/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1031.diff", "html_url": "https://github.com/psf/requests/pull/1031", "merged_at": "2012-12-18T05:44:56Z", "patch_url": "https://github.com/psf/requests/pull/1031.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1031" }
true
[ "thanks!\n", "Always welcome @kennethreitz \n" ]
https://api.github.com/repos/psf/requests/issues/1030
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1030/labels{/name}
https://api.github.com/repos/psf/requests/issues/1030/comments
https://api.github.com/repos/psf/requests/issues/1030/events
https://github.com/psf/requests/pull/1030
9,354,505
MDExOlB1bGxSZXF1ZXN0MzQwMzk0Ng==
1,030
Fix issue 1027. Always persist cookies.
{ "avatar_url": "https://avatars.githubusercontent.com/u/48100?v=4", "events_url": "https://api.github.com/users/bboe/events{/privacy}", "followers_url": "https://api.github.com/users/bboe/followers", "following_url": "https://api.github.com/users/bboe/following{/other_user}", "gists_url": "https://api.github.com/users/bboe/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bboe", "id": 48100, "login": "bboe", "node_id": "MDQ6VXNlcjQ4MTAw", "organizations_url": "https://api.github.com/users/bboe/orgs", "received_events_url": "https://api.github.com/users/bboe/received_events", "repos_url": "https://api.github.com/users/bboe/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bboe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bboe/subscriptions", "type": "User", "url": "https://api.github.com/users/bboe", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2012-12-18T01:14:24Z
2021-09-08T23:08:26Z
2012-12-18T05:45:49Z
CONTRIBUTOR
resolved
Fixes #1027. All tests pass in python2.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/1030/reactions" }
https://api.github.com/repos/psf/requests/issues/1030/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/1030.diff", "html_url": "https://github.com/psf/requests/pull/1030", "merged_at": "2012-12-18T05:45:49Z", "patch_url": "https://github.com/psf/requests/pull/1030.patch", "url": "https://api.github.com/repos/psf/requests/pulls/1030" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/1029
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/1029/labels{/name}
https://api.github.com/repos/psf/requests/issues/1029/comments
https://api.github.com/repos/psf/requests/issues/1029/events
https://github.com/psf/requests/issues/1029
9,354,159
MDU6SXNzdWU5MzU0MTU5
1,029
Since 1.0, seeing a large amount of "Cannot assign requested address" socket.errors
{ "avatar_url": "https://avatars.githubusercontent.com/u/49469?v=4", "events_url": "https://api.github.com/users/gmr/events{/privacy}", "followers_url": "https://api.github.com/users/gmr/followers", "following_url": "https://api.github.com/users/gmr/following{/other_user}", "gists_url": "https://api.github.com/users/gmr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gmr", "id": 49469, "login": "gmr", "node_id": "MDQ6VXNlcjQ5NDY5", "organizations_url": "https://api.github.com/users/gmr/orgs", "received_events_url": "https://api.github.com/users/gmr/received_events", "repos_url": "https://api.github.com/users/gmr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gmr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gmr/subscriptions", "type": "User", "url": "https://api.github.com/users/gmr", "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
8
2012-12-18T00:56:01Z
2021-09-09T05:30:06Z
2012-12-18T02:51:40Z
NONE
resolved
(Caused by <class 'socket.error'>: [Errno 99] Cannot assign requested address) ConnectionError(MaxRetryError("HTTPConnectionPool(host='foo', port=80): Max retries exceeded with url: /path (Caused by <class 'socket.error'>: [Errno 99] Cannot assign requested address)",),) I do not have this behavior on boxes that have not upgraded and are making the same GET requests.
{ "avatar_url": "https://avatars.githubusercontent.com/u/49469?v=4", "events_url": "https://api.github.com/users/gmr/events{/privacy}", "followers_url": "https://api.github.com/users/gmr/followers", "following_url": "https://api.github.com/users/gmr/following{/other_user}", "gists_url": "https://api.github.com/users/gmr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gmr", "id": 49469, "login": "gmr", "node_id": "MDQ6VXNlcjQ5NDY5", "organizations_url": "https://api.github.com/users/gmr/orgs", "received_events_url": "https://api.github.com/users/gmr/received_events", "repos_url": "https://api.github.com/users/gmr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gmr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gmr/subscriptions", "type": "User", "url": "https://api.github.com/users/gmr", "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/1029/reactions" }
https://api.github.com/repos/psf/requests/issues/1029/timeline
null
completed
null
null
false
[ "I've not been able to create a reproducible test case for this that I can export. I did find a upstream bug in my code due to it though where things that were supposed to be memoized were not.\n\nOn a side note, with the removal of the requests.default class, all that 1.0 has for impacting pool size is changing the constants which seems a bit hacky.\n", "@gmr if you think it is the pool size, try subclassing the `HTTPAdapter`, e.g.,\n\n``` python\nfrom requests.adapters import HTTPAdapter\n\n\nclass GMRAdapter(HTTPAdapter):\n def __init__(self):\n super(GMRAdapter, self).__init__(GMR_CONNECTIONS_SIZE, GMR_POOL_SIZE)\n\n\nsession.adapters['http'] = GMRAdapter()\nsession.adapters['https'] = GMRAdapter()\n```\n\n**Edit** where session above is a `Session` instance that you've already created.\n", "I did bump the pool size and combined with my fix (to the upstream caching code), that addressed my issue. I'll keep the adapter subclassing in mind. Thanks!\n", "Hmm, I don't think the defaults changed. Should we change the defaults?\n", "Sorry I was not more clear. I meant you removed the API (requests.defaults) for setting those values.\n", "Ah, correct. This was intentional.\n", "Also, I forgot session objects now have the `mount` method, i.e.\n\n``` python\nsession.mount('http://', GMRAdapter())\nsession.mount('https://', GMRAdapter())\n```\n", "+1\n" ]