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/228
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/228/labels{/name}
https://api.github.com/repos/psf/requests/issues/228/comments
https://api.github.com/repos/psf/requests/issues/228/events
https://github.com/psf/requests/issues/228
2,063,267
MDU6SXNzdWUyMDYzMjY3
228
Wrong default param `config` in requests.model.Request.__init__
{ "avatar_url": "https://avatars.githubusercontent.com/u/68183?v=4", "events_url": "https://api.github.com/users/mrtazz/events{/privacy}", "followers_url": "https://api.github.com/users/mrtazz/followers", "following_url": "https://api.github.com/users/mrtazz/following{/other_user}", "gists_url": "https://api.github.com/users/mrtazz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrtazz", "id": 68183, "login": "mrtazz", "node_id": "MDQ6VXNlcjY4MTgz", "organizations_url": "https://api.github.com/users/mrtazz/orgs", "received_events_url": "https://api.github.com/users/mrtazz/received_events", "repos_url": "https://api.github.com/users/mrtazz/repos", "site_admin": true, "starred_url": "https://api.github.com/users/mrtazz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrtazz/subscriptions", "type": "User", "url": "https://api.github.com/users/mrtazz", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-10-27T00:15:25Z
2021-09-09T11:00:55Z
2011-11-13T00:11:05Z
CONTRIBUTOR
resolved
The default value [here](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L55) should be `dict()` as otherwise the config parsing below results in `AttributeError: 'NoneType' object has no attribute 'get'` if no config is passed.
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/228/reactions" }
https://api.github.com/repos/psf/requests/issues/228/timeline
null
completed
null
null
false
[ "This has bitten me today.\n\nKenneth, you setup `config` in `Session`. Some project might need to create `Request` objects without having to create a `Session` before. Maybe you should move `config` setdefaults to the `Request` constructor. \n\nRegards,\nMiguel\n", "The config default value as dict() seems to have been fixed in [this commit](https://github.com/kennethreitz/requests/commit/35ed9b5f38ea9fa210658d555dbb8e1a71fb66d8). I believe those statements are equivalent to just having dict() as the default value, so I'm not sure why it's in this particular form. \n" ]
https://api.github.com/repos/psf/requests/issues/227
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/227/labels{/name}
https://api.github.com/repos/psf/requests/issues/227/comments
https://api.github.com/repos/psf/requests/issues/227/events
https://github.com/psf/requests/issues/227
2,062,459
MDU6SXNzdWUyMDYyNDU5
227
session hooks doesn't work with v0.7.3
{ "avatar_url": "https://avatars.githubusercontent.com/u/13985?v=4", "events_url": "https://api.github.com/users/bulkan/events{/privacy}", "followers_url": "https://api.github.com/users/bulkan/followers", "following_url": "https://api.github.com/users/bulkan/following{/other_user}", "gists_url": "https://api.github.com/users/bulkan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bulkan", "id": 13985, "login": "bulkan", "node_id": "MDQ6VXNlcjEzOTg1", "organizations_url": "https://api.github.com/users/bulkan/orgs", "received_events_url": "https://api.github.com/users/bulkan/received_events", "repos_url": "https://api.github.com/users/bulkan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bulkan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bulkan/subscriptions", "type": "User", "url": "https://api.github.com/users/bulkan", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-10-26T22:26:20Z
2021-09-09T11:01:01Z
2011-10-26T22:35:07Z
NONE
resolved
I was able to add a hook to a session object in v0.6.x but now it doesn't work ``` def print_url(args): print args['url'] session = requests.session(hooks=dict(args=print_url)) session.get('http://httpbin.org/') ``` Any ideas ?
{ "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/227/reactions" }
https://api.github.com/repos/psf/requests/issues/227/timeline
null
completed
null
null
false
[ "Yikes, sorry about that. I need to add some tests for hooks.\n", "v0.7.4 was just released, which fixes this.\n", "Awesome and thanks for that :)\n" ]
https://api.github.com/repos/psf/requests/issues/226
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/226/labels{/name}
https://api.github.com/repos/psf/requests/issues/226/comments
https://api.github.com/repos/psf/requests/issues/226/events
https://github.com/psf/requests/issues/226
2,049,343
MDU6SXNzdWUyMDQ5MzQz
226
How do I use PATCH with an external json file?
{ "avatar_url": "https://avatars.githubusercontent.com/u/91275?v=4", "events_url": "https://api.github.com/users/tlam/events{/privacy}", "followers_url": "https://api.github.com/users/tlam/followers", "following_url": "https://api.github.com/users/tlam/following{/other_user}", "gists_url": "https://api.github.com/users/tlam/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tlam", "id": 91275, "login": "tlam", "node_id": "MDQ6VXNlcjkxMjc1", "organizations_url": "https://api.github.com/users/tlam/orgs", "received_events_url": "https://api.github.com/users/tlam/received_events", "repos_url": "https://api.github.com/users/tlam/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tlam/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tlam/subscriptions", "type": "User", "url": "https://api.github.com/users/tlam", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-10-25T20:18:05Z
2021-09-09T11:00:59Z
2011-10-25T20:28:21Z
NONE
resolved
I'm currently trying to translate the example given at http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_update_fields.htm into requests. The corresponding PATCH action is: ``` curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/001D000000INjVe -H "Authorization: OAuth token" -H "X-PrettyPrint:1" -H "Content-Type: application/json" -d @patchaccount.json -X PATCH ``` With json: ``` { "BillingCity" : "San Francisco" } ``` My current code looks like: ``` import requests data = {'BillingCity': 'San Francisco'} url = 'https://na1.salesforce.com/services/data/v20.0/sobjects/Account/001D000000INjVe' headers = { 'Authorization': 'OAuth token', 'Content-Type': 'application/json', } r = requests.patch(url, headers=headers, data=data) ``` Apparently, I'm missing something from the above. Is there a way to use PATCH in requests without writing the json content in an external file?
{ "avatar_url": "https://avatars.githubusercontent.com/u/91275?v=4", "events_url": "https://api.github.com/users/tlam/events{/privacy}", "followers_url": "https://api.github.com/users/tlam/followers", "following_url": "https://api.github.com/users/tlam/following{/other_user}", "gists_url": "https://api.github.com/users/tlam/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tlam", "id": 91275, "login": "tlam", "node_id": "MDQ6VXNlcjkxMjc1", "organizations_url": "https://api.github.com/users/tlam/orgs", "received_events_url": "https://api.github.com/users/tlam/received_events", "repos_url": "https://api.github.com/users/tlam/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tlam/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tlam/subscriptions", "type": "User", "url": "https://api.github.com/users/tlam", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/226/reactions" }
https://api.github.com/repos/psf/requests/issues/226/timeline
null
completed
null
null
false
[ "Oops, was using older version of requests from pypi, bug was fixed in latest version.\n", "Sorry for the delayed response! Glad you got it figured out :)\n" ]
https://api.github.com/repos/psf/requests/issues/225
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/225/labels{/name}
https://api.github.com/repos/psf/requests/issues/225/comments
https://api.github.com/repos/psf/requests/issues/225/events
https://github.com/psf/requests/issues/225
2,042,681
MDU6SXNzdWUyMDQyNjgx
225
proxychains + (socks & https proxy support)
{ "avatar_url": "https://avatars.githubusercontent.com/u/67157?v=4", "events_url": "https://api.github.com/users/grugq/events{/privacy}", "followers_url": "https://api.github.com/users/grugq/followers", "following_url": "https://api.github.com/users/grugq/following{/other_user}", "gists_url": "https://api.github.com/users/grugq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/grugq", "id": 67157, "login": "grugq", "node_id": "MDQ6VXNlcjY3MTU3", "organizations_url": "https://api.github.com/users/grugq/orgs", "received_events_url": "https://api.github.com/users/grugq/received_events", "repos_url": "https://api.github.com/users/grugq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/grugq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/grugq/subscriptions", "type": "User", "url": "https://api.github.com/users/grugq", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-10-25T08:35:15Z
2021-09-09T10:00:49Z
2011-11-26T15:59:18Z
NONE
resolved
I'd quite like to see Requests have support for proxy chaining. The actual code is pretty straight forward from what I can make of this implementation: https://github.com/pagekite/PySocksipyChain/ The httplib2 module supports both SOCKS and HTTPS proxies via the same terrible library (sockipy, as I recall). It is very frustrating to work with, so I'd recommend clean implementations of SOCKS and HTTPS proxy support. So if you can, supporting more than a single instance of a single proxy+protocol would be great. thanks, gq
{ "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/225/reactions" }
https://api.github.com/repos/psf/requests/issues/225/timeline
null
completed
null
null
false
[ "While this is quite an edge case, I'd love to see this implemented myself. \n\nI have to wonder, though  — why not just set up a local proxy that does the chaining for you?\n", "I think I'm going to close this (for now) for being out of scope. \n\nUnless someone else implements, of course. Otherwise, I have no desire to do so :)\n", "The local proxy option is a reasonable alternative, but not always practical. If I get around to requiring this functionality again, I'll do the change myself and send a pull request. \n\ncheers.\n", "That would be quite welcome! (assuming it isn't too difficult to maintain)\n", "from what I've seen, it is basically just iterating over a list of proxies (e.g. (proto, addr, port)) and issuing the correct \"proxy_connect_%s'%proto call as you go. At a wild guess (ignoring the actual proxy connection code) something like 10-15 lines diff from now? ... \n\nthe proxy connection code is more problematic as it would require either writing SOCKS4/5 + HTTPS proxy support, or trying to find a usable 3rd party module as a dependency. I know of know usable 3rd party modules. (none that I'd want near my code anyway ;)\n", "I'm gonna be cheeky and leave this here, just so I can find it later should I return to this (or if someone else is inspired to try it, heres a reference implementation):\n\nhttps://github.com/pagekite/PySocksipyChain/blob/master/sockschain/__init__.py#L923\n" ]
https://api.github.com/repos/psf/requests/issues/224
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/224/labels{/name}
https://api.github.com/repos/psf/requests/issues/224/comments
https://api.github.com/repos/psf/requests/issues/224/events
https://github.com/psf/requests/pull/224
2,038,883
MDExOlB1bGxSZXF1ZXN0NDI5MTY4
224
Syntax error for Python 2.5
{ "avatar_url": "https://avatars.githubusercontent.com/u/1129098?v=4", "events_url": "https://api.github.com/users/stoey/events{/privacy}", "followers_url": "https://api.github.com/users/stoey/followers", "following_url": "https://api.github.com/users/stoey/following{/other_user}", "gists_url": "https://api.github.com/users/stoey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stoey", "id": 1129098, "login": "stoey", "node_id": "MDQ6VXNlcjExMjkwOTg=", "organizations_url": "https://api.github.com/users/stoey/orgs", "received_events_url": "https://api.github.com/users/stoey/received_events", "repos_url": "https://api.github.com/users/stoey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stoey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stoey/subscriptions", "type": "User", "url": "https://api.github.com/users/stoey", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-24T21:34:32Z
2021-09-08T23:10:58Z
2011-10-25T00:54:05Z
CONTRIBUTOR
resolved
Pull request for Issue #208 Sorry it's from master rather then develop (my git fu is lacking). This patch aims to emulate the Python 2.6 behavior as closely as possible.
{ "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/224/reactions" }
https://api.github.com/repos/psf/requests/issues/224/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/224.diff", "html_url": "https://github.com/psf/requests/pull/224", "merged_at": "2011-10-25T00:54:05Z", "patch_url": "https://github.com/psf/requests/pull/224.patch", "url": "https://api.github.com/repos/psf/requests/pulls/224" }
true
[ "Thanks for the catch!\n" ]
https://api.github.com/repos/psf/requests/issues/223
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/223/labels{/name}
https://api.github.com/repos/psf/requests/issues/223/comments
https://api.github.com/repos/psf/requests/issues/223/events
https://github.com/psf/requests/issues/223
2,035,471
MDU6SXNzdWUyMDM1NDcx
223
Content-Length is missing
{ "avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4", "events_url": "https://api.github.com/users/foxx/events{/privacy}", "followers_url": "https://api.github.com/users/foxx/followers", "following_url": "https://api.github.com/users/foxx/following{/other_user}", "gists_url": "https://api.github.com/users/foxx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/foxx", "id": 651797, "login": "foxx", "node_id": "MDQ6VXNlcjY1MTc5Nw==", "organizations_url": "https://api.github.com/users/foxx/orgs", "received_events_url": "https://api.github.com/users/foxx/received_events", "repos_url": "https://api.github.com/users/foxx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/foxx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/foxx/subscriptions", "type": "User", "url": "https://api.github.com/users/foxx", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
true
null
[]
null
63
2011-10-24T16:21:43Z
2021-09-08T23:10:51Z
2012-11-25T03:54:30Z
NONE
resolved
Please see the following example ``` _data = """callCount=1 page=/internetsales/iSnapVehicle.xhtml?_gk=_c083894BB-4392-5290-8580-DE159D03B2B0_k9C5EF4F0-0269-3CC9-0994-633224433265 httpSessionId= scriptSessionId=DD51AC690A8BC3BEDB1AEDF1B2A7A9DD575 c0-scriptName=PresentationRulesFacade c0-methodName=execute c0-id=0 c0-param0=string:VehicleForm c0-param1=string:VehicleForm%3Amake c0-param2=string:%7B%22VehicleForm%3AdaysDriven%22%20%3A%20%221%22%2C%20%22VehicleForm%3AmilesDriven%22%20%3A%20%220%22%2C%20%22VehicleForm%3Ayear%22%20%3A%20%221998%22%2C%20%22VehicleForm%3AestimatedMileage%22%20%3A%20%22%22%2C%20%22VehicleForm%3AodometerReading%22%20%3A%20%22%22%2C%20%22VehicleForm%3Amake%22%20%3A%20%22AUDI%22%2C%20%22VehicleForm%3Ayear-txt%22%20%3A%20%22%22%2C%20%22VehicleForm%3Amake-txt%22%20%3A%20%22%22%2C%20%22VehicleForm%3Amodel-txt%22%20%3A%20%22%22%2C%20%22VehicleForm%3AmodelDesc%22%20%3A%20%22Other%22%2C%20%22VehicleForm%3Amodel%22%20%3A%20%22Other%22%2C%20%22VehicleForm%3Abodystyle%22%20%3A%20%22VAN%22%7D c0-param3=boolean:false batchId=327 """ print len(_data) _headers = { 'referer' : 'https://sales2.geico.com/internetsales/iSnapVehicle.xhtml?_gk=_c083894BB-4392-5290-8580-DE159D03B2B0_k9C5EF4F0-0269-3CC9-0994-633224433265' } r = requests.post( url = 'https://sales2.geico.com/internetsales/dwr/call/plaincall/PresentationRulesFacade.execute.dwr', data = _data, headers = _headers ) print r.request.headers {'referer': 'https://sales2.geico.com/internetsales/iSnapVehicle.xhtml?_gk=_c083894BB-4392-5290-8580-DE159D03B2B0_k9C5EF4F0-0269-3CC9-0994-633224433265', 'Accept-Encoding': 'identity, deflate, compress, gzip', 'User-Agent': 'python-requests/0.7.3'} ``` In this example, the 'Content-Length' is missing. Haven't got any spare time to try and patch the bug - as this was only a quick test to explore new libs. Cal [revised post 3 - multiple edits due to mistake on bug report]
{ "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/223/reactions" }
https://api.github.com/repos/psf/requests/issues/223/timeline
null
completed
null
null
false
[ "Should be good now\n", "``` python\nimport requests\nURL = \"http://github.com\"\n\ng_url = \"http://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ\"\nparams = {\n 'method': 'pos.plusones.get',\n 'id': 'p',\n 'params': {\n 'nolog': 'true',\n 'id': URL,\n 'source': 'widget',\n 'userId': '@viewer',\n 'groupId':'@self'\n },\n 'jsonrpc': '2.0',\n 'key': 'p',\n 'apiVersion': 'v1'\n}\nheaders = {\n 'Content-type': 'application/json'\n}\n\nr = requests.post(g_url, params=params, headers=headers)\nprint r.request.headers\n```\n\ncontent length still isn't set in this code with version 0.8.3\n", "You're not uploading any body. Why would there be a content-length?\n", "kennethreitz, iirc - the Content-length header should always be set (even if it's zero) when a POST is involved.\n\nBut by looking at the code pasted by zoranzaric, he is indeed sending a POST with a request body - so the content-length should surely be included? \n\nAm I missing something here??\n\nCal\n", "foxx, I thought setting params was correct for a POST. What am I doing wrong?\n\nkennethreitz, the Google API that I'm talking to responds with 411 (Length Required)\n", "@zoranzaric: `params` is used for query url parameters. `data` is used for body data.\n", "@kennethreitz ok yeah snap... with `data` it works... thanks and sorry for the trouble!\n", "@zoranzaric, no worries! A lot of other libraries are quite inconsistent, so I completely understand the confusion. That's the whole reason I started Requests :)\n", "Ah - sorry I missed the 'params' / 'data' difference. My bad!\n", "This is still broken with regard to sending a blank POST request:\n\nr = requests.post(full_uri)\n\nWhile a Content-Length header is sent, the value is blank (it should be 0 per the RFC). The request as the server see is below:\n\n`````` BASE_ENVIRON\n{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': '',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'identity, deflate, compress, gzip',\n 'HTTP_HOST': 'localhost:8086',\n 'HTTP_USER_AGENT': 'python-requests/0.8.3',\n 'PATH_INFO': '/__snap__/sldb/cc/heartbeat/4f14a8282be5c42b87000002',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_PORT': 49676,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': '',\n 'SERVER_NAME': '127.0.0.1',\n 'SERVER_PORT': '8086',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'Werkzeug/0.8.1',\n 'werkzeug.request': <BaseRequest 'http://localhost:8086/__snap__/sldb/cc/heartbeat/4f14a8282be5c42b87000002' [POST]>,\n 'werkzeug.server.shutdown': <function shutdown_server at 0x105cd3de8>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x105373270>,\n 'wsgi.input': <socket._fileobject object at 0x105d62350>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}```\n``````\n", "Are you working on the invalid content-length for POST requests without data payload issue? I was just bit by this bug while trying to POST and PUT to a WCF service. I could luckily work around it by specifying a content-length of 0 via the 'headers' keyword argument to the 'post' and 'put' functions.\n", "@aknuds1 what version are you using? This is what I see in trunk:\n\n```\n>>> import requests\n>>> print requests.post('http://httpbin.org/post').text\n{\n \"origin\": \"[REDACTED]\", \n \"files\": {}, \n \"form\": {}, \n \"url\": \"http://httpbin.org/post\", \n \"args\": {}, \n \"headers\": {\n \"Content-Length\": \"0\", \n \"Accept-Encoding\": \"identity, deflate, compress, gzip\", \n \"Connection\": \"keep-alive\", \n \"Accept\": \"*/*\", \n \"User-Agent\": \"python-requests/0.11.3\", \n \"Host\": \"httpbin.org\", \n \"Content-Type\": \"\"\n }, \n \"json\": null, \n \"data\": \"\"\n}\n```\n", "@slingamn Ah, maybe it's fixed in trunk then. I'm just using the version installed via pip, i.e. 0.11.2.\n", "Oh, weird, I get `\"Content-Length\": \"0\"` on 0.11.2 (2159c802706f) also.\n\nCan you try the above test case and post the result?\n", "I tried your case and get the following output:\n\n```\n{\n \"origin\": \"[REDACTED]\",\n \"files\": {},\n \"form\": {},\n \"url\": \"http://httpbin.org/post\",\n \"args\": {},\n \"headers\": {\n \"Content-Length\": \"0\",\n \"Via\": \"1.1 EUR-PRXY-13\",\n \"Connection\": \"keep-alive\",\n \"Accept\": \"*/*\",\n \"User-Agent\": \"python-requests/0.11.2\",\n \"Host\": \"httpbin.org\",\n \"Content-Type\": \"\"\n },\n \"json\": null,\n \"data\": \"\"\n}\n```\n\nIs there a bug at httpbin.org then, since there is clearly a difference in the request when I define the content-length header myself?\n", "Sorry, I'm confused. Isn't that the expected output?\n\n```\n$ curl -d \"\" http://httpbin.org/post\n{\n \"origin\": \"[REDACTED]\", \n \"files\": {}, \n \"form\": {}, \n \"url\": \"http://httpbin.org/post\", \n \"args\": {}, \n \"headers\": {\n \"Content-Length\": \"0\", \n \"Connection\": \"keep-alive\", \n \"Accept\": \"*/*\", \n \"User-Agent\": \"curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.3.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7\", \n \"Host\": \"httpbin.org\", \n \"Content-Type\": \"application/x-www-form-urlencoded\"\n }, \n \"json\": null, \n \"data\": \"\"\n}\n```\n", "@slingamn It's the desired output, yes, but why is there a difference towards WCF when I define the content-length header myself?\n\nI mean, httpbin.org reports that the request has defined content-length as \"0\", even though the same request directed at WCF fails with error 411.\n", "I'm inclined to suspect a bug with the WCF service, since I get the same result using http://requestb.in.\n\n```\n>>> requests.post('http://requestb.in/10uyxph1')\n<Response [200]>\n>>> \n```\n\nand Requestbin saw the following headers:\n\n```\nContent-Length 0\nAccept-Encoding identity, deflate, compress, gzip\nConnection keep-alive\nAccept */*\nUser-Agent python-requests/0.11.1\nHost requestb.in\n```\n", "But there _must_ be a difference wrt. content-length, since defining that header myself in the client library (requests) results in a request accepted by WCF. I'll see if I can get hold of the POST request received by WCF.\n", "One possible explanation: this results in the headers appearing in a different order, and the WCF service (incorrectly) takes note of this.\n\nTo get the POST request, you could (as a last resort) try something like Wireshark.\n", "According to Fiddler, the POST request without user-defined content-length header looks like so:\n\n```\nPOST [REDACTED] HTTP/1.1\nHost: [REDACTED]\nConnection: Keep-Alive\nAccept-Encoding: identity, deflate, compress, gzip\nAccept: */*\nUser-Agent: python-requests/0.11.2\n```\n\nIf I define the content-length header, via the 'headers' argument to requests.post, however, the request looks like so:\n\n```\nPOST [REDACTED] HTTP/1.1\nHost: [REDACTED]\ncontent-length: 0\nConnection: Keep-Alive\nAccept-Encoding: identity, deflate, compress, gzip\nAccept: */*\nUser-Agent: python-requests/0.11.2\n```\n", "Interesting! The line of code that produces the bad behavior is just `requests.post(my_url)`, right?\n", "I'm on Python 2.7.2. Here's what I see in my httplib.py:\n\n``` python\n def _set_content_length(self, body):\n # Set the content-length based on the body.\n thelen = None\n try:\n thelen = str(len(body))\n except TypeError, te:\n # If this is a file-like object, try to\n # fstat its file descriptor\n try:\n thelen = str(os.fstat(body.fileno()).st_size)\n except (AttributeError, OSError):\n # Don't send a length if this failed\n if self.debuglevel > 0: print \"Cannot stat!!\"\n\n if thelen is not None:\n self.putheader('Content-Length', thelen)\n```\n\nIf you can't provide a reproducible test case for security/privacy reasons (totally understandable), can you try and monkeypatch your httplib and see if that `except` block is being hit? You could also try setting `debuglevel` from the client code in `requests.packages.urllib3`.\n", "My code is as simple as this (the HTTP proxy is Fiddler):\n\n```\nimport requests\n\nresp = requests.post(\"http://[REDACTED]\", proxies={\"http\": \"localhost:8888\"})\nresp.raise_for_status()\n```\n\nIf you run this script against Fiddler on your machine, you would probably see the same request as I do.\n\nI can't see that httplib._set_content_length is called at all. I injected some code in there to see if it was called by requests, but that code wasn't hit.\n", "And Fiddler shows a `Content-length: 0` header when querying httpbin.org and requestsb.in?\n", "```\nresp = requests.post(\"http://httpbin.org/post\", proxies={\"http\": \"localhost:8888\"})\n```\n\n```\nPOST http://httpbin.org/post HTTP/1.1\nHost: httpbin.org\nProxy-Connection: Keep-Alive\nAccept-Encoding: identity, deflate, compress, gzip\nAccept: */*\nUser-Agent: python-requests/0.11.2\n```\n", "Neat, I'll check up on that.\n\nBy the way, what's your platform and Python version?\n", "Also, just for kicks, you might want to upgrade to Requests 0.12.0 (although I don't think any of the changes are relevant to this issue).\n", "I'm on Python 2.7.2/Windows 7. I tried Requests 0.12.0, it made no difference unfortunately.\n", "You, sir, are correct!\n\n```\n>>> print requests.post('http://httpbin.org/post').content\n{\n \"origin\": \"[REDACTED]\", \n \"files\": {}, \n \"form\": {}, \n \"url\": \"http://httpbin.org/post\", \n \"args\": {}, \n \"headers\": {\n \"Content-Length\": \"0\", \n \"Accept-Encoding\": \"identity, deflate, compress, gzip\", \n \"Connection\": \"keep-alive\", \n \"Accept\": \"*/*\", \n \"User-Agent\": \"python-requests/0.12.0\", \n \"Host\": \"httpbin.org\", \n \"Content-Type\": \"\"\n }, \n \"json\": null, \n \"data\": \"\"\n}\n```\n\nbut `strace -v -e trace=network -p 32122 -s 2000` says:\n\n```\nconnect(4, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(\"107.21.123.247\")}, 16) = 0\nsendto(4, \"POST /post HTTP/1.1\\r\\nHost: httpbin.org\\r\\nAccept-Encoding: identity, deflate, compress, gzip\\r\\nAccept: */*\\r\\nUser-Agent: python-requests/0.12.0\\r\\n\\r\\n\", 143, 0, NULL, 0) = 143\n```\n\nContent-length is not being set on zero-data POSTs; httpbin.org is reporting it anyway.\n" ]
https://api.github.com/repos/psf/requests/issues/222
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/222/labels{/name}
https://api.github.com/repos/psf/requests/issues/222/comments
https://api.github.com/repos/psf/requests/issues/222/events
https://github.com/psf/requests/issues/222
2,033,386
MDU6SXNzdWUyMDMzMzg2
222
Request.cookiejar missing on 0.7.3
{ "avatar_url": "https://avatars.githubusercontent.com/u/92361?v=4", "events_url": "https://api.github.com/users/herberthamaral/events{/privacy}", "followers_url": "https://api.github.com/users/herberthamaral/followers", "following_url": "https://api.github.com/users/herberthamaral/following{/other_user}", "gists_url": "https://api.github.com/users/herberthamaral/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/herberthamaral", "id": 92361, "login": "herberthamaral", "node_id": "MDQ6VXNlcjkyMzYx", "organizations_url": "https://api.github.com/users/herberthamaral/orgs", "received_events_url": "https://api.github.com/users/herberthamaral/received_events", "repos_url": "https://api.github.com/users/herberthamaral/repos", "site_admin": false, "starred_url": "https://api.github.com/users/herberthamaral/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/herberthamaral/subscriptions", "type": "User", "url": "https://api.github.com/users/herberthamaral", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-10-24T13:08:14Z
2021-09-09T11:01:00Z
2011-10-31T13:58:51Z
NONE
resolved
This script works well on 0.6.4: https://gist.github.com/1308823 But it raises the following error when I use 0.7.3, : ``` File "gistfile1.py", line 15, in opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(response.request.cookiejar)) AttributeError: 'Request' object has no attribute 'cookiejar' ``` I guess the API was changed but the documentation wasn't.
{ "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/222/reactions" }
https://api.github.com/repos/psf/requests/issues/222/timeline
null
completed
null
null
false
[ "Correct — a blog post and documentation update is forthcoming. CookieJars are being deprecated throughout for simpler cookie dicts.\n", "Alright, but will it be possible to access the cookiejar object even if it is protected? \n\nAs you can see in my app, there are some scenarios that'd be interesting if I have access to the cookiejar.\n", "Unfortunately, no. I'm moving completely off of urllib2, which is needed for cookiejars. I might try to make a helper function available for converting the header to a cookiejar for you though.\n", "Oh, do not worry about that. I asked that just for convenience. I'll open a pull request this change bother me a lot ;)\n" ]
https://api.github.com/repos/psf/requests/issues/221
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/221/labels{/name}
https://api.github.com/repos/psf/requests/issues/221/comments
https://api.github.com/repos/psf/requests/issues/221/events
https://github.com/psf/requests/issues/221
2,027,277
MDU6SXNzdWUyMDI3Mjc3
221
prefetch=True on all methods
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-23T16:27:58Z
2021-09-09T11:00:58Z
2011-11-12T15:43:46Z
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/221/reactions" }
https://api.github.com/repos/psf/requests/issues/221/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/220
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/220/labels{/name}
https://api.github.com/repos/psf/requests/issues/220/comments
https://api.github.com/repos/psf/requests/issues/220/events
https://github.com/psf/requests/pull/220
2,026,773
MDExOlB1bGxSZXF1ZXN0NDI1NjUw
220
Detach from urllib2
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2011-10-23T14:05:46Z
2021-09-08T12:01:33Z
2011-10-23T19:18:34Z
CONTRIBUTOR
resolved
- Remove auth handlers — create headers by hand.
{ "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/220/reactions" }
https://api.github.com/repos/psf/requests/issues/220/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/220.diff", "html_url": "https://github.com/psf/requests/pull/220", "merged_at": "2011-10-23T19:18:34Z", "patch_url": "https://github.com/psf/requests/pull/220.patch", "url": "https://api.github.com/repos/psf/requests/pulls/220" }
true
[ "Gah, I love this so much.\n", "Looks like this:\n\nhttps://github.com/kennethreitz/requests/commit/340f7a0733b6b023c2bec18bb0f91e8f1052a84d#L0R18\n\nwill fix an issue I hit last week:\n\nhttps://gist.github.com/1292957\n\nGood stuff!\n", "\\o/ \n\nurllib2 is toxic.\n", "Trying to implement digest auth now. Easier said than done.\n", "``` python\nimport requests\n\ns = requests.session(auth=('digest', 'user', 'passwd'))\nr = s.get('http://httpbin.org/digest-auth/auth/user/passwd')\n\n```\n\n``` pycon\n>>> r.status_code\n200\n```\n" ]
https://api.github.com/repos/psf/requests/issues/219
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/219/labels{/name}
https://api.github.com/repos/psf/requests/issues/219/comments
https://api.github.com/repos/psf/requests/issues/219/events
https://github.com/psf/requests/pull/219
2,024,891
MDExOlB1bGxSZXF1ZXN0NDI1MjUz
219
Config
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-22T23:49:40Z
2021-09-08T12:01:34Z
2011-10-23T00:32:17Z
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/219/reactions" }
https://api.github.com/repos/psf/requests/issues/219/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/219.diff", "html_url": "https://github.com/psf/requests/pull/219", "merged_at": "2011-10-23T00:32:17Z", "patch_url": "https://github.com/psf/requests/pull/219.patch", "url": "https://api.github.com/repos/psf/requests/pulls/219" }
true
[]
https://api.github.com/repos/psf/requests/issues/218
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/218/labels{/name}
https://api.github.com/repos/psf/requests/issues/218/comments
https://api.github.com/repos/psf/requests/issues/218/events
https://github.com/psf/requests/pull/218
2,023,738
MDExOlB1bGxSZXF1ZXN0NDI0OTc4
218
Make Session Primary Interface
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-22T17:36:28Z
2021-09-08T12:01:32Z
2011-10-22T22:16:50Z
CONTRIBUTOR
resolved
The primary API will create and discard sessions.
{ "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/218/reactions" }
https://api.github.com/repos/psf/requests/issues/218/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/218.diff", "html_url": "https://github.com/psf/requests/pull/218", "merged_at": "2011-10-22T22:16:50Z", "patch_url": "https://github.com/psf/requests/pull/218.patch", "url": "https://api.github.com/repos/psf/requests/pulls/218" }
true
[]
https://api.github.com/repos/psf/requests/issues/217
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/217/labels{/name}
https://api.github.com/repos/psf/requests/issues/217/comments
https://api.github.com/repos/psf/requests/issues/217/events
https://github.com/psf/requests/pull/217
2,012,855
MDExOlB1bGxSZXF1ZXN0NDIxMzU5
217
Clarify documentation around async.map and Request.send
{ "avatar_url": "https://avatars.githubusercontent.com/u/1476?v=4", "events_url": "https://api.github.com/users/thedaniel/events{/privacy}", "followers_url": "https://api.github.com/users/thedaniel/followers", "following_url": "https://api.github.com/users/thedaniel/following{/other_user}", "gists_url": "https://api.github.com/users/thedaniel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/thedaniel", "id": 1476, "login": "thedaniel", "node_id": "MDQ6VXNlcjE0NzY=", "organizations_url": "https://api.github.com/users/thedaniel/orgs", "received_events_url": "https://api.github.com/users/thedaniel/received_events", "repos_url": "https://api.github.com/users/thedaniel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/thedaniel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/thedaniel/subscriptions", "type": "User", "url": "https://api.github.com/users/thedaniel", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-21T06:59:13Z
2021-09-08T12:01:32Z
2011-10-21T14:24:11Z
CONTRIBUTOR
resolved
I added a sentence to advanced.rst to help future readers avoid the confusion I expressed in IRC today.
{ "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/217/reactions" }
https://api.github.com/repos/psf/requests/issues/217/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/217.diff", "html_url": "https://github.com/psf/requests/pull/217", "merged_at": "2011-10-21T14:24:11Z", "patch_url": "https://github.com/psf/requests/pull/217.patch", "url": "https://api.github.com/repos/psf/requests/pulls/217" }
true
[ "Thank you sir! Make sure to add yourself to AUTHORS. :)\n" ]
https://api.github.com/repos/psf/requests/issues/216
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/216/labels{/name}
https://api.github.com/repos/psf/requests/issues/216/comments
https://api.github.com/repos/psf/requests/issues/216/events
https://github.com/psf/requests/issues/216
2,011,213
MDU6SXNzdWUyMDExMjEz
216
Issue #160 needs to be reopend
{ "avatar_url": "https://avatars.githubusercontent.com/u/684386?v=4", "events_url": "https://api.github.com/users/sergedomk/events{/privacy}", "followers_url": "https://api.github.com/users/sergedomk/followers", "following_url": "https://api.github.com/users/sergedomk/following{/other_user}", "gists_url": "https://api.github.com/users/sergedomk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sergedomk", "id": 684386, "login": "sergedomk", "node_id": "MDQ6VXNlcjY4NDM4Ng==", "organizations_url": "https://api.github.com/users/sergedomk/orgs", "received_events_url": "https://api.github.com/users/sergedomk/received_events", "repos_url": "https://api.github.com/users/sergedomk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sergedomk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sergedomk/subscriptions", "type": "User", "url": "https://api.github.com/users/sergedomk", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-21T00:35:09Z
2021-09-09T11:01:03Z
2011-10-22T22:17:58Z
NONE
resolved
https://github.com/kennethreitz/requests/issues/160
{ "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/216/reactions" }
https://api.github.com/repos/psf/requests/issues/216/timeline
null
completed
null
null
false
[ "194ff1a\n" ]
https://api.github.com/repos/psf/requests/issues/215
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/215/labels{/name}
https://api.github.com/repos/psf/requests/issues/215/comments
https://api.github.com/repos/psf/requests/issues/215/events
https://github.com/psf/requests/pull/215
2,010,501
MDExOlB1bGxSZXF1ZXN0NDIwNDg5
215
Feature/isolated unit tests
{ "avatar_url": "https://avatars.githubusercontent.com/u/68183?v=4", "events_url": "https://api.github.com/users/mrtazz/events{/privacy}", "followers_url": "https://api.github.com/users/mrtazz/followers", "following_url": "https://api.github.com/users/mrtazz/following{/other_user}", "gists_url": "https://api.github.com/users/mrtazz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrtazz", "id": 68183, "login": "mrtazz", "node_id": "MDQ6VXNlcjY4MTgz", "organizations_url": "https://api.github.com/users/mrtazz/orgs", "received_events_url": "https://api.github.com/users/mrtazz/received_events", "repos_url": "https://api.github.com/users/mrtazz/repos", "site_admin": true, "starred_url": "https://api.github.com/users/mrtazz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrtazz/subscriptions", "type": "User", "url": "https://api.github.com/users/mrtazz", "user_view_type": "public" }
[ { "color": "02e10c", "default": false, "description": null, "id": 76800, "name": "Feature Request", "node_id": "MDU6TGFiZWw3NjgwMA==", "url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request" } ]
closed
true
null
[]
null
9
2011-10-20T22:44:52Z
2021-09-08T12:01:33Z
2012-04-23T02:35:38Z
CONTRIBUTOR
resolved
It took me a while to integrate the changes in develop (waited too long). But I created this new feature branch now which I will use to work on the unit tests. So might be best to leave it open until I have reached a good level of coverage.
{ "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/215/reactions" }
https://api.github.com/repos/psf/requests/issues/215/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/215.diff", "html_url": "https://github.com/psf/requests/pull/215", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/215.patch", "url": "https://api.github.com/repos/psf/requests/pulls/215" }
true
[ "Heads up — you should be writing these against the `feature/rewrite` branch — a lot of these methods won't be there anymore.\n", "Yeah, I thought so. I looked at the branch some days ago and decided to wait a bit before I use it as the basis. Just to make sure the changes are somewhat stable. But I will base the tests on it then.\n\nOn Nov 5, 2011, at 4:31 AM, Kenneth Reitz [email protected] wrote:\n\n> Heads up — you should be writing these against the `feature/rewrite` branch — a lot of these methods won't be there anymore.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/215#issuecomment-2638761\n", "The coverage is at almost 70% now. It might take more time to push the coverage for the remaining paths. Therefore I think it might make sense to integrate the tests and extend them during actual development. This way the code can be tested better and the larger missing paths can still be added via individual pull requests. Any thoughts on this?\n", "Any thoughts on this? I didn't have a lot of time in the last weeks so coverage is probably way lower than before, but it might still make sense to merge and continue from there.\n", "This is really great stuff, but I worry that it'll be a maintenance liability. \n", "How so? They are just unit tests for the existing functionality. Or do you mean unit tests like that in general?\n", "Yeah, I guess I'm just a fan of integration tests?\n", "Sure seems like it :). I'm totally fine with not integrating the unit tests, if you think it's too much overhead.\n", "For now, yes. :(\n" ]
https://api.github.com/repos/psf/requests/issues/214
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/214/labels{/name}
https://api.github.com/repos/psf/requests/issues/214/comments
https://api.github.com/repos/psf/requests/issues/214/events
https://github.com/psf/requests/pull/214
2,006,056
MDExOlB1bGxSZXF1ZXN0NDE4OTAw
214
New http codes
{ "avatar_url": "https://avatars.githubusercontent.com/u/182194?v=4", "events_url": "https://api.github.com/users/zsiciarz/events{/privacy}", "followers_url": "https://api.github.com/users/zsiciarz/followers", "following_url": "https://api.github.com/users/zsiciarz/following{/other_user}", "gists_url": "https://api.github.com/users/zsiciarz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zsiciarz", "id": 182194, "login": "zsiciarz", "node_id": "MDQ6VXNlcjE4MjE5NA==", "organizations_url": "https://api.github.com/users/zsiciarz/orgs", "received_events_url": "https://api.github.com/users/zsiciarz/received_events", "repos_url": "https://api.github.com/users/zsiciarz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zsiciarz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zsiciarz/subscriptions", "type": "User", "url": "https://api.github.com/users/zsiciarz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-20T15:40:13Z
2021-09-08T23:07:18Z
2011-10-20T15:41:44Z
CONTRIBUTOR
resolved
See IETF document at https://tools.ietf.org/html/draft-nottingham-http-new-status-02. Just for fun :-)
{ "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/214/reactions" }
https://api.github.com/repos/psf/requests/issues/214/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/214.diff", "html_url": "https://github.com/psf/requests/pull/214", "merged_at": "2011-10-20T15:41:43Z", "patch_url": "https://github.com/psf/requests/pull/214.patch", "url": "https://api.github.com/repos/psf/requests/pulls/214" }
true
[ "Excellent! I was going to do this later today :)\n" ]
https://api.github.com/repos/psf/requests/issues/213
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/213/labels{/name}
https://api.github.com/repos/psf/requests/issues/213/comments
https://api.github.com/repos/psf/requests/issues/213/events
https://github.com/psf/requests/pull/213
2,003,579
MDExOlB1bGxSZXF1ZXN0NDE4MTAz
213
Fix pip-compared-to-easy-install url
{ "avatar_url": "https://avatars.githubusercontent.com/u/12793?v=4", "events_url": "https://api.github.com/users/fredrik/events{/privacy}", "followers_url": "https://api.github.com/users/fredrik/followers", "following_url": "https://api.github.com/users/fredrik/following{/other_user}", "gists_url": "https://api.github.com/users/fredrik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fredrik", "id": 12793, "login": "fredrik", "node_id": "MDQ6VXNlcjEyNzkz", "organizations_url": "https://api.github.com/users/fredrik/orgs", "received_events_url": "https://api.github.com/users/fredrik/received_events", "repos_url": "https://api.github.com/users/fredrik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fredrik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fredrik/subscriptions", "type": "User", "url": "https://api.github.com/users/fredrik", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-20T10:53:19Z
2021-09-08T12:01:31Z
2011-10-20T12:46:17Z
CONTRIBUTOR
resolved
Read through the docs, found a broken link. Slightly annoying (two out of ten on the ISO scale of annoyance) so decided to fix 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/213/reactions" }
https://api.github.com/repos/psf/requests/issues/213/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/213.diff", "html_url": "https://github.com/psf/requests/pull/213", "merged_at": "2011-10-20T12:46:17Z", "patch_url": "https://github.com/psf/requests/pull/213.patch", "url": "https://api.github.com/repos/psf/requests/pulls/213" }
true
[]
https://api.github.com/repos/psf/requests/issues/212
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/212/labels{/name}
https://api.github.com/repos/psf/requests/issues/212/comments
https://api.github.com/repos/psf/requests/issues/212/events
https://github.com/psf/requests/issues/212
2,001,273
MDU6SXNzdWUyMDAxMjcz
212
AuthManager isn't threadsafe for requests with same URL but different credentials
{ "avatar_url": "https://avatars.githubusercontent.com/u/315988?v=4", "events_url": "https://api.github.com/users/chadselph/events{/privacy}", "followers_url": "https://api.github.com/users/chadselph/followers", "following_url": "https://api.github.com/users/chadselph/following{/other_user}", "gists_url": "https://api.github.com/users/chadselph/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chadselph", "id": 315988, "login": "chadselph", "node_id": "MDQ6VXNlcjMxNTk4OA==", "organizations_url": "https://api.github.com/users/chadselph/orgs", "received_events_url": "https://api.github.com/users/chadselph/received_events", "repos_url": "https://api.github.com/users/chadselph/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chadselph/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chadselph/subscriptions", "type": "User", "url": "https://api.github.com/users/chadselph", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-10-20T04:12:50Z
2021-09-09T11:01:01Z
2011-10-26T19:13:14Z
NONE
resolved
When you send multiple concurrent requests (using gevent, in my case) to the same URL but with different auth parameters, every request will use the same auth parameters. Reproduced with this code: https://gist.github.com/1300341 The sample code is using the regular api, but the bug is reproducible using requests.async as well.
{ "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/212/reactions" }
https://api.github.com/repos/psf/requests/issues/212/timeline
null
completed
null
null
false
[ "Sorry for the bug. Luckily, auth manager will be removed soon. It's my least favorite part of the codebase.\n", "This bug is fixed in 0.7.3. Thanks kenneth :)\n", "I was so happy to see it die in a fire :)\n\n---\n\n:sparkles: :cake: :sparkles:\n" ]
https://api.github.com/repos/psf/requests/issues/211
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/211/labels{/name}
https://api.github.com/repos/psf/requests/issues/211/comments
https://api.github.com/repos/psf/requests/issues/211/events
https://github.com/psf/requests/pull/211
1,994,777
MDExOlB1bGxSZXF1ZXN0NDE1MzAx
211
Minor doc spelling tweaks
{ "avatar_url": "https://avatars.githubusercontent.com/u/110926?v=4", "events_url": "https://api.github.com/users/tvaught/events{/privacy}", "followers_url": "https://api.github.com/users/tvaught/followers", "following_url": "https://api.github.com/users/tvaught/following{/other_user}", "gists_url": "https://api.github.com/users/tvaught/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tvaught", "id": 110926, "login": "tvaught", "node_id": "MDQ6VXNlcjExMDkyNg==", "organizations_url": "https://api.github.com/users/tvaught/orgs", "received_events_url": "https://api.github.com/users/tvaught/received_events", "repos_url": "https://api.github.com/users/tvaught/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tvaught/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tvaught/subscriptions", "type": "User", "url": "https://api.github.com/users/tvaught", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-10-19T15:02:44Z
2021-09-08T12:01:31Z
2011-10-19T15:04:03Z
CONTRIBUTOR
resolved
Not sure what the policy is on pull-requests and, more specifically, fork naming. Let me know if I need to change things. Great package btw!
{ "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/211/reactions" }
https://api.github.com/repos/psf/requests/issues/211/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/211.diff", "html_url": "https://github.com/psf/requests/pull/211", "merged_at": "2011-10-19T15:04:05Z", "patch_url": "https://github.com/psf/requests/pull/211.patch", "url": "https://api.github.com/repos/psf/requests/pulls/211" }
true
[ "Thanks a ton! I'm pretty convinced that my spelling abilities go out the window when I'm working in a monospaced font :)\n", "That was fast! With that kind of responsiveness, I'm not surprised that this is such a great tool.\n" ]
https://api.github.com/repos/psf/requests/issues/210
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/210/labels{/name}
https://api.github.com/repos/psf/requests/issues/210/comments
https://api.github.com/repos/psf/requests/issues/210/events
https://github.com/psf/requests/issues/210
1,990,382
MDU6SXNzdWUxOTkwMzgy
210
getcwd() Called on Import
{ "avatar_url": "https://avatars.githubusercontent.com/u/522248?v=4", "events_url": "https://api.github.com/users/theonewolf/events{/privacy}", "followers_url": "https://api.github.com/users/theonewolf/followers", "following_url": "https://api.github.com/users/theonewolf/following{/other_user}", "gists_url": "https://api.github.com/users/theonewolf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/theonewolf", "id": 522248, "login": "theonewolf", "node_id": "MDQ6VXNlcjUyMjI0OA==", "organizations_url": "https://api.github.com/users/theonewolf/orgs", "received_events_url": "https://api.github.com/users/theonewolf/received_events", "repos_url": "https://api.github.com/users/theonewolf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/theonewolf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/theonewolf/subscriptions", "type": "User", "url": "https://api.github.com/users/theonewolf", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-10-19T03:39:12Z
2021-09-09T11:01:04Z
2011-10-19T04:32:43Z
NONE
resolved
Is this by design? ``` bash sh: getcwd() failed: No such file or directory sh: getcwd() failed: No such file or directory ```
{ "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/210/reactions" }
https://api.github.com/repos/psf/requests/issues/210/timeline
null
completed
null
null
false
[ "Are you sure something else isn't causing this?\n", "I'm pretty sure _something_ inside requests is causing it. Basically this occurs within a directory that no longer exists (or whenever getcwd() would fail).\n\nExample imports:\n\n``` bash\nwolf@gs9671:/tmp/src$ python\nPython 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import os\n>>> exit()\nwolf@gs9671:/tmp/src$ python\nPython 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import requests\nsh: getcwd() failed: No such file or directory\nsh: getcwd() failed: No such file or directory\n>>> \n```\n", "I'm just more wondering why getcwd() is needed, not that it always happens. Sorry should have specified that!\n", "It's not needed, and it's not called explicitly — that's why I'm confused :)\n", "I thought it might be for including a non-standard library, seems not:\n\n``` bash\nwolf@gs9671:/tmp/test$ python\nPython 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import flask\n>>> import requests\nsh: getcwd() failed: No such file or directory\nsh: getcwd() failed: No such file or directory\n>>> import redis\n>>> import bitarray\n>>> import termcolor\n>>> import gdata\n>>> import pygit2\n>>> \n```\n\nThose libraries are installed in /usr/local/lib/python2.6/dist-packages/*\n\nAnyways, just an oddity, not a show-stopper.\n", "That is beyond weird. I have no idea. Let me know if you come up with anything.\n" ]
https://api.github.com/repos/psf/requests/issues/209
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/209/labels{/name}
https://api.github.com/repos/psf/requests/issues/209/comments
https://api.github.com/repos/psf/requests/issues/209/events
https://github.com/psf/requests/issues/209
1,938,497
MDU6SXNzdWUxOTM4NDk3
209
Incorrect parsing of HTTP redirect location special characters
{ "avatar_url": "https://avatars.githubusercontent.com/u/117833?v=4", "events_url": "https://api.github.com/users/davidmytton/events{/privacy}", "followers_url": "https://api.github.com/users/davidmytton/followers", "following_url": "https://api.github.com/users/davidmytton/following{/other_user}", "gists_url": "https://api.github.com/users/davidmytton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/davidmytton", "id": 117833, "login": "davidmytton", "node_id": "MDQ6VXNlcjExNzgzMw==", "organizations_url": "https://api.github.com/users/davidmytton/orgs", "received_events_url": "https://api.github.com/users/davidmytton/received_events", "repos_url": "https://api.github.com/users/davidmytton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/davidmytton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidmytton/subscriptions", "type": "User", "url": "https://api.github.com/users/davidmytton", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-10-18T11:29:14Z
2021-09-09T11:00:47Z
2011-11-24T11:21:56Z
NONE
resolved
The location header in a 302 redirect response is not being parsed correctly when it has special characters in it. `/Login.aspx?ReturnUrl=%2f` becomes `/Login.aspx%3FReturnUrl%3D/` When followed, this results in a 404 because it's not correct. ``` python >>> import requests >>> r = requests.get('http://affiliatenetwork.ist-apps.com') >>> r.status_code 404 >>> print r.headers {'content-length': '1245', 'x-powered-by': 'ASP.NET', 'date': 'Tue, 18 Oct 2011 09:15:08 GMT', 'content-type': 'text/html', 'connection': 'close', 'server': 'Microsoft-IIS/7.0'} >>> r.url 'http://affiliatenetwork.ist-apps.com/Login.aspx%3FReturnUrl%3D/' >>> r.history [<Response [302]>] >>> r.history[0].headers {'content-length': '142', 'x-powered-by': 'ASP.NET', 'x-aspnet-version': '4.0.30319', 'server': 'Microsoft-IIS/7.0', 'connection': 'close', 'location': '/Login.aspx?ReturnUrl=%2f', 'cache-control': 'private', 'date': 'Tue, 18 Oct 2011 10:56:08 GMT', 'content-type': 'text/html; charset=utf-8'} ``` curl parses this correctly: ``` shell david@Shibuya ~: curl -v http://affiliatenetwork.ist-apps.com * About to connect() to affiliatenetwork.ist-apps.com port 80 (#0) * Trying 94.236.92.60... connected * Connected to affiliatenetwork.ist-apps.com (94.236.92.60) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 > Host: affiliatenetwork.ist-apps.com > Accept: */* > < HTTP/1.1 302 Found < Cache-Control: private < Content-Type: text/html; charset=utf-8 < Location: /Login.aspx?ReturnUrl=%2f < Server: Microsoft-IIS/7.0 < X-AspNet-Version: 4.0.30319 < X-Powered-By: ASP.NET < Date: Tue, 18 Oct 2011 11:26:34 GMT < Content-Length: 142 < <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/Login.aspx?ReturnUrl=%2f">here</a>.</h2> </body></html> * Connection #0 to host affiliatenetwork.ist-apps.com left intact * Closing connection #0 ``` httplib also parses this correctly: ``` python >>> conn = httplib.HTTPConnection('affiliatenetwork.ist-apps.com') >>> conn.request("GET","/") >>> res = conn.getresponse() >>> print res.status 302 >>> print res.reason Found >>> print res.getheaders() [('content-length', '142'), ('x-powered-by', 'ASP.NET'), ('x-aspnet-version', '4.0.30319'), ('server', 'Microsoft-IIS/7.0'), ('location', '/Login.aspx?ReturnUrl=%2f'), ('cache-control', 'private'), ('date', 'Tue, 18 Oct 2011 10:35:20 GMT'), ('content-type', 'text/html; charset=utf-8')] ``` Looks like the problem is caused by https://github.com/kennethreitz/requests/blob/master/requests/models.py#L237 ``` python >>> url = '/Login.aspx?ReturnUrl=%2f' >>> o = urlparse.urlparse(url) >>> print o ParseResult(scheme='', netloc='', path='/Login.aspx', params='', query='ReturnUrl=%2f', fragment='') >>> import urllib >>> urllib.quote(urllib.unquote(url)) '/Login.aspx%3FReturnUrl%3D/' >>> urllib.unquote(url) '/Login.aspx?ReturnUrl=/' ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/117833?v=4", "events_url": "https://api.github.com/users/davidmytton/events{/privacy}", "followers_url": "https://api.github.com/users/davidmytton/followers", "following_url": "https://api.github.com/users/davidmytton/following{/other_user}", "gists_url": "https://api.github.com/users/davidmytton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/davidmytton", "id": 117833, "login": "davidmytton", "node_id": "MDQ6VXNlcjExNzgzMw==", "organizations_url": "https://api.github.com/users/davidmytton/orgs", "received_events_url": "https://api.github.com/users/davidmytton/received_events", "repos_url": "https://api.github.com/users/davidmytton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/davidmytton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidmytton/subscriptions", "type": "User", "url": "https://api.github.com/users/davidmytton", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/209/reactions" }
https://api.github.com/repos/psf/requests/issues/209/timeline
null
completed
null
null
false
[ "Looks like this duplicates https://github.com/kennethreitz/requests/pull/158 which was fixed in https://github.com/kennethreitz/requests/commit/62d29d510625aa6c5415f4ba35579059b1c842fd\n\nWill patch and confirm.\n", "Confirmed the get_clean_url() method in https://github.com/kennethreitz/requests/commit/62d29d510625aa6c5415f4ba35579059b1c842fd parses the URL correctly but this does not appear to be in the 0.6.4 release.\n", "Bug still exists in 0.7.3.\n", "Bug still exists in 0.8.1\n", "Patch submitted in https://github.com/kennethreitz/requests/pull/273\n", "Looks like this was fixed from https://github.com/kennethreitz/requests/pull/273 in 0.8.2\n" ]
https://api.github.com/repos/psf/requests/issues/208
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/208/labels{/name}
https://api.github.com/repos/psf/requests/issues/208/comments
https://api.github.com/repos/psf/requests/issues/208/events
https://github.com/psf/requests/issues/208
1,931,170
MDU6SXNzdWUxOTMxMTcw
208
Syntax Error in requests/async.py in Python 2.5
{ "avatar_url": "https://avatars.githubusercontent.com/u/1129098?v=4", "events_url": "https://api.github.com/users/stoey/events{/privacy}", "followers_url": "https://api.github.com/users/stoey/followers", "following_url": "https://api.github.com/users/stoey/following{/other_user}", "gists_url": "https://api.github.com/users/stoey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stoey", "id": 1129098, "login": "stoey", "node_id": "MDQ6VXNlcjExMjkwOTg=", "organizations_url": "https://api.github.com/users/stoey/orgs", "received_events_url": "https://api.github.com/users/stoey/received_events", "repos_url": "https://api.github.com/users/stoey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stoey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stoey/subscriptions", "type": "User", "url": "https://api.github.com/users/stoey", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-17T17:26:14Z
2021-09-09T11:00:54Z
2011-11-13T00:13:48Z
CONTRIBUTOR
resolved
Function calls like `func(*args, arg=val, **kwargs)` raise a SyntaxError in Python 2.5 (tested in both 2.5.2 and 2.5.6) I have a patch for the issue here: https://github.com/stoey/requests/commit/84e89429f0414fe0d6b9497b16833bc6bee48957 Let me know if you would prefer a pull request of that commit. The rest of my changes are working around a bug in the urllib2 in Python 2.5.2 that was fixed in 2.5.4 so are not very useful to anyone else. Cheers, Dan
{ "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/208/reactions" }
https://api.github.com/repos/psf/requests/issues/208/timeline
null
completed
null
null
false
[ "Sorry for the bug! A pull request would be awesome :)\n" ]
https://api.github.com/repos/psf/requests/issues/207
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/207/labels{/name}
https://api.github.com/repos/psf/requests/issues/207/comments
https://api.github.com/repos/psf/requests/issues/207/events
https://github.com/psf/requests/pull/207
1,919,330
MDExOlB1bGxSZXF1ZXN0NDA1OTA0
207
Added support for Eventlet to async module
{ "avatar_url": "https://avatars.githubusercontent.com/u/317464?v=4", "events_url": "https://api.github.com/users/saghul/events{/privacy}", "followers_url": "https://api.github.com/users/saghul/followers", "following_url": "https://api.github.com/users/saghul/following{/other_user}", "gists_url": "https://api.github.com/users/saghul/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/saghul", "id": 317464, "login": "saghul", "node_id": "MDQ6VXNlcjMxNzQ2NA==", "organizations_url": "https://api.github.com/users/saghul/orgs", "received_events_url": "https://api.github.com/users/saghul/received_events", "repos_url": "https://api.github.com/users/saghul/repos", "site_admin": false, "starred_url": "https://api.github.com/users/saghul/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saghul/subscriptions", "type": "User", "url": "https://api.github.com/users/saghul", "user_view_type": "public" }
[ { "color": "e102d8", "default": false, "description": null, "id": 117745, "name": "Planned", "node_id": "MDU6TGFiZWwxMTc3NDU=", "url": "https://api.github.com/repos/psf/requests/labels/Planned" } ]
closed
true
null
[]
null
5
2011-10-15T21:06:50Z
2021-09-08T23:01:16Z
2012-01-23T07:57:07Z
NONE
resolved
A new setting is added: `async_module`, which defaults to 'gevent'. If gevent is not found eventlet is tried in turn, and if 'eventlet' is set explicitly, gevent will not be used. Example to use eventlet: ``` from requests.config import settings settings.async_module = 'eventlet' from requests import async .... ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/207/reactions" }
https://api.github.com/repos/psf/requests/issues/207/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/207.diff", "html_url": "https://github.com/psf/requests/pull/207", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/207.patch", "url": "https://api.github.com/repos/psf/requests/pulls/207" }
true
[ "Thanks a ton for this! Very exciting ;)\n\nI'll try to push this out in a release this evening.\n", "From http://www.gevent.org/\n\n> gevent is inspired by eventlet but features more consistent API, simpler implementation and better performance.\n\nDo we really need to support eventlet considering the above?\n", "No. The only reason to have Eventlet support is because it's pure-python, and therefore works in PyPy.\n", "I'd like to add it in as a fallback, but not a configurable one.\n", "Would also allow us to use requests on stackless which gevent doesn't support yet.\n\nAny progress on this?\n" ]
https://api.github.com/repos/psf/requests/issues/206
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/206/labels{/name}
https://api.github.com/repos/psf/requests/issues/206/comments
https://api.github.com/repos/psf/requests/issues/206/events
https://github.com/psf/requests/pull/206
1,918,480
MDExOlB1bGxSZXF1ZXN0NDA1Nzgz
206
[API review needed] Added support for Eventlet to async
{ "avatar_url": "https://avatars.githubusercontent.com/u/317464?v=4", "events_url": "https://api.github.com/users/saghul/events{/privacy}", "followers_url": "https://api.github.com/users/saghul/followers", "following_url": "https://api.github.com/users/saghul/following{/other_user}", "gists_url": "https://api.github.com/users/saghul/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/saghul", "id": 317464, "login": "saghul", "node_id": "MDQ6VXNlcjMxNzQ2NA==", "organizations_url": "https://api.github.com/users/saghul/orgs", "received_events_url": "https://api.github.com/users/saghul/received_events", "repos_url": "https://api.github.com/users/saghul/repos", "site_admin": false, "starred_url": "https://api.github.com/users/saghul/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saghul/subscriptions", "type": "User", "url": "https://api.github.com/users/saghul", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2011-10-15T18:17:54Z
2021-09-08T12:01:30Z
2011-10-15T21:01:26Z
NONE
resolved
Hi, Since Gevent and Eventlet are similar I thought I'd add support for the latter :-) Since both need monkeypatching things can get a bit tricky. Please see my proposal in the pull request commit. With this approach someone which would like to use Gevent would do: `from requests.async import gevent as async` and someone who want to use Eventlet would do: `from requests.async import eventlet as async` How does it sound look to you? Any suggestion? If you find it ok I'll complete the pull request with required changes to documentation. Cheers,
{ "avatar_url": "https://avatars.githubusercontent.com/u/317464?v=4", "events_url": "https://api.github.com/users/saghul/events{/privacy}", "followers_url": "https://api.github.com/users/saghul/followers", "following_url": "https://api.github.com/users/saghul/following{/other_user}", "gists_url": "https://api.github.com/users/saghul/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/saghul", "id": 317464, "login": "saghul", "node_id": "MDQ6VXNlcjMxNzQ2NA==", "organizations_url": "https://api.github.com/users/saghul/orgs", "received_events_url": "https://api.github.com/users/saghul/received_events", "repos_url": "https://api.github.com/users/saghul/repos", "site_admin": false, "starred_url": "https://api.github.com/users/saghul/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saghul/subscriptions", "type": "User", "url": "https://api.github.com/users/saghul", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/206/reactions" }
https://api.github.com/repos/psf/requests/issues/206/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/206.diff", "html_url": "https://github.com/psf/requests/pull/206", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/206.patch", "url": "https://api.github.com/repos/psf/requests/pulls/206" }
true
[ "Thanks for the patch! \n\nI love the idea of supporting both, but it should be a transparent thing. Here's the workflow that I have in mind:\n\n### Workflow\n- Import gevent\n- If ImportError on gevent, import eventlet\n- if no eventlet or gevent, raise existing warning that requests requires gevent.\n\nThe api should be identical to what it is now :)\n", "I tried that first, but I thought that it's be better to let user choose, because you may have both installed but you'd like to use just one. Imagine somebody develops an application which uses requests with Eventlet and does not use Gevent at all. I guess it would like to use Eventlet no matter what the user has installed in his system.\n\nHow about this: Maintain the API and use your workflow, _but_ if the REQUESTS_ASYNC_MODULE environment variable is defined we _only_ try that module. It should be either 'gevent' or 'eventlet'. This way there are means for the user to decide which one to use.\n\nDoes it sound better?\n", "I'm not sure why anyone would ever use eventlet if gevent was available, but I'll go with it :)\n\nSounds like a plan. I maintain a set of module-level defaults too that can be overridden in `requests.config`. You can just set it there as `settings['async_module'] = 'gevent'`, and someone can change that if they so choose.\n", "Ah, I missed `requests.config`. I'll add it there, and then there should be no fallback. If someone wants Eventlet support it needs to explicitly 'ask for it'. Gevent would be the default.\n\nI'll make a new patch.\n", "Essentially I was planning on making Eventlet a fallback for when Gevent wasn't available. I still want this to be the case\n\nAdding the overridable default will give someone a little more control if they need it.\n", "If gevent fails to import, give Eventlet a shot. Our usage is simple enough that it doesn't have to be explicit.\n", "I fucked up my repo and made a new one. GitHub won't allow me to attach commits from other branches to this pull request, so I'm closing it and opening a new one. Sorry about that :-S\n", "#207\n" ]
https://api.github.com/repos/psf/requests/issues/205
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/205/labels{/name}
https://api.github.com/repos/psf/requests/issues/205/comments
https://api.github.com/repos/psf/requests/issues/205/events
https://github.com/psf/requests/pull/205
1,917,585
MDExOlB1bGxSZXF1ZXN0NDA1NTkx
205
Local HTTP Test Suite
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-15T14:00:27Z
2021-09-08T12:01:30Z
2011-10-15T15:56:26Z
CONTRIBUTOR
resolved
Powered by httpbin.
{ "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/205/reactions" }
https://api.github.com/repos/psf/requests/issues/205/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/205.diff", "html_url": "https://github.com/psf/requests/pull/205", "merged_at": "2011-10-15T15:56:26Z", "patch_url": "https://github.com/psf/requests/pull/205.patch", "url": "https://api.github.com/repos/psf/requests/pulls/205" }
true
[]
https://api.github.com/repos/psf/requests/issues/204
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/204/labels{/name}
https://api.github.com/repos/psf/requests/issues/204/comments
https://api.github.com/repos/psf/requests/issues/204/events
https://github.com/psf/requests/issues/204
1,910,531
MDU6SXNzdWUxOTEwNTMx
204
allow_redirects=False ignored in a POST request
{ "avatar_url": "https://avatars.githubusercontent.com/u/558128?v=4", "events_url": "https://api.github.com/users/ehmo/events{/privacy}", "followers_url": "https://api.github.com/users/ehmo/followers", "following_url": "https://api.github.com/users/ehmo/following{/other_user}", "gists_url": "https://api.github.com/users/ehmo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ehmo", "id": 558128, "login": "ehmo", "node_id": "MDQ6VXNlcjU1ODEyOA==", "organizations_url": "https://api.github.com/users/ehmo/orgs", "received_events_url": "https://api.github.com/users/ehmo/received_events", "repos_url": "https://api.github.com/users/ehmo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ehmo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ehmo/subscriptions", "type": "User", "url": "https://api.github.com/users/ehmo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-14T13:53:50Z
2021-09-09T11:00:57Z
2011-11-12T15:47:23Z
NONE
resolved
Hi, I just noticed that if you will send a POST data into a URL which will redirect you then allow_redirects = False are ignored ``` python d_args = {'a':'a'} r = requests.post(url = 'http://www.synopsi.com', data = d_args, allow_redirects = False) print r.url => 'https://www.synopsi.tv/' d_args = {} r = requests.post(url = 'http://www.synopsi.com', data = d_args, allow_redirects = False) print r.url => 'http://www.synopsi.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/204/reactions" }
https://api.github.com/repos/psf/requests/issues/204/timeline
null
completed
null
null
false
[ "Fixed the in the upcoming release!\n" ]
https://api.github.com/repos/psf/requests/issues/203
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/203/labels{/name}
https://api.github.com/repos/psf/requests/issues/203/comments
https://api.github.com/repos/psf/requests/issues/203/events
https://github.com/psf/requests/issues/203
1,907,232
MDU6SXNzdWUxOTA3MjMy
203
Support to Disallow fetching if content size large
{ "avatar_url": "https://avatars.githubusercontent.com/u/228017?v=4", "events_url": "https://api.github.com/users/bevenky/events{/privacy}", "followers_url": "https://api.github.com/users/bevenky/followers", "following_url": "https://api.github.com/users/bevenky/following{/other_user}", "gists_url": "https://api.github.com/users/bevenky/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bevenky", "id": 228017, "login": "bevenky", "node_id": "MDQ6VXNlcjIyODAxNw==", "organizations_url": "https://api.github.com/users/bevenky/orgs", "received_events_url": "https://api.github.com/users/bevenky/received_events", "repos_url": "https://api.github.com/users/bevenky/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bevenky/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bevenky/subscriptions", "type": "User", "url": "https://api.github.com/users/bevenky", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-10-14T02:48:07Z
2021-09-09T11:01:05Z
2011-10-14T02:54:22Z
NONE
resolved
Allow support in request to disallow fetching a url, if content size is above a certain size specified in the argument list. This is very useful in cases where one needs to disallow large requests.
{ "avatar_url": "https://avatars.githubusercontent.com/u/228017?v=4", "events_url": "https://api.github.com/users/bevenky/events{/privacy}", "followers_url": "https://api.github.com/users/bevenky/followers", "following_url": "https://api.github.com/users/bevenky/following{/other_user}", "gists_url": "https://api.github.com/users/bevenky/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bevenky", "id": 228017, "login": "bevenky", "node_id": "MDQ6VXNlcjIyODAxNw==", "organizations_url": "https://api.github.com/users/bevenky/orgs", "received_events_url": "https://api.github.com/users/bevenky/received_events", "repos_url": "https://api.github.com/users/bevenky/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bevenky/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bevenky/subscriptions", "type": "User", "url": "https://api.github.com/users/bevenky", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/203/reactions" }
https://api.github.com/repos/psf/requests/issues/203/timeline
null
completed
null
null
false
[ "Actually, when you make an http request, the content isn't downloaded until you access the `Response.content` attribute :)\n", "So how would we check the size of the response? \n", "The headers, if they are available. The raw socket is also available from `Response.raw` in the latest release.\n", "Ok. Are their some more docs planned to show off usage?\n", "Yes :) \n\n#178\n", "Thnx\n" ]
https://api.github.com/repos/psf/requests/issues/202
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/202/labels{/name}
https://api.github.com/repos/psf/requests/issues/202/comments
https://api.github.com/repos/psf/requests/issues/202/events
https://github.com/psf/requests/pull/202
1,907,006
MDExOlB1bGxSZXF1ZXN0NDAyMzU4
202
Content Streaming
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-14T01:55:17Z
2021-09-08T12:01:30Z
2011-10-14T02:16:26Z
CONTRIBUTOR
resolved
@mitsuhiko
{ "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/202/reactions" }
https://api.github.com/repos/psf/requests/issues/202/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/202.diff", "html_url": "https://github.com/psf/requests/pull/202", "merged_at": "2011-10-14T02:16:26Z", "patch_url": "https://github.com/psf/requests/pull/202.patch", "url": "https://api.github.com/repos/psf/requests/pulls/202" }
true
[ ":sparkles: :cake: :sparkles:\n" ]
https://api.github.com/repos/psf/requests/issues/201
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/201/labels{/name}
https://api.github.com/repos/psf/requests/issues/201/comments
https://api.github.com/repos/psf/requests/issues/201/events
https://github.com/psf/requests/pull/201
1,906,425
MDExOlB1bGxSZXF1ZXN0NDAyMTU5
201
Beautiful Async Module
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-13T23:57:04Z
2021-09-09T00:01:18Z
2011-10-14T01:15:19Z
CONTRIBUTOR
resolved
``` python # -*- coding: utf-8 -*- import requests from requests import async urls = [ 'http://www.readability.com', 'http://tablib.org', 'http://httpbin.org', 'http://python-requests.org', 'http://kennethreitz.com' ] urls = urls + urls ``` **Standard (14.125s)** ``` python for url in urls: r = requests.get(url) r.content ``` **Standard + Gevent (1.589s)** ``` pycon >>> rs = [async.get(u) for u in urls] >>> async.map(rs) [<Response [200]>, <Response [200]>, ...] ```
{ "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/201/reactions" }
https://api.github.com/repos/psf/requests/issues/201/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/201.diff", "html_url": "https://github.com/psf/requests/pull/201", "merged_at": "2011-10-14T01:15:19Z", "patch_url": "https://github.com/psf/requests/pull/201.patch", "url": "https://api.github.com/repos/psf/requests/pulls/201" }
true
[ "Hmm, I think that's about it.\n" ]
https://api.github.com/repos/psf/requests/issues/200
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/200/labels{/name}
https://api.github.com/repos/psf/requests/issues/200/comments
https://api.github.com/repos/psf/requests/issues/200/events
https://github.com/psf/requests/pull/200
1,906,329
MDExOlB1bGxSZXF1ZXN0NDAyMTI0
200
urllib2 => urllib3
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-10-13T23:42:22Z
2021-09-08T22:01:17Z
2011-11-10T03:05: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/200/reactions" }
https://api.github.com/repos/psf/requests/issues/200/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/200.diff", "html_url": "https://github.com/psf/requests/pull/200", "merged_at": "2011-11-10T03:05:44Z", "patch_url": "https://github.com/psf/requests/pull/200.patch", "url": "https://api.github.com/repos/psf/requests/pulls/200" }
true
[]
https://api.github.com/repos/psf/requests/issues/199
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/199/labels{/name}
https://api.github.com/repos/psf/requests/issues/199/comments
https://api.github.com/repos/psf/requests/issues/199/events
https://github.com/psf/requests/issues/199
1,904,198
MDU6SXNzdWUxOTA0MTk4
199
Cookbook
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-13T19:56:41Z
2021-09-09T11:00:54Z
2011-11-13T00:13:52Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/199/reactions" }
https://api.github.com/repos/psf/requests/issues/199/timeline
null
completed
null
null
false
[ "http://paste.pocoo.org/show/492135/\n" ]
https://api.github.com/repos/psf/requests/issues/198
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/198/labels{/name}
https://api.github.com/repos/psf/requests/issues/198/comments
https://api.github.com/repos/psf/requests/issues/198/events
https://github.com/psf/requests/issues/198
1,893,599
MDU6SXNzdWUxODkzNTk5
198
matrix parameters in an earlier segment get URI encoded?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1123696?v=4", "events_url": "https://api.github.com/users/jtrenouth/events{/privacy}", "followers_url": "https://api.github.com/users/jtrenouth/followers", "following_url": "https://api.github.com/users/jtrenouth/following{/other_user}", "gists_url": "https://api.github.com/users/jtrenouth/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jtrenouth", "id": 1123696, "login": "jtrenouth", "node_id": "MDQ6VXNlcjExMjM2OTY=", "organizations_url": "https://api.github.com/users/jtrenouth/orgs", "received_events_url": "https://api.github.com/users/jtrenouth/received_events", "repos_url": "https://api.github.com/users/jtrenouth/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jtrenouth/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jtrenouth/subscriptions", "type": "User", "url": "https://api.github.com/users/jtrenouth", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-10-12T21:09:46Z
2021-09-09T10:00:51Z
2011-11-26T15:49:03Z
NONE
resolved
It looks as though matrix parameters that are in a non-leaf segment of the URI path get URI encoded and so corrupted. E.g. http://server:port/root;property1=value1/path/name.type becomes http://server:port/root%3Bproperty1%3Dvalue1/path/name.type but if you put them at the end it is OK: http://server:port/root/path/name.type;property1=value1 __Jason
{ "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/198/reactions" }
https://api.github.com/repos/psf/requests/issues/198/timeline
null
completed
null
null
false
[ "Is this still an issue?\n\nUnfortunately, matrix parameters aren't supported at this time. But, they shouldn't be meddled with in the first place.\n", "Closing for now — please comment if this is still an issue.\n", "It would be an issue if I had to use this framework. I was considering it as an alternative to restful_lib, but the matrix parameter issue is a blocker.\n" ]
https://api.github.com/repos/psf/requests/issues/197
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/197/labels{/name}
https://api.github.com/repos/psf/requests/issues/197/comments
https://api.github.com/repos/psf/requests/issues/197/events
https://github.com/psf/requests/pull/197
1,889,806
MDExOlB1bGxSZXF1ZXN0Mzk3NTU5
197
Fix mistake in history
{ "avatar_url": "https://avatars.githubusercontent.com/u/188771?v=4", "events_url": "https://api.github.com/users/n1m3/events{/privacy}", "followers_url": "https://api.github.com/users/n1m3/followers", "following_url": "https://api.github.com/users/n1m3/following{/other_user}", "gists_url": "https://api.github.com/users/n1m3/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/n1m3", "id": 188771, "login": "n1m3", "node_id": "MDQ6VXNlcjE4ODc3MQ==", "organizations_url": "https://api.github.com/users/n1m3/orgs", "received_events_url": "https://api.github.com/users/n1m3/received_events", "repos_url": "https://api.github.com/users/n1m3/repos", "site_admin": false, "starred_url": "https://api.github.com/users/n1m3/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/n1m3/subscriptions", "type": "User", "url": "https://api.github.com/users/n1m3", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-12T17:19:34Z
2021-09-08T12:01:29Z
2011-10-12T17:48:57Z
NONE
resolved
It is allow_redirects, not follow_redirect
{ "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/197/reactions" }
https://api.github.com/repos/psf/requests/issues/197/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/197.diff", "html_url": "https://github.com/psf/requests/pull/197", "merged_at": "2011-10-12T17:48:57Z", "patch_url": "https://github.com/psf/requests/pull/197.patch", "url": "https://api.github.com/repos/psf/requests/pulls/197" }
true
[ "Nice catch, thanks :)\n" ]
https://api.github.com/repos/psf/requests/issues/196
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/196/labels{/name}
https://api.github.com/repos/psf/requests/issues/196/comments
https://api.github.com/repos/psf/requests/issues/196/events
https://github.com/psf/requests/pull/196
1,887,063
MDExOlB1bGxSZXF1ZXN0Mzk2NjYy
196
Fix errors introduced by merging an outdated pull request.
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
false
null
[]
null
4
2011-10-12T13:02:59Z
2014-07-20T01:36:50Z
2011-10-12T13:34:45Z
NONE
null
See issue #195. (Note: you can still specify an iterable of functions as a hook, no worries.)
{ "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/196/reactions" }
https://api.github.com/repos/psf/requests/issues/196/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/196.diff", "html_url": "https://github.com/psf/requests/pull/196", "merged_at": "2011-10-12T13:34:45Z", "patch_url": "https://github.com/psf/requests/pull/196.patch", "url": "https://api.github.com/repos/psf/requests/pulls/196" }
true
[ "The pull request was not merged unintentionally. I'll merge this in, but only temporarily. \n\nClearly I should be doing this rewrite in a separate branch.\n", "I'm pretty sure you did it intentionally, because it added some functionality. But the pull request you merged was outdated, and thus no more compatible. I tried to retain new functionality, as you can see by comparing hooks.py. Please pay more attention to merge conflicts, OK?\n", "I'm extremely aware of everything the pull request did. It was under debate for over a month.\n\nIf you are going to contribute to this project, please do so respectfully.\n", "Well then, maybe I understood something wrong. Sorry.\n" ]
https://api.github.com/repos/psf/requests/issues/195
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/195/labels{/name}
https://api.github.com/repos/psf/requests/issues/195/comments
https://api.github.com/repos/psf/requests/issues/195/events
https://github.com/psf/requests/issues/195
1,886,921
MDU6SXNzdWUxODg2OTIx
195
Now it seems completely broken.
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-10-12T12:41:52Z
2021-09-09T11:01:07Z
2011-10-12T13:03:31Z
NONE
resolved
That was a good day, and I was trying to retrieve the response content, when suddenly a wild exception appears. ``` python >>> import requests >>> response = requests.get("http://httpbin.herokuapp.com/") >>> response.content Traceback (most recent call last): File "<stdin>", line 1, in <module> File "requests\models.py", line 458, in content self._content = self.fo.read() AttributeError: 'Response' object has no attribute 'fo' ``` I tried to fix it by replacing line 162 of models.py (`response.raw = resp`) with `response.raw = response.fo = resp`, but I got the following error: ``` python >>> import requests >>> response = requests.get("http://httpbin.herokuapp.com/") >>> response.content Traceback (most recent call last): File "<stdin>", line 1, in <module> File "requests\models.py", line 481, in content if settings.decode_unicode: NameError: global name 'settings' is not defined ``` Hmm... `from .config import settings`? ``` python >>> import requests >>> response = requests.get("http://httpbin.herokuapp.com/") >>> response.content Traceback (most recent call last): File "<stdin>", line 1, in <module> File "requests\models.py", line 493, in content self._content = get_unicode_from_response(self) File "requests\utils.py", line 291, in get_unicode_from_response return unicode(r.content, encoding) File "requests\models.py", line 493, in content self._content = get_unicode_from_response(self) ... RuntimeError: maximum recursion depth exceeded ``` Now I'm pretty sure I can't fix that. What is happening? If that helps, everything was OK in [commit f524fe4](https://github.com/kennethreitz/requests/commit/f524fe4934d41fc08173cd61f49c385207d42390). This problem probably exists because you merged an outdated pull request.
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/195/reactions" }
https://api.github.com/repos/psf/requests/issues/195/timeline
null
completed
null
null
false
[ "I've created a pull request. This issue can be closed now.\n", "Please do not use the current develop branch. It is under _heavy_ development, and is not suitable for anything at this time.\n", "I _don't_ use requests in my production code at all, honestly. ('Cause I don't write any production-level code.) And I like to use all the newest and most broken stuff I can get :-)\n", "v0.6.2 is fully suitable for production, as are all releases. :)\n" ]
https://api.github.com/repos/psf/requests/issues/194
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/194/labels{/name}
https://api.github.com/repos/psf/requests/issues/194/comments
https://api.github.com/repos/psf/requests/issues/194/events
https://github.com/psf/requests/issues/194
1,875,019
MDU6SXNzdWUxODc1MDE5
194
Google App Engine Support
{ "avatar_url": "https://avatars.githubusercontent.com/u/228017?v=4", "events_url": "https://api.github.com/users/bevenky/events{/privacy}", "followers_url": "https://api.github.com/users/bevenky/followers", "following_url": "https://api.github.com/users/bevenky/following{/other_user}", "gists_url": "https://api.github.com/users/bevenky/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bevenky", "id": 228017, "login": "bevenky", "node_id": "MDQ6VXNlcjIyODAxNw==", "organizations_url": "https://api.github.com/users/bevenky/orgs", "received_events_url": "https://api.github.com/users/bevenky/received_events", "repos_url": "https://api.github.com/users/bevenky/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bevenky/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bevenky/subscriptions", "type": "User", "url": "https://api.github.com/users/bevenky", "user_view_type": "public" }
[ { "color": "fbca04", "default": false, "description": null, "id": 615414998, "name": "GAE Support", "node_id": "MDU6TGFiZWw2MTU0MTQ5OTg=", "url": "https://api.github.com/repos/psf/requests/labels/GAE%20Support" } ]
closed
true
null
[]
null
19
2011-10-11T14:09:09Z
2021-09-08T09:00:50Z
2011-11-26T15:49:31Z
NONE
resolved
Http Lib2 works on google app engine and requests should support it too.
{ "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/194/reactions" }
https://api.github.com/repos/psf/requests/issues/194/timeline
null
completed
null
null
false
[ "Requests supports Python 2.5. Is more required?\n", "Google app engine works a bit differently.. from google.appengine.api import urlfetch\n\nYou have any ideas!\n", "Hmm. `urlfetch` already looks a bit like requests.\n", "let me give a bit more perpective.. im a the lead developer of https://github.com/plivo/plivohelper-python and we currently support both. requests would remove lot of boiler plate for us :) hence asking if you had a chance to test this stuff?\n", "@bevenky, I'd love to add a compatibility layer. It's truly a shame that Google doesn't just include the full standard library though. Very odd ;)\n", "that would be great.. :) already sold on this.. will wait for gae support :)\n", "It was my understanding that `urllib`, `urllib2`, and `httplib` are monkey patched on app engine to use `urlfetch` under the hood. What changes would need to be made to `requests`?\n", "@derferman, if that's the case, then everything should work perfectly!\n", "According to http://code.google.com/appengine/kb/libraries.html\n\nthe `select` module is not allowed on app engine, but is being used in `packages/urllib3/connectionpool.py`\n", "Well, I think App Engine is crazy :)\n", "I think you're crazy. GAE is \"crazy\" because in order to support a seamlessly scalable environment, you have to put certain restrictions on what a program can do in the environment. In Java you'd do so by applying a security manager, in python, you have to replace parts of the \"standard\" libraries to prevent users from doing nasty things to your carefully managed environment.\n\nCraziness aside, you think you can fix this issue? I was happy to find requests solved my cookie and header handling problems in 5 minutes what I'd been scouring python docs and google references for hours trying to figure out, but then failed miserably when actually put in the app engine environment. I suppose I'd be happy to make a patch if you say \"I'm too busy, make a patch\", but it'd take me a long while to find solutions and then narrow them to the _appropriate_ solutions.\n", "I have no problem supporting app engine, but I'm not bending over backwards for it.\n\nIt sounds like the problem is in urllib3, not requests.\n", "BTW, I don't quite understand why the import should be attempted on a synchronous GET, although I'm something of a python newbie, so there may be some convoluted logic why a GET doesn't boil down to a socket connect followed by a few writes and reads.\n", "Connection pooling?\n", "@kennethreitz: @twall and I are coworkers, and we're working together to get requests working on App Engine. I've forked the project, and I believe my fork works properly. I had to make a bunch of changes that are specific to Python 2.5, so I don't know if you'll be able to actually pull my changes in, but I'll create a pull request for you to review, anyway. Also, that way, when people ask about requests on App Engine, you can point them at my fork!\n", "@singingwolfboy I'd be happy to accept a pull request that works with 2.6–3.2 (I know App Engine supports 2.7), but the urllib3 changes need to occur in the urllib3 repository.\n", "https://github.com/shazow/urllib3\n", "FYI: Related urllib3 discussion is here: https://github.com/shazow/urllib3/issues/61\n", "Alright, urllib3 seems to be working on AppEngine now, pull the latest master. :)\n" ]
https://api.github.com/repos/psf/requests/issues/193
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/193/labels{/name}
https://api.github.com/repos/psf/requests/issues/193/comments
https://api.github.com/repos/psf/requests/issues/193/events
https://github.com/psf/requests/issues/193
1,871,258
MDU6SXNzdWUxODcxMjU4
193
Broken link in docs: "supported interpreters"
{ "avatar_url": "https://avatars.githubusercontent.com/u/291359?v=4", "events_url": "https://api.github.com/users/SimonSapin/events{/privacy}", "followers_url": "https://api.github.com/users/SimonSapin/followers", "following_url": "https://api.github.com/users/SimonSapin/following{/other_user}", "gists_url": "https://api.github.com/users/SimonSapin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SimonSapin", "id": 291359, "login": "SimonSapin", "node_id": "MDQ6VXNlcjI5MTM1OQ==", "organizations_url": "https://api.github.com/users/SimonSapin/orgs", "received_events_url": "https://api.github.com/users/SimonSapin/received_events", "repos_url": "https://api.github.com/users/SimonSapin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SimonSapin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SimonSapin/subscriptions", "type": "User", "url": "https://api.github.com/users/SimonSapin", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2011-10-11T06:50:11Z
2021-09-09T11:01:08Z
2011-10-12T04:08:47Z
CONTRIBUTOR
resolved
Hi, The "supported interpreters" link in the docs is broken: http://docs.python-requests.org/en/latest/community/faq/#python-3-support
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/193/reactions" }
https://api.github.com/repos/psf/requests/issues/193/timeline
null
completed
null
null
false
[ "< kennethreitz> blame readthedocs :)\n", "I’m not sure I understand. The `faq.rst` file contains the following markup:\n\n```\nHere's a list of `supported interpreters <interpreters>`_.\n```\n\nwhich, unsurprisingly generates the following HTML:\n\n```\nHere&#8217;s a list of <a class=\"reference external\" href=\"interpreters\">supported interpreters</a>.\n```\n\nBut I can’t find a `interpreters.rst` file anywhere in the repository. How is that related to readthedocs? Maybe Kenneth forgot to commit a file in 47a36de?\n", "I don't understand either - I pointed it out to him on IRC earlier today, that was his response; I'm just passing it along.\n", "Looks like I spoke too soon :)\n", "Fixed!\n" ]
https://api.github.com/repos/psf/requests/issues/192
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/192/labels{/name}
https://api.github.com/repos/psf/requests/issues/192/comments
https://api.github.com/repos/psf/requests/issues/192/events
https://github.com/psf/requests/pull/192
1,867,141
MDExOlB1bGxSZXF1ZXN0MzkxMTA3
192
Send file names in multipart/form-data requests.
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
false
null
[]
null
8
2011-10-10T19:20:51Z
2014-07-20T01:36:50Z
2011-11-13T05:38:16Z
NONE
null
Most of the values in the `files` dictionary are open file objects, which means they have a `name` attribute. Requests, though, sends the key name instead of file name. This can cause some unexpected shit if the server decides to use that information. Note: I'm not sure whether this change will work on Python <= 2.6.
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/192/reactions" }
https://api.github.com/repos/psf/requests/issues/192/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/192.diff", "html_url": "https://github.com/psf/requests/pull/192", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/192.patch", "url": "https://api.github.com/repos/psf/requests/pulls/192" }
true
[ "Thanks, I've been tossing that idea back and forth for a while. :cake:\n\n---\n\nAnyone else have any input?\n", "In general I am quite unhappy with the multipart uploading in requests currently, especially because you cannot use it to upload humongous files since they will be read into memory. I would recommend considering rewriting part of the multipart handling and to also make it possible to override the encoding explicitly.\n\nRegarding the filename issue however, do not use `.name` directly since this causes problems with streams that come from memory.\n\nBetter:\n\n``` python\ndef guess_filename(obj):\n name = getattr(obj, 'name', None)\n if name and name[0] != '<' and name[-1] != '>':\n return name\n```\n", "@mitsuhiko hmm, are you sure that in-memory streams have a `name` attribute?\n\n``` python\n>>> from io import StringIO\n>>> StringIO().name\nTraceback (most recent call last):\n ...\nAttributeError: '_io.StringIO' object has no attribute 'name'\n```\n\nAccording to http://docs.python.org/library/io.html, the `name` attribute is not a part of the API.\n\nUPD: By the way, `<stdin>`, `<memory>`, etc. are valid filenames in ext*, hfs+, and many other file systems; you can't throw them out so easy.\n", "A socket file descriptor has the name \"<fdopen>\", same goes with other things opened by file descriptor. stdin/stdout etc have '<stdin>'. Yes, StringIO does not have that attribute but many other streams have like temporary file objects opened with tempfile and many custom user streams have a different meaning assigned to `name`. In general I strongly recommend against using this attribute since it's undocumented and often used for different things.\n\nI made this mistake in Werkzeug and am currently in the process of recovering from it. I now have an explicit API for this kind of thing.\n", "Yeah, you're right. I don't see any way to ensure valid filenames other than to use requests with Python 3 (which has a well-defined I/O layer) then. That's quite sad.\n\nUPD: hey, wait. If someone rewrites the `encode_multipart_formdata()` function so that it does not load the whole stream contents into the memory, how are you supposed to pass anything other than files and BytesIOs to it? Don't forget, you **must know the exact request body length** in order to send it; sockets and most user-defined streams, as well as stdin (stdout is not readable, by the way :-), don't have a defined content length. Thus the filename problem is eliminated by restricting input streams to files (which have a `name`) and BytesIOs (which don't have a `name`.) If you want to send some data from a socket, for example, you should probably first read as much data as you need and then wrap it into a BytesIO.\n", "@mitsuhiko I have an old branch `filepost-stream` which implements a stream-whenever-possible `encode_multipart_formdata()`: http://code.google.com/p/urllib3/source/browse/urllib3/filepost.py?name=filepost-stream\n\nIt's a proof of concept and over the top in trying to cover to get the stream size in too many cases (to avoid using chunked-encoding which was rarely supported back in the day). If we get rid of the size guessing code, it should be pretty straight forward to forwardport to the latest urllib3 core.\n", "@shazow are you sure that the situation with Transfer-Encoding: chunked got better since then? For example, I've tried to send a file to http://httpbin.org/post using chunked transfer encoding and it replied me with the 411 Length Required error. We should probably stick to specifying the Content-Length. (UPD: TE: chunked works on http://httpbin.herokuapp.com/post)\n\nAnyway, this pull request is about sending filenames. I thought a bit more about what @mitsuhiko wrote and decided that using `getattr(v, 'name', k)` is OK in this case: even if it accidentally returns `<fdopen>` or `<stdin>` or something, sending the key name does not make much more sense (and angle brackets will get stripped by something like `werkzeug.utils.secure_filename` on the server side anyway.)\n", "@pyos, sorry for the heroku issues. I recommend using the `httpbin.herokuapp.com`domain now. The Requests tests will be updated accordingly.\n" ]
https://api.github.com/repos/psf/requests/issues/191
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/191/labels{/name}
https://api.github.com/repos/psf/requests/issues/191/comments
https://api.github.com/repos/psf/requests/issues/191/events
https://github.com/psf/requests/pull/191
1,866,950
MDExOlB1bGxSZXF1ZXN0MzkxMDQ4
191
just fixed a typo
{ "avatar_url": "https://avatars.githubusercontent.com/u/483?v=4", "events_url": "https://api.github.com/users/nakajima/events{/privacy}", "followers_url": "https://api.github.com/users/nakajima/followers", "following_url": "https://api.github.com/users/nakajima/following{/other_user}", "gists_url": "https://api.github.com/users/nakajima/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nakajima", "id": 483, "login": "nakajima", "node_id": "MDQ6VXNlcjQ4Mw==", "organizations_url": "https://api.github.com/users/nakajima/orgs", "received_events_url": "https://api.github.com/users/nakajima/received_events", "repos_url": "https://api.github.com/users/nakajima/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nakajima/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nakajima/subscriptions", "type": "User", "url": "https://api.github.com/users/nakajima", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-10T18:57:04Z
2021-09-08T12:01:29Z
2011-10-10T18:57:57Z
CONTRIBUTOR
resolved
it's -> its
{ "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/191/reactions" }
https://api.github.com/repos/psf/requests/issues/191/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/191.diff", "html_url": "https://github.com/psf/requests/pull/191", "merged_at": "2011-10-10T18:57:57Z", "patch_url": "https://github.com/psf/requests/pull/191.patch", "url": "https://api.github.com/repos/psf/requests/pulls/191" }
true
[ "I'm wholly convinced that monospace fonts kill my ability to read english ;)\n" ]
https://api.github.com/repos/psf/requests/issues/190
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/190/labels{/name}
https://api.github.com/repos/psf/requests/issues/190/comments
https://api.github.com/repos/psf/requests/issues/190/events
https://github.com/psf/requests/issues/190
1,866,768
MDU6SXNzdWUxODY2NzY4
190
Question: Multipart support
{ "avatar_url": "https://avatars.githubusercontent.com/u/574696?v=4", "events_url": "https://api.github.com/users/paulmillr/events{/privacy}", "followers_url": "https://api.github.com/users/paulmillr/followers", "following_url": "https://api.github.com/users/paulmillr/following{/other_user}", "gists_url": "https://api.github.com/users/paulmillr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/paulmillr", "id": 574696, "login": "paulmillr", "node_id": "MDQ6VXNlcjU3NDY5Ng==", "organizations_url": "https://api.github.com/users/paulmillr/orgs", "received_events_url": "https://api.github.com/users/paulmillr/received_events", "repos_url": "https://api.github.com/users/paulmillr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/paulmillr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/paulmillr/subscriptions", "type": "User", "url": "https://api.github.com/users/paulmillr", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-10-10T18:36:03Z
2021-09-09T11:01:08Z
2011-10-10T18:46:36Z
NONE
resolved
I didn't saw multipart/form-data support in the examples. Does `requests` support it? If no, I think it would be a good idea -- multipart is something that requires much coding with built-in tools.
{ "avatar_url": "https://avatars.githubusercontent.com/u/574696?v=4", "events_url": "https://api.github.com/users/paulmillr/events{/privacy}", "followers_url": "https://api.github.com/users/paulmillr/followers", "following_url": "https://api.github.com/users/paulmillr/following{/other_user}", "gists_url": "https://api.github.com/users/paulmillr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/paulmillr", "id": 574696, "login": "paulmillr", "node_id": "MDQ6VXNlcjU3NDY5Ng==", "organizations_url": "https://api.github.com/users/paulmillr/orgs", "received_events_url": "https://api.github.com/users/paulmillr/received_events", "repos_url": "https://api.github.com/users/paulmillr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/paulmillr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/paulmillr/subscriptions", "type": "User", "url": "https://api.github.com/users/paulmillr", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/190/reactions" }
https://api.github.com/repos/psf/requests/issues/190/timeline
null
completed
null
null
false
[ "Yessir! That's what the `files` parameter is for. \n", "Great! Thanks.\n" ]
https://api.github.com/repos/psf/requests/issues/189
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/189/labels{/name}
https://api.github.com/repos/psf/requests/issues/189/comments
https://api.github.com/repos/psf/requests/issues/189/events
https://github.com/psf/requests/issues/189
1,859,823
MDU6SXNzdWUxODU5ODIz
189
Python 3: fucking accomplished.
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-10-09T23:29:21Z
2021-09-09T11:01:09Z
2011-10-10T13:31:21Z
NONE
resolved
Hi! I like Requests very much, but Python 3 is too much awesomeness to miss. Yeah, I know, you're working on python 3 support but I live in Russia and "I'm working on it" actually means "fuck you, I don't care about your needs" for me :-) So a few hours ago I <del>drank some vodka and</del> decided to rewrite Requests with Python 3 support by myself. I got a bit carried away in the process, though, so the result does not look like Requests very much, but it still has almost the same API. (Some things like `Request.cookies` and `Response.cookies` are missing, but I'll fix it. Maybe.) Here it is: [pyos/requests3](http://github.com/pyos/requests3). Could you take a look at it, please? I'd really appreciate some thoughts on my code. ^^ (Not sure if creating an issue is a right thing to do to tell someone about that thing; I'm sorry if I made something wrong :-)
{ "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/189/reactions" }
https://api.github.com/repos/psf/requests/issues/189/timeline
null
completed
null
null
false
[ "Thank you very much sir!\n\nI can assure you, Python 3 is the very next thing on the roadmap. I'm currently reimplementing all of requests to be powered by urllib3 instead of urllib2, which will make this port significantly easier — so, if you can be patient for a few more weeks, all will be well :)\n\nThere's really no need to reimplement the entire library to support Python3. It'll actually be quite a simple process as soon as this dev cycle is finished :D\n", "> There's really no need to reimplement the entire library to support Python3.\n\nTo be honest, I've done this not only because I like to code stuff in Python 3, but also because I didn't understand most of the code.\n\nFor example:\n- Why do you need hooks when you can modify arguments before calling `request()` (this will also modify the `Request` object) and the `Response` object after `request()` finishes?\n- Why bother encoding keys & stuff in `utils.encode_params` if `urllib.urlencode` does the same thing for you?\n- Why copy the scheme by yourself in `utils.cleanup_url` when `urlparse.urljoin` also does this?\n- What exactly urllib3 does other than maintaining a collection of HTTPConnections and encoding data in `multipart/form-data`?\n", "- Hooks allow you to do some pretty advanced things, like add simple OAuth support.\n- You're welcome to call a few extra functions _every time_ you want to send a parameter.\n- See above.\n- That's mostly it. \n" ]
https://api.github.com/repos/psf/requests/issues/188
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/188/labels{/name}
https://api.github.com/repos/psf/requests/issues/188/comments
https://api.github.com/repos/psf/requests/issues/188/events
https://github.com/psf/requests/issues/188
1,855,875
MDU6SXNzdWUxODU1ODc1
188
Cleanup session patching
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" } ]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
0
2011-10-09T12:17:24Z
2021-09-09T11:01:02Z
2011-10-23T00:00:27Z
CONTRIBUTOR
resolved
A-la `requests.async`
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/188/reactions" }
https://api.github.com/repos/psf/requests/issues/188/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/187
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/187/labels{/name}
https://api.github.com/repos/psf/requests/issues/187/comments
https://api.github.com/repos/psf/requests/issues/187/events
https://github.com/psf/requests/issues/187
1,855,848
MDU6SXNzdWUxODU1ODQ4
187
Wrong status code because of DNS server redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/1113925?v=4", "events_url": "https://api.github.com/users/pySilver/events{/privacy}", "followers_url": "https://api.github.com/users/pySilver/followers", "following_url": "https://api.github.com/users/pySilver/following{/other_user}", "gists_url": "https://api.github.com/users/pySilver/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pySilver", "id": 1113925, "login": "pySilver", "node_id": "MDQ6VXNlcjExMTM5MjU=", "organizations_url": "https://api.github.com/users/pySilver/orgs", "received_events_url": "https://api.github.com/users/pySilver/received_events", "repos_url": "https://api.github.com/users/pySilver/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pySilver/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pySilver/subscriptions", "type": "User", "url": "https://api.github.com/users/pySilver", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-10-09T12:08:09Z
2021-09-09T12:00:32Z
2011-10-09T12:18:16Z
NONE
resolved
I'm not sure this is issue directly related to `requests` but anyway, I'd like to share this for community. Lets GET content from invalid domain (client has enabled OpenDNS servers in order to match domain ip): ``` In [1]: import requests In [2]: requests.__version__ Out[2]: '0.6.2 (dev)' ... In [8]: r = requests.get('http://kjsahfaskljfhaslfkjashjfjasfhasd.com') WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: guide.a.id.opendns.com WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: w10.guide.b.id.opendns.com WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: w10.w10.guide.c.id.opendns.com WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: w10.w10.w10.guide.d.id.opendns.com WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: w10.w10.w10.w10.guide.e.id.opendns.com WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: guide.opendns.com In [9]: r.status_code Out[9]: 200 In [10]: r.request.url Out[10]: 'http://kjsahfaskljfhaslfkjashjfjasfhasd.com' In [11]: r.content Out[11]: u'<html>\n\t<head>\n\t\t<title> </title>\n\t\t<script type="text/javascript">\n\t\tfunction bredir(a,b,c,d,e){var f,g,h,i,j;var k=false;var l=false;var m=[[300,250,false],[250,250,false],[240,400,false],[336,280,false],[180,150,false],[468,60,false],[234,60,false],[88,31,false],[120,90,false],[120,60,false],[120,240,false],[125,125,false],[728,90,false],[160,600,false],[120,600,false],[300,600,false],[300,125,false],[530,300,false],[190,200,false],[470,250,false],[720,300,true],[500,350,true],[550,480,true]];if(typeof window.innerHeight=="number"){g=window.innerHeight;f=window.innerWidth}else if(typeof document.body.offsetHeight=="number"){g=document.body.offsetHeight;f=document.body.offsetWidth}for(var n=0;n<m.length;n++){j=m[n];h=Math.abs(f-j[0]);i=Math.abs(g-j[1]);if(h<=2&&i<=2){k=true;l=j[2]}}if(k||f<100&&f!==0||g<100&&g!==0){if(l&&self==parent){self.close();return}return"/b"+"anner.php?w="+f+"&h="+g+"&d="+a+"&u="+b+"&r="+c+"&view="+d}else{return e+"&w="+f+"&h="+g}}\n\t\t</script>\n\t</head>\n\t<body onLoad="location.replace(bredir(\'kjsahfaskljfhaslfkjashjfjasfhasd.com\', \'kjsahfaskljfhaslfkjashjfjasfhasd.com\', \'\', \'error\', \'/main?url=kjsahfaskljfhaslfkjashjfjasfhasd.com\'));" style="margin: 0px;">\n\t\t<noscript>\n\t\t\t<iframe frameborder="0" src="/main?url=kjsahfaskljfhaslfkjashjfjasfhasd.com" width="100%" height="100%"></iframe>\n\t\t</noscript>\n\t</body>\n</html>\n' ``` As you can see request has 200 code, however this domain does not exists, so we wrongly assume that everything is fine. This particular case works because DNS servers (OpenDNS.com) fallback erorrs to custom page, you can try this out yourserlf by settings client dns servers from this site. However, urllib2 raises 404 error for that ``` In [15]: import urllib2 In [16]: urllib2.urlopen("http://kjsahfaskljfhaslfkjashjfjasfhasd.com") ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (14, 0)) --------------------------------------------------------------------------- HTTPError Traceback (most recent call last) /Users/silver/Projects/testpro/<ipython console> in <module>() /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in urlopen(url, data, timeout) 124 if _opener is None: 125 _opener = build_opener() --> 126 return _opener.open(url, data, timeout) 127 128 def install_opener(opener): /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in open(self, fullurl, data, timeout) 396 for processor in self.process_response.get(protocol, []): 397 meth = getattr(processor, meth_name) --> 398 response = meth(req, response) 399 400 return response /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in http_response(self, request, response) 509 if not (200 <= code < 300): 510 response = self.parent.error( --> 511 'http', request, response, code, msg, hdrs) 512 513 return response /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in error(self, proto, *args) 434 if http_err: 435 args = (dict, 'default', 'http_error_default') + orig_args --> 436 return self._call_chain(*args) 437 438 # XXX probably also want an abstract factory that knows when it makes /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args) 368 func = getattr(handler, meth_name) 369 --> 370 result = func(*args) 371 if result is not None: 372 return result /usr/local/Cellar/python/2.7.1/lib/python2.7/urllib2.pyc in http_error_default(self, req, fp, code, msg, hdrs) 517 class HTTPDefaultErrorHandler(BaseHandler): 518 def http_error_default(self, req, fp, code, msg, hdrs): --> 519 raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 520 521 class HTTPRedirectHandler(BaseHandler): HTTPError: HTTP Error 404: Not Found ``` I'm not really sure what to do about it beside not using that kind DNS servers.
{ "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/187/reactions" }
https://api.github.com/repos/psf/requests/issues/187/timeline
null
completed
null
null
false
[ "The current `develop` branch is under _heavy_ development, and is extremely unstable. \n\nI'll go back and investigate, but do use the latest stable release (v0.6.2).\n", "I have tried the same on pypi version already.\n", "Just making sure :) \n\n---\n\nMake sure to check out `response.history`. :)\n" ]
https://api.github.com/repos/psf/requests/issues/186
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/186/labels{/name}
https://api.github.com/repos/psf/requests/issues/186/comments
https://api.github.com/repos/psf/requests/issues/186/events
https://github.com/psf/requests/issues/186
1,845,049
MDU6SXNzdWUxODQ1MDQ5
186
weakref for response.request
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" } ]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
0
2011-10-07T15:44:15Z
2021-09-09T11:01:09Z
2011-10-09T12:34:20Z
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/186/reactions" }
https://api.github.com/repos/psf/requests/issues/186/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/185
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/185/labels{/name}
https://api.github.com/repos/psf/requests/issues/185/comments
https://api.github.com/repos/psf/requests/issues/185/events
https://github.com/psf/requests/issues/185
1,840,883
MDU6SXNzdWUxODQwODgz
185
No data parameter in requests.delete()
{ "avatar_url": "https://avatars.githubusercontent.com/u/14872?v=4", "events_url": "https://api.github.com/users/apetresc/events{/privacy}", "followers_url": "https://api.github.com/users/apetresc/followers", "following_url": "https://api.github.com/users/apetresc/following{/other_user}", "gists_url": "https://api.github.com/users/apetresc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/apetresc", "id": 14872, "login": "apetresc", "node_id": "MDQ6VXNlcjE0ODcy", "organizations_url": "https://api.github.com/users/apetresc/orgs", "received_events_url": "https://api.github.com/users/apetresc/received_events", "repos_url": "https://api.github.com/users/apetresc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/apetresc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/apetresc/subscriptions", "type": "User", "url": "https://api.github.com/users/apetresc", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-10-07T06:46:33Z
2021-09-09T11:01:04Z
2011-10-19T19:59:39Z
NONE
resolved
The requests.delete() method does not support having a `data` parameter. The [HTTP spec for DELETE](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) does not give much guidance about whether this is allowed, but in practical situations, it is often used. There is currently no way to access such services using requests. (In particular it's worth noting that `curl -X DELETE -d "data"` works without issue)
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/185/reactions" }
https://api.github.com/repos/psf/requests/issues/185/timeline
null
completed
null
null
false
[ "According to the HTTP spec, \"The DELETE method requests that the origin server delete the resource identified by the Request-URI.\"\n\nThis would seem to negate the usefulness of passing data in the request body, as the resource should be solely identified by the Request-URI.\n", "I agree that a theoretical discussion can be had about this, and I'd probably be on your side, @sergedomk. However, we cannot ignore that, _in reality_ servers can and do use data in the request body even for DELETE requests, and other standard tools (like `curl`) support this.\n\nIf you want an example, here's the first one that comes to mind: http://docs.gnip.com/w/page/23733233/Rules%20Methods%20Documentation#deleterules\n", "I'd say this is a point for theoretical discussion.\n\nSubmitting a DELETE with data is already possible using `requests`.\n\n`requests.request('DELETE', url, data=\"data\")`\n\nSo the discussion is whether or not it should be included in the DELETE method as well. It's a question of where to draw a boundary on adhering to the spec vs. not.\n\n`curl` is a great example of this as it has no adherence to the HTTP spec at all. `curl -V FOOBAR -d \"data\"` also works perfectly fine. And FOOBAR is definitely not a HTTP method.\n", "Oh, interesting. I didn't know about `requests.request`. That certainly mitigates my issue, and makes me agree with you even more.\n\nI'm okay with closing this issue if @kennethreitz is.\n" ]
https://api.github.com/repos/psf/requests/issues/184
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/184/labels{/name}
https://api.github.com/repos/psf/requests/issues/184/comments
https://api.github.com/repos/psf/requests/issues/184/events
https://github.com/psf/requests/pull/184
1,826,656
MDExOlB1bGxSZXF1ZXN0Mzc5ODM3
184
Make get and head requests respect allow_redirects=False.
{ "avatar_url": "https://avatars.githubusercontent.com/u/464726?v=4", "events_url": "https://api.github.com/users/millerdev/events{/privacy}", "followers_url": "https://api.github.com/users/millerdev/followers", "following_url": "https://api.github.com/users/millerdev/following{/other_user}", "gists_url": "https://api.github.com/users/millerdev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/millerdev", "id": 464726, "login": "millerdev", "node_id": "MDQ6VXNlcjQ2NDcyNg==", "organizations_url": "https://api.github.com/users/millerdev/orgs", "received_events_url": "https://api.github.com/users/millerdev/received_events", "repos_url": "https://api.github.com/users/millerdev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/millerdev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/millerdev/subscriptions", "type": "User", "url": "https://api.github.com/users/millerdev", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-10-05T18:39:59Z
2021-09-08T23:05:22Z
2011-10-09T11:06:15Z
NONE
resolved
Fixes issue #183 I did this on top of the 0.6.1 release because I need to use it in production.
{ "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/184/reactions" }
https://api.github.com/repos/psf/requests/issues/184/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/184.diff", "html_url": "https://github.com/psf/requests/pull/184", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/184.patch", "url": "https://api.github.com/repos/psf/requests/pulls/184" }
true
[ "Just realized I forgot to add myself to the authors file... Would appreciate if you did that if/when you merge this.\n", "You can still add yourself by commiting the change. It will be added to the pull request\n", "Thanks for the pull request! This was actually fixed a few weeks ago for the rewrite (currently being done in develop).\n\nI'll put out a bugfix release in the meantime.\n", "Merged. Thanks!\n\n:cake:\n" ]
https://api.github.com/repos/psf/requests/issues/183
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/183/labels{/name}
https://api.github.com/repos/psf/requests/issues/183/comments
https://api.github.com/repos/psf/requests/issues/183/events
https://github.com/psf/requests/issues/183
1,825,984
MDU6SXNzdWUxODI1OTg0
183
Cannot prevent redirect on GET request
{ "avatar_url": "https://avatars.githubusercontent.com/u/464726?v=4", "events_url": "https://api.github.com/users/millerdev/events{/privacy}", "followers_url": "https://api.github.com/users/millerdev/followers", "following_url": "https://api.github.com/users/millerdev/following{/other_user}", "gists_url": "https://api.github.com/users/millerdev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/millerdev", "id": 464726, "login": "millerdev", "node_id": "MDQ6VXNlcjQ2NDcyNg==", "organizations_url": "https://api.github.com/users/millerdev/orgs", "received_events_url": "https://api.github.com/users/millerdev/received_events", "repos_url": "https://api.github.com/users/millerdev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/millerdev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/millerdev/subscriptions", "type": "User", "url": "https://api.github.com/users/millerdev", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-10-05T17:28:11Z
2021-09-09T12:00:32Z
2011-10-09T11:07:24Z
NONE
resolved
I would like to make a request, but I do not want to follow the redirect. Currently this does not seem to be possible. I get a 200 response code despite initiating the request with `allow_redirects=False`. Here's some example code to show what I'm doing: ``` python response = requests.get('http://www.test.com/redirect', allow_redirects=False) assert response.status_code == 302 ``` Upon investigating the source, it seems that `allow_redirects` is ignored for GET and HEAD requests. I'm using v0.6.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/183/reactions" }
https://api.github.com/repos/psf/requests/issues/183/timeline
null
completed
null
null
false
[ "See #184\n" ]
https://api.github.com/repos/psf/requests/issues/182
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/182/labels{/name}
https://api.github.com/repos/psf/requests/issues/182/comments
https://api.github.com/repos/psf/requests/issues/182/events
https://github.com/psf/requests/issues/182
1,801,077
MDU6SXNzdWUxODAxMDc3
182
Response URLs are not unicode strings
{ "avatar_url": "https://avatars.githubusercontent.com/u/201022?v=4", "events_url": "https://api.github.com/users/pennersr/events{/privacy}", "followers_url": "https://api.github.com/users/pennersr/followers", "following_url": "https://api.github.com/users/pennersr/following{/other_user}", "gists_url": "https://api.github.com/users/pennersr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pennersr", "id": 201022, "login": "pennersr", "node_id": "MDQ6VXNlcjIwMTAyMg==", "organizations_url": "https://api.github.com/users/pennersr/orgs", "received_events_url": "https://api.github.com/users/pennersr/received_events", "repos_url": "https://api.github.com/users/pennersr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pennersr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pennersr/subscriptions", "type": "User", "url": "https://api.github.com/users/pennersr", "user_view_type": "public" }
[ { "color": "e102d8", "default": false, "description": null, "id": 117745, "name": "Planned", "node_id": "MDU6TGFiZWwxMTc3NDU=", "url": "https://api.github.com/repos/psf/requests/labels/Planned" }, { "color": "0b02e1", "default": false, "description": null, "id": 191274, "name": "Contributor Friendly", "node_id": "MDU6TGFiZWwxOTEyNzQ=", "url": "https://api.github.com/repos/psf/requests/labels/Contributor%20Friendly" } ]
closed
true
null
[]
null
2
2011-10-03T09:36:50Z
2021-09-09T10:00:45Z
2012-01-19T23:42:29Z
CONTRIBUTOR
resolved
When running... ``` >>> u = requests.head('http://t.co/qewwD8xr').url >>> print repr(u) 'http://korrdon.info/night/music/32843-fedde-le-grand-live-space-ibiza-closing-party-2011-02102011.html?utm_campaign=\xd0\x9a\xd0\xbe\xd1\x80\xd1\x80\xd0\xb5\xd1\x81\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb4\xd0\xb5\xd0\xbd\xd1\x82+\xd0\x94\xd0\xbe\xd0\xbd\xd0\xb5\xd1\x86\xd0\xba\xd0\xb0&utm_term=KorrDon&utm_content=news&utm_source=korrdon.info&utm_medium=korrdon' ``` ... I had expected `u` to be equal to: ``` u'http://korrdon.info/night/music/32843-fedde-le-grand-live-space-ibiza-closing-party-2011-02102011.html?utm_campaign=\u041a\u043e\u0440\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442+\u0414\u043e\u043d\u0435\u0446\u043a\u0430&utm_term=KorrDon&utm_content=news&utm_source=korrdon.info&utm_medium=korrdon' ``` That is, `u.decode('utf8')`.
{ "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/182/reactions" }
https://api.github.com/repos/psf/requests/issues/182/timeline
null
completed
null
null
false
[ "Have you taken into account charset returned by server?\n\n```\n>>> requests.head('http://t.co/qewwD8xr').headers['content-type']\n'text/html; charset=WINDOWS-1251'\n```\n", "They definitely should be. \n" ]
https://api.github.com/repos/psf/requests/issues/181
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/181/labels{/name}
https://api.github.com/repos/psf/requests/issues/181/comments
https://api.github.com/repos/psf/requests/issues/181/events
https://github.com/psf/requests/issues/181
1,793,882
MDU6SXNzdWUxNzkzODgy
181
Append '/' to domain root requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
2
2011-10-02T00:53:59Z
2021-09-09T12:00:31Z
2011-10-09T12:20:00Z
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/181/reactions" }
https://api.github.com/repos/psf/requests/issues/181/timeline
null
completed
null
null
false
[ "Might be a better idea to strip the domain rather than appending a character. At least it'll be more inline with other major libraries like cURL.\n\nSucks to make a special case just for Twitter though. :/\n", "You know, we should have done like a mini-sprint this weekend. :-/\n\n---\n\nFor now, I'm appending `/`, because I haven't taken a look at the the proxy stuff yet. \n" ]
https://api.github.com/repos/psf/requests/issues/180
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/180/labels{/name}
https://api.github.com/repos/psf/requests/issues/180/comments
https://api.github.com/repos/psf/requests/issues/180/events
https://github.com/psf/requests/issues/180
1,793,878
MDU6SXNzdWUxNzkzODc4
180
Move tests to nose
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
0
2011-10-02T00:51:14Z
2021-09-09T11:01:10Z
2011-10-09T12:20:11Z
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/180/reactions" }
https://api.github.com/repos/psf/requests/issues/180/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/179
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/179/labels{/name}
https://api.github.com/repos/psf/requests/issues/179/comments
https://api.github.com/repos/psf/requests/issues/179/events
https://github.com/psf/requests/issues/179
1,791,361
MDU6SXNzdWUxNzkxMzYx
179
Accept k/v lists in place of dicts 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" }
[ { "color": "e102d8", "default": false, "description": null, "id": 117745, "name": "Planned", "node_id": "MDU6TGFiZWwxMTc3NDU=", "url": "https://api.github.com/repos/psf/requests/labels/Planned" }, { "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
20
2011-10-01T10:43:19Z
2021-09-09T03:00:25Z
2012-09-11T03:19:15Z
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/179/reactions" }
https://api.github.com/repos/psf/requests/issues/179/timeline
null
completed
null
null
false
[ "Regarding Ordered Dicts (#284), if you're in need of a use case, [Amazon S3's Browser Uploads](http://aws.amazon.com/articles/1434) requires the form fields to be in a specific order. I just hacked up the code to use `collections.OrderedDict` where required to make this work. It looks like you're planning to do a bit more than that, but you're interested I can provide the modified code.\n", "Actually, I'd like to do the opposite: turn incoming dicts (ordered or not) into `k, v` iterables, which will be parsed in order.\n", "As this hasn't been done yet it would be nice to implement #507 as part of this implementation.\n", "If no one objects, I might start hacking something together on this. Mainly I need it to [create a download](http://github3py.readthedocs.org/en/latest/repo.html#github3.repo.Repository.create_download) via the GitHub \nAPI using Amazon S3. But even by [creating a form reply](https://github.com/sigmavirus24/github3.py/blob/master/github3/repo.py#L293), this doesn't work (which leads me to believe I'm doing something else wrong).\n", "@sigmavirus24 That'd be wonderful! Looking forward to it :)\n", "I'll probably have time to work on it this weekend at the earliest.\n", "So I started with `_encode_files` but realized that I cannot accurately test those changes since we seem to be having problems with the tests failing as the repository is now (at least they fail on my machine and I know @Lukasa is aware of this). Once those stop failing, I'll get back to work on this.\n", "Hmm, I'll take a look.\n\nEverything should be fine, according to Travis: http://travis-ci.org/#!/kennethreitz/requests\n\nWhat errors are you seeing?\n", "Scratch that. I had pulled but my directory had been dirty so after stashing I seem to not have pulled again. Sorry for the confusion. (Just pulled a second time to double check)\n", "@sigmavirus24, hmm, what operating system are you running? what version of python?\n\ncan you try `make simple`\n", "Oh, that's interesting. I remember what you're talking about @sigmavirus24 , but it's not the exact same failure case. The intermittent error I was seeing was associated with httpbin.org's /redirect loop occasionally returning 503s. [Relevant url](https://github.com/kennethreitz/requests/pull/746#issuecomment-7308242).\n\nEDIT: too slow twice in a row. I'll leave this here for posterity.\n", "Slackware 13.37 (x86_64) w/ python 2.6.6 but it was my error that the repository wasn't entirely up-to-date. I hope to finish `_encode_files` by the end of today to make sure it works properly. `_encode_data` already uses/accepts a list of k/v tuples and shouldn't really need to be changed unless I'm missing something.\n\nSorry to bother you @Lukasa.\n", "It's never a bother. =)\n", "Unfortunately I included my private email in a commit but whatever.\n\nCan anyone point me towards other areas that require this? I would guess that the `params` keyword is already covered since both `data` and `params` use `_encode_params` which handles the list of k/v tuples use case.\n\nThanks for the pointers in advance.\n\nJust to check, you also want: `headers`, `cookies`, `proxies`, `config`, and `cert` params in `Session.request` to accept a list of k/v tuples?\n", "@kennethreitz Anything other than the following that need this functionality?\n\nIn `Session.request`:\n- `headers` **done**\n- `cookies`\n- `proxies` **done**\n- `config`\n- `cert`\n- `params` **done**\n", "@sigmavirus24, `params`, `data` :)\n", "Roger that. For some reason I thought `_encode_params` which takes `data` and `params` already handled this, but I'll double check in case I'm wrong. I'll hop to it later tonight.\n\n**Edit**: `data` does, `params` does not.\n", "\"files\" could benefit from the magic treatment too. Happy to chip in test cases & fix on top of @sigmavirus24 work if it helps.\n", "@capped if you pull from git://github.com/sigmavirus24/requests and play around on fix_key_val_args branch it should work fine. Let me know if you run into any problems please. The changes are currently in PR #833 and now that you mention it, they should also close this issue entirely.\n", "@kennethreitz I'm pretty sure you can close this. I'm almost entirely certain that this is resolved as per the last PR of mine you merged (the one in reference to #817)\n" ]
https://api.github.com/repos/psf/requests/issues/178
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/178/labels{/name}
https://api.github.com/repos/psf/requests/issues/178/comments
https://api.github.com/repos/psf/requests/issues/178/events
https://github.com/psf/requests/issues/178
1,791,360
MDU6SXNzdWUxNzkxMzYw
178
Documentation Specifics
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
1
2011-10-01T10:42:41Z
2021-09-09T11:00:53Z
2011-11-13T00:14:43Z
CONTRIBUTOR
resolved
Explain the `r.content` logic. List some best practices.
{ "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/178/reactions" }
https://api.github.com/repos/psf/requests/issues/178/timeline
null
completed
null
null
false
[ "#203\n" ]
https://api.github.com/repos/psf/requests/issues/177
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/177/labels{/name}
https://api.github.com/repos/psf/requests/issues/177/comments
https://api.github.com/repos/psf/requests/issues/177/events
https://github.com/psf/requests/issues/177
1,791,358
MDU6SXNzdWUxNzkxMzU4
177
Passing Test Suite
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
0
2011-10-01T10:41:24Z
2021-09-09T11:01:05Z
2011-10-14T01:40:49Z
CONTRIBUTOR
resolved
What a funny goal.
{ "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/177/reactions" }
https://api.github.com/repos/psf/requests/issues/177/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/176
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/176/labels{/name}
https://api.github.com/repos/psf/requests/issues/176/comments
https://api.github.com/repos/psf/requests/issues/176/events
https://github.com/psf/requests/issues/176
1,788,129
MDU6SXNzdWUxNzg4MTI5
176
Strange encoding(?) problem
{ "avatar_url": "https://avatars.githubusercontent.com/u/105168?v=4", "events_url": "https://api.github.com/users/dbrgn/events{/privacy}", "followers_url": "https://api.github.com/users/dbrgn/followers", "following_url": "https://api.github.com/users/dbrgn/following{/other_user}", "gists_url": "https://api.github.com/users/dbrgn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dbrgn", "id": 105168, "login": "dbrgn", "node_id": "MDQ6VXNlcjEwNTE2OA==", "organizations_url": "https://api.github.com/users/dbrgn/orgs", "received_events_url": "https://api.github.com/users/dbrgn/received_events", "repos_url": "https://api.github.com/users/dbrgn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dbrgn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dbrgn/subscriptions", "type": "User", "url": "https://api.github.com/users/dbrgn", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-09-30T18:41:05Z
2021-09-09T12:00:32Z
2011-09-30T18:49:39Z
CONTRIBUTOR
resolved
When I try to GET a twitter API search url, with `requests` i get the following output: ``` >>> requests.get('http://search.twitter.com/search.json?q=pythonrequests').read() '\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xffl\x8f\xc1\x0e\x820\x10D\xffe\x0f\x9e\x1aS\xc0"4!~\x881\r\x81U\x9a\x14(\xdb\x92H\x8c\xff\xee\x1e@\x0fx\xdb\xc9\xbc\x99\xdd}A3\xf6\xdea\xc4\xd6\xd8\x01\xb4<\xcaT@_?\x8dmA\'IY\x9c\xb2$S*?\xa7e\xa1r\xb9y&D\x02\r{\x00\x04\xf8\xfa\x81\x9c\x150\xcdH\x0bS~\x89\xdd8\x10\xb2\x0e10Ax\'\x0c\x9d\x99\xc9\xb1}\tvh\x90K\xab}\xdda\xaa\xfe\xa4\xc3\xecx\xd2\xd7\xdbW\x18\x8fd\xd6\xc5J\xc0\xd6\xc8\x0f\xfd\xc4z\xb3\x84\xf7\x07\x00\x00\xff\xff\x03\x00g3\x0ex\xf6\x00\x00\x00' ``` These are the response headers: ``` >>> requests.get('http://search.twitter.com/search.json?q=pythonrequests').headers {'content-length': '173', 'x-varnish': '1594769474', 'content-encoding': 'gzip', 'age': '0', 'expires': 'Fri, 30 Sep 2011 18:43:40 GMT', 'vary': 'Accept-Encoding', 'server': 'tfe', 'connection': 'close', 'via': '1.1 varnish', 'cache-control': 'max-age=15, must-revalidate, max-age=300', 'date': 'Fri, 30 Sep 2011 18:38:40 GMT', 'content-type': 'application/json;charset=utf-8'} ``` I can't utf8-decode the returned string. ``` >>> response.decode('utf-8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/danilo/ve/studentenportal/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte ``` Using urllib2, the response is returned properly decoded. ``` >>> urllib2.urlopen('http://search.twitter.com/search.json?q=pythonrequests').read() '{"completed_in":0.0090,"max_id":119843090793111552,"max_id_str":"119843090793111552","page":1,"query":"pythonrequests","refresh_url":"?since_id=119843090793111552&q=pythonrequests","results":[],"results_per_page":15,"since_id":0,"since_id_str":"0"}' ``` Is this a bug?
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/176/reactions" }
https://api.github.com/repos/psf/requests/issues/176/timeline
null
completed
null
null
false
[ "This is not a bug (yay!).\n\nUse `response.content` instead of `response.read()`. Read is giving you the raw response bytes from the connection. It's for advanced usage.\n", "Oh, sorry for not reading the docs carefully enough, and thanks a lot for the quick comment :) I'm urllib2-spoiled ;)\n" ]
https://api.github.com/repos/psf/requests/issues/175
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/175/labels{/name}
https://api.github.com/repos/psf/requests/issues/175/comments
https://api.github.com/repos/psf/requests/issues/175/events
https://github.com/psf/requests/pull/175
1,737,839
MDExOlB1bGxSZXF1ZXN0MzU0ODQw
175
Fixed #174 and refactored urls quoting/concatenation in one function in utils.py.
{ "avatar_url": "https://avatars.githubusercontent.com/u/36156?v=4", "events_url": "https://api.github.com/users/jerem/events{/privacy}", "followers_url": "https://api.github.com/users/jerem/followers", "following_url": "https://api.github.com/users/jerem/following{/other_user}", "gists_url": "https://api.github.com/users/jerem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerem", "id": 36156, "login": "jerem", "node_id": "MDQ6VXNlcjM2MTU2", "organizations_url": "https://api.github.com/users/jerem/orgs", "received_events_url": "https://api.github.com/users/jerem/received_events", "repos_url": "https://api.github.com/users/jerem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerem/subscriptions", "type": "User", "url": "https://api.github.com/users/jerem", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-09-26T09:03:10Z
2021-09-08T12:01:28Z
2011-10-03T14:11:48Z
CONTRIBUTOR
resolved
We were only quoting path but params and query also need to be encoded. Everything is now in utils.py / get_clean_url (feel free to rename the function if you wish).
{ "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/175/reactions" }
https://api.github.com/repos/psf/requests/issues/175/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/175.diff", "html_url": "https://github.com/psf/requests/pull/175", "merged_at": "2011-10-03T14:11:48Z", "patch_url": "https://github.com/psf/requests/pull/175.patch", "url": "https://api.github.com/repos/psf/requests/pulls/175" }
true
[ "Nice one! :sparkles: ⍥ :cake: om nom nom\n", "Beautiful! I can merge this in once it's brought up to date with the current `develop` branch. :)\n", "Done, but btw, why don't we have a response.url anymore?\n", "We will, as soon as I figure out where to get it from w/ httplib :)\n" ]
https://api.github.com/repos/psf/requests/issues/174
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/174/labels{/name}
https://api.github.com/repos/psf/requests/issues/174/comments
https://api.github.com/repos/psf/requests/issues/174/events
https://github.com/psf/requests/issues/174
1,713,477
MDU6SXNzdWUxNzEzNDc3
174
Requests encounters HTTP 400 while redirecting -- wget does not
{ "avatar_url": "https://avatars.githubusercontent.com/u/201022?v=4", "events_url": "https://api.github.com/users/pennersr/events{/privacy}", "followers_url": "https://api.github.com/users/pennersr/followers", "following_url": "https://api.github.com/users/pennersr/following{/other_user}", "gists_url": "https://api.github.com/users/pennersr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pennersr", "id": 201022, "login": "pennersr", "node_id": "MDQ6VXNlcjIwMTAyMg==", "organizations_url": "https://api.github.com/users/pennersr/orgs", "received_events_url": "https://api.github.com/users/pennersr/received_events", "repos_url": "https://api.github.com/users/pennersr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pennersr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pennersr/subscriptions", "type": "User", "url": "https://api.github.com/users/pennersr", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-09-22T12:20:13Z
2021-09-09T11:01:06Z
2011-10-13T18:44:05Z
CONTRIBUTOR
resolved
Using the latest development version, requests returns an HTTP 400, whereas curl/wget have no trouble fetching that link. ``` >>> import requests >>> requests.__version__ '0.6.2 (dev)' >>> requests.get('http://t.co/fvMzDtAo') <Response [400]> ``` This does not seem related to issue #158 -- I tried the version from cactus with the same result. Here's the output of wget, showing an HTTP 200 as the final result: ``` $ wget --no-check-certificate http://t.co/fvMzDtAo --2011-09-22 14:17:56-- http://t.co/fvMzDtAo Resolving t.co (t.co)... 199.59.148.12 Connecting to t.co (t.co)|199.59.148.12|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://goo.gl/LQU5O [following] --2011-09-22 14:17:57-- http://goo.gl/LQU5O Resolving goo.gl (goo.gl)... 74.125.79.100, 74.125.79.102, 74.125.79.101 Connecting to goo.gl (goo.gl)|74.125.79.100|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://www.pharosreizen.nl/pharos/?tt=893_121092_71405_&amp;r= [following] --2011-09-22 14:17:57-- http://www.pharosreizen.nl/pharos/?tt=893_121092_71405_&amp;r= Resolving www.pharosreizen.nl (www.pharosreizen.nl)... 84.244.159.50 Connecting to www.pharosreizen.nl (www.pharosreizen.nl)|84.244.159.50|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://tc.tradetracker.nl/v2/893/121092/71405/?r= [following] --2011-09-22 14:17:57-- http://tc.tradetracker.nl/v2/893/121092/71405/?r= Resolving tc.tradetracker.nl (tc.tradetracker.nl)... 81.93.57.150 Connecting to tc.tradetracker.nl (tc.tradetracker.nl)|81.93.57.150|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://tc.tradetracker.net/v2/893/121092/71405/?r= [following] --2011-09-22 14:17:57-- http://tc.tradetracker.net/v2/893/121092/71405/?r= Resolving tc.tradetracker.net (tc.tradetracker.net)... 81.93.57.150 Connecting to tc.tradetracker.net (tc.tradetracker.net)|81.93.57.150|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://tc.tradetracker.net/v2/893/121092/71405/?r=&c=893&m=121092&a=71405&bct=1 [following] --2011-09-22 14:17:57-- http://tc.tradetracker.net/v2/893/121092/71405/?r=&c=893&m=121092&a=71405&bct=1 Connecting to tc.tradetracker.net (tc.tradetracker.net)|81.93.57.150|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://tm.tradetracker.net/bct?s=893&t=m [following] --2011-09-22 14:17:57-- https://tm.tradetracker.net/bct?s=893&t=m Resolving tm.tradetracker.net (tm.tradetracker.net)... 81.93.57.161 Connecting to tm.tradetracker.net (tm.tradetracker.net)|81.93.57.161|:443... connected. WARNING: The certificate of `tm.tradetracker.net' is not trusted. WARNING: The certificate of `tm.tradetracker.net' hasn't got a known issuer. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://www.pharosreizen.nl/Gezinnen/Wintersport?utm_source= tt-2011-71405&utm_term=s [following] --2011-09-22 14:17:57-- http://www.pharosreizen.nl/Gezinnen/Wintersport?utm_source=%20tt-2011-71405&utm_term=s Reusing existing connection to www.pharosreizen.nl:80. HTTP request sent, awaiting response... 302 Found Location: /gezinnen/wintersport/?utm_source=%20tt-2011-71405&utm_term=s [following] --2011-09-22 14:17:57-- http://www.pharosreizen.nl/gezinnen/wintersport/?utm_source=%20tt-2011-71405&utm_term=s Connecting to www.pharosreizen.nl (www.pharosreizen.nl)|84.244.159.50|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 25978 (25K) [text/html] Saving to: `fvMzDtAo.1' 100%[======================================>] 25,978 --.-K/s in 0.09s 2011-09-22 14:17:58 (283 KB/s) - `fvMzDtAo.1' saved [25978/25978] ```
{ "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/174/reactions" }
https://api.github.com/repos/psf/requests/issues/174/timeline
null
completed
null
null
false
[ "Hmm, the location of the last redirect is `http://www.pharosreizen.nl/Gezinnen/Wintersport?utm_source= tt-2011-71405&utm_term=s`, which isn't a valid URL (because of the space, I assume). \n", "My 2cts: whether or not this is spec compliant, as it stands now, the t.co link above can be thrown at curl/wget/chrome/firefox/whatever and redirect properly. So I would opt for the pragmatic route instead of the spec compliant one, and leniently handle this case.\n", "I agree, but I don't want to break existing redirects (e.g. #170).\n\nI'll have to experiment to see what this would effect.\n", "Upon further experimentation, this URL:\n\n`http://tc.tradetracker.nl/v2/893/121092/71405/?r=`\n\nResponds with a `Location` header of `http://tc.tradetracker.nethttp://tc.tradetracker.nl/v2/893/121092/71405/?r=` for some reason. I can't figure out why.\n" ]
https://api.github.com/repos/psf/requests/issues/173
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/173/labels{/name}
https://api.github.com/repos/psf/requests/issues/173/comments
https://api.github.com/repos/psf/requests/issues/173/events
https://github.com/psf/requests/pull/173
1,711,317
MDExOlB1bGxSZXF1ZXN0MzQ3NzIy
173
PEP8ified all the things
{ "avatar_url": "https://avatars.githubusercontent.com/u/221196?v=4", "events_url": "https://api.github.com/users/mvanveen/events{/privacy}", "followers_url": "https://api.github.com/users/mvanveen/followers", "following_url": "https://api.github.com/users/mvanveen/following{/other_user}", "gists_url": "https://api.github.com/users/mvanveen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mvanveen", "id": 221196, "login": "mvanveen", "node_id": "MDQ6VXNlcjIyMTE5Ng==", "organizations_url": "https://api.github.com/users/mvanveen/orgs", "received_events_url": "https://api.github.com/users/mvanveen/received_events", "repos_url": "https://api.github.com/users/mvanveen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mvanveen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mvanveen/subscriptions", "type": "User", "url": "https://api.github.com/users/mvanveen", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-09-22T10:49:03Z
2021-09-08T12:01:27Z
2011-09-22T13:23:37Z
CONTRIBUTOR
resolved
I ran the pep8 checker (version 0.6.1) on the code base and tried to clean up as many pep8 errors as I could. Everything except line-width errors are gone (I was worried about messing up the documentor since I.haven't fiddled with it). Code base didn't have very many pep8 errors (awesome!).
{ "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/173/reactions" }
https://api.github.com/repos/psf/requests/issues/173/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/173.diff", "html_url": "https://github.com/psf/requests/pull/173", "merged_at": "2011-09-22T13:23:37Z", "patch_url": "https://github.com/psf/requests/pull/173.patch", "url": "https://api.github.com/repos/psf/requests/pulls/173" }
true
[ "Thank you, sir! \n\nI'm quite religious about these sort of things myself. But contributors, not so much. :) \n\n:sparkles: :cake: :sparkles:\n", "I love it when contributors PEP8'ify all the things. Yay!\n" ]
https://api.github.com/repos/psf/requests/issues/172
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/172/labels{/name}
https://api.github.com/repos/psf/requests/issues/172/comments
https://api.github.com/repos/psf/requests/issues/172/events
https://github.com/psf/requests/pull/172
1,708,688
MDExOlB1bGxSZXF1ZXN0MzQ3NTUz
172
Ignore unknown encodings
{ "avatar_url": "https://avatars.githubusercontent.com/u/36156?v=4", "events_url": "https://api.github.com/users/jerem/events{/privacy}", "followers_url": "https://api.github.com/users/jerem/followers", "following_url": "https://api.github.com/users/jerem/following{/other_user}", "gists_url": "https://api.github.com/users/jerem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerem", "id": 36156, "login": "jerem", "node_id": "MDQ6VXNlcjM2MTU2", "organizations_url": "https://api.github.com/users/jerem/orgs", "received_events_url": "https://api.github.com/users/jerem/received_events", "repos_url": "https://api.github.com/users/jerem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerem/subscriptions", "type": "User", "url": "https://api.github.com/users/jerem", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-22T09:16:50Z
2021-09-08T12:01:28Z
2011-09-22T13:25:12Z
CONTRIBUTOR
resolved
For example, this link returns a binary charset that is an unknown python encoding. http://cdn.blipstatic.com/images/blip/blipIcon.png -> Content-Type: image/png; charset=binary In that case we simply return the raw content.
{ "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/172/reactions" }
https://api.github.com/repos/psf/requests/issues/172/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/172.diff", "html_url": "https://github.com/psf/requests/pull/172", "merged_at": "2011-09-22T13:25:12Z", "patch_url": "https://github.com/psf/requests/pull/172.patch", "url": "https://api.github.com/repos/psf/requests/pulls/172" }
true
[ "Nice, catch. Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/171
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/171/labels{/name}
https://api.github.com/repos/psf/requests/issues/171/comments
https://api.github.com/repos/psf/requests/issues/171/events
https://github.com/psf/requests/issues/171
1,706,786
MDU6SXNzdWUxNzA2Nzg2
171
socket.error: [Errno 54] Connection reset by peer
{ "avatar_url": "https://avatars.githubusercontent.com/u/191620?v=4", "events_url": "https://api.github.com/users/epicserve/events{/privacy}", "followers_url": "https://api.github.com/users/epicserve/followers", "following_url": "https://api.github.com/users/epicserve/following{/other_user}", "gists_url": "https://api.github.com/users/epicserve/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/epicserve", "id": 191620, "login": "epicserve", "node_id": "MDQ6VXNlcjE5MTYyMA==", "organizations_url": "https://api.github.com/users/epicserve/orgs", "received_events_url": "https://api.github.com/users/epicserve/received_events", "repos_url": "https://api.github.com/users/epicserve/repos", "site_admin": false, "starred_url": "https://api.github.com/users/epicserve/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/epicserve/subscriptions", "type": "User", "url": "https://api.github.com/users/epicserve", "user_view_type": "public" }
[]
closed
true
null
[]
null
19
2011-09-22T01:52:27Z
2021-09-08T05:00:44Z
2011-09-22T03:36:20Z
NONE
resolved
I'm currently getting the error, `socket.error: [Errno 54] Connection reset by peer` when I use `requests.get(url, params=kwargs)` and the `params` contain large bodies of text. If I truncate the two large bodies of text to less than 2,900 characters each, it works. If I run the same get request from the command line using `curl` it works. I'm using requests version 0.6.1 that I installed using, `pip install python-requests`. I'm not sure how to tell you to replicate the issue because I'm using the [python-sendgrid](https://github.com/epicserve/python-sendgrid/blob/master/src/sendgrid/__init__.py) library to add a newsletter to my sendgrid account and I don't want to post my api username and password in issue ticket. :) To test from the command line using curl I created two files that each contained plain text and html text that was urlencoded using a [urlencoder](http://meyerweb.com/eric/tools/dencoder/). Then I ran the following command. ``` bash export IDENTITY='<my identity number>' export API_KEY='<my smtp password>' export API_USER='<my smtp username>' export NAME='<My Urlencoded Newsletter Name>' export SUBJECT='<My Urlencoded Newsletter Subject>' TEXT=`cat urlencoded.txt`; HTML=`cat urlencoded.html`; curl -d "api_user=$API_USER&api_key=$API_KEY&identity=$IDENTITY&name=$NAME&subject=$SUBJECT&text=$TEXT&html=$HTML" https://sendgrid.com/api/newsletter/newsletter/add.json ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/191620?v=4", "events_url": "https://api.github.com/users/epicserve/events{/privacy}", "followers_url": "https://api.github.com/users/epicserve/followers", "following_url": "https://api.github.com/users/epicserve/following{/other_user}", "gists_url": "https://api.github.com/users/epicserve/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/epicserve", "id": 191620, "login": "epicserve", "node_id": "MDQ6VXNlcjE5MTYyMA==", "organizations_url": "https://api.github.com/users/epicserve/orgs", "received_events_url": "https://api.github.com/users/epicserve/received_events", "repos_url": "https://api.github.com/users/epicserve/repos", "site_admin": false, "starred_url": "https://api.github.com/users/epicserve/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/epicserve/subscriptions", "type": "User", "url": "https://api.github.com/users/epicserve", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/171/reactions" }
https://api.github.com/repos/psf/requests/issues/171/timeline
null
completed
null
null
false
[ "Hmm, interesting. If that's the error that is being raised, I have little reason to believe that the server _isn't_ actually resetting the connection.\n\nDo you have an HTTP proxy like Charles available? It might help shed some light onto what's actually going on.\n", "Sorry, I forgot to provide the full traceback. Here is the traceback I get when I get the error. Also, I'm not understanding how to use the HTTP proxy and why that would make a difference when it works from the command line with curl.\n\n```\nTraceback (most recent call last):\n File \"/Users/oconnor/.virtualenvs/emails/bin/django-admin.py\", line 5, in <module>\n management.execute_from_command_line()\n File \"/Users/oconnor/.virtualenvs/emails/lib/python2.7/site-packages/django/core/management/__init__.py\", line 429, in execute_from_command_line\n utility.execute()\n File \"/Users/oconnor/.virtualenvs/emails/lib/python2.7/site-packages/django/core/management/__init__.py\", line 379, in execute\n self.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/Users/oconnor/.virtualenvs/emails/lib/python2.7/site-packages/django/core/management/base.py\", line 191, in run_from_argv\n self.execute(*args, **options.__dict__)\n File \"/Users/oconnor/.virtualenvs/emails/lib/python2.7/site-packages/django/core/management/base.py\", line 220, in execute\n output = self.handle(*args, **options)\n File \"/Users/oconnor/Sites/wenworld/emails/emails/management/commands/ww_daily_headlines_send.py\", line 114, in handle\n self.add_newsletter_to_sendgrid(sendgrid_newsletter_name, NEWSLETTER_SLUG)\n File \"/Users/oconnor/Sites/wenworld/emails/emails/management/commands/ww_daily_headlines_send.py\", line 94, in add_newsletter_to_sendgrid\n html=email.html\n File \"/Users/oconnor/.virtualenvs/emails/src/sendgrid/src/sendgrid/__init__.py\", line 67, in newsletter_add\n subject=subject, text=text, html=html)\n File \"/Users/oconnor/.virtualenvs/emails/src/sendgrid/src/sendgrid/__init__.py\", line 157, in get\n return self.call(method, **kwargs)\n File \"/Users/oconnor/.virtualenvs/emails/src/sendgrid/src/sendgrid/__init__.py\", line 56, in call\n result_json = json.loads(response.content)\n File \"/Users/oconnor/.virtualenvs/emails/lib/python2.7/site-packages/requests/models.py\", line 429, in __getattr__\n self._content = self.read()\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py\", line 351, in read\n data = self._sock.recv(rbufsize)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 553, in read\n s = self.fp.read(amt)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 1276, in read\n return s + self._file.read(amt - len(s))\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py\", line 380, in read\n data = self._sock.recv(left)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py\", line 219, in recv\n return self.read(buflen)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py\", line 138, in read\n return self._sslobj.read(len)\nsocket.error: [Errno 54] Connection reset by peer\n```\n", "The response I get back from github is...\n\n``` html\n\n<html>\n<head><title>414 Request-URI Too Large</title></head>\n<body bgcolor=\"white\">\n<center><h1>414 Request-URI Too Large</h1></center>\n<hr><center>nginx/0.7.65</center>\n</body>\n</html>\n```\n\nWhich is strange because, like I mentioned before it works with `curl`.\n", "If you take the time to take a look at the two requests through Charles (or similar), I'm sure you'll see the issue quite quickly.\n\n---\n\nAs the error says, the Request-URI is too large for the server to process, so it's dropping the connection.\n\nWith Requests, you're sending all the data as a massive query string in the Request URI, known as a GET parameter. When you're using curl, you're uploading form-encoded data to the body of the request, known as POST data.\n", "I've tried using both `requests.get(url, params=kwargs)` and `requests.post(url, params=kwargs)` and both return the same error. For some reason Charles isn't capturing requests from curl and it's just capturing requests from my browser and my python command lines script that uses python-requests.\n", "No worries. \n\n`params` is for query strings, `data` is for POST data.\n", "Sweet action! Switching from `requests.get(url, params=kwargs)` to `requests.post(url, data=kwargs)` fixed it! Sorry for bother you with this and thanks for the help!\n", "No worries at all :)\n", "It's strange that I get the same error with similar data, the only difference is that in my case I do not have big list or size of parameters. The same request made via CURL works fine but via requests gives me this error.\n\nrequests.exceptions.ConnectionError: HTTPSConnectionPool(host='sbarnea.com', port=443): Max retries exceeded with url: /jira/rest/api/2/group?groupname=jira-administrators&expand=users (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)\n\nEven more interesting, it seems that the request does not even reach the web server.\n\nAny idea what it could be cause?\n", "@ssbarnea This issue is more than two years old: it has nothing to do with the problem you're currently experiencing. =) Can you open a new issue to track your problem please?\n", "Even better, don't open an issue, go talk to StackOverflow, you're asking a question and you have no reason to believe it is an issue with how requests behaves. Hash out the details on StackOverflow and then we can file a bug report (if necessary).\n", "It's a very strange behavior and I haver reasons to believe it's not a bug in requests, that's why I did open a new bug. I'm still investigating what could cause this, it happens only from my machine, but the most interesting part is that CURL works (and browsers too). Thank you.\n", "Sorry to keep this here but I found what cause this:\n\n```\n# resolver 127.0.0.1;\n# ssl_protocols TLSv1.2 TLSv1.1 ; # TLSv1\n# ssl_stapling on;\n# ssl_stapling_verify on;\n# ssl_session_cache builtin:1000;\n# ssl_session_timeout 30m;\n# ssl_ciphers HIGH:!RC4:!aNULL:!MD5;\n# ssl_prefer_server_ciphers on;\n```\n\nBy disabling these tunnings on the nginx server it started to work with requests, clearly one of them is causing the malfunction.\n", "@ssbarnea \nIt most probably a buggy server doing wrong stuff when spoken to in specific SSL/TLS versions like described in #1567 (and several more).\nTry to force a different version like it is explained [here](http://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/) (some more kudos to @Lukasa)\n", "And the winner (losser) is `ssl_protocols TLSv1.2 TLSv1.1;`\nIt seems that removing `TLSv1` from the supported protocols on the server prevent requests from working.\n\nNow, I can call this a bug in requests or an underlying library?\n\nNote: removal of TLSv1 is recommended due to security concerns, there are exploits with it.\n", "@ssbarnea You'll find that the limitation isn't in Requests but in Python. Currently no shipped versions of Python have support for any version of TLS more recent than V1.0 as you can see in the table [here](http://docs.python.org/3.3/library/ssl.html#ssl.wrap_socket).\n\nPython 3.4 (not yet shipped, no guarantees that Requests is compatible with it) allows support for TLS1.2 and TLS1.1, so you can try with that. Otherwise, you'll have to allow TLSv1 to allow Requests through.\n", "Still there is something strange: in both cases I used Python, when tested from OS X it failed, when tested from Ubuntu it worked.\n\nNormally I wouldn't touch the default settings for SSL, but I run a SSL report and tried to solve most warnings:\n\nFIPS requires: SSL v2 and SSL v3 are disabled (only TLS version protocols in use)\nAlso read about BEAST attacks.\n\nCheck it here:\nhttps://sslcheck.globalsign.com/en_US/sslcheck/?host=sbarnea.com\n\nSo, I wondering if it's possible to fix this, clearly if it works with Python on Ubuntu, it cannot be specific to all python versions.\n", "Mm, sadly it can. The relative features of the `ssl` support you get depends on the version of OpenSSL that you have installed. Compare the two versions. =)\n", "Just to give a bit of closure on the subject. If your webserver doesn't allow TLSv1 then you will get TLSv1.1 and 1.2 with python 2.7.9 (due out in december 2014). However you can also install PYOpenSSL and inject that into urrlib3 (http://urllib3.readthedocs.org/en/latest/security.html#openssl-pyopenssl) which seems to allow use of requests for a webserver that has disabled TLSv1 with python 2.7.6 (and probably others).\n\n```\nimport urllib3.contrib.pyopenssl\nurllib3.contrib.pyopenssl.inject_into_urllib3()\n```\n\nBut really, the webserver should probably not be deprecating something which forces people to jump through this many weird hoops.\n" ]
https://api.github.com/repos/psf/requests/issues/170
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/170/labels{/name}
https://api.github.com/repos/psf/requests/issues/170/comments
https://api.github.com/repos/psf/requests/issues/170/events
https://github.com/psf/requests/issues/170
1,695,885
MDU6SXNzdWUxNjk1ODg1
170
redirect fails
{ "avatar_url": "https://avatars.githubusercontent.com/u/181486?v=4", "events_url": "https://api.github.com/users/laacz/events{/privacy}", "followers_url": "https://api.github.com/users/laacz/followers", "following_url": "https://api.github.com/users/laacz/following{/other_user}", "gists_url": "https://api.github.com/users/laacz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/laacz", "id": 181486, "login": "laacz", "node_id": "MDQ6VXNlcjE4MTQ4Ng==", "organizations_url": "https://api.github.com/users/laacz/orgs", "received_events_url": "https://api.github.com/users/laacz/received_events", "repos_url": "https://api.github.com/users/laacz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/laacz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laacz/subscriptions", "type": "User", "url": "https://api.github.com/users/laacz", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2011-09-21T10:36:17Z
2021-09-09T12:00:36Z
2011-09-21T12:08:25Z
NONE
resolved
When response contains redirection, it fails to reencode correctly. For example, headers contain: ``` python {'location': '/relative/uri/init.do;jsessionid=SOMEDATA!234567889?param=value'} ``` When redirecting, it becomes urlencoded, which is not correct, since results in 404: ``` https://example.com/relative/uri/init.do%3Bjsessionid%3DSOMEDATA%211234567889%3Fparam%value ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/181486?v=4", "events_url": "https://api.github.com/users/laacz/events{/privacy}", "followers_url": "https://api.github.com/users/laacz/followers", "following_url": "https://api.github.com/users/laacz/following{/other_user}", "gists_url": "https://api.github.com/users/laacz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/laacz", "id": 181486, "login": "laacz", "node_id": "MDQ6VXNlcjE4MTQ4Ng==", "organizations_url": "https://api.github.com/users/laacz/orgs", "received_events_url": "https://api.github.com/users/laacz/received_events", "repos_url": "https://api.github.com/users/laacz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/laacz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laacz/subscriptions", "type": "User", "url": "https://api.github.com/users/laacz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/170/reactions" }
https://api.github.com/repos/psf/requests/issues/170/timeline
null
completed
null
null
false
[ "This is not an issue with master branch. Pip version only. \n", "master branch or develop branch?\n", "Right, develop:\n\n```\n(new) skapis requests # git branch\n* develop\n```\n", "Excellent, just making sure. \n\nI'm glad you raised this issue, actually.\n", "Related #174\n" ]
https://api.github.com/repos/psf/requests/issues/169
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/169/labels{/name}
https://api.github.com/repos/psf/requests/issues/169/comments
https://api.github.com/repos/psf/requests/issues/169/events
https://github.com/psf/requests/pull/169
1,669,712
MDExOlB1bGxSZXF1ZXN0MzM3Mzk3
169
Feature/improve test structure
{ "avatar_url": "https://avatars.githubusercontent.com/u/68183?v=4", "events_url": "https://api.github.com/users/mrtazz/events{/privacy}", "followers_url": "https://api.github.com/users/mrtazz/followers", "following_url": "https://api.github.com/users/mrtazz/following{/other_user}", "gists_url": "https://api.github.com/users/mrtazz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrtazz", "id": 68183, "login": "mrtazz", "node_id": "MDQ6VXNlcjY4MTgz", "organizations_url": "https://api.github.com/users/mrtazz/orgs", "received_events_url": "https://api.github.com/users/mrtazz/received_events", "repos_url": "https://api.github.com/users/mrtazz/repos", "site_admin": true, "starred_url": "https://api.github.com/users/mrtazz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrtazz/subscriptions", "type": "User", "url": "https://api.github.com/users/mrtazz", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2011-09-17T17:02:41Z
2021-09-08T12:01:27Z
2011-09-17T20:26:30Z
CONTRIBUTOR
resolved
Successively adding unit tests for request here. Reopened from [here](https://github.com/kennethreitz/requests/pull/166).
{ "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/169/reactions" }
https://api.github.com/repos/psf/requests/issues/169/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/169.diff", "html_url": "https://github.com/psf/requests/pull/169", "merged_at": "2011-09-17T20:26:30Z", "patch_url": "https://github.com/psf/requests/pull/169.patch", "url": "https://api.github.com/repos/psf/requests/pulls/169" }
true
[ "![i'm lovin it](http://www.freelancewritinggigs.com/wp-content/uploads/2010/09/Lovin-ItMcDs_Print.jpg)\n", "Excellent work. Thanks :)\n", "So pull requests get closed on merge automatically? Looks like we need to decide on leaving it open and you merge at the end or I'll submit a pull request every time I've added some commits. Or maybe see if `git cherry-pick` is not detected by Github. But I think we should prefer one of the first two solutions.\n" ]
https://api.github.com/repos/psf/requests/issues/168
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/168/labels{/name}
https://api.github.com/repos/psf/requests/issues/168/comments
https://api.github.com/repos/psf/requests/issues/168/events
https://github.com/psf/requests/pull/168
1,661,012
MDExOlB1bGxSZXF1ZXN0MzM0ODgz
168
Expose HTTP status message resp.status_msg
{ "avatar_url": "https://avatars.githubusercontent.com/u/143504?v=4", "events_url": "https://api.github.com/users/fmoo/events{/privacy}", "followers_url": "https://api.github.com/users/fmoo/followers", "following_url": "https://api.github.com/users/fmoo/following{/other_user}", "gists_url": "https://api.github.com/users/fmoo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fmoo", "id": 143504, "login": "fmoo", "node_id": "MDQ6VXNlcjE0MzUwNA==", "organizations_url": "https://api.github.com/users/fmoo/orgs", "received_events_url": "https://api.github.com/users/fmoo/received_events", "repos_url": "https://api.github.com/users/fmoo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fmoo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fmoo/subscriptions", "type": "User", "url": "https://api.github.com/users/fmoo", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-09-16T10:09:01Z
2021-09-08T12:01:26Z
2011-09-23T16:05:25Z
NONE
resolved
This change adds a new attribute to the Response objects, status_msg. This typically returns something like "OK" for 200 responses or "Not Found" for 404 responses. The status message can provide some additional semantic information about the response outside of the response body and response headers.
{ "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/168/reactions" }
https://api.github.com/repos/psf/requests/issues/168/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/168.diff", "html_url": "https://github.com/psf/requests/pull/168", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/168.patch", "url": "https://api.github.com/repos/psf/requests/pulls/168" }
true
[ "Is this good? Or should I squash these revisions together?\n", "Sorry for the delay!\n\nI'm torn about adding this in right now. I'm currently working at porting the entire backend of Requests to urllib3. part of that will be to give the response a simple reference to the original httplib response object w/ `r.raw`. With that, the `status_msg` will be available.\n", "Yeah, I saw poster removal was targeting 0.8 and figured this might be good to have for another 0.6 or an 0.7 release in the meantime.\n\nIf urllib3 is around the corner and/or the api's (r.raw.status_msg vs. r.status_msg) won't be compatible then you probably shouldn't take this.\n", "Closing, but I'll add you to the contributors list. If the urllib3 integration falls through (doubtful), I'll def add this.\n" ]
https://api.github.com/repos/psf/requests/issues/167
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/167/labels{/name}
https://api.github.com/repos/psf/requests/issues/167/comments
https://api.github.com/repos/psf/requests/issues/167/events
https://github.com/psf/requests/issues/167
1,658,816
MDU6SXNzdWUxNjU4ODE2
167
User-agent lookup
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-12-17T21:10:23Z", "closed_issues": 4, "created_at": "2011-08-23T15:07:10Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/11", "id": 30486, "labels_url": "https://api.github.com/repos/psf/requests/milestones/11/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODY=", "number": 11, "open_issues": 0, "state": "closed", "title": "v0.9.0", "updated_at": "2011-12-28T10:04:17Z", "url": "https://api.github.com/repos/psf/requests/milestones/11" }
13
2011-09-16T02:04:54Z
2021-09-09T11:01:02Z
2011-10-23T00:32:56Z
CONTRIBUTOR
resolved
likely in `requests.utils.agents`
{ "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/167/reactions" }
https://api.github.com/repos/psf/requests/issues/167/timeline
null
completed
null
null
false
[ "Is this a feature request? I don't see anything about user agents in requests.utils at present... (New to the codebase, but I've walked through this module and follow it pretty easily).\n", "Feature request indeed :)\n", "Could you eludicate on the requirements of this feature so I can build it to spec? What sorts of functionality are you envisioning?\n", "I'd love for it to be similar to `requests.codes`, but for looking up browser string user agents.\n\nMy thought is something like this\n\n`requests.utils.agents`\n\n``` pycon\n>>> agents['firefox']\n\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1\"\n\n>>> agents['chrome']['osx']\n\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1\"\n```\n\nI'm a bit torn on the API, but I think that this could work well.\n", "Thoughts/feedback appreciated.\n", "So you store browsers default user agents in the code somewhere?\nThat could be helpful indeed\n", "For what could this be used? \n", "@FSX: attaching a user-agent to a request. \n\nUse cases: When a site blocks non-browsers from making requests. Maybe also testing?\n", "Setting a fake user agent to pretend you are firefox instead of an automatic request made by a piece of code.\n", "Ok. Doing that manually is not much work, but less work is always nice.\n", "Yeah, that's why I'm hesitant to implement. Would love other opinions.\n", "I found an xml dump of many known user-agents [here](http://www.user-agents.org/allagents.xml). Looks like it could be pretty helpful.\n\nAdditionally, [RFC 1945](http://tools.ietf.org/html/rfc1945) provides the following helpful definition about user-agents:\n\n### 10.15 User-Agent\n\n```\nPublisher-Subscriber based events infrastructure for asynchronous message \npassing between services.\n\nThe User-Agent request-header field contains information about the\nuser agent originating the request. This is for statistical purposes,\nthe tracing of protocol violations, and automated recognition of user\nagents for the sake of tailoring responses to avoid particular user\nagent limitations. Although it is not required, user agents should\ninclude this field with requests. The field can contain multiple\nproduct tokens (Section 3.7) and comments identifying the agent and\nany subproducts which form a significant part of the user agent. By\nconvention, the product tokens are listed in order of their\nsignificance for identifying the application.\n\n User-Agent = \"User-Agent\" \":\" 1*( product | comment )\n\nExample:\n\n User-Agent: CERN-LineMode/2.15 libwww/2.17b3\n```\n\nSome upfront things stand out about the vast space of user agents:\n\n### Notes\n- Most modern browsers keep `Mozilla/5.0` upfront for compatibility reasons. It initially was meant to signify that the browser was \"Mozilla compatible\" ([source](https://developer.mozilla.org/en/Gecko_user_agent_string_reference)), but is now widely adopted.\n- The platform field is not specific to just \"osx\" or \"linux\". It seems like there is more a fine-grained description of platform (e.g. `(Windows; U; Windows NT 5.1; de; rv:1.9.2.3)` or `(Macintosh; Intel Mac OS X 10.7; rv:7.0.1)`).\n\n### Questions\n- Are we interested in supporting the vast space of user agents, or just popular browsers?\n", "The more I think about this, the more I think it's unnecessary. It would be useful under certain occasions, but it would be best in a separate module. \n" ]
https://api.github.com/repos/psf/requests/issues/166
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/166/labels{/name}
https://api.github.com/repos/psf/requests/issues/166/comments
https://api.github.com/repos/psf/requests/issues/166/events
https://github.com/psf/requests/pull/166
1,657,823
MDExOlB1bGxSZXF1ZXN0MzMzOTQ2
166
Improve test structure (proposal)
{ "avatar_url": "https://avatars.githubusercontent.com/u/68183?v=4", "events_url": "https://api.github.com/users/mrtazz/events{/privacy}", "followers_url": "https://api.github.com/users/mrtazz/followers", "following_url": "https://api.github.com/users/mrtazz/following{/other_user}", "gists_url": "https://api.github.com/users/mrtazz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrtazz", "id": 68183, "login": "mrtazz", "node_id": "MDQ6VXNlcjY4MTgz", "organizations_url": "https://api.github.com/users/mrtazz/orgs", "received_events_url": "https://api.github.com/users/mrtazz/received_events", "repos_url": "https://api.github.com/users/mrtazz/repos", "site_admin": true, "starred_url": "https://api.github.com/users/mrtazz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrtazz/subscriptions", "type": "User", "url": "https://api.github.com/users/mrtazz", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2011-09-15T22:44:14Z
2021-09-08T12:01:25Z
2011-09-16T02:30:33Z
CONTRIBUTOR
resolved
This might be somewhat related to issue #153. I think it would make sense to split up testing into a unit testing and an integration testing part (loosely defined). In the unit tests the actual methods are tested with everything mocked out. This way it can be assured that the respective external methods are always called with the right arguments. In the integration testing suite it is allowed to call external entities (like `httpbin.org`) for testing the overall function. So I just moved the existing tests there. I have restructured the tests organization a bit and added some basic unit tests for the `api` module. However I would like to get your feedback on this, before going on. As this will definitely be some work and take a while to reach a somewhat good level of coverage.
{ "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/166/reactions" }
https://api.github.com/repos/psf/requests/issues/166/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/166.diff", "html_url": "https://github.com/psf/requests/pull/166", "merged_at": "2011-09-16T02:30:33Z", "patch_url": "https://github.com/psf/requests/pull/166.patch", "url": "https://api.github.com/repos/psf/requests/pulls/166" }
true
[ "Excellent work, thanks! \n\nI have a good feeling about this. I'm going to think about it for a few days, but I know this is absolutely the direction I'd like to go.\n", "I'm 100% in. I'll merge this in, but keep the pull request open so you can add your further changes.\n\n:cake:\n", "Cool. I'll update and push the unit tests subsequently. What are you using as a test runner? I saw that you removed the tox.ini some time ago.\n", "I typically use `py.test`, with or without tox.\n", "I'd love to open this, if I could figure out how :)\n", "@mrtazz, can you send another one?\n", "Done. Forgot to add the original commits, though. But I thought it's ok since they are merged anyway.\n", "#169\n" ]
https://api.github.com/repos/psf/requests/issues/165
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/165/labels{/name}
https://api.github.com/repos/psf/requests/issues/165/comments
https://api.github.com/repos/psf/requests/issues/165/events
https://github.com/psf/requests/pull/165
1,655,578
MDExOlB1bGxSZXF1ZXN0MzMzMTc5
165
a subclass of models.Response can now be passed to get, post etc
{ "avatar_url": "https://avatars.githubusercontent.com/u/118963?v=4", "events_url": "https://api.github.com/users/j0hnsmith/events{/privacy}", "followers_url": "https://api.github.com/users/j0hnsmith/followers", "following_url": "https://api.github.com/users/j0hnsmith/following{/other_user}", "gists_url": "https://api.github.com/users/j0hnsmith/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/j0hnsmith", "id": 118963, "login": "j0hnsmith", "node_id": "MDQ6VXNlcjExODk2Mw==", "organizations_url": "https://api.github.com/users/j0hnsmith/orgs", "received_events_url": "https://api.github.com/users/j0hnsmith/received_events", "repos_url": "https://api.github.com/users/j0hnsmith/repos", "site_admin": false, "starred_url": "https://api.github.com/users/j0hnsmith/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/j0hnsmith/subscriptions", "type": "User", "url": "https://api.github.com/users/j0hnsmith", "user_view_type": "public" }
[]
closed
true
null
[]
null
14
2011-09-15T18:21:00Z
2021-09-08T12:01:25Z
2011-09-16T16:48:06Z
NONE
resolved
`models.Response` can't easily be subclassed (I'm making the assumption that there isn't a way that I don't know about) I'd like to be able to pass a subclass of `models.Response` to `get`, `post` etc. I know there is a `response` hook however I don't want to do something like `response.__class__ = MyResponse` or add custom methods to the `Response` instance one by one. Being able to subclass would be much cleaner.
{ "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/165/reactions" }
https://api.github.com/repos/psf/requests/issues/165/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/165.diff", "html_url": "https://github.com/psf/requests/pull/165", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/165.patch", "url": "https://api.github.com/repos/psf/requests/pulls/165" }
true
[ "What is the use case for passing in a subclass of Response to get, post etc.. ? \n", "I saw the comment somewhere that it had been discussed and decided that requests is a http library not a html library (a good decision in my opinion), however there will be many people (myself included) that will use requests.get on a html page and parse resp.content with lxml or similar then do what they need to do. \n\nBy adding the ability to subclass `Response` you provide users the freedom add their own functionality (html parsing etc) whilst maintaining requests' core values (eg http only). \n\nSee this example of what I want to be able to do (not sure the `__getattr__` method would work but it gives the idea). \n\n```\nimport requests\nimport lxml\n\nclass MyResponse(requests.models.Response):\n def xpath(self, expression):\n results = []\n for result in self._etree.xpath(expression):\n if expression.endswith('href') or expression.endswith('src') and not result.startswith('http'):\n result = urljoin(self.url, result)\n results.append(result)\n return results\n\n def get_etree(self):\n return self._etree\n\n def __getattr__(self, name):\n \"\"\"\n Read and returns the full stream when accessing to :attr: `content`\n And sets up :attr: `_etree` if accessed.\n \"\"\"\n if name == '_etree':\n if not self.__dict__.get('_etree'):\n self._etree = etree.HTML(self.content)\n return self._etree\n\n else:\n super(requests.models.Response, self).__getattr__(name)\n\ntree = requests.get('http://www.somesite.com', response_class=MyResponse).get_etree()\nurls = requests.get('http://www.anothersite.com', response_class=MyResponse).xpath('//a/@href')\n>>> ['http://foo.com','http://bar.com/baz.html]\n```\n\nThe alternatives to this involve nasty hacks within the `response` hook.\n", "Wouldn't a less leaky abstraction be to create your own request helper class (wrapper), that abstracts both the request and the response away, instead of attempting to modify the existing class hierarchy?\n", "Not sure I understand, can you elaborate?\n", "Maybe something like this. Using a class in this example, as you could pass in the xpath you are looking for on construction possibly. A simpler case would just be a method wrapper for 'get' or something like that.\n\n``` python\nimport functools\nimport requests\n\nclass WrapperClient(object):\n def __init__(self, *args, **kwds):\n ## some init here...\n\n def __getattr__(self, method_name):\n mlower = method_name.lower()\n if mlower in requests.api.__all__:\n # partial application\n return functools.partial(self._request, mlower)\n else:\n raise AttributeError(method_name)\n\n def _request(self, http_method, url, *args, **kwds):\n resp = getattr(requests, http_method)(url, *args, **kwds)\n ## do something with resp. xpath, etc\n return resp # or whatever you want\n```\n\nedit: fixed the code a bit. sorry! it was late here.. :/\n", ":+1: @cactus.\n", "Was going to say that using wrappers makes it difficult to use sessions, additionallly the beautiful api is lost unless you copy lots of code from api.\n", "Sessions don't have to be used as context managers.\n\nYou can simply toss around the session:\n\n``` python\ns = requests.session()\n\ndef get(*args, **kwargs):\n r = s.get(*args, **kwargs)\n # do something to r\n return r\n```\n", "Another suggest: you can just pass in an `post_request` hook to the session that returns your new `Response` object, bootstrapped from the one Requests returns. Very simple and elegant.\n", "Bootstrapping from the existing `Response` was my very first thought but it felt messy.\n\nI've made a decorator that adds a `response` hook which replaces `Response` with a wrapped version, decorator for individual requests, hook function for sessions (with `with`).\n\nI take your (and cactus') points however it would be more user friendly to be able to simply subclass Response. You can provide a `CookieJar` or `auth` instance so why not `Response` (or class due to the implementation)... food for thought.\n\nAnyway, thank you both for your suggestions.\n", "I certainly see where you are coming from @j0hnsmith.\nMy example was indeed simplistic (geared towards that one simple example you had presented).\nGlad you found a work around that is tenable given your requirements and use case. \n\nI think the argument against passing in a response object is that all the other method parameters modify the request and request behavior, and not the response. Providing a custom response object could have other repercussions inside the request handling, and might require more runtime checking to make sure expected methods are present. That could be a pain.\n\nI think using a decorator to add a response hook is a pretty clean way to go. nice.\n", "I use a response hook for xpath queries see https://gist.github.com/2714629\n", "So what's with response_class= ?...\n", "@nfx this pull request wasn't excepted. There never was such a feature.\n" ]
https://api.github.com/repos/psf/requests/issues/164
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/164/labels{/name}
https://api.github.com/repos/psf/requests/issues/164/comments
https://api.github.com/repos/psf/requests/issues/164/events
https://github.com/psf/requests/issues/164
1,655,559
MDU6SXNzdWUxNjU1NTU5
164
models.Response can't easily be subclassed
{ "avatar_url": "https://avatars.githubusercontent.com/u/118963?v=4", "events_url": "https://api.github.com/users/j0hnsmith/events{/privacy}", "followers_url": "https://api.github.com/users/j0hnsmith/followers", "following_url": "https://api.github.com/users/j0hnsmith/following{/other_user}", "gists_url": "https://api.github.com/users/j0hnsmith/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/j0hnsmith", "id": 118963, "login": "j0hnsmith", "node_id": "MDQ6VXNlcjExODk2Mw==", "organizations_url": "https://api.github.com/users/j0hnsmith/orgs", "received_events_url": "https://api.github.com/users/j0hnsmith/received_events", "repos_url": "https://api.github.com/users/j0hnsmith/repos", "site_admin": false, "starred_url": "https://api.github.com/users/j0hnsmith/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/j0hnsmith/subscriptions", "type": "User", "url": "https://api.github.com/users/j0hnsmith", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-15T18:18:11Z
2021-09-09T12:00:36Z
2011-09-15T18:23:05Z
NONE
resolved
I'm making the assumption that there isn't a way that I don't know about :) I'd like to be able to pass a subclass of `models.Response` to `get`, `post` etc. I know there is a `response` hook however I don't want to do something like `response.__class__ = MyResponse` or add custom methods to the `Response` instance one by one. Being able to subclass would be much cleaner, I have a patch (hopefully I can work out how to attach it).
{ "avatar_url": "https://avatars.githubusercontent.com/u/118963?v=4", "events_url": "https://api.github.com/users/j0hnsmith/events{/privacy}", "followers_url": "https://api.github.com/users/j0hnsmith/followers", "following_url": "https://api.github.com/users/j0hnsmith/following{/other_user}", "gists_url": "https://api.github.com/users/j0hnsmith/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/j0hnsmith", "id": 118963, "login": "j0hnsmith", "node_id": "MDQ6VXNlcjExODk2Mw==", "organizations_url": "https://api.github.com/users/j0hnsmith/orgs", "received_events_url": "https://api.github.com/users/j0hnsmith/received_events", "repos_url": "https://api.github.com/users/j0hnsmith/repos", "site_admin": false, "starred_url": "https://api.github.com/users/j0hnsmith/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/j0hnsmith/subscriptions", "type": "User", "url": "https://api.github.com/users/j0hnsmith", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/164/reactions" }
https://api.github.com/repos/psf/requests/issues/164/timeline
null
completed
null
null
false
[ "see #165, it has code\n" ]
https://api.github.com/repos/psf/requests/issues/163
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/163/labels{/name}
https://api.github.com/repos/psf/requests/issues/163/comments
https://api.github.com/repos/psf/requests/issues/163/events
https://github.com/psf/requests/pull/163
1,651,564
MDExOlB1bGxSZXF1ZXN0MzMxOTUw
163
Fixed #161 (quoting issue).
{ "avatar_url": "https://avatars.githubusercontent.com/u/36156?v=4", "events_url": "https://api.github.com/users/jerem/events{/privacy}", "followers_url": "https://api.github.com/users/jerem/followers", "following_url": "https://api.github.com/users/jerem/following{/other_user}", "gists_url": "https://api.github.com/users/jerem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerem", "id": 36156, "login": "jerem", "node_id": "MDQ6VXNlcjM2MTU2", "organizations_url": "https://api.github.com/users/jerem/orgs", "received_events_url": "https://api.github.com/users/jerem/received_events", "repos_url": "https://api.github.com/users/jerem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerem/subscriptions", "type": "User", "url": "https://api.github.com/users/jerem", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-15T09:58:27Z
2021-09-08T12:01:24Z
2011-09-15T14:07:14Z
CONTRIBUTOR
resolved
This issue is fixed in Python 2.7 (http://bugs.python.org/issue918368), but here is the fix for requests.
{ "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/163/reactions" }
https://api.github.com/repos/psf/requests/issues/163/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/163.diff", "html_url": "https://github.com/psf/requests/pull/163", "merged_at": "2011-09-15T14:07:14Z", "patch_url": "https://github.com/psf/requests/pull/163.patch", "url": "https://api.github.com/repos/psf/requests/pulls/163" }
true
[ "Excellent, thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/162
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/162/labels{/name}
https://api.github.com/repos/psf/requests/issues/162/comments
https://api.github.com/repos/psf/requests/issues/162/events
https://github.com/psf/requests/issues/162
1,645,020
MDU6SXNzdWUxNjQ1MDIw
162
Tests throw error
{ "avatar_url": "https://avatars.githubusercontent.com/u/188771?v=4", "events_url": "https://api.github.com/users/n1m3/events{/privacy}", "followers_url": "https://api.github.com/users/n1m3/followers", "following_url": "https://api.github.com/users/n1m3/following{/other_user}", "gists_url": "https://api.github.com/users/n1m3/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/n1m3", "id": 188771, "login": "n1m3", "node_id": "MDQ6VXNlcjE4ODc3MQ==", "organizations_url": "https://api.github.com/users/n1m3/orgs", "received_events_url": "https://api.github.com/users/n1m3/received_events", "repos_url": "https://api.github.com/users/n1m3/repos", "site_admin": false, "starred_url": "https://api.github.com/users/n1m3/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/n1m3/subscriptions", "type": "User", "url": "https://api.github.com/users/n1m3", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-09-14T16:17:17Z
2021-09-09T12:00:37Z
2011-09-14T16:17:42Z
NONE
resolved
Running test_requests.py -v with develop version (commit a8e77688f0) I get the following exception: ``` ====================================================================== ERROR: test_settings (__main__.RequestsTestSuite) ---------------------------------------------------------------------- Traceback (most recent call last): File "./test_requests.py", line 283, in test_settings with requests.settings(timeout=0.0000001): TypeError: 'Settings' object is not callable ---------------------------------------------------------------------- Ran 47 tests in 29.054s FAILED (errors=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/162/reactions" }
https://api.github.com/repos/psf/requests/issues/162/timeline
null
completed
null
null
false
[ "In development :)\n", "Uppps didn't think about that, sorry. :-[\n" ]
https://api.github.com/repos/psf/requests/issues/161
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/161/labels{/name}
https://api.github.com/repos/psf/requests/issues/161/comments
https://api.github.com/repos/psf/requests/issues/161/events
https://github.com/psf/requests/issues/161
1,622,594
MDU6SXNzdWUxNjIyNTk0
161
requests bumps into TooManyRedirects, curl/wget don't
{ "avatar_url": "https://avatars.githubusercontent.com/u/201022?v=4", "events_url": "https://api.github.com/users/pennersr/events{/privacy}", "followers_url": "https://api.github.com/users/pennersr/followers", "following_url": "https://api.github.com/users/pennersr/following{/other_user}", "gists_url": "https://api.github.com/users/pennersr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pennersr", "id": 201022, "login": "pennersr", "node_id": "MDQ6VXNlcjIwMTAyMg==", "organizations_url": "https://api.github.com/users/pennersr/orgs", "received_events_url": "https://api.github.com/users/pennersr/received_events", "repos_url": "https://api.github.com/users/pennersr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pennersr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pennersr/subscriptions", "type": "User", "url": "https://api.github.com/users/pennersr", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2011-09-12T10:28:06Z
2021-09-08T22:00:50Z
2011-09-12T12:29:35Z
CONTRIBUTOR
resolved
The following invocation raises a TooManyRedirects exception. ``` >>> requests.get('http://t.co/uHmpMUF') requests.exceptions.TooManyRedirects ``` However, neither `wget` nor `curl` appears to have any problems tracking this URL: ``` wget http://t.co/uHmpMUF --2011-09-12 12:20:43-- http://t.co/uHmpMUF Resolving t.co (t.co)... 199.59.148.12 Connecting to t.co (t.co)|199.59.148.12|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://awe.sm/5Sxto [following] --2011-09-12 12:20:44-- http://awe.sm/5Sxto Resolving awe.sm (awe.sm)... 174.129.233.169 Connecting to awe.sm (awe.sm)|174.129.233.169|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://hypem.com/item/1e8ah?awesm=awe.sm_5Sxto&utm_campaign=&utm_medium=awe.sm-twitter&utm_source=direct-awe.sm&utm_content=autotweet [following] --2011-09-12 12:20:44-- http://hypem.com/item/1e8ah?awesm=awe.sm_5Sxto&utm_campaign=&utm_medium=awe.sm-twitter&utm_source=direct-awe.sm&utm_content=autotweet Resolving hypem.com (hypem.com)... 205.251.139.43 Connecting to hypem.com (hypem.com)|205.251.139.43|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: /#!/item/1e8ah?awesm=awe.sm_5Sxto&utm_campaign=&utm_medium=awe.sm-twitter&utm_source=direct-awe.sm&utm_content=autotweet [following] --2011-09-12 12:20:45-- http://hypem.com/ Connecting to hypem.com (hypem.com)|205.251.139.43|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: “index.html.1” [ <=> ] 15,102 --.-K/s in 0.008s 2011-09-12 12:20:45 (1.89 MB/s) - “index.html.1” saved [15102] ``` Same for curl: ``` curl -L http://t.co/uHmpMUF ```
{ "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/161/reactions" }
https://api.github.com/repos/psf/requests/issues/161/timeline
null
completed
null
null
false
[ "Requests intentionally stops following redirects after 30. You can customize this behavior with this:\n\n``` python\nrequests.settings.max_redirects = None\n```\n", "As the `wget` log clearly shows, the number of redirects is far less than 30. So `requests` should not be bumping into the `max_redirects` limit at all.\n\nSo unless I am missing something, this really looks like a bug in `requests`. Could you please reopen?\n", "Sorry for the bug. I'm not having the same issue here from the current development version.\n\nThere was a set of changes to the relative redirection mechanism recently. I suspect it is related. The new release will be available soon.\n\n``` pycon\n>>> import requests\n>>> r = requests.get('http://t.co/uHmpMUF')\n>>> r.status_code\n200\n>>> r.history\n[<Response [301]>, <Response [301]>, <Response [302]>]\n```\n", "Confirmative -- the current development version works fine. Thanks.\n", "I bumped into another link that shows the same problem, this time with the current development version:\n\n```\n>>> import requests\n>>> requests.__version__\n'0.6.2 (dev)'\n>>> requests.head('http://t.co/OnL7f5Pu')\nTraceback (most recent call last):\n File \"<console>\", line 1, in <module>\n File \"/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/api.py\", line 114, in head\n return request('head', url, **kwargs)\n File \"/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/api.py\", line 79, in request\n r.send()\n File \"/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/models.py\", line 377, in send\n self._build_response(why, is_error=True)\n File \"/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/models.py\", line 222, in _build_response\n raise TooManyRedirects()\nTooManyRedirects\n```\n\n`wget` has no trouble fetching that URL:\n\n```\n$ wget http://t.co/OnL7f5Pu\n--2011-09-15 09:30:27-- http://t.co/OnL7f5Pu\nResolving t.co (t.co)... 199.59.148.12\nConnecting to t.co (t.co)|199.59.148.12|:80... connected.\nHTTP request sent, awaiting response... 301 Moved Permanently\nLocation: http://instnc.tv/1vP [following]\n--2011-09-15 09:30:28-- http://instnc.tv/1vP\nResolving instnc.tv (instnc.tv)... 174.143.181.147\nConnecting to instnc.tv (instnc.tv)|174.143.181.147|:80... connected.\nHTTP request sent, awaiting response... 301 Moved Permanently\nLocation: http://www.instinctiv.com/song/Paul+Van+Dyk+F.+A.Tomberlin/Complicated+%28Kyau+Vs.+Albert+Remix%29/4bce24c700010efb0c204a60644a0101 [following]\n--2011-09-15 09:30:28-- http://www.instinctiv.com/song/Paul+Van+Dyk+F.+A.Tomberlin/Complicated+%28Kyau+Vs.+Albert+Remix%29/4bce24c700010efb0c204a60644a0101\nResolving www.instinctiv.com (www.instinctiv.com)... 174.143.181.147\nReusing existing connection to instnc.tv:80.\nHTTP request sent, awaiting response... 200 OK\nLength: unspecified [text/html]\nSaving to: “4bce24c700010efb0c204a60644a0101”\n\n [ <=> ] 9,036 --.-K/s in 0.1s \n\n2011-09-15 09:30:28 (63.4 KB/s) - “4bce24c700010efb0c204a60644a0101” saved [9036]\n```\n", "@kennethreitz I think this problem is still there, I'm getting a lot TooManyRedirects errors.\n\nThe fix by @jerem worked for me, but had to adapt it a little bit to the latest Requests version.\n", "Can you provide a reproducible example?\n", "Yes, try this URL:\n\n```\nhttp://thehottestishh.net/?feed=rss2\n```\n\nWith Requests:\n\n```\n\n>>> a = requests.get('http://thehottestishh.net/?feed=rss2')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 78, in get\n return request('get', url, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 65, in request\n prefetch=prefetch\n File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 187, in request\n r.send(prefetch=prefetch)\n File \"/usr/local/lib/python2.7/dist-packages/requests/models.py\", line 459, in send\n self._build_response(r)\n File \"/usr/local/lib/python2.7/dist-packages/requests/models.py\", line 203, in _build_response\n raise TooManyRedirects()\nrequests.exceptions.TooManyRedirects\n```\n\nWith Wget:\n\n```\n\n--2011-11-16 00:53:54-- http://thehottestishh.net/?feed=rss2\nResolving thehottestishh.net... 68.178.232.99\nConnecting to thehottestishh.net|68.178.232.99|:80... connected.\nHTTP request sent, awaiting response... 302 Moved Temporarily\nLocation: /?feed=rss2?b6eff5f0 [following]\n--2011-11-16 00:53:54-- http://thehottestishh.net/?feed=rss2?b6eff5f0\nConnecting to thehottestishh.net|68.178.232.99|:80... connected.\nHTTP request sent, awaiting response... 302 Moved Temporarily\nLocation: /?feed=rss2 [following]\n--2011-11-16 00:53:54-- http://thehottestishh.net/?feed=rss2\nConnecting to thehottestishh.net|68.178.232.99|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 26936 (26K) [text/html]\nSaving to: `index.html?feed=rss2.1'\n\n100%[===================================================================================================================================================================================================>] 26,936 52.7K/s in 0.5s \n\n2011-11-16 00:53:56 (52.7 KB/s) - `index.html?feed=rss2.1' saved [26936/26936]\n```\n\nBut now I'm testing with this url strange stuff is happening, now I retried I get a 200 and it's working in both Wget and Requests:\n\n```\n--2011-11-16 00:58:03-- http://thehottestishh.net/?feed=rss2\nResolving thehottestishh.net... 68.178.232.99\nConnecting to thehottestishh.net|68.178.232.99|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 26936 (26K) [text/html]\nSaving to: `index.html?feed=rss2.2'\n\n100%[===================================================================================================================================================================================================>] 26,936 52.2K/s in 0.5s \n\n2011-11-16 00:58:05 (52.2 KB/s) - `index.html?feed=rss2.2' saved [26936/26936]\n```\n\nBtw, this was in my logfile (not everything is from this same url but you can see what's happening):\n\n```\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /?feed=rss2 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /rss HTTP/1.1\" 200 2616\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /rslblog/Byey HTTP/1.1\" 200 None\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /fadedglamourblog HTTP/1.1\" 200 None\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /rss HTTP/1.1\" 200 3172\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /feed HTTP/1.1\" 301 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): www.rollogrady.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /feed HTTP/1.1\" 301 20\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): www.megaplatinum.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /feed/ HTTP/1.1\" 200 None\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /feed HTTP/1.1\" 302 145\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): tirbd.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /blog/?feed=rss2 HTTP/1.1\" 200 None\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (3): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (4): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (5): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (6): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (7): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (8): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (9): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (10): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (11): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (12): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (13): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (14): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (16): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (17): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (18): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (19): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (20): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (21): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (22): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (23): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (24): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (25): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (26): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (27): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (28): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (29): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (30): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (31): thehottestishh.net\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /%3Ffeed%3Drss2%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0%3Fb6eff5f0 HTTP/1.1\" 302 0\n```\n", "Another one that goes crazy: http://sarahspy.com/post/12643485796 (hosted on Tumblr)\n\n```\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (16): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (17): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (18): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (19): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (20): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (21): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (22): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12848432239%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (14): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12512935464%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (14): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/11394955863%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (14): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (23): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12848432239%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12512935464%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/11394955863%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12643485796%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (19): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (24): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12643485796%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (20): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (25): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12643485796%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (21): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12599423788%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (26): sarahspy.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /post/12643485796%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910%3F420de910 HTTP/1.1\" 302 0\n```\n\nAnd this one:\n\n```\n\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (4): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /2011/02/clara-c.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+letmelikeit+%28LetMeLikeIt%29 HTTP/1.1\" 200 None\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (5): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (6): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (7): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (8): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (9): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (10): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (11): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (12): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (13): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (14): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (15): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (16): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (17): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (18): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (19): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (20): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (21): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (22): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (23): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (24): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (25): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (26): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (27): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (28): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (29): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (30): jacuzzikillers.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /index.php%3F/music/die-antwoord--poirier--boogat--el-romolon/%26utm_source%3Dfeedburner%26utm_medium%3Dfeed%26utm_campaign%3DFeed%3A%2BJacuzziKillers%2B%28Jacuzzi%2BKillers%29%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218%3Faa068218 HTTP/1.1\" 302 0\n```\n", "This ticket should be reopened -- there are more unhandled cases:\n\n```\n>>> requests.__version__\n'0.8.1'\n>>> requests.get('http://t.co/sBP41YTn')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"requests/api.py\", line 78, in get\n return request('get', url, **kwargs)\n File \"requests/api.py\", line 65, in request\n prefetch=prefetch\n File \"requests/sessions.py\", line 187, in request\n r.send(prefetch=prefetch)\n File \"requests/models.py\", line 459, in send\n self._build_response(r)\n File \"requests/models.py\", line 203, in _build_response\n raise TooManyRedirects()\nrequests.exceptions.TooManyRedirects\n```\n\nBrowser, wget, curl work fine. curl output:\n\n```\ncurl -L -I http://t.co/sBP41YTn\nHTTP/1.1 301 Moved Permanently\nDate: Thu, 17 Nov 2011 09:14:29 GMT\nServer: hi\nLocation: http://bit.ly/qnyjiE\nCache-Control: private,max-age=300\nExpires: Thu, 17 Nov 2011 09:19:29 GMT\nConnection: close\nContent-Type: text/html; charset=UTF-8\n\nHTTP/1.1 301 Moved\nServer: nginx\nDate: Thu, 17 Nov 2011 09:14:24 GMT\nContent-Type: text/html; charset=utf-8\nConnection: keep-alive\nSet-Cookie: _bit=4ec4d070-0024c-04de1-3c1cf10a;domain=.bit.ly;expires=Tue May 15 09:14:24 2012;path=/; HttpOnly\nCache-control: private; max-age=90\nLocation: http://www.freelance.nl/a/rvb220371/http://www.freelance.nl/?p=bekijkproject&id=321264\nMIME-Version: 1.0\nContent-Length: 182\n\nHTTP/1.1 302 Found\nDate: Thu, 17 Nov 2011 09:14:29 GMT\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g\nX-Powered-By: PHP/5.2.6-1+lenny13\nSet-Cookie: PHPSESSID=9772382d74c91b87614e68bccc2de4da; path=/\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\nCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\nPragma: no-cache\nLocation: http://www.freelance.nl/?p=bekijkproject&id=321264\nVary: Accept-Encoding\nContent-Type: text/html\n\nHTTP/1.1 200 OK\nDate: Thu, 17 Nov 2011 09:14:29 GMT\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g\nX-Powered-By: PHP/5.2.6-1+lenny13\nSet-Cookie: PHPSESSID=b1e3c4f673cb536c6e36afa47755ed2f; path=/\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\nCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\nPragma: no-cache\nVary: Accept-Encoding\nContent-Type: text/html\n```\n", "$ python\nPython 2.7.5+ (default, Sep 19 2013, 13:48:49) \n[GCC 4.8.1] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\nimport requests\nr = requests.get('http://nedovolnie.ru/')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 55, in get\n return request('get', url, *_kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 44, in request\n return session.request(method=method, url=url, *_kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 382, in request\n resp = self.send(prep, **send_kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 505, in send\n history = [resp for resp in gen] if allow_redirects else []\n File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 99, in resolve_redirects\n raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)\nrequests.exceptions.TooManyRedirects: Exceeded 30 redirects.\n\nrequests.**version**\n'2.1.0'\n", "Please note the date on this issue: it's more than two years old. The code has changed dramatically since then. Also, if you'd read some more recent issues you'd see that this is the same as issue #1805, which was fixed by #1808. The fix is in the current `master` and will be in the next release of Requests.\n", "yes, path is working,\nthank you very much\n", "I am also having this issue, requesting a few urls and `requests.exceptions.TooManyRedirects` comes up randomly. I cannot set the limit for redirects, I get `AttributeError: 'module' object has no attribute 'settings'` for `requests.settings.max_redirects = None`\n\nWhat is the current way of handling this exception?\n", "@imrek without any detail, my best advice to you is to ask for help on [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests) and provide more detail there, e.g.,\n- What url are you trying to make a request to?\n- What does your code look like?\n- etc.\n" ]
https://api.github.com/repos/psf/requests/issues/160
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/160/labels{/name}
https://api.github.com/repos/psf/requests/issues/160/comments
https://api.github.com/repos/psf/requests/issues/160/events
https://github.com/psf/requests/issues/160
1,611,028
MDU6SXNzdWUxNjExMDI4
160
data arg submitted to 'patch' method is ignored
{ "avatar_url": "https://avatars.githubusercontent.com/u/684386?v=4", "events_url": "https://api.github.com/users/sergedomk/events{/privacy}", "followers_url": "https://api.github.com/users/sergedomk/followers", "following_url": "https://api.github.com/users/sergedomk/following{/other_user}", "gists_url": "https://api.github.com/users/sergedomk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sergedomk", "id": 684386, "login": "sergedomk", "node_id": "MDQ6VXNlcjY4NDM4Ng==", "organizations_url": "https://api.github.com/users/sergedomk/orgs", "received_events_url": "https://api.github.com/users/sergedomk/received_events", "repos_url": "https://api.github.com/users/sergedomk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sergedomk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sergedomk/subscriptions", "type": "User", "url": "https://api.github.com/users/sergedomk", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-09-09T20:25:38Z
2021-09-09T11:01:03Z
2011-10-21T03:01:19Z
NONE
resolved
The data parameter passed to the 'patch' method in api.py is not being included in the parameter list passed to the 'request' method. The following change shown below fixes the issue. In api.py: ``` def patch(url, data='', **kwargs): """Sends a PATCH request. Returns :class:`Response` object. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`. :param **kwargs: Optional arguments that ``request`` takes. """ - return request('patch', url, **kwargs) + return request('patch', url, data=data, **kwargs) ```
{ "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/160/reactions" }
https://api.github.com/repos/psf/requests/issues/160/timeline
null
completed
null
null
false
[ "Yikes, thanks for the fix.\n\nMuch appreciated :)\n", "I think this bug has regressed into the codebase again. I have a failing unit test for this in https://github.com/kennethreitz/requests/pull/215 and was wondering how it got there.\n", "You are right. Looking through the commit history, I'm not seeing the \ncommit for that issue. Seems it might have gotten inadvertently wiped.\n\nOn 10/20/2011 03:57 PM, Daniel Schauenberg wrote:\n\n> I think this bug has regressed into the codebase again. I have a failing unit test for this in https://github.com/kennethreitz/requests/pull/215 and was wondering how it got there.\n", "Sorry about the bug, guys. The rewrite to urllib3 was previously taking place in the develop branch, but was taking longer than expected (was blocking releases), so I had to back it out into a feature branch. The codebase is in a good state again, and pull requests that were merged into that branch are being backported into new releases.\n" ]
https://api.github.com/repos/psf/requests/issues/159
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/159/labels{/name}
https://api.github.com/repos/psf/requests/issues/159/comments
https://api.github.com/repos/psf/requests/issues/159/events
https://github.com/psf/requests/issues/159
1,606,775
MDU6SXNzdWUxNjA2Nzc1
159
Requests form attributes sort (like curl -f)
{ "avatar_url": "https://avatars.githubusercontent.com/u/446752?v=4", "events_url": "https://api.github.com/users/kigeia/events{/privacy}", "followers_url": "https://api.github.com/users/kigeia/followers", "following_url": "https://api.github.com/users/kigeia/following{/other_user}", "gists_url": "https://api.github.com/users/kigeia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kigeia", "id": 446752, "login": "kigeia", "node_id": "MDQ6VXNlcjQ0Njc1Mg==", "organizations_url": "https://api.github.com/users/kigeia/orgs", "received_events_url": "https://api.github.com/users/kigeia/received_events", "repos_url": "https://api.github.com/users/kigeia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kigeia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kigeia/subscriptions", "type": "User", "url": "https://api.github.com/users/kigeia", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-09T11:07:06Z
2021-09-09T12:00:37Z
2011-09-09T16:53:24Z
CONTRIBUTOR
resolved
Hi, is there a way to sort the form attributes : in the github v3 api, it is stated that when posting form for a download, the order of the form attributes is mandatory to be the same as the doc exemple. Any advice on this ? Here is a working curl post, followed by a non working requests post : Curl post : working POST / HTTP/1.1 User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6 Host: github.s3.amazonaws.com Accept: / Content-Length: 2299 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------b7a77fa8ccb4 ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" key" downloads/kigeia/gepi/LICENSE-1-245 ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" acl" public-read ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" success_action_status" 201 ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" Filename" LICENSE-1-245 ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" AWSAccessKeyId" 1DWESVTPGHQVTX38V182 ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" Policy" ewogICAgJ2V4cGlyYXRpb24nOiAnMjExMS0wOC0zMVQxMjoyMjozNS4wMDBaJywKICAgICdjb25kaXRpb25zJzogWwogICAgICAgIHsnYnVja2V0JzogJ2dpdGh1Yid9LAogICAgICAgIHsna2V5JzogJ2Rvd25sb2Fkcy9raWdlaWEvZ2VwaS9MSUNFTlNFLTEtMjQ1J30sCiAgICAgICAgeydhY2wnOiAncHVibGljLXJlYWQnfSwKICAgICAgICB7J3N1Y2Nlc3NfYWN0aW9uX3N0YXR1cyc6ICcyMDEnfSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRGaWxlbmFtZScsICcnXSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRDb250ZW50LVR5cGUnLCAnJ10KICAgIF0KfQ== ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" Signature" Cdiawuw8CDChzxqE7lOdaaClo08= ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" Content-Type" application/octet-stream ------------------------------b7a77fa8ccb4 Content-Disposition: form-data; name=" file"; filename="LICENSE-1-245" Content-Type: application/octet-stream Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------b7a77fa8ccb4-- Requests post : not working POST / HTTP/1.1 Accept-Encoding: identity Content-Length: 2522 Host: github.s3.amazonaws.com Content-Type: multipart/form-data; boundary=7005673b2b0941909024b72cb0adf66c Connection: close User-Agent: python-requests.org --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="AWSAccessKeyId" Content-Type: text/plain; charset=utf-8 1DWESVTPGHQVTX38V182 --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="LICENSE-1-245" Content-Type: text/plain; charset=utf-8 Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="Filename" Content-Type: text/plain; charset=utf-8 LICENSE-1-245 --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="key" Content-Type: text/plain; charset=utf-8 downloads/kigeia/gepi/LICENSE-1-245 --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="Signature" Content-Type: text/plain; charset=utf-8 z8EEaQtwIrVVCwjZqadKzE2b918= --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="Policy" Content-Type: text/plain; charset=utf-8 ewogICAgJ2V4cGlyYXRpb24nOiAnMjExMS0wOC0zMVQxMjo1MDoxMS4wMDBaJywKICAgICdjb25kaXRpb25zJzogWwogICAgICAgIHsnYnVja2V0JzogJ2dpdGh1Yid9LAogICAgICAgIHsna2V5JzogJ2Rvd25sb2Fkcy9raWdlaWEvZ2VwaS9MSUNFTlNFLTEtMjQ1J30sCiAgICAgICAgeydhY2wnOiAncHVibGljLXJlYWQnfSwKICAgICAgICB7J3N1Y2Nlc3NfYWN0aW9uX3N0YXR1cyc6ICcyMDEnfSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRGaWxlbmFtZScsICcnXSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRDb250ZW50LVR5cGUnLCAnJ10KICAgIF0KfQ== --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="acl" Content-Type: text/plain; charset=utf-8 public-read --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="Content-Type" Content-Type: text/plain; charset=utf-8 application/octet-stream --7005673b2b0941909024b72cb0adf66c Content-Disposition: form-data; name="success_action_status" Content-Type: text/plain; charset=utf-8 201 --7005673b2b0941909024b72cb0adf66c--
{ "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/159/reactions" }
https://api.github.com/repos/psf/requests/issues/159/timeline
null
completed
null
null
false
[ "You should be able to used an [OrderedDict](http://docs.python.org/dev/library/collections.html#collections.OrderedDict), but I'd have to confirm.\n" ]
https://api.github.com/repos/psf/requests/issues/158
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/158/labels{/name}
https://api.github.com/repos/psf/requests/issues/158/comments
https://api.github.com/repos/psf/requests/issues/158/events
https://github.com/psf/requests/pull/158
1,603,623
MDExOlB1bGxSZXF1ZXN0MzE4Mjk4
158
Possibly fix GET with a 302 redirect response causing params to be glued on incorrectly
{ "avatar_url": "https://avatars.githubusercontent.com/u/59039?v=4", "events_url": "https://api.github.com/users/dropwhile/events{/privacy}", "followers_url": "https://api.github.com/users/dropwhile/followers", "following_url": "https://api.github.com/users/dropwhile/following{/other_user}", "gists_url": "https://api.github.com/users/dropwhile/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dropwhile", "id": 59039, "login": "dropwhile", "node_id": "MDQ6VXNlcjU5MDM5", "organizations_url": "https://api.github.com/users/dropwhile/orgs", "received_events_url": "https://api.github.com/users/dropwhile/received_events", "repos_url": "https://api.github.com/users/dropwhile/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dropwhile/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dropwhile/subscriptions", "type": "User", "url": "https://api.github.com/users/dropwhile", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2011-09-08T23:07:28Z
2021-09-08T23:08:26Z
2011-10-22T23:46:50Z
NONE
resolved
A case can arise where a GET request, with params, receives a 302 redirect and the subsequent request has param garbase appended to the url. Example: ``` client> GET /some/url?id=1 HTTP/1.1 client> Host: example.com server< HTTP/1.1 302 Moved Temporarily server< Location: http://example.com/some/url?id=1&extra_data=2 ## this is the bad request right here. Note the [('id', 1)] stuck on # the end client> GET /some/url?id=1&extra_data=2&[('id', 1)] HTTP/1.1. client> Host: example.com # the server of course doesn't like it server< HTTP/1.0 400 Bad request. ``` This issue is caused by the conditional branch in _encode_params for the second request not urlencoding the list of tuples for the Request._enc_params attribute. github note: possible fix for kennethreitz/requests#157
{ "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/158/reactions" }
https://api.github.com/repos/psf/requests/issues/158/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/158.diff", "html_url": "https://github.com/psf/requests/pull/158", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/158.patch", "url": "https://api.github.com/repos/psf/requests/pulls/158" }
true
[]
https://api.github.com/repos/psf/requests/issues/157
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/157/labels{/name}
https://api.github.com/repos/psf/requests/issues/157/comments
https://api.github.com/repos/psf/requests/issues/157/events
https://github.com/psf/requests/issues/157
1,602,922
MDU6SXNzdWUxNjAyOTIy
157
GET with a 302 redirect response causing params to be glued on incorrectly
{ "avatar_url": "https://avatars.githubusercontent.com/u/59039?v=4", "events_url": "https://api.github.com/users/dropwhile/events{/privacy}", "followers_url": "https://api.github.com/users/dropwhile/followers", "following_url": "https://api.github.com/users/dropwhile/following{/other_user}", "gists_url": "https://api.github.com/users/dropwhile/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dropwhile", "id": 59039, "login": "dropwhile", "node_id": "MDQ6VXNlcjU5MDM5", "organizations_url": "https://api.github.com/users/dropwhile/orgs", "received_events_url": "https://api.github.com/users/dropwhile/received_events", "repos_url": "https://api.github.com/users/dropwhile/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dropwhile/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dropwhile/subscriptions", "type": "User", "url": "https://api.github.com/users/dropwhile", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2011-09-08T22:01:05Z
2021-09-09T11:00:52Z
2011-11-13T05:42:05Z
NONE
resolved
I am calling a service like this: ``` import requests resp = requests.get('http://example.com/some/url', params={'id': 1}) ``` The service responds with a series of 302 redirects. I am seeing this exchange. ``` client> GET /some/url?id=1 HTTP/1.1 client> Host: example.com server< HTTP/1.1 302 Moved Temporarily server< Location: http://example.com/some/url?id=1&extra_data=2 ## this is the bad request right here. Note the [('id', 1)] stuck on the end client> GET /some/url?id=1&extra_data=2&[('id', 1)] HTTP/1.1. client> Host: example.com # the server of course doesn't like it server< HTTP/1.0 400 Bad request. ``` Any ideas why this may be happening?
{ "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/157/reactions" }
https://api.github.com/repos/psf/requests/issues/157/timeline
null
completed
null
null
false
[ "Adding a print statement on [line 79](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L79) of models.py like this:\n\n```\nprint 'params: %r, %r, %r' % (params, self.params, self._enc_params)\n```\n\nShows me the following output:\n\n```\nparams: {'id': 1}, [('id', 1)], 'id=1'\nparams: [('id', 1)], [('id', 1)], [('id', 1)]\n```\n\nSo it looks like the branch in _encode_params is not doing the right thing for the second request (after redirect).\n", "This seems to fix it, but I don't know if it has other unintended side effects.\n\n```\ndiff --git a/requests/models.py b/requests/models.py\nindex 6180e96..b3e32d2 100644\n--- a/requests/models.py\n+++ b/requests/models.py\n@@ -278,7 +278,9 @@ class Request(object):\n v.encode('utf-8') if isinstance(v, unicode) \n return result, urllib.urlencode(result, doseq=True)\n else:\n- return data, data\n+ if data == None:\n+ return data, data\n+ return data, urllib.urlencode(data, doseq=True)\n\n\n def _build_url(self):\n```\n", "previous print output now looks like this:\n\n```\nparams: {'id': 1}, [('id', 1)], 'id=1'\nparams: [('id', 1)], [('id', 1)], 'id=1'\n```\n", "Excellent! Thanks for both the bug and the apparent solution.\n\nCan you send a pull request?\n", "Hmm. Note that the patch provide does not guard against the addition of duplicate results in the request.\n\nI am seeing this now (note the additional copy of id=1 in the qs):\n\n```\nclient> GET /some/url?id=1&extra_data=2&id=1 HTTP/1.1.\nclient> Host: example.com\n```\n\nIs there a mechanism to _not_ supply params again for redirect requests, but to simply follow the redirect?\n", "Also, by simply appending (even if the location redirect provides it) identical elements, could there arise a situation where a form array post type query string could accidentally get more elements added to it?\n\nSuch as: `http://example.com/some/url?arr[]=val1&arr[]=val2`\n", "In response to your question, I sure can send a pull request. I just wanted to make sure the solution was tenable (and correct) before doing so.\n", "pull request kennethreitz/requests#158\n", "Fixed!\n", "great! thanks. :)\n" ]
https://api.github.com/repos/psf/requests/issues/156
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/156/labels{/name}
https://api.github.com/repos/psf/requests/issues/156/comments
https://api.github.com/repos/psf/requests/issues/156/events
https://github.com/psf/requests/issues/156
1,599,768
MDU6SXNzdWUxNTk5NzY4
156
get_unicode_from_response does not check charsets from meta tags
{ "avatar_url": "https://avatars.githubusercontent.com/u/307713?v=4", "events_url": "https://api.github.com/users/scott2b/events{/privacy}", "followers_url": "https://api.github.com/users/scott2b/followers", "following_url": "https://api.github.com/users/scott2b/following{/other_user}", "gists_url": "https://api.github.com/users/scott2b/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/scott2b", "id": 307713, "login": "scott2b", "node_id": "MDQ6VXNlcjMwNzcxMw==", "organizations_url": "https://api.github.com/users/scott2b/orgs", "received_events_url": "https://api.github.com/users/scott2b/received_events", "repos_url": "https://api.github.com/users/scott2b/repos", "site_admin": false, "starred_url": "https://api.github.com/users/scott2b/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/scott2b/subscriptions", "type": "User", "url": "https://api.github.com/users/scott2b", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2011-09-08T16:08:10Z
2021-09-09T00:34:21Z
2011-09-25T23:50:38Z
NONE
resolved
Also affects Response.content which calls this utility method. According to documentation, utils.get_unicode_from_response should check meta tags for additional charsets to try (presumably with get_encodings_from_content) before falling back to using unicode with errors="replace". However, the code seems to miss this step, rather the encoding is extracted from the headers, tried and then directly falls back to replacement.
{ "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/156/reactions" }
https://api.github.com/repos/psf/requests/issues/156/timeline
null
completed
null
null
false
[ "Sorry about that — the documentation is in development and needs to be update. \n\nThe decision was that Requests is an HTTP module, not an HTML module. There's a helper function available from within `requests.utils` that will attempt to decode the html content for you based on meta tags though.\n", "I see. Thanks for the quick reply. Let me know if you prefer I close this or leave it open.\n", "I'll leave it open to remind me to update the docs :)\n\n:cake:\n", "Hi, I want to reopen issue, because property .text came in game.\n\nYou actually use content to detect encoding with _detected_encoding() but forgot get_encodings_from_content() branch.\nchardet wont use html meta too and I can't see how to hint .text to use meta. \nShould I write \"response.encoding = request.utils.get_encodings_from_content(response.content)\" before using response.text? I think I need config option to do it automaticly or just try get_encodings_from_content() before chardet in _detected_encoding()\n\nAlso, fallback to 'ISO-8859-1' in get_encoding_from_headers() when no suitable headers found looks wrong for me because it makes false sense of determined encoding. Why \"content-type: text/html\" means ISO-8859-1? It means utf-8 more often in my non-english world.\n", "This is intentional, actually.\n\nThe initial implementation of response encoding did take meta tags into consideration, but I decided to remove it to keep things within a small scope. In short, meta tags are HTML, not HTTP :)\n\nYou can see #480 for a bit more detail.\n", "Actually, you are usng that html in _detected_encoding() with unreliable result (via chardet).\n\nIf I understand what regular expression based parsing is error prone, maybe I can get option like \ns = requests.session(config = {'look_for_meta':True})\n\nAnd what about 'ISO-8859-1' in get_encoding_from_headers()?\n", "@Savier: `_detected_encoding()` is checking the bytes of the response for an encoding. Chardet does a damn good job to :)\n" ]
https://api.github.com/repos/psf/requests/issues/155
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/155/labels{/name}
https://api.github.com/repos/psf/requests/issues/155/comments
https://api.github.com/repos/psf/requests/issues/155/events
https://github.com/psf/requests/issues/155
1,597,550
MDU6SXNzdWUxNTk3NTUw
155
Malformed headers cause later headers to be ignored
{ "avatar_url": "https://avatars.githubusercontent.com/u/117833?v=4", "events_url": "https://api.github.com/users/davidmytton/events{/privacy}", "followers_url": "https://api.github.com/users/davidmytton/followers", "following_url": "https://api.github.com/users/davidmytton/following{/other_user}", "gists_url": "https://api.github.com/users/davidmytton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/davidmytton", "id": 117833, "login": "davidmytton", "node_id": "MDQ6VXNlcjExNzgzMw==", "organizations_url": "https://api.github.com/users/davidmytton/orgs", "received_events_url": "https://api.github.com/users/davidmytton/received_events", "repos_url": "https://api.github.com/users/davidmytton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/davidmytton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidmytton/subscriptions", "type": "User", "url": "https://api.github.com/users/davidmytton", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-09-08T11:28:29Z
2021-09-09T12:00:34Z
2011-09-25T23:47:23Z
NONE
resolved
If an HTTP header is malformed then the headers after it will be ignored. E.g. the line after the "Server" header is missing a key and value. The "Date" and "Server" headers are stored in r.headers but the "Vary", "Connection" and "Content-Type" headers are not: ``` shell wget -S http://www.example.com/ --2011-09-08 08:56:59-- http://www.example.com/ Resolving www.example.com... XX Connecting to www.example.com|XX|:80... connected. HTTP request sent, awaiting response... HTTP/1.0 200 OK Date: Thu, 08 Sep 2011 08:57:00 GMT Server: Apache : Vary: Accept-Encoding,User-Agent Connection: close Content-Type: text/html; charset=UTF-8 Length: unspecified [text/html] Saving to: `index.html' ``` Request: ``` python >> import requests >>> r = requests.get("http://www.example.com/") >>> r.headers {'date': 'Thu, 08 Sep 2011 08:57:00 GMT', 'server': 'Apache'} ```
{ "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/155/reactions" }
https://api.github.com/repos/psf/requests/issues/155/timeline
null
completed
null
null
false
[ "Looks likes this comes from urllib2\n\n``` python\n>>> import urllib2\n>>> request = urllib2.Request('http://www.example.com/')\n>>> request.get_method = lambda : 'HEAD'\n>>> response = urllib2.urlopen(request)\n>>> print response.info()\nDate: Thu, 08 Sep 2011 13:38:22 GMT\nServer: Apache\n```\n", "Actually, it comes from httplib.py L#317 where it breaks out of the header parsing. Unfortunately this status message isn't passed on from urllib2.py L#1177. Not sure if the behavior is specified in a RFC.\n", "This is a bit out of scope — at least for now.\n\nIf someone wants to take the time to overload httplib's internal methods, I wouldn't mind adding the patch at all, but that will likely get complicated while supporting Python 2.5–3.3.\n", "[RFC2616 section 4](http://tools.ietf.org/html/rfc2616#section-4) says field-name must be a token, so the header is malformed. \nThe [section on tolerant applications](http://tools.ietf.org/html/rfc2616#section-19.3) only mentions line terminators, whitespace and date handling (the RFC was written in the pre-apocalyptic year of 1999)\n\nThe protocol gives the server all kinds of 4xx messages to point out epic client failz, but what is sane to do as a client?\n\n\"Be liberal in what you accept, and conservative in what you send\"\n\nBut a malformed header could be a sign of more things mal. Maybe a \"quirksmode\" that silently tries to fix the servers intent (IE6 anyone?) and a strict-mode that raises warnings.\n", "I'm currently porting the codebase to be powered by the wonderful `urllib3` project, which sits directly on top of httplib. This will make handing a case like this much easier.\n", "I'm closing this ticket for being out of scope.\n\nIf the headers are being malformed, I think there are bigger issues at hand :)\n" ]
https://api.github.com/repos/psf/requests/issues/154
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/154/labels{/name}
https://api.github.com/repos/psf/requests/issues/154/comments
https://api.github.com/repos/psf/requests/issues/154/events
https://github.com/psf/requests/issues/154
1,594,176
MDU6SXNzdWUxNTk0MTc2
154
Deprecate global settings
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-13T05:41:39Z", "closed_issues": 9, "created_at": "2011-08-23T15:07:03Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/10", "id": 30485, "labels_url": "https://api.github.com/repos/psf/requests/milestones/10/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODU=", "number": 10, "open_issues": 0, "state": "closed", "title": "v0.8.0", "updated_at": "2011-11-27T16:13:09Z", "url": "https://api.github.com/repos/psf/requests/milestones/10" }
1
2011-09-07T23:00:53Z
2021-09-09T11:00:53Z
2011-11-13T00:14:48Z
CONTRIBUTOR
resolved
Session objects will have a `config` dictionary. Module-level _defaults_ will still be present as `requests.settings` or `requests.defaults`.
{ "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/154/reactions" }
https://api.github.com/repos/psf/requests/issues/154/timeline
null
completed
null
null
false
[ "In the works.\n" ]
https://api.github.com/repos/psf/requests/issues/153
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/153/labels{/name}
https://api.github.com/repos/psf/requests/issues/153/comments
https://api.github.com/repos/psf/requests/issues/153/events
https://github.com/psf/requests/issues/153
1,573,191
MDU6SXNzdWUxNTczMTkx
153
Mock Tests
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-05T20:26:37Z
2021-09-09T12:00:35Z
2011-09-25T23:45:40Z
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/153/reactions" }
https://api.github.com/repos/psf/requests/issues/153/timeline
null
completed
null
null
false
[ "Thanks, @mrtazz!\n" ]
https://api.github.com/repos/psf/requests/issues/152
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/152/labels{/name}
https://api.github.com/repos/psf/requests/issues/152/comments
https://api.github.com/repos/psf/requests/issues/152/events
https://github.com/psf/requests/issues/152
1,571,746
MDU6SXNzdWUxNTcxNzQ2
152
Content-Type overwritten by urllib2 during POST
{ "avatar_url": "https://avatars.githubusercontent.com/u/292951?v=4", "events_url": "https://api.github.com/users/petermanser/events{/privacy}", "followers_url": "https://api.github.com/users/petermanser/followers", "following_url": "https://api.github.com/users/petermanser/following{/other_user}", "gists_url": "https://api.github.com/users/petermanser/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/petermanser", "id": 292951, "login": "petermanser", "node_id": "MDQ6VXNlcjI5Mjk1MQ==", "organizations_url": "https://api.github.com/users/petermanser/orgs", "received_events_url": "https://api.github.com/users/petermanser/received_events", "repos_url": "https://api.github.com/users/petermanser/repos", "site_admin": false, "starred_url": "https://api.github.com/users/petermanser/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/petermanser/subscriptions", "type": "User", "url": "https://api.github.com/users/petermanser", "user_view_type": "public" }
[]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" } ]
{ "closed_at": "2011-11-26T15:49:46Z", "closed_issues": 7, "created_at": "2011-08-23T15:02:54Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/9", "id": 30484, "labels_url": "https://api.github.com/repos/psf/requests/milestones/9/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODQ=", "number": 9, "open_issues": 0, "state": "closed", "title": "v0.6.2", "updated_at": "2011-11-26T15:49:46Z", "url": "https://api.github.com/repos/psf/requests/milestones/9" }
3
2011-09-05T17:02:45Z
2021-09-09T11:00:53Z
2011-11-13T00:14:57Z
CONTRIBUTOR
resolved
Got a bug, where urllib2 set a "Content-type" header, even if the "Content-Type" was set. ``` python r = requests.post('http://example.com', headers={'Content-Type':'application/json'}) ``` vs ``` python r = requests.post('http://example.com', headers={'Content-type':'application/json'}) ``` Content-Type failed, because urllib2 has written it's own header ("Content-Type: application/x-www-form-urlencoded"). I think it's a case (in)sensitive problem. Didn't have the time to look exactly into it, sorry. The error occured with Python 2.7.2.
{ "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/152/reactions" }
https://api.github.com/repos/psf/requests/issues/152/timeline
null
completed
null
null
false
[ "Thanks for the report. I know exactly what's causing this — should have a fix pushed up soon.\n", "Awesome, thanks! :)\n", "urllib2 is being removed, so this shouldn't be a problem in the next release.\n" ]
https://api.github.com/repos/psf/requests/issues/151
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/151/labels{/name}
https://api.github.com/repos/psf/requests/issues/151/comments
https://api.github.com/repos/psf/requests/issues/151/events
https://github.com/psf/requests/issues/151
1,566,383
MDU6SXNzdWUxNTY2Mzgz
151
Auto decode content
{ "avatar_url": "https://avatars.githubusercontent.com/u/292951?v=4", "events_url": "https://api.github.com/users/petermanser/events{/privacy}", "followers_url": "https://api.github.com/users/petermanser/followers", "following_url": "https://api.github.com/users/petermanser/following{/other_user}", "gists_url": "https://api.github.com/users/petermanser/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/petermanser", "id": 292951, "login": "petermanser", "node_id": "MDQ6VXNlcjI5Mjk1MQ==", "organizations_url": "https://api.github.com/users/petermanser/orgs", "received_events_url": "https://api.github.com/users/petermanser/received_events", "repos_url": "https://api.github.com/users/petermanser/repos", "site_admin": false, "starred_url": "https://api.github.com/users/petermanser/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/petermanser/subscriptions", "type": "User", "url": "https://api.github.com/users/petermanser", "user_view_type": "public" }
[]
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "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" } ]
null
5
2011-09-05T10:31:27Z
2021-09-09T12:00:33Z
2011-09-25T23:48:37Z
CONTRIBUTOR
resolved
Currently thinking of a feature, which allows you to automatically get the content of request decoded, for example in a seperate field. now: ``` python >>> import requests, json >>> r = requests.get('http://search.twitter.com/search.json?q=from%3Apetermanser&rpp=1') >>> json.loads(r.content) {u'next_page': u'?page=2&max_id=110411755330600960&q=from%3Apetermanser&rpp=1', u'completed_in': 0.045999999999999999, u'max_id_str': u'110411755330600960', u'since_id_str': u'0', u'refresh_url': u'?since_id=110411755330600960&q=from%3Apetermanser', u'results': [{u'iso_language_code': u'en', u'from_user_id_str': u'23642932', u'text': u'@mitsuhiko you have to get a time machine.. ;)', u'created_at': u'Sun, 04 Sep 2011 17:59:48 +0000', u'profile_image_url': u'http://a3.twimg.com/profile_images/1285795312/peter.manser_normal.jpg', u'to_user_id_str': u'3260011', u'to_user': u'mitsuhiko', u'source': u'&lt;a href=&quot;http://tapbots.com/tweetbot&quot; rel=&quot;nofollow&quot;&gt;Tweetbot for iPhone&lt;/a&gt;', u'id_str': u'110411755330600960', u'from_user': u'petermanser', u'from_user_id': 23642932, u'to_user_id': 3260011, u'geo': None, u'id': 110411755330600960, u'metadata': {u'result_type': u'recent'}}], u'since_id': 0, u'results_per_page': 1, u'query': u'from%3Apetermanser', u'max_id': 110411755330600960, u'page': 1} ``` with decode feature: ``` python >>> import requests, json >>> r = requests.get('http://search.twitter.com/search.json?q=from%3Apetermanser&rpp=1', decode='json') >>> r.content_decoded {u'next_page': u'?page=2&max_id=110411755330600960&q=from%3Apetermanser&rpp=1', u'completed_in': 0.045999999999999999, u'max_id_str': u'110411755330600960', u'since_id_str': u'0', u'refresh_url': u'?since_id=110411755330600960&q=from%3Apetermanser', u'results': [{u'iso_language_code': u'en', u'from_user_id_str': u'23642932', u'text': u'@mitsuhiko you have to get a time machine.. ;)', u'created_at': u'Sun, 04 Sep 2011 17:59:48 +0000', u'profile_image_url': u'http://a3.twimg.com/profile_images/1285795312/peter.manser_normal.jpg', u'to_user_id_str': u'3260011', u'to_user': u'mitsuhiko', u'source': u'&lt;a href=&quot;http://tapbots.com/tweetbot&quot; rel=&quot;nofollow&quot;&gt;Tweetbot for iPhone&lt;/a&gt;', u'id_str': u'110411755330600960', u'from_user': u'petermanser', u'from_user_id': 23642932, u'to_user_id': 3260011, u'geo': None, u'id': 110411755330600960, u'metadata': {u'result_type': u'recent'}}], u'since_id': 0, u'results_per_page': 1, u'query': u'from%3Apetermanser', u'max_id': 110411755330600960, u'page': 1} ``` wdyt? good idea? --- ### List of possible encodings - json - gzip - xml
{ "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/151/reactions" }
https://api.github.com/repos/psf/requests/issues/151/timeline
null
completed
null
null
false
[ "Sorry for the delayed response.\n\nI've been thinking about this for a while. I'm torn.\n\nLet's build a list of possible decoders first. If there's a nice list that can be handled by the standard library, this will definitely be a good idea.\n", "Cool :)\n\nYou mean a list of decoders to implement?\n\nThere are [a lot of mime_types](http://en.wikipedia.org/wiki/Mime_type), but I'd love to see the most important ones, such as `application/json` or `text/xml` for the beginning.\n", "I mean a list of decoders that could easily be handled by the standard library.\n", "Okay. I added xml.\n", "Out of scope.\n" ]
https://api.github.com/repos/psf/requests/issues/150
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/150/labels{/name}
https://api.github.com/repos/psf/requests/issues/150/comments
https://api.github.com/repos/psf/requests/issues/150/events
https://github.com/psf/requests/pull/150
1,562,692
MDExOlB1bGxSZXF1ZXN0MzA4NDc0
150
Feature content streaming
{ "avatar_url": "https://avatars.githubusercontent.com/u/7396?v=4", "events_url": "https://api.github.com/users/mitsuhiko/events{/privacy}", "followers_url": "https://api.github.com/users/mitsuhiko/followers", "following_url": "https://api.github.com/users/mitsuhiko/following{/other_user}", "gists_url": "https://api.github.com/users/mitsuhiko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mitsuhiko", "id": 7396, "login": "mitsuhiko", "node_id": "MDQ6VXNlcjczOTY=", "organizations_url": "https://api.github.com/users/mitsuhiko/orgs", "received_events_url": "https://api.github.com/users/mitsuhiko/received_events", "repos_url": "https://api.github.com/users/mitsuhiko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mitsuhiko/subscriptions", "type": "User", "url": "https://api.github.com/users/mitsuhiko", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-09-04T16:28:13Z
2021-09-08T23:08:17Z
2011-09-05T20:39:10Z
CONTRIBUTOR
resolved
Make it possible to not load the whole response into memory at once. This is especially helpful if you download huge responses from the interwebs.
{ "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/150/reactions" }
https://api.github.com/repos/psf/requests/issues/150/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/150.diff", "html_url": "https://github.com/psf/requests/pull/150", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/150.patch", "url": "https://api.github.com/repos/psf/requests/pulls/150" }
true
[ "Yes, there are no tests now, but I don't know how you want to have this tested. Open for suggestions.\n", "Beautiful — Thanks Armin.\n\n---\n\nTesting shouldn't need to be too thorough for this. For now, we can send a request to Httpbin's `/gzip` endoint and join the iterator to confirm that it's the same as a non-iterator version.\n" ]
https://api.github.com/repos/psf/requests/issues/149
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/149/labels{/name}
https://api.github.com/repos/psf/requests/issues/149/comments
https://api.github.com/repos/psf/requests/issues/149/events
https://github.com/psf/requests/pull/149
1,551,150
MDExOlB1bGxSZXF1ZXN0MzA1OTM4
149
Only the path should be unquoted/quoted.
{ "avatar_url": "https://avatars.githubusercontent.com/u/36156?v=4", "events_url": "https://api.github.com/users/jerem/events{/privacy}", "followers_url": "https://api.github.com/users/jerem/followers", "following_url": "https://api.github.com/users/jerem/following{/other_user}", "gists_url": "https://api.github.com/users/jerem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerem", "id": 36156, "login": "jerem", "node_id": "MDQ6VXNlcjM2MTU2", "organizations_url": "https://api.github.com/users/jerem/orgs", "received_events_url": "https://api.github.com/users/jerem/received_events", "repos_url": "https://api.github.com/users/jerem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerem/subscriptions", "type": "User", "url": "https://api.github.com/users/jerem", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-02T13:18:30Z
2021-09-08T12:01:23Z
2011-09-05T20:22:59Z
CONTRIBUTOR
resolved
Only the path should be unquoted/quoted (not the query, otherwise it makes a wrong redirection). For example if you have: ``` Location: /test?foo=bar ``` Only /test should be unquoted + quoted, not the query string.
{ "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/149/reactions" }
https://api.github.com/repos/psf/requests/issues/149/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/149.diff", "html_url": "https://github.com/psf/requests/pull/149", "merged_at": "2011-09-05T20:22:59Z", "patch_url": "https://github.com/psf/requests/pull/149.patch", "url": "https://api.github.com/repos/psf/requests/pulls/149" }
true
[ "Thanks!\n" ]
https://api.github.com/repos/psf/requests/issues/148
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/148/labels{/name}
https://api.github.com/repos/psf/requests/issues/148/comments
https://api.github.com/repos/psf/requests/issues/148/events
https://github.com/psf/requests/issues/148
1,541,485
MDU6SXNzdWUxNTQxNDg1
148
HTTPS client-side certificate
{ "avatar_url": "https://avatars.githubusercontent.com/u/370891?v=4", "events_url": "https://api.github.com/users/ndevilla/events{/privacy}", "followers_url": "https://api.github.com/users/ndevilla/followers", "following_url": "https://api.github.com/users/ndevilla/following{/other_user}", "gists_url": "https://api.github.com/users/ndevilla/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ndevilla", "id": 370891, "login": "ndevilla", "node_id": "MDQ6VXNlcjM3MDg5MQ==", "organizations_url": "https://api.github.com/users/ndevilla/orgs", "received_events_url": "https://api.github.com/users/ndevilla/received_events", "repos_url": "https://api.github.com/users/ndevilla/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ndevilla/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ndevilla/subscriptions", "type": "User", "url": "https://api.github.com/users/ndevilla", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-09-01T15:10:17Z
2021-09-09T12:00:38Z
2011-09-05T20:46:30Z
NONE
resolved
About certificates and validation: it would be really great to have client-side certificate authentication. Submit a PKCS#12 identity and its associated password (if any) and let requests use it for authentication to a remote HTTPS site. This is the kind of thing you need more and more as some public APIs require strong authentication. pyCurl has it but it is a real pain to use.
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/148/reactions" }
https://api.github.com/repos/psf/requests/issues/148/timeline
null
completed
null
null
false
[ "Thanks for the thoughts! \n\nCheck out #30 for the current plans.\n" ]
https://api.github.com/repos/psf/requests/issues/147
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/147/labels{/name}
https://api.github.com/repos/psf/requests/issues/147/comments
https://api.github.com/repos/psf/requests/issues/147/events
https://github.com/psf/requests/issues/147
1,533,506
MDU6SXNzdWUxNTMzNTA2
147
bytecode string returned when page has charset=UTF-8
{ "avatar_url": "https://avatars.githubusercontent.com/u/118963?v=4", "events_url": "https://api.github.com/users/j0hnsmith/events{/privacy}", "followers_url": "https://api.github.com/users/j0hnsmith/followers", "following_url": "https://api.github.com/users/j0hnsmith/following{/other_user}", "gists_url": "https://api.github.com/users/j0hnsmith/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/j0hnsmith", "id": 118963, "login": "j0hnsmith", "node_id": "MDQ6VXNlcjExODk2Mw==", "organizations_url": "https://api.github.com/users/j0hnsmith/orgs", "received_events_url": "https://api.github.com/users/j0hnsmith/received_events", "repos_url": "https://api.github.com/users/j0hnsmith/repos", "site_admin": false, "starred_url": "https://api.github.com/users/j0hnsmith/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/j0hnsmith/subscriptions", "type": "User", "url": "https://api.github.com/users/j0hnsmith", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-08-31T16:14:02Z
2021-09-09T00:34:22Z
2011-09-14T12:47:51Z
NONE
resolved
I had a situation (with both requests and urllib2) where a page that had `<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />` was being returned as a bytestring `<type 'str'>` but did contain unicode characters (due to a server misconfiguration I assume). So when I tried to use it I got the classic `UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 419: ordinal not in range(128)` Is this something that requests could fix? Is this something that requests would want to 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/147/reactions" }
https://api.github.com/repos/psf/requests/issues/147/timeline
null
completed
null
null
false
[ "Requests only attempts to decode charsets specified in HTTP Headers (in the upcoming release).\n\nHowever, there is a utility function that will attempt to decode based on the HTML tags. If the content isn't actually in the specified encoding, however, there's nothing that can be done (aside from ignoring the invalid charecters).\n" ]
https://api.github.com/repos/psf/requests/issues/146
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/146/labels{/name}
https://api.github.com/repos/psf/requests/issues/146/comments
https://api.github.com/repos/psf/requests/issues/146/events
https://github.com/psf/requests/pull/146
1,530,524
MDExOlB1bGxSZXF1ZXN0MzAwNDYy
146
Move tests into submodule
{ "avatar_url": "https://avatars.githubusercontent.com/u/320966?v=4", "events_url": "https://api.github.com/users/densh/events{/privacy}", "followers_url": "https://api.github.com/users/densh/followers", "following_url": "https://api.github.com/users/densh/following{/other_user}", "gists_url": "https://api.github.com/users/densh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/densh", "id": 320966, "login": "densh", "node_id": "MDQ6VXNlcjMyMDk2Ng==", "organizations_url": "https://api.github.com/users/densh/orgs", "received_events_url": "https://api.github.com/users/densh/received_events", "repos_url": "https://api.github.com/users/densh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/densh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/densh/subscriptions", "type": "User", "url": "https://api.github.com/users/densh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-08-31T08:44:28Z
2021-09-08T12:01:24Z
2011-09-05T20:29:46Z
CONTRIBUTOR
resolved
- Moved tests into .test submodule. As you can see instead of `import requests` i used `import __init__ as requests` — this will work in the same way. Some relative import magic might have been used but AFAIK it won't work on python 2.5 - Changed `open('test_requests.py')` to `StringIO('Test.')` — this will always work and behave properly. Using plain file open might not work if user is testing requests from some different location (e.g. test module after install via pip.) Although it is possible to make usual file open work by some clever path calculations but i'm not sure if this is really needed. - Added additional try/except during json import to ensure proper import.
{ "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/146/reactions" }
https://api.github.com/repos/psf/requests/issues/146/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/146.diff", "html_url": "https://github.com/psf/requests/pull/146", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/146.patch", "url": "https://api.github.com/repos/psf/requests/pulls/146" }
true
[ "Thanks for the contribution — I'm still a little hesitant about doing this though. \n\nI'll update this pull request once I give it some more thought. \n" ]
https://api.github.com/repos/psf/requests/issues/145
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/145/labels{/name}
https://api.github.com/repos/psf/requests/issues/145/comments
https://api.github.com/repos/psf/requests/issues/145/events
https://github.com/psf/requests/issues/145
1,527,982
MDU6SXNzdWUxNTI3OTgy
145
readonly input fields
{ "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
1
2011-08-31T04:58:46Z
2021-09-09T12:00:38Z
2011-09-05T20:45:57Z
NONE
resolved
How does requests handle readonly (hidden) input fields like [nonce](http://en.wikipedia.org/wiki/Cryptographic_nonce) ? In [mechanize](https://github.com/jjlee/mechanize) , the readonly values are automatically posted. Are there any plans of implementing this , since this is a Huge Time Saver.
{ "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/145/reactions" }
https://api.github.com/repos/psf/requests/issues/145/timeline
null
completed
null
null
false
[ "Can you give me more context?\n\nRequests is used for crafting HTTP requests, not necessarily filling out HTML forms. \n" ]
https://api.github.com/repos/psf/requests/issues/144
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/144/labels{/name}
https://api.github.com/repos/psf/requests/issues/144/comments
https://api.github.com/repos/psf/requests/issues/144/events
https://github.com/psf/requests/pull/144
1,517,891
MDExOlB1bGxSZXF1ZXN0Mjk4MDQ1
144
Fix a bug when content-type is empty
{ "avatar_url": "https://avatars.githubusercontent.com/u/446752?v=4", "events_url": "https://api.github.com/users/kigeia/events{/privacy}", "followers_url": "https://api.github.com/users/kigeia/followers", "following_url": "https://api.github.com/users/kigeia/following{/other_user}", "gists_url": "https://api.github.com/users/kigeia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kigeia", "id": 446752, "login": "kigeia", "node_id": "MDQ6VXNlcjQ0Njc1Mg==", "organizations_url": "https://api.github.com/users/kigeia/orgs", "received_events_url": "https://api.github.com/users/kigeia/received_events", "repos_url": "https://api.github.com/users/kigeia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kigeia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kigeia/subscriptions", "type": "User", "url": "https://api.github.com/users/kigeia", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-08-30T10:04:21Z
2021-09-08T12:01:23Z
2011-08-31T03:58:37Z
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/144/reactions" }
https://api.github.com/repos/psf/requests/issues/144/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/144.diff", "html_url": "https://github.com/psf/requests/pull/144", "merged_at": "2011-08-31T03:58:37Z", "patch_url": "https://github.com/psf/requests/pull/144.patch", "url": "https://api.github.com/repos/psf/requests/pulls/144" }
true
[ "Thanks for the bugfix!\n" ]
https://api.github.com/repos/psf/requests/issues/143
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/143/labels{/name}
https://api.github.com/repos/psf/requests/issues/143/comments
https://api.github.com/repos/psf/requests/issues/143/events
https://github.com/psf/requests/issues/143
1,517,852
MDU6SXNzdWUxNTE3ODUy
143
Build a form like curl -F
{ "avatar_url": "https://avatars.githubusercontent.com/u/446752?v=4", "events_url": "https://api.github.com/users/kigeia/events{/privacy}", "followers_url": "https://api.github.com/users/kigeia/followers", "following_url": "https://api.github.com/users/kigeia/following{/other_user}", "gists_url": "https://api.github.com/users/kigeia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kigeia", "id": 446752, "login": "kigeia", "node_id": "MDQ6VXNlcjQ0Njc1Mg==", "organizations_url": "https://api.github.com/users/kigeia/orgs", "received_events_url": "https://api.github.com/users/kigeia/received_events", "repos_url": "https://api.github.com/users/kigeia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kigeia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kigeia/subscriptions", "type": "User", "url": "https://api.github.com/users/kigeia", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-08-30T09:58:41Z
2021-09-09T12:00:38Z
2011-08-31T04:07:20Z
CONTRIBUTOR
resolved
I wonder if it's possible to build a form within the requests library. I want to do that to implement the download in github api (python-github3). Here is the doc for the api v3 download : curl \ -F "key=downloads/octocat/Hello-World/new_file.jpg" \ -F "acl=public-read" \ ... -F "file=@new_file.jpg" \ https://github.s3.amazonaws.com/ Any advice on how to do that with the requests library ? Bye
{ "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/143/reactions" }
https://api.github.com/repos/psf/requests/issues/143/timeline
null
completed
null
null
false
[ "Attaching form data is quite easy with requests:\n\n``` python\n\nimport requests\n\nurl = 'https://github.s3.amazonaws.com/'\nform = {\n 'key': 'downloads/octocat/Hello-World/new_file.jpg',\n 'acl': 'public-read',\n 'file': '@new_file.jpg'\n}\n\nr = requests.post(url, data=form)\n\n```\n", "Hi, is there a way to order the form attributes : in the github v3 api, it is stated that when posting a download, the order of the form attribute is mandatory to be the same as the doc exemple.\n\nAny advice on this ?\n\nHere is a working curl post, followed by a non working requests post :\n\nPOST / HTTP/1.1\nUser-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6\nHost: github.s3.amazonaws.com\nAccept: _/_\nContent-Length: 2299\nExpect: 100-continue\nContent-Type: multipart/form-data; boundary=----------------------------b7a77fa8ccb4\n\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" key\"\n\ndownloads/kigeia/gepi/LICENSE-1-245\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" acl\"\n\npublic-read\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" success_action_status\"\n\n201\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" Filename\"\n\nLICENSE-1-245\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" AWSAccessKeyId\"\n\n1DWESVTPGHQVTX38V182\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" Policy\"\n\newogICAgJ2V4cGlyYXRpb24nOiAnMjExMS0wOC0zMVQxMjoyMjozNS4wMDBaJywKICAgICdjb25kaXRpb25zJzogWwogICAgICAgIHsnYnVja2V0JzogJ2dpdGh1Yid9LAogICAgICAgIHsna2V5JzogJ2Rvd25sb2Fkcy9raWdlaWEvZ2VwaS9MSUNFTlNFLTEtMjQ1J30sCiAgICAgICAgeydhY2wnOiAncHVibGljLXJlYWQnfSwKICAgICAgICB7J3N1Y2Nlc3NfYWN0aW9uX3N0YXR1cyc6ICcyMDEnfSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRGaWxlbmFtZScsICcnXSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRDb250ZW50LVR5cGUnLCAnJ10KICAgIF0KfQ==\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" Signature\"\n\nCdiawuw8CDChzxqE7lOdaaClo08=\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" Content-Type\"\n\napplication/octet-stream\n------------------------------b7a77fa8ccb4\nContent-Disposition: form-data; name=\" file\"; filename=\"LICENSE-1-245\"\nContent-Type: application/octet-stream\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n------------------------------b7a77fa8ccb4--\n\n# \n\n# \n\nPOST / HTTP/1.1\nAccept-Encoding: identity\nContent-Length: 2522\nHost: github.s3.amazonaws.com\nContent-Type: multipart/form-data; boundary=7005673b2b0941909024b72cb0adf66c\nConnection: close\nUser-Agent: python-requests.org\n\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"AWSAccessKeyId\"\nContent-Type: text/plain; charset=utf-8\n\n1DWESVTPGHQVTX38V182\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"LICENSE-1-245\"\nContent-Type: text/plain; charset=utf-8\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"Filename\"\nContent-Type: text/plain; charset=utf-8\n\nLICENSE-1-245\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"key\"\nContent-Type: text/plain; charset=utf-8\n\ndownloads/kigeia/gepi/LICENSE-1-245\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"Signature\"\nContent-Type: text/plain; charset=utf-8\n\nz8EEaQtwIrVVCwjZqadKzE2b918=\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"Policy\"\nContent-Type: text/plain; charset=utf-8\n\newogICAgJ2V4cGlyYXRpb24nOiAnMjExMS0wOC0zMVQxMjo1MDoxMS4wMDBaJywKICAgICdjb25kaXRpb25zJzogWwogICAgICAgIHsnYnVja2V0JzogJ2dpdGh1Yid9LAogICAgICAgIHsna2V5JzogJ2Rvd25sb2Fkcy9raWdlaWEvZ2VwaS9MSUNFTlNFLTEtMjQ1J30sCiAgICAgICAgeydhY2wnOiAncHVibGljLXJlYWQnfSwKICAgICAgICB7J3N1Y2Nlc3NfYWN0aW9uX3N0YXR1cyc6ICcyMDEnfSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRGaWxlbmFtZScsICcnXSwKICAgICAgICBbJ3N0YXJ0cy13aXRoJywgJyRDb250ZW50LVR5cGUnLCAnJ10KICAgIF0KfQ==\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"acl\"\nContent-Type: text/plain; charset=utf-8\n\npublic-read\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"Content-Type\"\nContent-Type: text/plain; charset=utf-8\n\napplication/octet-stream\n--7005673b2b0941909024b72cb0adf66c\nContent-Disposition: form-data; name=\"success_action_status\"\nContent-Type: text/plain; charset=utf-8\n\n201\n--7005673b2b0941909024b72cb0adf66c--\n" ]
https://api.github.com/repos/psf/requests/issues/142
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/142/labels{/name}
https://api.github.com/repos/psf/requests/issues/142/comments
https://api.github.com/repos/psf/requests/issues/142/events
https://github.com/psf/requests/pull/142
1,511,492
MDExOlB1bGxSZXF1ZXN0Mjk2NDEz
142
Fixed logic for auto redirect in GET and HEAD methods.
{ "avatar_url": "https://avatars.githubusercontent.com/u/328826?v=4", "events_url": "https://api.github.com/users/verm666/events{/privacy}", "followers_url": "https://api.github.com/users/verm666/followers", "following_url": "https://api.github.com/users/verm666/following{/other_user}", "gists_url": "https://api.github.com/users/verm666/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/verm666", "id": 328826, "login": "verm666", "node_id": "MDQ6VXNlcjMyODgyNg==", "organizations_url": "https://api.github.com/users/verm666/orgs", "received_events_url": "https://api.github.com/users/verm666/received_events", "repos_url": "https://api.github.com/users/verm666/repos", "site_admin": false, "starred_url": "https://api.github.com/users/verm666/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/verm666/subscriptions", "type": "User", "url": "https://api.github.com/users/verm666", "user_view_type": "public" }
[]
closed
true
null
[]
null
11
2011-08-29T16:03:48Z
2021-09-08T12:01:21Z
2011-09-03T15:45:12Z
CONTRIBUTOR
resolved
This patch allow you turn off allow_redirects for GET or HEAD methods.
{ "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/142/reactions" }
https://api.github.com/repos/psf/requests/issues/142/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/142.diff", "html_url": "https://github.com/psf/requests/pull/142", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/142.patch", "url": "https://api.github.com/repos/psf/requests/pulls/142" }
true
[ "Please merge this into next release, this will make testing redirect code much easier\n", "Can you explain in more detail?\n", "The `allow_redirects` parameter is only for PUSH/POST/_&c_ requests, to allow the behavior described in [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html):\n\n> If the 301 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.\n", "I can see how the name of the argument could be confusing. I need to make an explicit note of it in the docs. \n\nCan you explain the use case for wanting to disable redirect-following for a GET/HEAD? I'm not against adding it (at all), if it's needed.\n", "> > Can you explain the use case for wanting to disable redirect-following for a GET/HEAD? I'm not against adding it (at all), if it's needed.\n\nFor debug my http application. (i want to see full sequence of requests/responses)\n", "You should use `Response.history`, which contains a list of the redirect response objects.\n", "On second thought, I think I will add this in. I'll have `follow_redirects` default to True for GET/Heads.\n", "> I'll have follow_redirects default to True for GET/Heads\n\nThis is exists in my patch :)\n\nhttps://github.com/kennethreitz/requests/pull/142/files#diff-0\n", ":thumbsup:\n", "Good though, kennethreitz! Please, apply this pull request, it will make world better ;-) \n", "I merged it in yesterday :)\n" ]
https://api.github.com/repos/psf/requests/issues/141
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/141/labels{/name}
https://api.github.com/repos/psf/requests/issues/141/comments
https://api.github.com/repos/psf/requests/issues/141/events
https://github.com/psf/requests/issues/141
1,499,278
MDU6SXNzdWUxNDk5Mjc4
141
Session local argument merging
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-26T15:49:46Z", "closed_issues": 7, "created_at": "2011-08-23T15:02:54Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/9", "id": 30484, "labels_url": "https://api.github.com/repos/psf/requests/milestones/9/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODQ=", "number": 9, "open_issues": 0, "state": "closed", "title": "v0.6.2", "updated_at": "2011-11-26T15:49:46Z", "url": "https://api.github.com/repos/psf/requests/milestones/9" }
2
2011-08-27T01:34:02Z
2021-09-09T12:00:33Z
2011-09-26T01:02:55Z
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/141/reactions" }
https://api.github.com/repos/psf/requests/issues/141/timeline
null
completed
null
null
false
[ "Beautiful. This will kill two birds with one stone.\n\nMy plan of late has been: if you pass in a dictionary update sequence, instead of a dictionary, it will be converted to a dictionary internally. \n\nI can also use this to power local argument overrides for sessions. When a dict is passed in locally, it'll be merged. When a sequence is, it will be overridden.\n\n``` python\nimport requests\n\nheaders = {'X-Life': '42'}\n\nwith requests.session(headers=headers) as s:\n\n _headers_merged = {'X-Question': 'What is six times nine?'}\n\n r = s.get('http://..', headers=_headers_merged)\n # request has both X-Question and X-Life headers\n\n _headers_override = [('X-Question', 'We\\'ll never know.')]\n\n r2 = s.get('http://..', headers=_headers_override)\n # request has only X-Question header\n```\n\nI can pretty much just check to see if the passed in item has `__getitem__`, and if does not, assume it's a dict sequence. If it doesn't work as one, just let the `dict()` error raise.\n", "New proposal, as discussed with @robmadole:\n\nAll locally passed dictionaries will merge with the session-level dictionaries. If a value is set to None, that key will be removed before being passed to the request method.\n" ]
https://api.github.com/repos/psf/requests/issues/140
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/140/labels{/name}
https://api.github.com/repos/psf/requests/issues/140/comments
https://api.github.com/repos/psf/requests/issues/140/events
https://github.com/psf/requests/issues/140
1,496,864
MDU6SXNzdWUxNDk2ODY0
140
HTTP Headers w/ Multiple Values
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-08-26T17:39:57Z
2021-09-09T10:00:52Z
2011-11-26T15:51:32Z
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/140/reactions" }
https://api.github.com/repos/psf/requests/issues/140/timeline
null
completed
null
null
false
[ "http://www.w3.org/Protocols/9707-link-header.html\n", "https://gist.github.com/210535\n", "Document this.\n", "Does it mean something like this for example?\n\n``` python\nfrom unittest import TestCase\nimport requests\n\n\nclass TestHeaderLink(TestCase):\n\n def test_header(self):\n response = requests.get('http://response_header_link_url')\n self.assertEquals(response.headers['link'], {\n 'url_link?query': {'rel': 'some', 'author': 'test'},\n 'url_link1?query': {'rel': 'some', 'author': 'test'},\n 'url_link2?query': {'rel': 'some', 'author': 'test'}})\n```\n" ]
https://api.github.com/repos/psf/requests/issues/139
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/139/labels{/name}
https://api.github.com/repos/psf/requests/issues/139/comments
https://api.github.com/repos/psf/requests/issues/139/events
https://github.com/psf/requests/pull/139
1,471,723
MDExOlB1bGxSZXF1ZXN0Mjg3MjUy
139
Issue #97 - Turn a request into a CURL command string
{ "avatar_url": "https://avatars.githubusercontent.com/u/40419?v=4", "events_url": "https://api.github.com/users/mawaldne/events{/privacy}", "followers_url": "https://api.github.com/users/mawaldne/followers", "following_url": "https://api.github.com/users/mawaldne/following{/other_user}", "gists_url": "https://api.github.com/users/mawaldne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mawaldne", "id": 40419, "login": "mawaldne", "node_id": "MDQ6VXNlcjQwNDE5", "organizations_url": "https://api.github.com/users/mawaldne/orgs", "received_events_url": "https://api.github.com/users/mawaldne/received_events", "repos_url": "https://api.github.com/users/mawaldne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mawaldne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mawaldne/subscriptions", "type": "User", "url": "https://api.github.com/users/mawaldne", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2011-08-24T03:47:58Z
2021-09-08T12:01:22Z
2011-09-05T20:27:49Z
NONE
resolved
For Issue #97. Once you create a request, just run r.request.curl for the curl command. For example: ``` python >>> import requests >>> r = requests.get("http://httpbin.org"); >>> r.request.curl 'curl -L -X GET -H "Accept-Encoding:gzip" -H "User-Agent:python-requests.org" "http://httpbin.org"' ``` Still have the following to do: - OAuth
{ "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/139/reactions" }
https://api.github.com/repos/psf/requests/issues/139/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/139.diff", "html_url": "https://github.com/psf/requests/pull/139", "merged_at": "2011-09-05T20:27:49Z", "patch_url": "https://github.com/psf/requests/pull/139.patch", "url": "https://api.github.com/repos/psf/requests/pulls/139" }
true
[ "This is so awesome! I'm going to toy with the API a bit, if you don't mind.\n\nI think the way to go is have a `curl_from_request` function in the `requests.utils` module.\n", "Sounds good. \n\nYeah, requests.utils sounds like a better idea. I'll dig through that code and maybe send an update. \n", "Just made a few modifications. You can pull from my `feature/curl` branch to get them.\n\nThanks again for this! I'm really excited to see this going in.\n", "So, new syntax is:\n\n``` python\n>>> import requests\n>>> from requests.utils import curl_from_request\n\n>>> r = requests.get('http://httpbin.org/get')\n>>> curl_from_request(r.request)\n'curl -L -X GET -H \"Accept-Encoding:gzip\" -H \"User-Agent:python-requests.org\" \"http://httpbin.org/get\"'\n\n```\n", "Looks good!\n", "Sorry about the double commits, created another branch by mistake. Still learning my way around github. \n\nI merged in your change from feature/curl and everything should be in mawaldne:curl_feature\n\nStill a few things left to do. \n", "No worries ;)\n", "Apart from Oauth, this is finished. I know there's some work going on with Oauth in #65. Once that's complete I'll add update the curl util method. \n", "Excellent! Thanks for the great work :) \n\nThis will make an excellent addition to the next release.\n" ]
https://api.github.com/repos/psf/requests/issues/138
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/138/labels{/name}
https://api.github.com/repos/psf/requests/issues/138/comments
https://api.github.com/repos/psf/requests/issues/138/events
https://github.com/psf/requests/issues/138
1,467,840
MDU6SXNzdWUxNDY3ODQw
138
Progressive downloading
{ "avatar_url": "https://avatars.githubusercontent.com/u/142475?v=4", "events_url": "https://api.github.com/users/bjourne/events{/privacy}", "followers_url": "https://api.github.com/users/bjourne/followers", "following_url": "https://api.github.com/users/bjourne/following{/other_user}", "gists_url": "https://api.github.com/users/bjourne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bjourne", "id": 142475, "login": "bjourne", "node_id": "MDQ6VXNlcjE0MjQ3NQ==", "organizations_url": "https://api.github.com/users/bjourne/orgs", "received_events_url": "https://api.github.com/users/bjourne/received_events", "repos_url": "https://api.github.com/users/bjourne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bjourne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bjourne/subscriptions", "type": "User", "url": "https://api.github.com/users/bjourne", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2011-08-23T16:38:04Z
2021-09-09T12:00:39Z
2011-08-31T04:07:43Z
NONE
resolved
Is there any hooks in requests to enable progressive loading of data? Please don't tell me I have to go back to urllib2 to create a simple progressbar. :(
{ "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/138/reactions" }
https://api.github.com/repos/psf/requests/issues/138/timeline
null
completed
null
null
false
[ "There are no hooks, but the content is not downloaded until you access the `Response.content` attribute.\n\nInstead of using the `content` attribute, you can read bytes from the socket directly with `Response.read`. You can easily set up a loop to pull down 1/100th of your content at a time while updating your progress bar.\n\n---\n\n**Note:** In the next release of Requests, this will be available as `Response.fo.read()`.\n", "Is there an example in the documentation on how to do that? Also note, that the headers need to be available so that you can check the total size of the download. And preferably, you would have hooks that trigger after dns lookups and after connection established. I guess that may be hard to accomplish using urllib2 though.\n", "No documentation on that, but I'll add it in soon.\n\nThe request is made as soon as you call the request functions, so the headers are all there and everything, the content just isn't downloaded yet until you access `r.content`, which is usually immediately after.\n", "@bjourne: Check out #90 for an example. Your use case is a bit different, but this is the general idea.\n" ]
https://api.github.com/repos/psf/requests/issues/137
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/137/labels{/name}
https://api.github.com/repos/psf/requests/issues/137/comments
https://api.github.com/repos/psf/requests/issues/137/events
https://github.com/psf/requests/pull/137
1,466,211
MDExOlB1bGxSZXF1ZXN0Mjg1Njgw
137
Added multiple hooks support.
{ "avatar_url": "https://avatars.githubusercontent.com/u/909716?v=4", "events_url": "https://api.github.com/users/monkeython/events{/privacy}", "followers_url": "https://api.github.com/users/monkeython/followers", "following_url": "https://api.github.com/users/monkeython/following{/other_user}", "gists_url": "https://api.github.com/users/monkeython/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/monkeython", "id": 909716, "login": "monkeython", "node_id": "MDQ6VXNlcjkwOTcxNg==", "organizations_url": "https://api.github.com/users/monkeython/orgs", "received_events_url": "https://api.github.com/users/monkeython/received_events", "repos_url": "https://api.github.com/users/monkeython/repos", "site_admin": false, "starred_url": "https://api.github.com/users/monkeython/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/monkeython/subscriptions", "type": "User", "url": "https://api.github.com/users/monkeython", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-26T15:49:46Z", "closed_issues": 7, "created_at": "2011-08-23T15:02:54Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/9", "id": 30484, "labels_url": "https://api.github.com/repos/psf/requests/milestones/9/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODQ=", "number": 9, "open_issues": 0, "state": "closed", "title": "v0.6.2", "updated_at": "2011-11-26T15:49:46Z", "url": "https://api.github.com/repos/psf/requests/milestones/9" }
4
2011-08-23T13:13:39Z
2021-09-08T12:01:22Z
2011-10-11T12:39:49Z
CONTRIBUTOR
resolved
As per feature request #134
{ "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/137/reactions" }
https://api.github.com/repos/psf/requests/issues/137/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/137.diff", "html_url": "https://github.com/psf/requests/pull/137", "merged_at": "2011-10-11T12:39:49Z", "patch_url": "https://github.com/psf/requests/pull/137.patch", "url": "https://api.github.com/repos/psf/requests/pulls/137" }
true
[ "I apologize for not getting back to you about this sooner. \n\nTo be honest, I'm a bit torn about including a library of hooks with requests. I'm thinking about it. \n", "Hi Kenneth,\nSince the multiple hooks feature is more interesting than a library of hooks, I just reverted from sub-package to module. Hooks library was just an idea.. and honestly, I couldn't think to something more than `post_request` HTTP status code handler or `response` content parsing.\n", "I'm considering utilizing some hooks internally now, actually. It will likely be a more elegant solution going forward as more decodings are added.\n", "Let's do this.\n" ]
https://api.github.com/repos/psf/requests/issues/136
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/136/labels{/name}
https://api.github.com/repos/psf/requests/issues/136/comments
https://api.github.com/repos/psf/requests/issues/136/events
https://github.com/psf/requests/pull/136
1,464,934
MDExOlB1bGxSZXF1ZXN0Mjg1MzU4
136
Add test_requests.py to manifest
{ "avatar_url": "https://avatars.githubusercontent.com/u/176984?v=4", "events_url": "https://api.github.com/users/jbergstroem/events{/privacy}", "followers_url": "https://api.github.com/users/jbergstroem/followers", "following_url": "https://api.github.com/users/jbergstroem/following{/other_user}", "gists_url": "https://api.github.com/users/jbergstroem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbergstroem", "id": 176984, "login": "jbergstroem", "node_id": "MDQ6VXNlcjE3Njk4NA==", "organizations_url": "https://api.github.com/users/jbergstroem/orgs", "received_events_url": "https://api.github.com/users/jbergstroem/received_events", "repos_url": "https://api.github.com/users/jbergstroem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbergstroem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbergstroem/subscriptions", "type": "User", "url": "https://api.github.com/users/jbergstroem", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2011-08-23T09:39:07Z
2021-09-08T23:11:00Z
2011-08-23T13:34:47Z
CONTRIBUTOR
resolved
People that download the tarball should also be fortunate enough to test that Requests works as intended :-)
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/136/reactions" }
https://api.github.com/repos/psf/requests/issues/136/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/136.diff", "html_url": "https://github.com/psf/requests/pull/136", "merged_at": "2011-08-23T13:34:47Z", "patch_url": "https://github.com/psf/requests/pull/136.patch", "url": "https://api.github.com/repos/psf/requests/pulls/136" }
true
[ "Thanks!\n", "IMO it might be good idea to move test_requests.py into requests.test submodule, what do you think?\n", "@densh, I've considered this before, but I like being able to 'import requests' directly from `test_requests.py` without having have requests installed into a site-packages w/ `setup.py develop`.\n\nIf there's an elegant way to accomplish both at the same time, I'm game.\n", "@kennethreitz: You shouldn't really assume PYTHONPATH=`pwd` anyway (since different flavors of python won't like running the same bytecode) - so if you want to create the subdir, either inject path to `ls -d build/lib-*/` depending on python version or more commonly let the user decide by setting PYTHONPATH. I guess one could say that the latter is already in play (disregarding moving tests) :-)\n", "I noticed e8dbecb4dbed3e835021977cf43f225a76bc5ec3 adding this to MANIFEST.in, but AFAICT test_requests.py still isn't included in the 0.10.6 or 0.10.8 tarballs, so I think this might need to be reopened?\n", "Sorry, I thought this was an issue... should I open an issue to get this revisited?\n" ]
https://api.github.com/repos/psf/requests/issues/135
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/135/labels{/name}
https://api.github.com/repos/psf/requests/issues/135/comments
https://api.github.com/repos/psf/requests/issues/135/events
https://github.com/psf/requests/issues/135
1,464,639
MDU6SXNzdWUxNDY0NjM5
135
More content encodings.
{ "avatar_url": "https://avatars.githubusercontent.com/u/909716?v=4", "events_url": "https://api.github.com/users/monkeython/events{/privacy}", "followers_url": "https://api.github.com/users/monkeython/followers", "following_url": "https://api.github.com/users/monkeython/following{/other_user}", "gists_url": "https://api.github.com/users/monkeython/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/monkeython", "id": 909716, "login": "monkeython", "node_id": "MDQ6VXNlcjkwOTcxNg==", "organizations_url": "https://api.github.com/users/monkeython/orgs", "received_events_url": "https://api.github.com/users/monkeython/received_events", "repos_url": "https://api.github.com/users/monkeython/repos", "site_admin": false, "starred_url": "https://api.github.com/users/monkeython/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/monkeython/subscriptions", "type": "User", "url": "https://api.github.com/users/monkeython", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-26T15:49:46Z", "closed_issues": 7, "created_at": "2011-08-23T15:02:54Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/9", "id": 30484, "labels_url": "https://api.github.com/repos/psf/requests/milestones/9/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODQ=", "number": 9, "open_issues": 0, "state": "closed", "title": "v0.6.2", "updated_at": "2011-11-26T15:49:46Z", "url": "https://api.github.com/repos/psf/requests/milestones/9" }
3
2011-08-23T08:44:05Z
2021-09-09T12:00:35Z
2011-09-25T23:45:26Z
CONTRIBUTOR
resolved
Hi Kenneth, I don't see a reason why not to support more content encodings. I' would contribute to this by writing a module with a set of decoding functions, a way to get the list of supported encodings, and a main decoder which parse the response header and apply the decoding.
{ "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/135/reactions" }
https://api.github.com/repos/psf/requests/issues/135/timeline
null
completed
null
null
false
[ "I mean http://en.wikipedia.org/wiki/HTTP_compression\n", "Absolutely. I'd love to add both deflate and sdch soon.\n", "Added from urllib3.\n" ]
https://api.github.com/repos/psf/requests/issues/134
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/134/labels{/name}
https://api.github.com/repos/psf/requests/issues/134/comments
https://api.github.com/repos/psf/requests/issues/134/events
https://github.com/psf/requests/issues/134
1,464,586
MDU6SXNzdWUxNDY0NTg2
134
More hooks, in pipe
{ "avatar_url": "https://avatars.githubusercontent.com/u/909716?v=4", "events_url": "https://api.github.com/users/monkeython/events{/privacy}", "followers_url": "https://api.github.com/users/monkeython/followers", "following_url": "https://api.github.com/users/monkeython/following{/other_user}", "gists_url": "https://api.github.com/users/monkeython/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/monkeython", "id": 909716, "login": "monkeython", "node_id": "MDQ6VXNlcjkwOTcxNg==", "organizations_url": "https://api.github.com/users/monkeython/orgs", "received_events_url": "https://api.github.com/users/monkeython/received_events", "repos_url": "https://api.github.com/users/monkeython/repos", "site_admin": false, "starred_url": "https://api.github.com/users/monkeython/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/monkeython/subscriptions", "type": "User", "url": "https://api.github.com/users/monkeython", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2011-11-26T15:49:46Z", "closed_issues": 7, "created_at": "2011-08-23T15:02:54Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/9", "id": 30484, "labels_url": "https://api.github.com/repos/psf/requests/milestones/9/labels", "node_id": "MDk6TWlsZXN0b25lMzA0ODQ=", "number": 9, "open_issues": 0, "state": "closed", "title": "v0.6.2", "updated_at": "2011-11-26T15:49:46Z", "url": "https://api.github.com/repos/psf/requests/milestones/9" }
3
2011-08-23T08:34:15Z
2021-09-09T10:00:53Z
2011-11-26T15:49:46Z
CONTRIBUTOR
resolved
Hi Kenneth, I'd like to see this feature: allow developers to specify more hooks per category, and let them be applied in pipe. I'll be very glad to produce a patch.
{ "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/134/reactions" }
https://api.github.com/repos/psf/requests/issues/134/timeline
null
completed
null
null
false
[ "I would love that as well. What did you have in mind?\n", "Sorry, I messed up with issues and pull requests :P See the issue #137\nBut.. I played a little more with the package and I've come up with more changes.\nYou can take a look at https://github.com/monkeython/requests/tree/develop/requests\nBasically:\n- `hooks` is a package.\n- `hooks.response` is a module that now contains 2 hooks: one for unicode and another to decode the `response`.\n- `hooks.setup_hooks` is a function that builds a dictionary of sets of hooks (easily handle duplicates). Based on `config.settings` it may add the unicode and uncompress response hooks.\n- `hooks.dispatch_hooks` now take just an iterable of hooks and an argument, and apply each hook on the argument.\n\nNo unit testing yet, but there will be soon. \n", "Closing.\n" ]
https://api.github.com/repos/psf/requests/issues/133
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/133/labels{/name}
https://api.github.com/repos/psf/requests/issues/133/comments
https://api.github.com/repos/psf/requests/issues/133/events
https://github.com/psf/requests/issues/133
1,455,480
MDU6SXNzdWUxNDU1NDgw
133
Optional base url attribute on Session object
{ "avatar_url": "https://avatars.githubusercontent.com/u/13985?v=4", "events_url": "https://api.github.com/users/bulkan/events{/privacy}", "followers_url": "https://api.github.com/users/bulkan/followers", "following_url": "https://api.github.com/users/bulkan/following{/other_user}", "gists_url": "https://api.github.com/users/bulkan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bulkan", "id": 13985, "login": "bulkan", "node_id": "MDQ6VXNlcjEzOTg1", "organizations_url": "https://api.github.com/users/bulkan/orgs", "received_events_url": "https://api.github.com/users/bulkan/received_events", "repos_url": "https://api.github.com/users/bulkan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bulkan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bulkan/subscriptions", "type": "User", "url": "https://api.github.com/users/bulkan", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2011-08-22T06:36:38Z
2021-09-02T00:07:13Z
2011-08-23T04:51:59Z
NONE
resolved
Is it possible to add an optional base url attribute to the Session object ? For example; ``` auth = ('user', 'pass') with requests.session(url='http://api.twitter.com', auth=auth) as s: resp = s.get('/1/statuses/home_timeline.json') ```
{ "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": 12, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 12, "url": "https://api.github.com/repos/psf/requests/issues/133/reactions" }
https://api.github.com/repos/psf/requests/issues/133/timeline
null
completed
null
null
false
[ "Or I can just use a hook;\n\n```\nauth = ('user', 'pass')\ndef twitter(args):\n args['url'] = 'http://api.twitter.com%s' %args['url']\n\nwith requests.session(auth=auth, hooks=dict(args=twitter)) as s:\n resp = s.get('/1/statuses/home_timeline.json')\n```\n", "I've considered this myself, but opted against it. I think this is a good use-case for the hooks.\n", "I don't think this can be done with hooks anymore.", "I think @tback , it's not possible to do with hooks anymore. The only hook available according to the docs is the `response` hook. Any update on this issue?", "https://toolbelt.readthedocs.io/en/latest/sessions.html#baseurlsession" ]
https://api.github.com/repos/psf/requests/issues/132
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/132/labels{/name}
https://api.github.com/repos/psf/requests/issues/132/comments
https://api.github.com/repos/psf/requests/issues/132/events
https://github.com/psf/requests/pull/132
1,452,500
MDExOlB1bGxSZXF1ZXN0MjgyMjg2
132
Extra mention in the list
{ "avatar_url": "https://avatars.githubusercontent.com/u/320966?v=4", "events_url": "https://api.github.com/users/densh/events{/privacy}", "followers_url": "https://api.github.com/users/densh/followers", "following_url": "https://api.github.com/users/densh/following{/other_user}", "gists_url": "https://api.github.com/users/densh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/densh", "id": 320966, "login": "densh", "node_id": "MDQ6VXNlcjMyMDk2Ng==", "organizations_url": "https://api.github.com/users/densh/orgs", "received_events_url": "https://api.github.com/users/densh/received_events", "repos_url": "https://api.github.com/users/densh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/densh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/densh/subscriptions", "type": "User", "url": "https://api.github.com/users/densh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-08-21T11:10:49Z
2021-09-08T12:01:21Z
2011-08-21T11:12:02Z
CONTRIBUTOR
resolved
AUTHORS -= Den Shabalin (I've already been mentioned in the list @ line 41.)
{ "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/132/reactions" }
https://api.github.com/repos/psf/requests/issues/132/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/132.diff", "html_url": "https://github.com/psf/requests/pull/132", "merged_at": "2011-08-21T11:12:02Z", "patch_url": "https://github.com/psf/requests/pull/132.patch", "url": "https://api.github.com/repos/psf/requests/pulls/132" }
true
[ "`O_O`\n\nIt's too early in the morning. _grabs a cup of coffee_\n" ]
https://api.github.com/repos/psf/requests/issues/131
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/131/labels{/name}
https://api.github.com/repos/psf/requests/issues/131/comments
https://api.github.com/repos/psf/requests/issues/131/events
https://github.com/psf/requests/pull/131
1,452,318
MDExOlB1bGxSZXF1ZXN0MjgyMjQz
131
Refactor Response.content into a property
{ "avatar_url": "https://avatars.githubusercontent.com/u/320966?v=4", "events_url": "https://api.github.com/users/densh/events{/privacy}", "followers_url": "https://api.github.com/users/densh/followers", "following_url": "https://api.github.com/users/densh/following{/other_user}", "gists_url": "https://api.github.com/users/densh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/densh", "id": 320966, "login": "densh", "node_id": "MDQ6VXNlcjMyMDk2Ng==", "organizations_url": "https://api.github.com/users/densh/orgs", "received_events_url": "https://api.github.com/users/densh/received_events", "repos_url": "https://api.github.com/users/densh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/densh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/densh/subscriptions", "type": "User", "url": "https://api.github.com/users/densh", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-08-21T09:08:41Z
2021-09-08T23:01:13Z
2011-08-21T10:59:21Z
CONTRIBUTOR
resolved
Originally my main goal was to just make `Response.content` attribute visible in `dir(response)`. After writing a custom `__dir__` it struck me that a simple refactoring of the content attribute into a property would make a much more cleaner solution.
{ "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/131/reactions" }
https://api.github.com/repos/psf/requests/issues/131/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/131.diff", "html_url": "https://github.com/psf/requests/pull/131", "merged_at": "2011-08-21T10:59:21Z", "patch_url": "https://github.com/psf/requests/pull/131.patch", "url": "https://api.github.com/repos/psf/requests/pulls/131" }
true
[ "Much cleaner, thanks!\n", "Sphinx autodoc understands property docstrings fine, no need to set it to `None`.\n\nI'm using `Request._content` to cache the value of `Request.content`, for now.\n" ]
https://api.github.com/repos/psf/requests/issues/130
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/130/labels{/name}
https://api.github.com/repos/psf/requests/issues/130/comments
https://api.github.com/repos/psf/requests/issues/130/events
https://github.com/psf/requests/pull/130
1,449,355
MDExOlB1bGxSZXF1ZXN0MjgxNzAx
130
Added readline method to response object.
{ "avatar_url": "https://avatars.githubusercontent.com/u/31504?v=4", "events_url": "https://api.github.com/users/janrito/events{/privacy}", "followers_url": "https://api.github.com/users/janrito/followers", "following_url": "https://api.github.com/users/janrito/following{/other_user}", "gists_url": "https://api.github.com/users/janrito/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janrito", "id": 31504, "login": "janrito", "node_id": "MDQ6VXNlcjMxNTA0", "organizations_url": "https://api.github.com/users/janrito/orgs", "received_events_url": "https://api.github.com/users/janrito/received_events", "repos_url": "https://api.github.com/users/janrito/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janrito/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janrito/subscriptions", "type": "User", "url": "https://api.github.com/users/janrito", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2011-08-20T11:07:56Z
2021-09-08T12:01:19Z
2011-08-20T23:23:58Z
CONTRIBUTOR
resolved
Reading single lines is really useful when dealing with APIs , for example consuming streaming data from twitter.
{ "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/130/reactions" }
https://api.github.com/repos/psf/requests/issues/130/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/130.diff", "html_url": "https://github.com/psf/requests/pull/130", "merged_at": "2011-08-20T23:23:58Z", "patch_url": "https://github.com/psf/requests/pull/130.patch", "url": "https://api.github.com/repos/psf/requests/pulls/130" }
true
[ "Thanks!\n\n---\n\nHmm, I'm hesitant to add this. Adding `r.read()` has already caused some confusion. I'm leaning more towards having a `r.fo` w/ these methods.\n", "Thanks, yes. I think the Response abstraction is excellent for most uses. Sometimes, you need to access the file handle methods. `r.fo` sounds like the best way of exposing these methods. Thanks for the great work with requests. \n" ]
https://api.github.com/repos/psf/requests/issues/129
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/129/labels{/name}
https://api.github.com/repos/psf/requests/issues/129/comments
https://api.github.com/repos/psf/requests/issues/129/events
https://github.com/psf/requests/pull/129
1,444,945
MDExOlB1bGxSZXF1ZXN0MjgwNjAy
129
Issue 128
{ "avatar_url": "https://avatars.githubusercontent.com/u/320966?v=4", "events_url": "https://api.github.com/users/densh/events{/privacy}", "followers_url": "https://api.github.com/users/densh/followers", "following_url": "https://api.github.com/users/densh/following{/other_user}", "gists_url": "https://api.github.com/users/densh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/densh", "id": 320966, "login": "densh", "node_id": "MDQ6VXNlcjMyMDk2Ng==", "organizations_url": "https://api.github.com/users/densh/orgs", "received_events_url": "https://api.github.com/users/densh/received_events", "repos_url": "https://api.github.com/users/densh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/densh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/densh/subscriptions", "type": "User", "url": "https://api.github.com/users/densh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2011-08-19T16:31:39Z
2021-09-08T12:01:20Z
2011-08-19T23:40:08Z
CONTRIBUTOR
resolved
Hello! I've just fixed issue #128: https://github.com/kennethreitz/requests/issues/128 Actual problem was quite subtle: `Response.__getattr__` didn't trow AttributeError on attributes other then `content` so you would get `None` for any non-existent attribute. lxml tried to perform `.getvalue()` call and it resulted into: - `response.getvalue -> None` - `response.getvalue() -> TypeError: ...`
{ "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/129/reactions" }
https://api.github.com/repos/psf/requests/issues/129/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/129.diff", "html_url": "https://github.com/psf/requests/pull/129", "merged_at": "2011-08-19T23:40:08Z", "patch_url": "https://github.com/psf/requests/pull/129.patch", "url": "https://api.github.com/repos/psf/requests/pulls/129" }
true
[ "Nice catch, thanks!\n" ]