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/328
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/328/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/328/comments
|
https://api.github.com/repos/psf/requests/issues/328/events
|
https://github.com/psf/requests/pull/328
| 2,692,668 |
MDExOlB1bGxSZXF1ZXN0NjQxNDgz
| 328 |
Implement automatic deflating when using response.iter_content. refs #327
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4",
"events_url": "https://api.github.com/users/gazpachoking/events{/privacy}",
"followers_url": "https://api.github.com/users/gazpachoking/followers",
"following_url": "https://api.github.com/users/gazpachoking/following{/other_user}",
"gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gazpachoking",
"id": 187133,
"login": "gazpachoking",
"node_id": "MDQ6VXNlcjE4NzEzMw==",
"organizations_url": "https://api.github.com/users/gazpachoking/orgs",
"received_events_url": "https://api.github.com/users/gazpachoking/received_events",
"repos_url": "https://api.github.com/users/gazpachoking/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gazpachoking",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-30T23:57:36Z
|
2021-09-08T23:01:02Z
|
2011-12-31T00:03:39Z
|
CONTRIBUTOR
|
resolved
|
Refactor response.iter_lines to use responset.iter_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/328/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/328/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/328.diff",
"html_url": "https://github.com/psf/requests/pull/328",
"merged_at": "2011-12-31T00:03:39Z",
"patch_url": "https://github.com/psf/requests/pull/328.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/328"
}
| true |
[
"#327\n"
] |
https://api.github.com/repos/psf/requests/issues/327
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/327/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/327/comments
|
https://api.github.com/repos/psf/requests/issues/327/events
|
https://github.com/psf/requests/issues/327
| 2,690,903 |
MDU6SXNzdWUyNjkwOTAz
| 327 |
handle deflate encoding with iter_content
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4",
"events_url": "https://api.github.com/users/gazpachoking/events{/privacy}",
"followers_url": "https://api.github.com/users/gazpachoking/followers",
"following_url": "https://api.github.com/users/gazpachoking/following{/other_user}",
"gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gazpachoking",
"id": 187133,
"login": "gazpachoking",
"node_id": "MDQ6VXNlcjE4NzEzMw==",
"organizations_url": "https://api.github.com/users/gazpachoking/orgs",
"received_events_url": "https://api.github.com/users/gazpachoking/received_events",
"repos_url": "https://api.github.com/users/gazpachoking/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gazpachoking",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-12-30T19:08:02Z
|
2021-09-09T10:00:43Z
|
2012-01-23T08:04:12Z
|
CONTRIBUTOR
|
resolved
|
Currently deflate compression is not handled when reading a response with response.iter_content(). Some way should be figured out to handle this situation.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/327/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/327/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/326
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/326/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/326/comments
|
https://api.github.com/repos/psf/requests/issues/326/events
|
https://github.com/psf/requests/issues/326
| 2,686,461 |
MDU6SXNzdWUyNjg2NDYx
| 326 |
`ImportError: No module named certifi` when using SSL
|
{
"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 | 23 |
2011-12-30T04:01:57Z
|
2021-09-08T12:00:52Z
|
2012-01-02T05:17:39Z
|
CONTRIBUTOR
|
resolved
|
I did a fresh clone of the requests repo and get the following traceback when I try to POST to the following endpoint:
``` python
>>> requests.post('https://api.dropbox.com/1/oauth/request_token')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "requests/api.py", line 83, in post
return request('post', url, data=data, **kwargs)
File "requests/api.py", line 38, in request
return s.request(method=method, url=url, **kwargs)
File "requests/sessions.py", line 200, in request
r.send(prefetch=prefetch)
File "requests/models.py", line 454, in send
cert_loc = __import__('certifi').where()
ImportError: No module named certifi
```
This was after I attempted to run `python setup.py build` and navigated to the `build/lib` directory.
I realize that Requests leverages the full breadth of existing http packages out there, but do I really need to download an external dependency just to get out through https? Is there some way a fallback stub could be put in the place of this package?
Overall I'm in love with Requests and think the job you guys are doing is awesome. Keep up the great work!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/326/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/326/timeline
| null |
completed
| null | null | false |
[
"Traditionally, requests has had 0 dependencies. With the new SSL support, a pem file must be distributed for standard validation. I'm using mozilla's. Mozilla's is GPL. So, certifi (which contains their pen file) is a separate module, and must be distributed as such. \n\nYou can make ssl requests without it, you just need to specify another pem file or turn verification off.\n",
"Trust me, I hate it more than you do ;)\n",
"IMO dependency isn't a big deal thanks to pip and setup script options that will check for them. What's the reason you hate them?\n",
"I do a lot of App Engine. On App Engine, you don't have `pip`, you don't have `setuptools`, or anything really for that matter. You can't even run dependencies that aren't pure Python. No dependency tracker can hear you scream in the vacuum of space!\n",
"Scary.\n",
"I would love to have no dependencies, but it's a requirements of the licensing. Plus, having the certs decoupled from the module is also nice, so they aren't tied to one another.\n",
"I sympathize with your wishes and empathize with your licensing woes. :scream:\n",
"Somewhat unrelated, but I believe that certdata.txt is also licensed under LGPL (if you read the header of the certdata.txt file itself, as well as the curl reference [page](http://curl.haxx.se/docs/caextract.html)) as well as GPL and MPL.\n",
"@cactus yes, and they are all equally incompatible ;)\n",
"The file certdata.txt has a license, but the certificates themselves are free to distribute. right?\nWhy not generating the file yourself by exporting all the certificates in a file?\nOn macosx it is easy with the 'keychain', you select 'system roots' and select all the root cert you want them 'file -> export items' and you'll have a file with all certs in pem format.\n",
"Correct.\n\nIf someone else can find a heavily maintained and accepted CA bundle (I tried), I'd be happy to use it instead. Mozilla's put a lot of work into that list though, and it's update quite frequently.\n",
"I don't see how LGPL is incompatible, as use of a cert chain would (in my mind) fall very clearly under use 'as a library' and not be considered a derivative. I am by no means a master of software license law though. \n\nInterestingly, the tornado project includes this file in their package and [repo](https://github.com/facebook/tornado/blob/master/tornado/ca-certificates.crt) (for use in their http_client) and tornado itself is apache-2.0 licensed.\n",
"Anyone using tornado and packaging that file within their application is now subject to the GPL/MPL.\n",
"As that file is licensed under the gpl _or_ mpl, and reading the actual wording of the licenses, I don't see how that is the case. However, I am not a lawyer, don't deal with license issues often, etc. (some interesting references anyway: [here](http://www.mail-archive.com/[email protected]/msg16980.html), [here](https://en.wikipedia.org/wiki/Mozilla_Public_License#Compatibility_with_other_licenses), [here](http://www.mozilla.org/MPL/mpl-faq.html) (see points 6 and 7))\n\nThat said, instead of including the file itself, would it would be enough to document that if you want to use https, you need to configure requests to point at your system ssl ca-certificates bundle? (and/or refer people to the libcurl page showing how to download a version for themselves)? Perhaps with a config.defaults configuration value for the path to the bundle/pem?\n",
"No, it needs to be 100% completely seamless.\n\nRequests is HTTP for Humans. Not machines.\n\nWeb browsers don't require you to read documentation, download an obscure file, place it in a folder, and configure your system to use it in order to have verified SSL. Neither should your Python HTTP client.\n",
"heh. Fair point. :)\n",
"Hey guys,\n\nSorry to beat a dead horse, so to speak. My issue has been exacerbated now that I want to need to do some SSL requests at work. :sob:\n\nWhat is the recommended way of getting a cert into requests without `certifi`?\n\nI'd like to avoid having to make a `certifi` stub which I write myself to get around the GPL, and it sounds like there aren't simple configuration hooks at present.\n\nI wouldn't mind adding them & submitting a changeset if it is in line with the philosophy of Requests, or, alternatively, creating a separate repo which stubs certifi but doesn't restrict you to GPL. Basically I just need a non-GPL way to get the cert in without having to think about it.\n\nCheers,\n\n--mvv :tophat:\n",
"You can also pass `verify` the path to a CA_BUNDLE file for private certs. You can also set the `REQUESTS_CA_BUNDLE` environment variable.\n",
"Awesome! I'm off to the races. Thanks for the pro tip. :v:\n",
"Let me know if you have any problems :)\n",
"So if your only goal was to get SSL URLS working with requests, what are the steps? I don't care about licensing restrictions, I just want it to work. What do I need to download and install for it to work?\n\nThanks so much for your hard work.\n",
"@davidpshaw a simple `pip install requests` takes care of everything.\n\nIf you're just having the certifi is missing error, `pip install certifi`.\n",
"@kennethreitz Thanks, I had same issue and is resolved by that command\r\n`pip install requests` just saved my life."
] |
https://api.github.com/repos/psf/requests/issues/325
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/325/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/325/comments
|
https://api.github.com/repos/psf/requests/issues/325/events
|
https://github.com/psf/requests/issues/325
| 2,683,806 |
MDU6SXNzdWUyNjgzODA2
| 325 |
Clean way to silence warnings in connectionpool?
|
{
"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 | 6 |
2011-12-29T23:23:13Z
|
2021-09-09T10:00:43Z
|
2012-01-23T08:04:02Z
|
NONE
|
resolved
|
Logging messages in connectionpool.py are set to level warning, and there appears to be no clean (eg. in config/defaults) way to silence them (please correct me if I am wrong about that!).
Currently, after importing requests I am doing this:
```
logging.getLogger('requests.packages.urllib3').setLevel(logging.CRITICAL)
```
It seems a bit inelegant though. Is there a better way?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/325/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/325/timeline
| null |
completed
| null | null | false |
[
"This is not inelegant in any way. That's how logging module is supposed to work.\n",
"I realize that is how it works (or I wouldn't have known to do it!). :P\n\nAs to 'inelegant', it just seemed that way to me because urllib3 is kind of a submodule of requests, and is otherwise relatively hidden underneath requests' api model layer and required special knowledge of non interface code to silence unexpected logging.\n\nI have no problem doing it the way I did though. \n\nThis issue was created because I was wondering if the way I did it was the intended/recommended way (e.g. avoid api changes breaking the work around) or if I missed a config element or other suggested mechanism somewhere.\n",
"Should we agree that this is a documentation problem?\n",
"(I never use logging myself)\n",
"The only stuff you should do in requests is add a NullHandler so your lib doesn't create warnings about missing handlers.\n\nSee here : http://docs.python.org/howto/logging.html#configuring-logging-for-a-library\n\nEvery thing else is done by the user\n",
"> The only stuff you should do in requests is add a NullHandler so your lib doesn't create warnings about missing handlers.\n> \n> See here : http://docs.python.org/howto/logging.html#configuring-logging-for-a-library\n\nI believe that is already being done in the **init**.py. \n\n> Every thing else is done by the user\n\nI wonder if 'warning' is the right error level for library logging though. As an exception is reraised, and is part of the parent api expectation, warning level will simply \"leak\" logs if the user does not manually override it with a default log level. Maybe a debug log level makes more sense there?\n"
] |
https://api.github.com/repos/psf/requests/issues/324
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/324/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/324/comments
|
https://api.github.com/repos/psf/requests/issues/324/events
|
https://github.com/psf/requests/issues/324
| 2,682,703 |
MDU6SXNzdWUyNjgyNzAz
| 324 |
SOCKS proxy support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/692970?v=4",
"events_url": "https://api.github.com/users/thefinn93/events{/privacy}",
"followers_url": "https://api.github.com/users/thefinn93/followers",
"following_url": "https://api.github.com/users/thefinn93/following{/other_user}",
"gists_url": "https://api.github.com/users/thefinn93/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thefinn93",
"id": 692970,
"login": "thefinn93",
"node_id": "MDQ6VXNlcjY5Mjk3MA==",
"organizations_url": "https://api.github.com/users/thefinn93/orgs",
"received_events_url": "https://api.github.com/users/thefinn93/received_events",
"repos_url": "https://api.github.com/users/thefinn93/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thefinn93/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thefinn93/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thefinn93",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-12-29T21:04:43Z
|
2021-09-09T09:00:42Z
|
2012-03-16T22:59:24Z
|
NONE
|
resolved
|
Maybe this exists and I just can't find it, but it'd be awfully nice if requests had support for SOCKS proxies. If this exists already, could someone give me a simple example? Thanks.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/692970?v=4",
"events_url": "https://api.github.com/users/thefinn93/events{/privacy}",
"followers_url": "https://api.github.com/users/thefinn93/followers",
"following_url": "https://api.github.com/users/thefinn93/following{/other_user}",
"gists_url": "https://api.github.com/users/thefinn93/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thefinn93",
"id": 692970,
"login": "thefinn93",
"node_id": "MDQ6VXNlcjY5Mjk3MA==",
"organizations_url": "https://api.github.com/users/thefinn93/orgs",
"received_events_url": "https://api.github.com/users/thefinn93/received_events",
"repos_url": "https://api.github.com/users/thefinn93/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thefinn93/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thefinn93/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thefinn93",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/324/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/324/timeline
| null |
completed
| null | null | false |
[
"I patched in socks5 support in my fork (https://github.com/kbatten/requests/commit/fb4676bcabcb53471272b6bfbecada7ce6161be6). I'm not sure if this specific implementation is appropriate for Requests though because it bypasses the proxies={'scheme':'host:port'} method and instead globally sets up the proxy to handle any socket connections with the specified remote port (instead of scheme.)\n",
"Try [PySOCKS5](https://bitbucket.org/shugelee/pysocks5)\n\nSimple demo\nhttps://bitbucket.org/shugelee/pysocks5/src/23625b3ad726/demos/using_socks5_with_auth_and_requests.py\n",
"See issue #478. It seems to solve this.\n"
] |
https://api.github.com/repos/psf/requests/issues/323
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/323/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/323/comments
|
https://api.github.com/repos/psf/requests/issues/323/events
|
https://github.com/psf/requests/issues/323
| 2,681,784 |
MDU6SXNzdWUyNjgxNzg0
| 323 |
Add ending slash to raw domains before query insertion
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1292974?v=4",
"events_url": "https://api.github.com/users/schluffo/events{/privacy}",
"followers_url": "https://api.github.com/users/schluffo/followers",
"following_url": "https://api.github.com/users/schluffo/following{/other_user}",
"gists_url": "https://api.github.com/users/schluffo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schluffo",
"id": 1292974,
"login": "schluffo",
"node_id": "MDQ6VXNlcjEyOTI5NzQ=",
"organizations_url": "https://api.github.com/users/schluffo/orgs",
"received_events_url": "https://api.github.com/users/schluffo/received_events",
"repos_url": "https://api.github.com/users/schluffo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schluffo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schluffo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schluffo",
"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 | 6 |
2011-12-29T19:06:08Z
|
2021-09-09T07:05:22Z
|
2012-07-27T06:07:45Z
|
NONE
|
resolved
|
Method 'get' with not empty params ends with error:
File "/usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py", line 524, in get_host
port = int(port)
ValueError: invalid literal for int() with base 10: '7766?test=s'
It is probably caused by invalid parsing of port in method get_host.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/323/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/323/timeline
| null |
completed
| null | null | false |
[
"Can you attach some code to reproduce?\n",
"import requests\nrequests.get(\"http://localhost:80\", params=dict(test=\"s\")) \n",
"Ah, we should fix that. Nice catch.\n\nTechnically, that's an invalid URL. Try this:\n\n``` python\nrequests.get(\"http://localhost:80/\", params=dict(test=\"s\"))\n```\n",
"Ok, thanks.\n",
"Keeping this open, because requests should compensate for this.\n",
"This issue was fixed by Pull Request #401. \n"
] |
https://api.github.com/repos/psf/requests/issues/322
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/322/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/322/comments
|
https://api.github.com/repos/psf/requests/issues/322/events
|
https://github.com/psf/requests/issues/322
| 2,674,449 |
MDU6SXNzdWUyNjc0NDQ5
| 322 |
Test failures with requests 0.9.0
|
{
"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 | 1 |
2011-12-28T20:27:48Z
|
2021-09-09T10:00:47Z
|
2011-12-28T20:34:36Z
|
CONTRIBUTOR
|
resolved
|
I get lots of these errors (most likely related to gunicorn starting correctly):
<pre>
# PYTHONPATH=build/lib python test_requests.py
EEEEEEEEEEEEEEEEEE.E..EEEEEEEEEEEEEEEEEEEEEE
======================================================================
ERROR: test_BASICAUTH_HTTP_200_OK_GET (__main__.RequestsTestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_requests.py", line 176, in test_BASICAUTH_HTTP_200_OK_GET
r = requests.get(url, auth=auth)
File "/home/jbergstroem/requests/requests/api.py", line 50, in get
return request('get', url, **kwargs)
File "/home/jbergstroem/requests/requests/api.py", line 38, in request
return s.request(method=method, url=url, **kwargs)
File "/home/jbergstroem/requests/requests/sessions.py", line 200, in request
r.send(prefetch=prefetch)
File "/home/jbergstroem/requests/requests/models.py", line 498, in send
raise ConnectionError(e)
ConnectionError: Max retries exceeded for url: /basic-auth/user/pass
</pre>
requests 0.9.0, envoy 0.0.2, gunicorn 0.13.4, certifi 0.0.6. tested on python2.5-2.7.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/322/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/322/timeline
| null |
completed
| null | null | false |
[
"looks like you aren't running httpbin correctly.\n"
] |
https://api.github.com/repos/psf/requests/issues/321
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/321/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/321/comments
|
https://api.github.com/repos/psf/requests/issues/321/events
|
https://github.com/psf/requests/issues/321
| 2,671,113 |
MDU6SXNzdWUyNjcxMTEz
| 321 |
`requests.get('https://httpbin.org', verify=True)` fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24753?v=4",
"events_url": "https://api.github.com/users/zed/events{/privacy}",
"followers_url": "https://api.github.com/users/zed/followers",
"following_url": "https://api.github.com/users/zed/following{/other_user}",
"gists_url": "https://api.github.com/users/zed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zed",
"id": 24753,
"login": "zed",
"node_id": "MDQ6VXNlcjI0NzUz",
"organizations_url": "https://api.github.com/users/zed/orgs",
"received_events_url": "https://api.github.com/users/zed/received_events",
"repos_url": "https://api.github.com/users/zed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zed",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-12-28T13:09:34Z
|
2021-09-09T10:00:46Z
|
2011-12-28T20:48:01Z
|
NONE
|
resolved
|
Example from the docs doesn't work http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification
```
>>> import requests
>>> requests.get('https://httpbin.org', verify=True)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/path/to/lib/python2.7/site-packages/requests/api.py", line
50, in get
return request('get', url, **kwargs)
File "/path/to/lib/python2.7/site-packages/requests/api.py", line
38, in request
return s.request(method=method, url=url, **kwargs)
File "/path/to/lib/python2.7/site-packages/requests/sessions.py",
line 200, in request
r.send(prefetch=prefetch)
File "/path/to/lib/python2.7/site-packages/requests/models.py", li
ne 502, in send
raise SSLError(e)
SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certi
ficate verify failed
>>> requests.__version__
'0.9.0'
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.0e 6 Sep 2011'
```
<!-- -->
```
$ pip freeze | grep certifi
certifi==0.0.6
$ python -mplatform
Linux-3.0.0-14-generic-i686-with-Ubuntu-11.10-oneiric
```
I've also tried to specify path to httpbin certificate:
```
>>> requests.get('https://httpbin.org', verify='./httpbin.pem')
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/path/to/lib/python2.7/site-packages/requests/api.py", line
50, in get
return request('get', url, **kwargs)
File "/path/to/lib/python2.7/site-packages/requests/api.py", line
38, in request
return s.request(method=method, url=url, **kwargs)
File "/path/to/lib/python2.7/site-packages/requests/sessions.py",
line 200, in request
r.send(prefetch=prefetch)
File "/path/to/lib/python2.7/site-packages/requests/models.py", li
ne 502, in send
raise SSLError(e)
SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certi
ficate verify failed
>>> print open('./httpbin.pem').read(),
-----BEGIN CERTIFICATE-----
MIIEPjCCAyagAwIBAgIDBEmFMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT
MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew
HhcNMTExMjA1MDc0NzE4WhcNMTIwOTI3MTQwOTIxWjCB3TEpMCcGA1UEBRMgVmZQ
ZmpuSlVKWi9MZkVEdkVPd1l1LzJWWDJKZzEvQVcxCzAJBgNVBAYTAlVTMRQwEgYD
VQQKEwtodHRwYmluLm9yZzETMBEGA1UECxMKR1QxNjA2ODExMjExMC8GA1UECxMo
U2VlIHd3dy5yYXBpZHNzbC5jb20vcmVzb3VyY2VzL2NwcyAoYykxMTEvMC0GA1UE
CxMmRG9tYWluIENvbnRyb2wgVmFsaWRhdGVkIC0gUmFwaWRTU0woUikxFDASBgNV
BAMTC2h0dHBiaW4ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHxo+T
CKPwIVglz3VpmkptvP/JAd1pLwyVafQwixGY779wuRwMwF3GRqwfHk2BNMuXWhw2
FwAoLT6oRjpFEGT/sbh5AY3V+qf+bXyQfxebFvjME5eA0hKb8HXnHAtmqWaDUs7k
yItMWUSAGi+vBiUjwSLTrWdslNWtKxD5KXBJNwIDAQABo4IBKTCCASUwHwYDVR0j
BBgwFoAUa2k9ahhCSt2PAmU5/TUkhniRFjAwDgYDVR0PAQH/BAQDAgWgMB0GA1Ud
JQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAWBgNVHREEDzANggtodHRwYmluLm9y
ZzBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vcmFwaWRzc2wtY3JsLmdlb3RydXN0
LmNvbS9jcmxzL3JhcGlkc3NsLmNybDAdBgNVHQ4EFgQUTZ2ILuE9CsUsoMX1uUGu
n+kbHBgwDAYDVR0TAQH/BAIwADBJBggrBgEFBQcBAQQ9MDswOQYIKwYBBQUHMAKG
LWh0dHA6Ly9yYXBpZHNzbC1haWEuZ2VvdHJ1c3QuY29tL3JhcGlkc3NsLmNydDAN
BgkqhkiG9w0BAQUFAAOCAQEAdLSwICRSG3vSSxBVdF/vZ1rAURU6ztOFaYiPC6jg
GWdNNOwljG4tkf5bCGh6XJjlMtLosz7QtcKprTvoMuCYSTKR5VTxJqgWbdhds4oU
nBnI0YzcgZR9qtVItCaZfl5487gYuIertX8le0cJBAG+X8I14AKAsBGJ/+HFbtRV
aWa4M7Faw6jTLxrc/NjiCFSs4RB38vpLkcbUa0jOTN4czPmSgWJHiaEnleUQ+AO9
L+0f+4Y1HULBFJAOJ1VjIdY0JEt67CFulkdbMXZ8qrGldpWYLlHqsoUH1xYS9g0F
RufOesXsqmteRxjKo8KocDpxw+RSFvyJL4sRBzBobHLWyg==
-----END CERTIFICATE-----
```
Firefox for `https://httpbin.org` says:
```
httpbin.org uses an invalid security certificate.
The certificate is not trusted because no issuer chain was provided.
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/321/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/321/timeline
| null |
completed
| null | null | false |
[
"I can reproduce this here:\n\n```\n$ pip freeze | grep certifi\npip freeze | grep certifi\n$ python -mplatform\nLinux-3.1.5-1-ARCH-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-glibc2.2.5\n```\n",
"Sorry, httpbin's cert is a little bit messed up. Depends on the ssl version.\n"
] |
https://api.github.com/repos/psf/requests/issues/320
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/320/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/320/comments
|
https://api.github.com/repos/psf/requests/issues/320/events
|
https://github.com/psf/requests/issues/320
| 2,659,735 |
MDU6SXNzdWUyNjU5NzM1
| 320 |
mention binary mode for saving files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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-12-26T20:11:50Z
|
2021-09-09T07:05:22Z
|
2012-07-27T06:07:49Z
|
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/320/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/320/timeline
| null |
completed
| null | null | false |
[] |
|
https://api.github.com/repos/psf/requests/issues/319
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/319/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/319/comments
|
https://api.github.com/repos/psf/requests/issues/319/events
|
https://github.com/psf/requests/issues/319
| 2,657,111 |
MDU6SXNzdWUyNjU3MTEx
| 319 |
Timeout when using authenticated proxy for https request
|
{
"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 | 0 |
2011-12-26T07:14:10Z
|
2021-09-09T07:05:22Z
|
2012-07-27T06:08:02Z
|
NONE
|
resolved
|
I get a timeout when I run this
```
import requests
proxies = {
'https': 'https://username:password@ip:port',
}
resp = requests.get('https://www.google.com/', proxies=proxies)
print resp.status_code`
```
This worked in 0.7.6, then 0.8.0 - 0.8.5 there's the `ValueError: invalid literal for int() with base 10: 'user:pass@ip:port'` that contains the proxy details. Then 0.8.6/7 it just takes ages then times out. Here's the stacktrace if I kill it manually
```
^CTraceback (most recent call last):
File "test.py", line 6, in <module>
resp = requests.get('https://www.google.com/', proxies=proxies)
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/api.py", line 79, in get
return request('get', url, **kwargs)
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/api.py", line 66, in request
prefetch=prefetch
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/sessions.py", line 191, in request
r.send(prefetch=prefetch)
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/models.py", line 462, in send
timeout=self.timeout,
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/packages/urllib3/poolmanager.py", line 123, in urlopen
return self.proxy_pool.urlopen(method, url, **kw)
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 334, in urlopen
body=body, headers=headers)
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 215, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 941, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 975, in _send_request
self.endheaders(body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 937, in endheaders
self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 797, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 759, in send
self.connect()
File "/Users/peter/.virtualenvs/my_project/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 72, in connect
ca_certs=self.ca_certs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 344, in wrap_socket
ciphers=ciphers)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 121, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 283, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt
```
Here's where the error happens https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L469 but I'm not sure of the cause. I'm pretty sure this is related to #293.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/319/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/319/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/318
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/318/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/318/comments
|
https://api.github.com/repos/psf/requests/issues/318/events
|
https://github.com/psf/requests/pull/318
| 2,650,596 |
MDExOlB1bGxSZXF1ZXN0NjI4Mjg3
| 318 |
Make safe_mode handle exceptions more consistently
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376462?v=4",
"events_url": "https://api.github.com/users/atdt/events{/privacy}",
"followers_url": "https://api.github.com/users/atdt/followers",
"following_url": "https://api.github.com/users/atdt/following{/other_user}",
"gists_url": "https://api.github.com/users/atdt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atdt",
"id": 376462,
"login": "atdt",
"node_id": "MDQ6VXNlcjM3NjQ2Mg==",
"organizations_url": "https://api.github.com/users/atdt/orgs",
"received_events_url": "https://api.github.com/users/atdt/received_events",
"repos_url": "https://api.github.com/users/atdt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atdt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atdt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atdt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-12-23T22:07:30Z
|
2021-09-08T13:06:06Z
|
2011-12-23T22:24:35Z
|
CONTRIBUTOR
|
resolved
|
I'm not sure how I feel about this patch, but I thought I'd submit a pull request regardless because if nothing else it raises a couple of issues that need some attention, IMHO.
Instead of passing None to `_build_response` when a request failed in safe mode, we now pass an empty `urllib3.HTTPResponse` object instead. One advantage is that you no longer need to check for None in the `iter_*` methods, because reading the bare response works as expected (i.e., you end up with an empty iterator). Having a regular object is also nice because you can save suppressed exceptions in an attribute before passing it to `_build_response`, which allows us to avoid breaking the current pattern of having the nested build function there build a `requests.Response` by inspecting attributes of the raw response.
I took out the optional `is_error` arg in `_build_response` because it was not getting used anywhere, nor was it part of the public API.
But: is it a good idea to store suppressed exceptions in safe mode on `Response.error`? This makes `Response.ok` work as expected (or at least as _I_ expect :P), but maybe this encourages bad habits. If you need to know what exceptions (if any) were raised by your HTTP request, you probably shouldn't be suppressing them.
On the other hand, the current implementation seems a little inconsistent:
``` python
>>> import requests
>>> r = requests.get('http://__bad_url__/', config=dict(safe_mode=True))
>>> r.ok
True
>>> r = requests.get('http://httpbin.org/status/501', config=dict(safe_mode=True))
>>> r.ok
False
```
Thoughts?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/318/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/318/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/318.diff",
"html_url": "https://github.com/psf/requests/pull/318",
"merged_at": "2011-12-23T22:24:35Z",
"patch_url": "https://github.com/psf/requests/pull/318.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/318"
}
| true |
[
"Thanks for the thoughts — I'm glad someone noticed. I lot of these oddities that you noticed are remnants from old iterations of requests that need to be cleaned up. \n",
"I'm going to accept this. I think it's a good step going forward.\n",
"Thanks. I like this a lot.\n\nLast thing to do is have safe_mode be default for async requests.\n"
] |
https://api.github.com/repos/psf/requests/issues/317
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/317/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/317/comments
|
https://api.github.com/repos/psf/requests/issues/317/events
|
https://github.com/psf/requests/pull/317
| 2,644,228 |
MDExOlB1bGxSZXF1ZXN0NjI2MDQ0
| 317 |
fix iteration on null responses in safe_mode
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376462?v=4",
"events_url": "https://api.github.com/users/atdt/events{/privacy}",
"followers_url": "https://api.github.com/users/atdt/followers",
"following_url": "https://api.github.com/users/atdt/following{/other_user}",
"gists_url": "https://api.github.com/users/atdt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atdt",
"id": 376462,
"login": "atdt",
"node_id": "MDQ6VXNlcjM3NjQ2Mg==",
"organizations_url": "https://api.github.com/users/atdt/orgs",
"received_events_url": "https://api.github.com/users/atdt/received_events",
"repos_url": "https://api.github.com/users/atdt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atdt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atdt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atdt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-23T02:43:30Z
|
2021-09-08T13:06:05Z
|
2011-12-23T02:45:10Z
|
CONTRIBUTOR
|
resolved
|
Previously, calling `iter_lines` or `iter_content` on a blank response caused an `AttributeError` to be thrown, because it called `self.raw.read()` where `raw` was `None`. In my opinion, the correct behavior should be to return an empty iterator.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/317/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/317/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/317.diff",
"html_url": "https://github.com/psf/requests/pull/317",
"merged_at": "2011-12-23T02:45:10Z",
"patch_url": "https://github.com/psf/requests/pull/317.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/317"
}
| true |
[
"Excellent, thanks!\n\nFor the record, I commend you for adding tests to all of your pull requests. I wish everyone was like you.\n\n:sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/316
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/316/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/316/comments
|
https://api.github.com/repos/psf/requests/issues/316/events
|
https://github.com/psf/requests/pull/316
| 2,642,280 |
MDExOlB1bGxSZXF1ZXN0NjI1MzAy
| 316 |
Make safe_mode play nice with timeout (fixes #312)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376462?v=4",
"events_url": "https://api.github.com/users/atdt/events{/privacy}",
"followers_url": "https://api.github.com/users/atdt/followers",
"following_url": "https://api.github.com/users/atdt/following{/other_user}",
"gists_url": "https://api.github.com/users/atdt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atdt",
"id": 376462,
"login": "atdt",
"node_id": "MDQ6VXNlcjM3NjQ2Mg==",
"organizations_url": "https://api.github.com/users/atdt/orgs",
"received_events_url": "https://api.github.com/users/atdt/received_events",
"repos_url": "https://api.github.com/users/atdt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atdt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atdt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atdt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-12-22T21:53:36Z
|
2021-09-08T13:06:07Z
|
2011-12-22T23:17:45Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/316/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/316/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/316.diff",
"html_url": "https://github.com/psf/requests/pull/316",
"merged_at": "2011-12-22T23:17:45Z",
"patch_url": "https://github.com/psf/requests/pull/316.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/316"
}
| true |
[
":sparkles: :cake: :sparkles:\n",
":sparkles: :cake: :sparkles:\n"
] |
|
https://api.github.com/repos/psf/requests/issues/315
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/315/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/315/comments
|
https://api.github.com/repos/psf/requests/issues/315/events
|
https://github.com/psf/requests/pull/315
| 2,621,807 |
MDExOlB1bGxSZXF1ZXN0NjE3ODYx
| 315 |
Fix for #30: options for certificate validation and client certs.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39950?v=4",
"events_url": "https://api.github.com/users/sciyoshi/events{/privacy}",
"followers_url": "https://api.github.com/users/sciyoshi/followers",
"following_url": "https://api.github.com/users/sciyoshi/following{/other_user}",
"gists_url": "https://api.github.com/users/sciyoshi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sciyoshi",
"id": 39950,
"login": "sciyoshi",
"node_id": "MDQ6VXNlcjM5OTUw",
"organizations_url": "https://api.github.com/users/sciyoshi/orgs",
"received_events_url": "https://api.github.com/users/sciyoshi/received_events",
"repos_url": "https://api.github.com/users/sciyoshi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sciyoshi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sciyoshi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sciyoshi",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-12-21T05:16:06Z
|
2021-09-08T13:06:04Z
|
2011-12-28T09:20:24Z
|
NONE
|
resolved
|
Quick fix for issue #30. Note that this doesn't do hostname matching when verifying, although this is an issue in urllib3 - maybe it should use [`backports.ssl_match_hostname`](http://pypi.python.org/pypi/backports.ssl_match_hostname/) if available.
For example, you can set the global `ca_certs` and enable cert verification with
```
import requests
requests.defaults.defaults['verify_cert'] = True
requests.defaults.defaults['ca_certs'] = '/etc/ssl/certs/ca-certificates.crt'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/315/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/315/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/315.diff",
"html_url": "https://github.com/psf/requests/pull/315",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/315.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/315"
}
| true |
[
"Awesome!\n\nThose default dicts shouldn't be touched by any users. There needs to be a better API for this.\n",
"> Those default dicts shouldn't be touched by any users.\n\nThis would be not quite pythonic I guess :)\n",
"shazow/urllib3#25\n",
"Requests v0.8.8 was just released that includes ssl verification!\n\nhttp://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification\n"
] |
https://api.github.com/repos/psf/requests/issues/314
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/314/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/314/comments
|
https://api.github.com/repos/psf/requests/issues/314/events
|
https://github.com/psf/requests/issues/314
| 2,611,645 |
MDU6SXNzdWUyNjExNjQ1
| 314 |
Exceptions inside greenlets
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6988?v=4",
"events_url": "https://api.github.com/users/j4mie/events{/privacy}",
"followers_url": "https://api.github.com/users/j4mie/followers",
"following_url": "https://api.github.com/users/j4mie/following{/other_user}",
"gists_url": "https://api.github.com/users/j4mie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/j4mie",
"id": 6988,
"login": "j4mie",
"node_id": "MDQ6VXNlcjY5ODg=",
"organizations_url": "https://api.github.com/users/j4mie/orgs",
"received_events_url": "https://api.github.com/users/j4mie/received_events",
"repos_url": "https://api.github.com/users/j4mie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/j4mie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/j4mie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/j4mie",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-12-20T10:59:48Z
|
2021-09-09T09:00:42Z
|
2011-12-28T09:21:19Z
|
NONE
|
resolved
|
Hi,
When using the async stuff, how do I correctly handle an exception that occurs inside the greenlet?
```
Traceback (most recent call last):
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
result = self._run(*self.args, **self.kwargs)
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/requests/async.py", line 50, in send
r.send()
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/requests/models.py", line 454, in send
raise ConnectionError(e)
ConnectionError: Max retries exceeded for url: /followers/ids.json?user_id=21762493
<Greenlet at 0x111fe05f0: send(<Request [GET]>)> failed with ConnectionError
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/314/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/314/timeline
| null |
completed
| null | null | false |
[
"aync requests now have `safe_mode` enabled by default.\n",
"This doesn´t solve the problem. Same issue here. Adding \"ConnectionError\" on line 650 in models.py solves the problem, buts it´s just a workaround\n"
] |
https://api.github.com/repos/psf/requests/issues/313
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/313/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/313/comments
|
https://api.github.com/repos/psf/requests/issues/313/events
|
https://github.com/psf/requests/pull/313
| 2,609,961 |
MDExOlB1bGxSZXF1ZXN0NjEzMzE0
| 313 |
fix bug that causes iter_lines to truncate content
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376462?v=4",
"events_url": "https://api.github.com/users/atdt/events{/privacy}",
"followers_url": "https://api.github.com/users/atdt/followers",
"following_url": "https://api.github.com/users/atdt/following{/other_user}",
"gists_url": "https://api.github.com/users/atdt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atdt",
"id": 376462,
"login": "atdt",
"node_id": "MDQ6VXNlcjM3NjQ2Mg==",
"organizations_url": "https://api.github.com/users/atdt/orgs",
"received_events_url": "https://api.github.com/users/atdt/received_events",
"repos_url": "https://api.github.com/users/atdt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atdt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atdt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atdt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-20T07:05:47Z
|
2021-09-08T13:06:04Z
|
2011-12-22T16:56:05Z
|
CONTRIBUTOR
|
resolved
|
Currently, if the response does not terminate with a newline, iter_lines truncates the trailing remainder.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/313/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/313/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/313.diff",
"html_url": "https://github.com/psf/requests/pull/313",
"merged_at": "2011-12-22T16:56:05Z",
"patch_url": "https://github.com/psf/requests/pull/313.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/313"
}
| true |
[
"Thanks for the awesome fix!\n"
] |
https://api.github.com/repos/psf/requests/issues/312
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/312/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/312/comments
|
https://api.github.com/repos/psf/requests/issues/312/events
|
https://github.com/psf/requests/issues/312
| 2,608,975 |
MDU6SXNzdWUyNjA4OTc1
| 312 |
Unhandled exception on timeout in safe_mode
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/187133?v=4",
"events_url": "https://api.github.com/users/gazpachoking/events{/privacy}",
"followers_url": "https://api.github.com/users/gazpachoking/followers",
"following_url": "https://api.github.com/users/gazpachoking/following{/other_user}",
"gists_url": "https://api.github.com/users/gazpachoking/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gazpachoking",
"id": 187133,
"login": "gazpachoking",
"node_id": "MDQ6VXNlcjE4NzEzMw==",
"organizations_url": "https://api.github.com/users/gazpachoking/orgs",
"received_events_url": "https://api.github.com/users/gazpachoking/received_events",
"repos_url": "https://api.github.com/users/gazpachoking/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gazpachoking/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gazpachoking/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gazpachoking",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-12-20T03:28:28Z
|
2021-09-09T10:00:47Z
|
2011-12-22T23:17:45Z
|
CONTRIBUTOR
|
resolved
|
If safe_mode is specified, and a timeout occurs, the following error is raised:
``` python
>>>requests.get('http://timeout.com', timeout=0.01, config=dict(safe_mode=True))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win32\egg\requests\api.py", line 79, in get
File "build\bdist.win32\egg\requests\api.py", line 66, in request
File "build\bdist.win32\egg\requests\sessions.py", line 191, in request
File "build\bdist.win32\egg\requests\models.py", line 468, in send
UnboundLocalError: local variable 'r' referenced before assignment
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/312/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/312/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/311
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/311/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/311/comments
|
https://api.github.com/repos/psf/requests/issues/311/events
|
https://github.com/psf/requests/pull/311
| 2,602,685 |
MDExOlB1bGxSZXF1ZXN0NjEwMzc1
| 311 |
Add Twitter Streaming API example to Advanced Usage docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18160?v=4",
"events_url": "https://api.github.com/users/jemerick/events{/privacy}",
"followers_url": "https://api.github.com/users/jemerick/followers",
"following_url": "https://api.github.com/users/jemerick/following{/other_user}",
"gists_url": "https://api.github.com/users/jemerick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jemerick",
"id": 18160,
"login": "jemerick",
"node_id": "MDQ6VXNlcjE4MTYw",
"organizations_url": "https://api.github.com/users/jemerick/orgs",
"received_events_url": "https://api.github.com/users/jemerick/received_events",
"repos_url": "https://api.github.com/users/jemerick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jemerick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jemerick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jemerick",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-19T16:46:19Z
|
2021-09-08T13:06:03Z
|
2011-12-19T16:51: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/311/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/311/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/311.diff",
"html_url": "https://github.com/psf/requests/pull/311",
"merged_at": "2011-12-19T16:51:15Z",
"patch_url": "https://github.com/psf/requests/pull/311.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/311"
}
| true |
[
"Beautiful. Thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/310
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/310/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/310/comments
|
https://api.github.com/repos/psf/requests/issues/310/events
|
https://github.com/psf/requests/issues/310
| 2,597,235 |
MDU6SXNzdWUyNTk3MjM1
| 310 |
Encode data according to Content-Type.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/100702?v=4",
"events_url": "https://api.github.com/users/jorgeecardona/events{/privacy}",
"followers_url": "https://api.github.com/users/jorgeecardona/followers",
"following_url": "https://api.github.com/users/jorgeecardona/following{/other_user}",
"gists_url": "https://api.github.com/users/jorgeecardona/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorgeecardona",
"id": 100702,
"login": "jorgeecardona",
"node_id": "MDQ6VXNlcjEwMDcwMg==",
"organizations_url": "https://api.github.com/users/jorgeecardona/orgs",
"received_events_url": "https://api.github.com/users/jorgeecardona/received_events",
"repos_url": "https://api.github.com/users/jorgeecardona/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorgeecardona/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorgeecardona/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorgeecardona",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 18 |
2011-12-19T06:16:33Z
|
2021-09-09T10:00:47Z
|
2011-12-19T06:18:14Z
|
NONE
|
resolved
|
Hi,
It would be great that a request with a particular content-type would encode the "data" to the type given by the header Content-Type.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/310/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/310/timeline
| null |
completed
| null | null | false |
[
"Don't mean to be blunt, but... this is out of scope. \n",
"It's been heavily considered before, but it's definitely a step in the wrong direction.\n",
"Why? this will make my (and assume others) life really easy, If there\nis already some decoding in the response with the content-type, why is\na wrong direction to do the same at the request?\n\nBy the first line on description: \"Requests is an ISC Licensed HTTP\nlibrary, written in Python, _for human beings._\", clearly stated that\nthis is a good direction.\n\nOn Mon, Dec 19, 2011 at 1:18 AM, Kenneth Reitz\[email protected]\nwrote:\n\n> It's been heavily considered before, but it's definitely a step in the wrong direction.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/310#issuecomment-3199729\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"What content types do you have in mind?\n\nI'm assuming you mean json, etc.\n",
"Yeah, I'm thinking in json, xml, yaml.\n\nOn Mon, Dec 19, 2011 at 1:26 AM, Kenneth Reitz\[email protected]\nwrote:\n\n> What content types do you have in mind?\n> \n> I'm assuming you mean json, etc.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/310#issuecomment-3199760\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"Yeah, out of scope. Requests is an HTTP module — not a json, xml, or yaml module. \n\n---\n\nDon't worry, I absolutely understand the logic and the desire of this featureset, but it's simply not something requests is for.\n",
"But HTTP deals with content types, and that means json, xml, or yaml\nin some cases, it can be an optional behavior too.\n\nOn Mon, Dec 19, 2011 at 1:36 AM, Kenneth Reitz\[email protected]\nwrote:\n\n> Yeah, out of scope. Requests is an HTTP module — not a json, xml, or yaml module.\n> \n> ---\n> \n> Don't worry, I absolutely understand the logic and the desire of this featureset, but it's simply not something requests is for.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/310#issuecomment-3199827\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"HTTP deals with bytes. \n",
"Ok, but humans likes content types then, are you disagree even if this\nis just an optional behavior? I don't think is too complex, I'll try\nto add this and make a pull request if you agree to let it be an\noptional behavior.\n\nOn Mon, Dec 19, 2011 at 1:44 AM, Kenneth Reitz\[email protected]\nwrote:\n\n> HTTP deals with bytes.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/310#issuecomment-3199873\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"I've heavily considered this in the past, and I can assure that it's not something that should be included in requests. \n\nMind you — I don't think this is a bad idea. It just doesn't belong in requests. It could serve well as a separate module that you maintain.\n\n---\n\nConsider this: Okay, so you want to support JSON and YAML. What about XML? CSV? TSV? Where would you stop? The list of possible content types is limitless. The dependencies would continually grow. The (de)serialization standard aren't always uniform either.\n",
"I think a system where you could register deserialization handlers to content types would be ideal. By default Requests would just include a plain-text handler for everything and the end-user could register their own.\n",
"We can do as tastypie does, requests doesn't need to require all the\nlibraries for each content-type. If a particular content type is used\nwithout the correct library it will raise an exception show in that.\nIn that way requests will not grow in dependencies, we can support the\nbasics json, yaml and xml, and if someone want more, a system as\n@megaman821 says can help.\n\nOn Mon, Dec 19, 2011 at 8:48 AM, megaman821\[email protected]\nwrote:\n\n> I think a system where you could register deserialization handlers to content types would be ideal. By default Requests would just include a plain-text handler for everything and the end-user could register their own.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/310#issuecomment-3203260\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"This is never going to happen. Requests is an HTTP module, not an xml, json, yaml, etc module. \n\nI would be very excited to see someone build a complimentary module that provides this functionality, but it does _not_ belong within requests itself.\n",
"I'm sorry if it seems like I'm being difficult — I'm usually quite receptive of ideas like this.\n\nI've been down this road dozens of times myself, and have already determined that it's the wrong direction.\n",
"I would agree with not including json, xml, etc., just providing the hooks for an interested party to do it themselves. The only handler Requests should include is the plain-text handler which goes mirrors what Request already does.\n",
"Requests currently provides plain text and unicode.\n\nI wouldn't be against a pipeline that someone could hook into for doing this, actually. Sounds like an interesting idea. What would it look like?\n",
"This will do the trick with json:\n\n```\ndef encode_content_type(args):\n \" Encode the data using the 'Content-Type' header.\"\n\n if 'Content-Type' not in args['headers']:\n return args\n\n if args['headers']['Content-Type'] == 'application/json':\n args['data'] = simplejson.dumps(args['data'])\n\n return args\n```\n\nNow, the hook has to be passed to the get/post/put/delete method, is\nthere a way to register a hook without passing it to every request in\nthe hooks dict?\n\nOn Mon, Dec 19, 2011 at 3:12 PM, Jorge Cardona [email protected] wrote:\n\n> Actually, it can be done using the \"args\" hook.\n> \n> On Mon, Dec 19, 2011 at 12:53 PM, Kenneth Reitz\n> [email protected]\n> wrote:\n> \n> > Requests currently provides plain text and unicode.\n> > \n> > I wouldn't be against a pipeline that someone could hook into for doing this, actually. Sounds like an interesting idea. What would it look like?\n> > \n> > ---\n> > \n> > Reply to this email directly or view it on GitHub:\n> > https://github.com/kennethreitz/requests/issues/310#issuecomment-3206717\n> \n> ## \n> \n> Jorge Eduardo Cardona\n> [email protected]\n> jorgeecardona.blogspot.com\n> \n> ## github.com/jorgeecardona\n> \n> Linux registered user #391186\n> \n> ## Registered machine #291871\n\n## \n\nJorge Eduardo Cardona\[email protected]\njorgeecardona.blogspot.com\n\n## github.com/jorgeecardona\n\nLinux registered user #391186\n\n## Registered machine #291871\n",
"Add it to the session.\n"
] |
https://api.github.com/repos/psf/requests/issues/309
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/309/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/309/comments
|
https://api.github.com/repos/psf/requests/issues/309/events
|
https://github.com/psf/requests/pull/309
| 2,590,245 |
MDExOlB1bGxSZXF1ZXN0NjA2NTQ2
| 309 |
Add Proxy Authorization Support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1010392?v=4",
"events_url": "https://api.github.com/users/chrisguitarguy/events{/privacy}",
"followers_url": "https://api.github.com/users/chrisguitarguy/followers",
"following_url": "https://api.github.com/users/chrisguitarguy/following{/other_user}",
"gists_url": "https://api.github.com/users/chrisguitarguy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrisguitarguy",
"id": 1010392,
"login": "chrisguitarguy",
"node_id": "MDQ6VXNlcjEwMTAzOTI=",
"organizations_url": "https://api.github.com/users/chrisguitarguy/orgs",
"received_events_url": "https://api.github.com/users/chrisguitarguy/received_events",
"repos_url": "https://api.github.com/users/chrisguitarguy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrisguitarguy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrisguitarguy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrisguitarguy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-12-17T19:56:12Z
|
2021-09-08T09:01:08Z
|
2011-12-19T00:14:56Z
|
CONTRIBUTOR
|
resolved
|
A new class is auth.py adds the `Proxy-Authorization` header to a Request object.
If a proxy is specified in the request, the `send()` method is going to look for authentication info in the proxy URL string and set up the proxy auth from there.
None of this works with out the changes to urllib3 in #293, however.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/309/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/309/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/309.diff",
"html_url": "https://github.com/psf/requests/pull/309",
"merged_at": "2011-12-19T00:14:56Z",
"patch_url": "https://github.com/psf/requests/pull/309.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/309"
}
| true |
[
"Thanks a ton for this!\n",
"(Great pull request btw — honored to be your first :)\n"
] |
https://api.github.com/repos/psf/requests/issues/308
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/308/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/308/comments
|
https://api.github.com/repos/psf/requests/issues/308/events
|
https://github.com/psf/requests/issues/308
| 2,559,650 |
MDU6SXNzdWUyNTU5NjUw
| 308 |
Client Certificates in Requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1264133?v=4",
"events_url": "https://api.github.com/users/johncwheeler/events{/privacy}",
"followers_url": "https://api.github.com/users/johncwheeler/followers",
"following_url": "https://api.github.com/users/johncwheeler/following{/other_user}",
"gists_url": "https://api.github.com/users/johncwheeler/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/johncwheeler",
"id": 1264133,
"login": "johncwheeler",
"node_id": "MDQ6VXNlcjEyNjQxMzM=",
"organizations_url": "https://api.github.com/users/johncwheeler/orgs",
"received_events_url": "https://api.github.com/users/johncwheeler/received_events",
"repos_url": "https://api.github.com/users/johncwheeler/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/johncwheeler/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/johncwheeler/subscriptions",
"type": "User",
"url": "https://api.github.com/users/johncwheeler",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-14T22:09:30Z
|
2021-09-09T10:00:48Z
|
2011-12-19T00:23:27Z
|
NONE
|
resolved
|
In requests there doesn't seem to be a way to specify an SSL key and certificate for client certificate auth.
urllib and httplib both support the client cert approach. This is a commonly requested implementation for business to business communications.
Is this something that we would use the custom auth approach for, using the interface to bind the values to the internal urllib object... or, what?
Just want to get a handle on whether or not this is achievable using requests.
John
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/308/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/308/timeline
| null |
completed
| null | null | false |
[
"Hey there. I'm looking forward to adding support for this soon.\n\nSee #30 for discussion and details. \n"
] |
https://api.github.com/repos/psf/requests/issues/307
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/307/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/307/comments
|
https://api.github.com/repos/psf/requests/issues/307/events
|
https://github.com/psf/requests/issues/307
| 2,541,917 |
MDU6SXNzdWUyNTQxOTE3
| 307 |
Digest Authentication in 0.7.3 versus 0.8.4
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/212338?v=4",
"events_url": "https://api.github.com/users/sweenzor/events{/privacy}",
"followers_url": "https://api.github.com/users/sweenzor/followers",
"following_url": "https://api.github.com/users/sweenzor/following{/other_user}",
"gists_url": "https://api.github.com/users/sweenzor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sweenzor",
"id": 212338,
"login": "sweenzor",
"node_id": "MDQ6VXNlcjIxMjMzOA==",
"organizations_url": "https://api.github.com/users/sweenzor/orgs",
"received_events_url": "https://api.github.com/users/sweenzor/received_events",
"repos_url": "https://api.github.com/users/sweenzor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sweenzor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sweenzor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sweenzor",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-12-13T19:32:57Z
|
2021-09-09T10:00:48Z
|
2011-12-13T19:39:23Z
|
CONTRIBUTOR
|
resolved
|
After upgrading from 0.7.3 to 0.8.4:
A digest request such as:
``` python
r = requests.get('http://app.com/sensors.json', auth=('digest', 'username', 'password'))
```
Yields:
```
matt@Jenkins:~/Development/sensor-tools$ python pollsensors.py
Traceback (most recent call last):
File "pollsensors.py", line 84, in <module>
s = PollSensors()
File "pollsensors.py", line 12, in __init__
r = requests.get('http://app.com/sensors.json', auth=('digest', 'username', 'password'))
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 80, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 67, in request
prefetch=prefetch
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 191, in request
r.send(prefetch=prefetch)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 400, in send
r = self.auth(self)
TypeError: 'tuple' object is not callable
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/212338?v=4",
"events_url": "https://api.github.com/users/sweenzor/events{/privacy}",
"followers_url": "https://api.github.com/users/sweenzor/followers",
"following_url": "https://api.github.com/users/sweenzor/following{/other_user}",
"gists_url": "https://api.github.com/users/sweenzor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sweenzor",
"id": 212338,
"login": "sweenzor",
"node_id": "MDQ6VXNlcjIxMjMzOA==",
"organizations_url": "https://api.github.com/users/sweenzor/orgs",
"received_events_url": "https://api.github.com/users/sweenzor/received_events",
"repos_url": "https://api.github.com/users/sweenzor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sweenzor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sweenzor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sweenzor",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/307/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/307/timeline
| null |
completed
| null | null | false |
[
"There was a backwards incompatible change. \n\nHere's the new usage:\n\nhttp://docs.python-requests.org/en/latest/user/quickstart/#digest-authentication\n",
"ah, shit. I didn't see that\n\nworks now.\n",
"Sorry for the backwards-incompatible changes. They're for the best :)\n",
"no worries, I like this new syntax better!\n"
] |
https://api.github.com/repos/psf/requests/issues/306
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/306/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/306/comments
|
https://api.github.com/repos/psf/requests/issues/306/events
|
https://github.com/psf/requests/issues/306
| 2,529,375 |
MDU6SXNzdWUyNTI5Mzc1
| 306 |
requests does not install if Python has no SSL support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/576874?v=4",
"events_url": "https://api.github.com/users/nisavid/events{/privacy}",
"followers_url": "https://api.github.com/users/nisavid/followers",
"following_url": "https://api.github.com/users/nisavid/following{/other_user}",
"gists_url": "https://api.github.com/users/nisavid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nisavid",
"id": 576874,
"login": "nisavid",
"node_id": "MDQ6VXNlcjU3Njg3NA==",
"organizations_url": "https://api.github.com/users/nisavid/orgs",
"received_events_url": "https://api.github.com/users/nisavid/received_events",
"repos_url": "https://api.github.com/users/nisavid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nisavid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nisavid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nisavid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2011-12-12T22:12:42Z
|
2021-09-09T10:00:41Z
|
2012-01-23T08:01:45Z
|
NONE
|
resolved
|
here's what happens if you try to install requests in a Python environment that doesn't have SSL support:
```
Downloading/unpacking requests
Downloading requests-0.8.4.tar.gz (52Kb): 52Kb downloaded
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/usr/local/src/cogo/platform/systemfiles/analyst/home/config/build/requests/setup.py", line 6, in <module>
import requests
File "requests/__init__.py", line 27, in <module>
from .models import Request, Response
File "requests/models.py", line 19, in <module>
from .packages import oreos
File "requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "requests/packages/urllib3/connectionpool.py", line 11, in <module>
from httplib import HTTPConnection, HTTPSConnection, HTTPException
ImportError: cannot import name HTTPSConnection
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/usr/local/src/cogo/platform/systemfiles/analyst/home/config/build/requests/setup.py", line 6, in <module>
import requests
File "requests/__init__.py", line 27, in <module>
from .models import Request, Response
File "requests/models.py", line 19, in <module>
from .packages import oreos
File "requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "requests/packages/urllib3/connectionpool.py", line 11, in <module>
from httplib import HTTPConnection, HTTPSConnection, HTTPException
ImportError: cannot import name HTTPSConnection
----------------------------------------
Command python setup.py egg_info failed with error code 1
```
not only is this very inconvenient, but it seems to contradict the assertion that requests has "zero dependencies".
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/306/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/306/timeline
| null |
completed
| null | null | false |
[
"Interesting. We should definitely fix this.\n\nNow I'm curious though — what's the best way to hand this? Raise a `ConnectionError` when someone tries to open an https url? Or maybe a `ProtocolNotAvailable` error?\n",
"Shouldn't this be handled in the urllib3?\n",
"@piotr-dobrogost: urllib3 is, as always, not an issue. \n\nProbally worth noting to @shazow though.\n",
"Hmm I've never seen that happen before. I could try to handle the case better by providing a built-in faux-HTTPSConnection object, though not sure if it would work at all without replicating a lot of the logic.\n\n`ProtocolNotAvailable` sounds good to me, maybe even inherit from a `ConnectionError`. :)\n",
"I'm tempted to just say that we require it.\n",
"Closing this, since this is technically a urllib3 bug. \n",
"@shazow - asking here rather than filing an issue on urllib3, as I'm looking for clarification.\n\nI've just run into this exact issue myself. Seeing as how it's been marked closed 'urllib3 bug', would you like an issue opened for it? I'm not seeing one currently.\n\n**Edit:** For reference, urllib2 does import fine in this environment and throws a urllib2.URLError: \"urlopen error unknown url type: https\" Regular http connections work.\n",
"@pudquick Please open a urllib3 bug, I'll try to get this fixed this weekend. \n"
] |
https://api.github.com/repos/psf/requests/issues/305
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/305/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/305/comments
|
https://api.github.com/repos/psf/requests/issues/305/events
|
https://github.com/psf/requests/pull/305
| 2,515,123 |
MDExOlB1bGxSZXF1ZXN0NTgxMjQw
| 305 |
Fix spelling errors, typos.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47585?v=4",
"events_url": "https://api.github.com/users/hatchetation/events{/privacy}",
"followers_url": "https://api.github.com/users/hatchetation/followers",
"following_url": "https://api.github.com/users/hatchetation/following{/other_user}",
"gists_url": "https://api.github.com/users/hatchetation/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hatchetation",
"id": 47585,
"login": "hatchetation",
"node_id": "MDQ6VXNlcjQ3NTg1",
"organizations_url": "https://api.github.com/users/hatchetation/orgs",
"received_events_url": "https://api.github.com/users/hatchetation/received_events",
"repos_url": "https://api.github.com/users/hatchetation/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hatchetation/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hatchetation/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hatchetation",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-11T08:02:29Z
|
2021-09-08T13:06:03Z
|
2011-12-11T16:04:27Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/305/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/305/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/305.diff",
"html_url": "https://github.com/psf/requests/pull/305",
"merged_at": "2011-12-11T16:04:26Z",
"patch_url": "https://github.com/psf/requests/pull/305.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/305"
}
| true |
[
"Thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/304
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/304/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/304/comments
|
https://api.github.com/repos/psf/requests/issues/304/events
|
https://github.com/psf/requests/issues/304
| 2,511,261 |
MDU6SXNzdWUyNTExMjYx
| 304 |
Add caching support with pluggable storage classes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/308610?v=4",
"events_url": "https://api.github.com/users/jaraco/events{/privacy}",
"followers_url": "https://api.github.com/users/jaraco/followers",
"following_url": "https://api.github.com/users/jaraco/following{/other_user}",
"gists_url": "https://api.github.com/users/jaraco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jaraco",
"id": 308610,
"login": "jaraco",
"node_id": "MDQ6VXNlcjMwODYxMA==",
"organizations_url": "https://api.github.com/users/jaraco/orgs",
"received_events_url": "https://api.github.com/users/jaraco/received_events",
"repos_url": "https://api.github.com/users/jaraco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jaraco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jaraco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jaraco",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 20 |
2011-12-10T14:56:07Z
|
2021-09-09T07:05:21Z
|
2012-07-27T06:08:15Z
|
CONTRIBUTOR
|
resolved
|
Our application relies heavily on the caching support of httplib2. We cannot consider switching to requests until requests has basic caching support with pluggable storage backends (we use a BSDDB backend for a multi-process shared cache).
Glancing over the code, I did not see any cache support. Let's sprint on this some day. I maintain an [http cache handler for urllib2](https://bitbucket.org/jaraco/jaraco.net/src/eeb3581fb267/jaraco/net/http/caching.py#cl-15) and I've also worked on the httplib2 code base (though I recognize that might be as much a detriment as a compliment ;).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/304/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/304/timeline
| null |
completed
| null | null | false |
[
"What's the status of caching support? Has anyone considered it yet? Would pull requests be considered? Are there any other considerations that should be made before going down the path of an implementation?\n",
"Excellent! It's absolutely something that I'd like to support eventually, as long as the API is right, and it doesn't make requests difficult to maintain.\n\nIf it is, it may serve best as a \"sister module\". We'll have to see. I'd like to see it in core if it fits, though.\n",
"I'm interested in middleware that does storing, caching, purging and additionally **protects against API failures and downtime**. This is the reality of most API's, so why not bake that in since we can use values from the cache while the API is down.\n\nThe logic for such a module:\n- Cache on path and parameter dictionary variations\n- On default only cache responses for GET requests\n- If API response is erroneous or non responsive, use cached value, reset TTL so the service get's a little time to breath\n\nFor an example of a CachedResponse class check out this tumblr.py module I'm using in production: https://gist.github.com/1455583\n",
"@jokull Something much like this is done in the HTTP cache Varnish by setting a grace period where Varnish will return stale values if the back-end is not responding.\n\nThe only note I would like to add is that cache headers should be respected and not to just blindly cache all GET requests.\n\nAlso other nice properties for a cache would be:\n- Ordering of GET string variables before caching so things like http://example.com?a=1&b=2 is the same as http://example.com?b=2&a=1\n- Excluding GET string variables that don't affect content like Google Analytics variables\n",
"I love to have cache to file support :)\n",
"there's a project named [python-cache](http://code.google.com/p/python-cache/) that provides this functionality for httplib2, maybe it would be best to make requests able to use it too, if not already.\n\nthere's also a project called [requests-cache](https://github.com/reclosedev/requests-cache) that provides cache over sqlite.\n",
"also [dogbutler](http://pypi.python.org/pypi/dogbutler/0.0.4).\n",
"I briefly reviewed the mentioned libraries.\n\nRequests-cache does provide a cache, but as best as I can tell, it doesn't respect HTTP headers and protocol. Also, requests-cache indicates monkey-patching, so at the very least needs better hooks.\n\nInteresting that python-cache was implemented at all. It wraps httplib2 to provide caching, even though httplib2 integrates caching at the protocol level. Still, that approach won't be viable for requests because it doesn't respect HTTP headers and protocol.\n\nDogbutler appears to implement good HTTP-level caching, but it is also a separate HTTP request handler.\n",
"I should make my long term plans a little more well known ;)\n\nEssentially, a new library called 'cachecore' will be made as part of the [werkzeug/requests refactor](http://kennethreitz.com/the-future-of-python-http.html). It will provide all the cache storage backends that `werkzeug.contrib.cache` does currently. Requests will then be able to use those backends for cache storage. \n\nThe actual implementation of the HTTP cache algorithm is yet to be determined. \n",
"thanks for that, sounds like a good plan.\n",
"I ported the algorithm for the httplib2 caching in a simple library I'm hesitantly calling [httpcache](http://bitbucket.org/elarson/httpcache). It currently focuses on the HTTP 1.1 Cache-Control support for caching requests but I plan to add the HTTP 1.0 Expires support as well. In terms of testing whether to return a cached value, it uses a direct port from httplib2.\n\nIt supports plugging in your own cache object. It comes with an ultra simple dictionary based cache, but I believe any cache that works with httplib2 would work as well.\n\nIf this is helpful, I'm happy to work on merging this work into requests. That said, I'm not a heavy requests user (because of this caching aspect), so suggestions on how best to make the code requests friendly is welcome. Any other suggestions or criticisms are also appreciated.\n",
"#700\n",
"https://github.com/core/cachecore released!\n\nStep 1.\n",
"I am asking just for to be sure, Is it going to be cache to disk for requests.get() or post()?\n",
"@queeup cachecore is a storage interface for the cache and doesn't deal specifically with HTTP caching. For example, if you have code that looks at the Cache-Control headers to store GET responses, you could store those responses in cachecore.\n\nIf you are looking for a tool to handle the HTTP protocol details for caching, I wrote a wrapper based on the httplib2 algorithms. If you do try it out please let me know any issues you find - https://bitbucket.org/elarson/httpcache\n",
"@ionrock: this looks perfect. I think I'm going to try to merge this into the codebase ;)\n",
"@kennethreitz That is great news. Please let me know if I can help. I'm happy to fork and try to merge it myself. I also plan on adding the etag and if-\\* header support, which I'm happy to submit as a patch later if need be. \n",
"@ionrock Fantastic! Start watching the #700 pull request, where i'll be working on it. It'll be using the cachecore caching interfaces.\n",
"Fantastic :) thanks both of you. After finish this I can use requests for my all XBMC add-ons :)\n",
"Closing for #700\n"
] |
https://api.github.com/repos/psf/requests/issues/303
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/303/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/303/comments
|
https://api.github.com/repos/psf/requests/issues/303/events
|
https://github.com/psf/requests/issues/303
| 2,511,120 |
MDU6SXNzdWUyNTExMTIw
| 303 |
prefetch=True and RuntimeError: The content for this response was already consumed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/103396?v=4",
"events_url": "https://api.github.com/users/fillest/events{/privacy}",
"followers_url": "https://api.github.com/users/fillest/followers",
"following_url": "https://api.github.com/users/fillest/following{/other_user}",
"gists_url": "https://api.github.com/users/fillest/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fillest",
"id": 103396,
"login": "fillest",
"node_id": "MDQ6VXNlcjEwMzM5Ng==",
"organizations_url": "https://api.github.com/users/fillest/orgs",
"received_events_url": "https://api.github.com/users/fillest/received_events",
"repos_url": "https://api.github.com/users/fillest/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fillest/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fillest/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fillest",
"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 | 1 |
2011-12-10T14:10:20Z
|
2021-09-09T10:00:49Z
|
2011-12-11T16:32:21Z
|
NONE
|
resolved
|
Hello!
requests 0.8.3 (was installed with pip), python 2.7.1
> > > import requests
> > > r = requests.get("http://www.httpbin.org/headers", prefetch=True)
> > > print r.content
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/home/hurr/venvs/durr/local/lib/python2.7/site-packages/requests/models.py", line 584, in content
> > > 'The content for this response was already consumed')
> > > RuntimeError: The content for this response was already consumed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/303/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/303/timeline
| null |
completed
| null | null | false |
[
"Yikes, thanks for finding this. I'll push a fix up soon.\n"
] |
https://api.github.com/repos/psf/requests/issues/302
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/302/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/302/comments
|
https://api.github.com/repos/psf/requests/issues/302/events
|
https://github.com/psf/requests/issues/302
| 2,505,608 |
MDU6SXNzdWUyNTA1NjA4
| 302 |
LICENSE file absent from pip based install
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/281946?v=4",
"events_url": "https://api.github.com/users/devdave/events{/privacy}",
"followers_url": "https://api.github.com/users/devdave/followers",
"following_url": "https://api.github.com/users/devdave/following{/other_user}",
"gists_url": "https://api.github.com/users/devdave/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/devdave",
"id": 281946,
"login": "devdave",
"node_id": "MDQ6VXNlcjI4MTk0Ng==",
"organizations_url": "https://api.github.com/users/devdave/orgs",
"received_events_url": "https://api.github.com/users/devdave/received_events",
"repos_url": "https://api.github.com/users/devdave/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/devdave/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/devdave/subscriptions",
"type": "User",
"url": "https://api.github.com/users/devdave",
"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-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"
}
| 1 |
2011-12-09T19:25:45Z
|
2021-09-09T10:00:48Z
|
2011-12-17T21:10:23Z
|
NONE
|
resolved
|
Should be a simple fix by adding a "package_data" configuration option to setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/281946?v=4",
"events_url": "https://api.github.com/users/devdave/events{/privacy}",
"followers_url": "https://api.github.com/users/devdave/followers",
"following_url": "https://api.github.com/users/devdave/following{/other_user}",
"gists_url": "https://api.github.com/users/devdave/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/devdave",
"id": 281946,
"login": "devdave",
"node_id": "MDQ6VXNlcjI4MTk0Ng==",
"organizations_url": "https://api.github.com/users/devdave/orgs",
"received_events_url": "https://api.github.com/users/devdave/received_events",
"repos_url": "https://api.github.com/users/devdave/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/devdave/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/devdave/subscriptions",
"type": "User",
"url": "https://api.github.com/users/devdave",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/302/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/302/timeline
| null |
completed
| null | null | false |
[
"Interesting, we should definitely add that.\n"
] |
https://api.github.com/repos/psf/requests/issues/301
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/301/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/301/comments
|
https://api.github.com/repos/psf/requests/issues/301/events
|
https://github.com/psf/requests/pull/301
| 2,499,217 |
MDExOlB1bGxSZXF1ZXN0NTc2MDk5
| 301 |
Fixed typo in documentation.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/30053?v=4",
"events_url": "https://api.github.com/users/cwvh/events{/privacy}",
"followers_url": "https://api.github.com/users/cwvh/followers",
"following_url": "https://api.github.com/users/cwvh/following{/other_user}",
"gists_url": "https://api.github.com/users/cwvh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cwvh",
"id": 30053,
"login": "cwvh",
"node_id": "MDQ6VXNlcjMwMDUz",
"organizations_url": "https://api.github.com/users/cwvh/orgs",
"received_events_url": "https://api.github.com/users/cwvh/received_events",
"repos_url": "https://api.github.com/users/cwvh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cwvh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cwvh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cwvh",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-09T07:49:39Z
|
2021-09-08T13:06:01Z
|
2011-12-09T16:42:19Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/301/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/301/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/301.diff",
"html_url": "https://github.com/psf/requests/pull/301",
"merged_at": "2011-12-09T16:42:19Z",
"patch_url": "https://github.com/psf/requests/pull/301.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/301"
}
| true |
[
"Thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/300
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/300/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/300/comments
|
https://api.github.com/repos/psf/requests/issues/300/events
|
https://github.com/psf/requests/pull/300
| 2,470,559 |
MDExOlB1bGxSZXF1ZXN0NTY2MTI4
| 300 |
disable_redirects should be allow_redirects in docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33829?v=4",
"events_url": "https://api.github.com/users/edsu/events{/privacy}",
"followers_url": "https://api.github.com/users/edsu/followers",
"following_url": "https://api.github.com/users/edsu/following{/other_user}",
"gists_url": "https://api.github.com/users/edsu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/edsu",
"id": 33829,
"login": "edsu",
"node_id": "MDQ6VXNlcjMzODI5",
"organizations_url": "https://api.github.com/users/edsu/orgs",
"received_events_url": "https://api.github.com/users/edsu/received_events",
"repos_url": "https://api.github.com/users/edsu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/edsu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/edsu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/edsu",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-12-07T02:37:34Z
|
2021-09-08T13:06:01Z
|
2011-12-07T02:38:31Z
|
CONTRIBUTOR
|
resolved
|
disable_redirects parameter does not seem to exist anymore, updated docs to point folks at allow_redirects
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/300/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/300/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/300.diff",
"html_url": "https://github.com/psf/requests/pull/300",
"merged_at": "2011-12-07T02:38:31Z",
"patch_url": "https://github.com/psf/requests/pull/300.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/300"
}
| true |
[
"I must have been really tired when I wrote this. Thanks!\n",
"It's the least I could do. Thank you for requests. It has made life w/ http worth living :-)\n",
"My pleasure! Thanks for the support :)\n\n:sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/299
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/299/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/299/comments
|
https://api.github.com/repos/psf/requests/issues/299/events
|
https://github.com/psf/requests/issues/299
| 2,466,910 |
MDU6SXNzdWUyNDY2OTEw
| 299 |
honor .netrc
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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-12-06T20:19:12Z
|
2021-09-09T09:00:31Z
|
2012-05-04T01:58:31Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4",
"events_url": "https://api.github.com/users/slingamn/events{/privacy}",
"followers_url": "https://api.github.com/users/slingamn/followers",
"following_url": "https://api.github.com/users/slingamn/following{/other_user}",
"gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/slingamn",
"id": 376448,
"login": "slingamn",
"node_id": "MDQ6VXNlcjM3NjQ0OA==",
"organizations_url": "https://api.github.com/users/slingamn/orgs",
"received_events_url": "https://api.github.com/users/slingamn/received_events",
"repos_url": "https://api.github.com/users/slingamn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/slingamn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/slingamn",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/299/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/299/timeline
| null |
completed
| null | null | false |
[
"Looks like this was done in 793d314c8d45d.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/298
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/298/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/298/comments
|
https://api.github.com/repos/psf/requests/issues/298/events
|
https://github.com/psf/requests/issues/298
| 2,451,226 |
MDU6SXNzdWUyNDUxMjI2
| 298 |
File upload not working with HTTP digest authentication
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/733442?v=4",
"events_url": "https://api.github.com/users/ibrechin/events{/privacy}",
"followers_url": "https://api.github.com/users/ibrechin/followers",
"following_url": "https://api.github.com/users/ibrechin/following{/other_user}",
"gists_url": "https://api.github.com/users/ibrechin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ibrechin",
"id": 733442,
"login": "ibrechin",
"node_id": "MDQ6VXNlcjczMzQ0Mg==",
"organizations_url": "https://api.github.com/users/ibrechin/orgs",
"received_events_url": "https://api.github.com/users/ibrechin/received_events",
"repos_url": "https://api.github.com/users/ibrechin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ibrechin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ibrechin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ibrechin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-12-05T16:25:41Z
|
2021-09-09T09:00:36Z
|
2012-05-01T09:42:59Z
|
NONE
|
resolved
|
This is due to a couple of issues involved with the fact that it is necessary to create two requests and the file already having been read and a boundary set in the content-type header by the first request, resulting in the second (authenticated) request lacking file data and having an incorrect boundary even if you reset the file input stream.
However, more than that it seems like a waste of bytes to send POST data up with the initial request which you know will come back as 401. As a quick fix in my own project I have added an if statement around lines 360-388 in models.py with the conditional
```
if (not isinstance(self.auth, HTTPDigestAuth)) or 'Authorization' in self.headers:
```
but I expect there is a more elegant way. If there already exists a way to do an empty first request when using HTTP Digest then I was unable to find 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/298/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/298/timeline
| null |
completed
| null | null | false |
[
"Thanks for the report. I'm really unhappy with the post-hook thing that's being used in the Digest Auth handler. It feels really messy.\n\nI'd love to take a more elegant approach, but nothing seems immediately obvious.\n"
] |
https://api.github.com/repos/psf/requests/issues/297
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/297/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/297/comments
|
https://api.github.com/repos/psf/requests/issues/297/events
|
https://github.com/psf/requests/issues/297
| 2,387,034 |
MDU6SXNzdWUyMzg3MDM0
| 297 |
File download: get the filename without the data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/319220?v=4",
"events_url": "https://api.github.com/users/Diaoul/events{/privacy}",
"followers_url": "https://api.github.com/users/Diaoul/followers",
"following_url": "https://api.github.com/users/Diaoul/following{/other_user}",
"gists_url": "https://api.github.com/users/Diaoul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Diaoul",
"id": 319220,
"login": "Diaoul",
"node_id": "MDQ6VXNlcjMxOTIyMA==",
"organizations_url": "https://api.github.com/users/Diaoul/orgs",
"received_events_url": "https://api.github.com/users/Diaoul/received_events",
"repos_url": "https://api.github.com/users/Diaoul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Diaoul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Diaoul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Diaoul",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-29T16:34:21Z
|
2021-09-09T10:00:49Z
|
2011-11-29T16:42:31Z
|
NONE
|
resolved
|
Is it possible to just retrieve the filename when doing a get request without the file itself?
For example, any browsers prompts for a filename to save before actually downloading the file if the save button is hit.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/319220?v=4",
"events_url": "https://api.github.com/users/Diaoul/events{/privacy}",
"followers_url": "https://api.github.com/users/Diaoul/followers",
"following_url": "https://api.github.com/users/Diaoul/following{/other_user}",
"gists_url": "https://api.github.com/users/Diaoul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Diaoul",
"id": 319220,
"login": "Diaoul",
"node_id": "MDQ6VXNlcjMxOTIyMA==",
"organizations_url": "https://api.github.com/users/Diaoul/orgs",
"received_events_url": "https://api.github.com/users/Diaoul/received_events",
"repos_url": "https://api.github.com/users/Diaoul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Diaoul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Diaoul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Diaoul",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/297/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/297/timeline
| null |
completed
| null | null | false |
[
"This might help: http://docs.python-requests.org/en/latest/user/advanced/#body-content-workflow\n",
"Wow it seems the doc has been updated since last time I checked. Sorry for that useless issue, I may be able to read the filename in one of the header.\n\nThanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/296
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/296/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/296/comments
|
https://api.github.com/repos/psf/requests/issues/296/events
|
https://github.com/psf/requests/issues/296
| 2,384,830 |
MDU6SXNzdWUyMzg0ODMw
| 296 |
ConnectionError with Python 2.5 and SSL site
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/334087?v=4",
"events_url": "https://api.github.com/users/davidwtbuxton/events{/privacy}",
"followers_url": "https://api.github.com/users/davidwtbuxton/followers",
"following_url": "https://api.github.com/users/davidwtbuxton/following{/other_user}",
"gists_url": "https://api.github.com/users/davidwtbuxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidwtbuxton",
"id": 334087,
"login": "davidwtbuxton",
"node_id": "MDQ6VXNlcjMzNDA4Nw==",
"organizations_url": "https://api.github.com/users/davidwtbuxton/orgs",
"received_events_url": "https://api.github.com/users/davidwtbuxton/received_events",
"repos_url": "https://api.github.com/users/davidwtbuxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidwtbuxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidwtbuxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidwtbuxton",
"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 | 10 |
2011-11-29T14:20:07Z
|
2021-09-09T10:00:42Z
|
2012-01-23T08:06:13Z
|
NONE
|
resolved
|
I am using requests 0.8.5 to GET the front page of an SSL site. This works fine with Python 2.7.2, Python 2.6.7, but throws ConnectionError with Python 2.5.6. Other SSL sites work as expected with Python 2.5.6.
Quick tests from the command-line:
```
veronica:test david$ python2.7 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"
<Response [200]>
veronica:test david$ python2.6 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"
<Response [200]>
veronica:test david$ python2.5 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "requests/api.py", line 80, in get
return request('get', url, **kwargs)
File "requests/api.py", line 67, in request
prefetch=prefetch
File "requests/sessions.py", line 191, in request
r.send(prefetch=prefetch)
File "requests/models.py", line 453, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: Max retries exceeded for url: /
veronica:test david$
```
But this works in Python 2.5:
```
veronica:test david$ python2.5 -c "import requests; print requests.get('https://github.com/');"
<Response [200]>
```
The problem web server is running IIS7. I will try and get more details soon. Platform is Mac OS X 10.7.2, all Python versions built from MacPorts.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/296/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/296/timeline
| null |
completed
| null | null | false |
[
"Hmm, very odd. Oddly enough, it's working properly on my local copy of Python 2.5.6. \n\nDo let me know what you come up with.\n",
"Mistake, I am using requests version 0.8.3\n",
"The test works fine using a local proxy. Dammit. Turning up the log level I see\n\n```\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (2): viewpoint.toyota-europe.com\nWARNING:requests.packages.urllib3.connectionpool:Retrying (0 attempts remain) after connection broken by 'error(54, 'Connection reset by peer')': /\n```\n\nSo the server really is forcing the retries error.\n",
"I think the problem is the server is closing the connection when there is no 'Host:' header. Will get an example working.\n",
"OK. Adding a Host header fixes the problem on Python 2.5 for me. So it is a server problem. Incidentally, Python's urllib2.urlopen() adds a Host header by default.\n\nAn example of a hook that adds the Host header if it is missing:\n\n```\nimport requests\nfrom urlparse import urlparse\n\n\ndef pre_request_hook(req):\n \"\"\"Add a 'Host' header if it does not exist.\"\"\"\n if 'Host' not in req.headers:\n hostname = urlparse(req.full_url)[1]\n req.headers['Host'] = hostname\n\n\nhooks = {'pre_request': pre_request_hook}\nurl = 'https://viewpoint.toyota-europe.com/'\nresp = requests.get(url, hooks=hooks)\nprint \"With host header:\", resp.status_code\n```\n",
"There should definitely be a host header. Will investigate.\n",
"I went spelunking through httplib, and on Python 2.5.6 it definitely wasn't adding a host header for me automatically. It was only when I started going through urllib2 that I noticed it was always creating a host header.\n",
"httplib on my Python 2.5.6 _does_ add the host, but for https connections it adds the port in the header like `Host: viewpoint.toyota-europe.com:443`. This default host value is causing the server to close the connection, even though it is indeed listening on port 443.\n\n```\nimport requests\n\n# Request succeeds\nrequests.get('https://viewpoint.toyota-europe.com/', headers={'Host': 'viewpoint.toyota-europe.com'})\n\n# Request raises ConnectionError\nrequests.get('https://viewpoint.toyota-europe.com/', headers={'Host': 'viewpoint.toyota-europe.com:443'})\n```\n\nSee HTTPConnection.putrequest() in httplib 2.5.6 http://hg.python.org/cpython/file/de34c7b097e8/Lib/httplib.py#l816 where the test is for `HTTP_PORT`. In later versions, http://hg.python.org/cpython/file/8527427914a2/Lib/httplib.py#l899 , the test is for `self.default_port` which will be 443 for https connections (therefore the port number is omitted from the host header).\n",
"I'm having the same problem and found just to do a get request through my company's firewall/proxy that I had to set the 'Host\" to the domain of the site I'm trying to connect to. However fails to work when I try to connect to an https site. \n",
"Python 2.5 is no longer supported (in favor of Python 3). Sorry!\n"
] |
https://api.github.com/repos/psf/requests/issues/295
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/295/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/295/comments
|
https://api.github.com/repos/psf/requests/issues/295/events
|
https://github.com/psf/requests/issues/295
| 2,383,619 |
MDU6SXNzdWUyMzgzNjE5
| 295 |
Don't read whole files into memory for multipart file uploads.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/55050?v=4",
"events_url": "https://api.github.com/users/zacharyvoase/events{/privacy}",
"followers_url": "https://api.github.com/users/zacharyvoase/followers",
"following_url": "https://api.github.com/users/zacharyvoase/following{/other_user}",
"gists_url": "https://api.github.com/users/zacharyvoase/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zacharyvoase",
"id": 55050,
"login": "zacharyvoase",
"node_id": "MDQ6VXNlcjU1MDUw",
"organizations_url": "https://api.github.com/users/zacharyvoase/orgs",
"received_events_url": "https://api.github.com/users/zacharyvoase/received_events",
"repos_url": "https://api.github.com/users/zacharyvoase/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zacharyvoase/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zacharyvoase/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zacharyvoase",
"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"
},
{
"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 | 19 |
2011-11-29T11:51:14Z
|
2021-09-09T00:28:28Z
|
2013-02-10T22:50:21Z
|
NONE
|
resolved
|
This: https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L375 would indicate that files passed in `files` are being read into memory in their entirety. This is likely to get pathological for large files; the underlying `poster` library supports streaming requests. The solution to this issue is probably related to #292.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/295/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/295/timeline
| null |
completed
| null | null | false |
[
"Correct. This is currently a bit of a fundamental limitation of the current architecture, but is something that I'd like to revisit on the longterm roadmap. \n\nRequests no longer utilizes Poster internally. \n\nI believe @mitsuhiko has some thoughts on this.\n",
"I see that this is planned. I just wanted to verify that this is definitely an issue with large files. I'm taking a look at poster for handling large uploads.\n",
"@kennethreitz, If I wanted to take a look at implementing this and contributing it to requests, where would you suggest I start. I don't want to step on any toes :).\n",
"Has anyone made any progress with this? I need this for a project where I'd like to use requests but need to handle large files. If there's anyway I can help out with getting something implemented, I'd be willing to contribute. If anyone knows of any work-around solutions (e.g., poster + requests) that would be good enough until requests handles this better, I'd be interested in that as well.\n",
"Ok, so this is something that's been bothering me as well (i've got use-cases involving posting large files, potentially multi-GB). So i took a crack at it.\n\nMy changes are based on the observation that, except for a couple of lines of code in models.py which read any files passed into ram, and the encode_multipart_formdata() function itself, everything else is happy with the files remaining as file objects. Particularly, the httplib backend is happy for body to be a file.\n\nThe complication of course is that we can't directly send the file as the entire body, but rather it must be framed by multipart/form-data boundaries and headers. My solution was creating a file-like class that stores its contents as fragments of the whole body. These fragments may be either strings (framing text, string fields) or file objects. When httplib ultimately tries to send it, it walks through its set of fragments, coalescing them into blocks of the size requested. No more than 8 KB of each file will be read at a time (the block size passed by httplib to read()).\n\nTechnically the change is to the urllib3 package, with a small change to models.py to take advantage of it.\n\nThe commit is 025427818703fb6c79ed14853789c1e7411aff36, although I can't say i'm particularly happy with it (hence no pull request). I'm feeling that i'm missing something and probably breaking code (although it passes the tests). Anyone got any ideas? Is this the sort of thing that should be fixed at an architectural level instead?\n",
"The bulk of your changes are in `urllib3`, so we should probably see if @shazow is interested in your changes. (NB: the reason the tests pass is because requests doesn't test `urllib3`. =D )\n",
"Yes and no. The encode_multipart_formdata() function is in urllib3, but the call to it is in requests in models.py (there's another call to it in urllib3, but that's unused by requests as far as i can see, as the body is already encoded by the time it gets that far). Requests is encoding the body before handing the request off to urllib3. It just happens to be reusing that function by importing it from urllib3. There's no reason they have to share the same copy of the function other than sanity. :)\n\nAnyway, i'm just pointing out that, in the case that @shazow doesn't want these sorts of changes in urllib3, the patch can be changed to move that functionality local to requests. Btw, does anyone know the reason why requests doesn't just hand off the unencoded files to urllib3 but rather encodes them itself?\n\nIn any case, i'm sort of only posting this as a \"could we do something like this?\" suggestion rather than a pull request. There's a few flaws in my approach that even I noticed. I don't really have enough knowledge of the code and all the interactions to make this change. It's also almost certainly a performance regression for small files.\n",
"So, the design decision that we came up with was to use iterators for streaming uploads.\n\nIf you provide a generator, for example, instead of a string for a response body, it'll be uploaded as a stream.\n\nThat's what urllib3 needs to support. \n",
"Yeah that sounds like a much more flexible approach. One thing i noticed implementing my version though is that if you don't send a content-length, httpbin.org won't parse the request properly, and i think a lot of other servers/web services will also break. And urllib3/httplib isn't going to be able to calculate the content-length if the body is an arbitrary generator right? So the calling code in requests will have to do that? Or use chunked encoding? Not a criticism, i'm just curious. :)\n\nI'm assuming this also means a move away from httplib? As far as i can see, that only allows the body to be a string or a file-like object.\n",
"I believe we'll have to do chunked encoding, yes.\n\nAs for httplib, @shazow would be a better person to ask ;)\n",
"See: https://github.com/shazow/urllib3/issues/51\n",
"Right, the approach you took is essentially the same as mine but using a separate multipart encoding generator and a file-like object to wrap around it, whereas i combined the two into a single object (sort of). Your approach is much nicer i think. One benefit of my approach though is that once you're in the middle of a large file, the call to read() from httplib is passed fairly directly to the underlying file, whereas in that implementation the reading from the underlying file and the read from httplib may be using mismatched blocks. which means a bunch of extra string concatenation and data always being left in leftover. It might be worth returning less data than requested by httplib once to sync up or something. Although my implementation has far too much string copying as well. The blocksizes involved in both seem a little wastefully small as well.\n\nAnyway, the last comment in that issue is 6 months old and appears to have died with you asking if they wanted to do it. Are you still looking for someone to do this, or have you already got a plan to do it yourself? If you are, what would be required before you'd accept a pull request? Specific approach? Lots of testing?\n\n(Apologies for posting this on the wrong project btw)\n",
"Don't think anyone is doing it. You're more than welcome to have at it. Requirements:\n1. Post in the right project. :)\n2. 100% unit test coverage.\n3. If possible, backwards-compatible changes. If not, then changes in as few places as possible.\n4. Consistent code style with the rest of the project (mostly PEP8).\n",
"Has there been any progress on this? We currently use poster + urllib2 for streaming uploads but having it built directly into requests would be much, much cleaner.\n",
"Just an update, this is entirely related to #952\n",
"Since streaming requests were finished in #952, I'm going to close this. If this is still a problem, let me know and I'll reopen it.\n",
"@sigmavirus24 \n\nI don't see how making it possible to stream a request by passing generator/iterator as `data` param's value could magically change how another part of api (`files` param) works.\n",
"@piotr-dobrogost I missed this [line](https://github.com/kennethreitz/requests/commit/ef8563a#L1R348) when I originally skimmed the commit. This is making me wonder how difficult streaming multipart file uploads could be.\n",
"I answered my own question: [RFC 2854](https://www.rfc-editor.org/rfc/rfc2854.txt). Now to get a cup of hot chocolate and a blanket to make consuming this document more enjoyable.\n"
] |
https://api.github.com/repos/psf/requests/issues/294
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/294/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/294/comments
|
https://api.github.com/repos/psf/requests/issues/294/events
|
https://github.com/psf/requests/pull/294
| 2,379,375 |
MDExOlB1bGxSZXF1ZXN0NTM2NzIz
| 294 |
Documentation fix: clarification of keep-alive behavior.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/136931?v=4",
"events_url": "https://api.github.com/users/berg/events{/privacy}",
"followers_url": "https://api.github.com/users/berg/followers",
"following_url": "https://api.github.com/users/berg/following{/other_user}",
"gists_url": "https://api.github.com/users/berg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/berg",
"id": 136931,
"login": "berg",
"node_id": "MDQ6VXNlcjEzNjkzMQ==",
"organizations_url": "https://api.github.com/users/berg/orgs",
"received_events_url": "https://api.github.com/users/berg/received_events",
"repos_url": "https://api.github.com/users/berg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/berg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/berg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/berg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-29T06:58:22Z
|
2021-09-08T13:06:02Z
|
2011-11-29T08:06:54Z
|
CONTRIBUTOR
|
resolved
|
The existing behavior was a little opaque for me--I was making a PUT request which returned a HTTP 204 with a 0-byte body. I was never reading the body and was wondering why my connections were not being reused.
Thanks so much for the requests library--we use it at App.net and absolutely love it. I threw away a big spaghetti'd-out mess of a homegrown urllib2 wrapper and haven't looked back.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/294/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/294/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/294.diff",
"html_url": "https://github.com/psf/requests/pull/294",
"merged_at": "2011-11-29T08:06:54Z",
"patch_url": "https://github.com/psf/requests/pull/294.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/294"
}
| true |
[
"That's for the kind words!\n\nThis is a great addition. Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/293
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/293/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/293/comments
|
https://api.github.com/repos/psf/requests/issues/293/events
|
https://github.com/psf/requests/issues/293
| 2,370,543 |
MDU6SXNzdWUyMzcwNTQz
| 293 |
Proxy authentication broken with 0.76 -> 0.83 upgrade.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/795033?v=4",
"events_url": "https://api.github.com/users/steinster/events{/privacy}",
"followers_url": "https://api.github.com/users/steinster/followers",
"following_url": "https://api.github.com/users/steinster/following{/other_user}",
"gists_url": "https://api.github.com/users/steinster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/steinster",
"id": 795033,
"login": "steinster",
"node_id": "MDQ6VXNlcjc5NTAzMw==",
"organizations_url": "https://api.github.com/users/steinster/orgs",
"received_events_url": "https://api.github.com/users/steinster/received_events",
"repos_url": "https://api.github.com/users/steinster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/steinster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/steinster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/steinster",
"user_view_type": "public"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 191274,
"name": "Contributor Friendly",
"node_id": "MDU6TGFiZWwxOTEyNzQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Contributor%20Friendly"
}
] |
closed
| true | null |
[] | null | 4 |
2011-11-28T17:25:20Z
|
2021-09-09T09:00:40Z
|
2012-03-31T07:16:31Z
|
NONE
|
resolved
|
Proxy authentication was possible in 0.76 using a string like "user:password@ip:port". In 0.83 I am getting the following error:
Traceback (most recent call last):
File "req.py", line 10, in <module>
print get('http://ipcheckit.com', proxies=p).content
File "build\bdist.win32\egg\requests\api.py", line 80, in get
File "build\bdist.win32\egg\requests\api.py", line 67, in request
File "build\bdist.win32\egg\requests\sessions.py", line 191, in request
File "build\bdist.win32\egg\requests\models.py", line 409, in send
File "build\bdist.win32\egg\requests\packages\urllib3\poolmanager.py", line 127, in proxy_from_url
File "build\bdist.win32\egg\requests\packages\urllib3\connectionpool.py", line 521, in connection_from_url
File "build\bdist.win32\egg\requests\packages\urllib3\connectionpool.py", line 497, in get_host
ValueError: invalid literal for int() with base 10: '(censored)@184.154.139.226:60099'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/293/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/293/timeline
| null |
completed
| null | null | false |
[
"This may be an unexpected side effect of @shazow's hated for the urlparse module :)\n",
"You are correct. :(\n\nI actually had a thought that @ would break my parsing last week but didn't get around to fixing it yet.\n\nSorry about this, I'll fix it this week. It's being tracked here: https://github.com/shazow/urllib3/issues/12\n\nIf everyone would prefer I switch to using urlparse proper, I'm willing to do that begrudgingly. :P\n",
"This specific case is fixed in https://github.com/shazow/urllib3/commit/e5c2c193a0a93f97202ad76749231723f8d60156\n",
"Fixed.\n"
] |
https://api.github.com/repos/psf/requests/issues/292
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/292/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/292/comments
|
https://api.github.com/repos/psf/requests/issues/292/events
|
https://github.com/psf/requests/issues/292
| 2,369,635 |
MDU6SXNzdWUyMzY5NjM1
| 292 |
Accept file-like objects as request data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/55050?v=4",
"events_url": "https://api.github.com/users/zacharyvoase/events{/privacy}",
"followers_url": "https://api.github.com/users/zacharyvoase/followers",
"following_url": "https://api.github.com/users/zacharyvoase/following{/other_user}",
"gists_url": "https://api.github.com/users/zacharyvoase/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zacharyvoase",
"id": 55050,
"login": "zacharyvoase",
"node_id": "MDQ6VXNlcjU1MDUw",
"organizations_url": "https://api.github.com/users/zacharyvoase/orgs",
"received_events_url": "https://api.github.com/users/zacharyvoase/received_events",
"repos_url": "https://api.github.com/users/zacharyvoase/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zacharyvoase/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zacharyvoase/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zacharyvoase",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-28T16:42:28Z
|
2021-09-09T07:05:21Z
|
2012-07-27T06:08:28Z
|
NONE
|
resolved
|
I'd like it to be possible to pass in a file-like object as the source of request data, provided `Content-Length` and `Content-Type` headers have been specified already. Here's an example of what I'd like to do:
```
response = requests.put(
'http://example.com/endpoint',
data=open('filename', 'rb'),
headers={
"Content-Type": "text/plain",
"Content-Length": os.stat('filename').st_size})
```
Alternatively, requests could even recognise that I've passed in a `file` object and perform an `os.fstat(file_like_obj.fileno())` automatically.
Here's the bit of code that seems to be breaking:
https://github.com/kennethreitz/requests/blob/c7b99f78192bdff62fad4f92039396c0dfbe4fb8/requests/models.py#L267
When I pass in an object that is neither a string nor a dictionary, the call to `dict()` fails.
I'm able and willing to work on this in a fork, I just figured it would be better to submit it as an issue first.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/292/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/292/timeline
| null |
completed
| null | null | false |
[
"Interesting. I see no reason why we couldn't support that.\n\nSupporting this everywhere would also force us to revisit the `files` parameter. Currently, it expects file-like objects. It should also accept bytes/unicode strings.\n",
"In this case, I'd imagine that the `files` parameter wouldn't even be used in `Request.send()`; by that point, the data could be put into one large file-like object with a computed `Content-Length`.\n"
] |
https://api.github.com/repos/psf/requests/issues/291
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/291/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/291/comments
|
https://api.github.com/repos/psf/requests/issues/291/events
|
https://github.com/psf/requests/issues/291
| 2,360,630 |
MDU6SXNzdWUyMzYwNjMw
| 291 |
models.Request.sent never set to `True`?
|
{
"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": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] |
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-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"
}
| 1 |
2011-11-27T16:16:40Z
|
2021-09-09T10:00:50Z
|
2011-11-27T16:29:58Z
|
CONTRIBUTOR
|
resolved
|
While dissecting the `models.Request.send()` method for unit testing I tried to find the path where `return self.sent` actually returns `True`. I `ack`-ed through the code but failed to find a path. Did I miss something or is it really never set?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/291/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/291/timeline
| null |
completed
| null | null | false |
[
"Yikes! Thanks for the catch.\n"
] |
https://api.github.com/repos/psf/requests/issues/290
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/290/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/290/comments
|
https://api.github.com/repos/psf/requests/issues/290/events
|
https://github.com/psf/requests/issues/290
| 2,355,061 |
MDU6SXNzdWUyMzU1MDYx
| 290 |
timeout not working?
|
{
"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"
}
|
[
{
"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 | 12 |
2011-11-26T11:46:59Z
|
2017-02-01T09:38:27Z
|
2011-12-19T05:25:42Z
|
NONE
| null |
It seems that timeouts are not working when the host cannot be reached. It appears that the standard socket timeout timeframe is being used (I get similar timings with timeouts via telnet to the same non listening host/port for example).
``` .python
>>> import logging
>>> logging.basicConfig(level=logging.DEBUG)
>>> import requests
>>> import time
>>> def callwithtime(callable, *args, **kwds):
... t1 = time.time()
... try:
... callable(*args, **kwds)
... except:
... pass
... t2 = time.time()
... print '%s took %0.3f ms' % (callable.func_name, (t2-t1)*1000.0)
...
>>> callwithtime(requests.get, 'http://1.1.1.1/foo.txt')
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 1.1.1.1
^Cget took 10215.639 ms
>>> callwithtime(requests.get, 'http://1.1.1.1/foo.txt', timeout=1)
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 1.1.1.1
WARNING:requests.packages.urllib3.connectionpool:Retrying (0 attempts remain) after connection broken by 'error(60, 'Operation timed out')': /foo.txt
get took 75865.529 ms
>>> callwithtime(requests.get, 'http://1.1.1.1/foo.txt', timeout=0.1)
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 1.1.1.1
WARNING:requests.packages.urllib3.connectionpool:Retrying (0 attempts remain) after connection broken by 'error(60, 'Operation timed out')': /foo.txt
get took 75441.546 ms
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/290/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/290/timeline
| null |
completed
| null | null | false |
[
"This should be causing a `ConnectionError`, but instead it just hangs. Very odd.\n",
"Does a timeout value need to be passed to HTTPConnection when you create one?\n\nhttps://github.com/kennethreitz/requests/blob/a76f4925b512b481375f0886a5b675d3e8522b34/requests/packages/urllib3/connectionpool.py#L151\n\nWhen I create an httpconnect object without passing timeout to it, it uses the default timeout for a new socket.\nYou are setting the timeout here: https://github.com/kennethreitz/requests/blob/a76f4925b512b481375f0886a5b675d3e8522b34/requests/packages/urllib3/connectionpool.py#L214\n\nBut that is after the connect attempt has already been made, but before reading. So it is more of a read timeout than a connection timeout.\n\nMaybe pass a timeout value on the _new_conn creation of an HTTPConnection?\n\nhttps://github.com/kennethreitz/requests/blob/a76f4925b512b481375f0886a5b675d3e8522b34/requests/packages/urllib3/connectionpool.py#L151\n\n``` .python\n>>> h = httplib.HTTPConnection('1.1.1.1', 80, timeout=1)\n>>> try:\n... h.request('GET', '/')\n... except Exception as e:\n... print e\n... \n## short wait here\ntimed out\n>>> \n>>> h = httplib.HTTPConnection('1.1.1.1', 80)\n>>> try:\n... h.request('GET', '/')\n... except Exception as e:\n... print e\n... \n### very long wait here\n[Errno 51] Network is unreachable\n```\n\nrelated code in [python httplib](http://hg.python.org/cpython/file/64fae6f7b64c/Lib/httplib.py#l754) module where timeout is set if passed to class [on init](http://hg.python.org/cpython/file/64fae6f7b64c/Lib/httplib.py#l681).\n",
"This seems to be partially fixed in shazow/urllib3#17.\n\nBut when calling `urlopen` in the `Request` class [here](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L437), there is a bug in the `urlopen` function that does not consider the `timeout` parameter when throwing the exception, causing a `TypeError`.\n\nI´ve created an issue and a pull request (shazow/urllib3#23) to get this fixed.\n",
"..and now it is merged in. Is there a strategy for merging in new changes from urllib3?\n",
"just updated it :)\n\nthe 'make deps' command pulls it in, for now. I'm technically a fork though, so use sparingly. \n",
"Aha, I see. Missed that detail. (-:\n\nTested the `timeout` parameter now, and it is working for me.\n",
"Excellent! I'll try to roll a release tonight.\n",
"great! :D\n",
"Released!\n",
"I'm experiencing this issue myself, but only when a DNS lookup is needed.\n\nUsing cactus's code above:\n\n```\ncallwithtime(requests.get, 'http://1.1.1.1/') # 75 seconds\ncallwithtime(requests.get, 'http://1.1.1.1/', timeout=1) # 1 second\ncallwithtime(requests.get, 'http://NOTREAL/') # 30 seconds\ncallwithtime(requests.get, 'http://NOTREAL/', timeout=1) # 13 seconds, INCORRECT\n```\n\nThe two requests requiring DNS lookups also output:\nWARNING:requests.packages.urllib3.connectionpool:Retrying (0 attempts remain) after connection broken by 'gaierror(8, 'nodename nor servname provided, or not known')': /\n",
"I'm seeing the same behaviour on v2.13.0.",
"@wanaryytel Please do not comment on old issues (this issue was originally opened in *2011*, more than five years ago) to suggest you are seeing vague problems like \"timeouts not working\". The last comment here was made almost five years ago, and any problem you are seeing now is going to be entirely unrelated to this one.\r\n\r\nIf you are having an issue, either look for newer issues that replicate your problem or open a new one.\r\n\r\nI should note, by the way, that \"I am seeing the same problem\" is using a few more words to say \"+1\", and is not hugely helpful. I highly recommend being a bit clearer about what problem you are seeing, and how you are triggering it. The more information you can give us, the more likely it is that you will see a resolution to your problem."
] |
https://api.github.com/repos/psf/requests/issues/289
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/289/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/289/comments
|
https://api.github.com/repos/psf/requests/issues/289/events
|
https://github.com/psf/requests/issues/289
| 2,355,022 |
MDU6SXNzdWUyMzU1MDIy
| 289 |
original errors get swallowed due to retries
|
{
"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 | 6 |
2011-11-26T11:28:28Z
|
2021-09-09T10:00:50Z
|
2011-11-26T15:49:59Z
|
NONE
|
resolved
|
specifically, hostname nonexistence is being swallowed in my case.
It looks like this is because a retry is always attempted if a conn is None in urlib3 (it appears), then after the second invocation the retry is aborted if tries is too large, and finally a max connection exception is thrown (losing the original exception)
``` .python
>>> import logging
>>> logging.basicConfig(level=logging.DEBUG)
>>> import requests
>>> r = requests.get('http://doesntexist.foo')
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): doesntexist.foo
WARNING:requests.packages.urllib3.connectionpool:Retrying (0 attempts remain) after connection broken by 'gaierror(8, 'nodename nor servname provided, or not known')': /
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "venv/lib/python2.6/site-packages/requests/api.py", line 78, in get
return request('get', url, **kwargs)
File "venv/lib/python2.6/site-packages/requests/api.py", line 65, in request
prefetch=prefetch
File "venv/lib/python2.6/site-packages/requests/sessions.py", line 191, in request
r.send(prefetch=prefetch)
File "venv/lib/python2.6/site-packages/requests/models.py", line 453, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: Max retries exceeded for url: /
>>>
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/289/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/289/timeline
| null |
completed
| null | null | false |
[
"note: the above output was generated testing against the current release version 0.8.2.\n",
"Is a `ConnectionError` not specific-enough?\n",
"I suppose it would be, but the message I get is about failing retries (even when retry is set to 0). I have no visibility at the api level into the actual cause (name not found). \n\nOn Nov 26, 2011, at 7:31 AM, Kenneth [email protected] wrote:\n\n> Is a `ConnectionError` not specific-enough?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/289#issuecomment-2882078\n",
"Hmm, I see what you're saying. I guess my perspective is the connection was either the issue or it wasn't ;)\n\nI'll see if I can at least add some more introspection.\n",
"I can certainly see your point too. It was certainly a type of connection error. ;)\nMy creating this ticket was because it was just a surprising departure from how the code used to behave, and seemed an unintentional one..\n\nDidn't it used to return a result object with the 'ok' attribute set to true or false, and an error object possibly present?\nI was using something like this with an earlier version (0.7.x maybe?)... A bit ugly but it was functional (provided a means to discern the underlying issue).\n\n``` .python\n resp = requests.get(\n url, headers=req_headers, timeout=2, allow_redirects=False,\n hooks={'pre_request': no_follow_redirect_hook})\n if resp.error:\n logging.debug('response error: %s', resp.error)\n if isinstance(resp.error, requests.exceptions.Timeout):\n raise HTTP504Exception('Timeout')\n elif isinstance(resp.error, urllib2.URLError):\n if hasattr(resp.error, 'reason') and \\\n isinstance(resp.error.reason, socket.gaierror):\n raise HTTP404Exception('Host name not found')\n```\n\nMy main use-case for knowing a bit more about the underlying connection error, is a proxy service scenario. Knowing the underlying problem can give insight into a proper http response code to the requesting client, as well as a friendly and hopefully helpful error message.\n\nI can certainly work around it and return a more generic message to the requesting clients, but I was wondering if this was an intended change to error handling or an unforeseen one due to the urllib3 code. \n\nThanks.\n",
"Yes, it was absolutely an intended change — mostly due to the multitude of requests that were made by the community.\n\nThere's a `safe_mode` parameter that will surpress the errors, as before.\n\nHere's the docs on the new exceptions: http://docs.python-requests.org/en/latest/user/quickstart/#errors-and-exceptions\n"
] |
https://api.github.com/repos/psf/requests/issues/288
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/288/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/288/comments
|
https://api.github.com/repos/psf/requests/issues/288/events
|
https://github.com/psf/requests/pull/288
| 2,346,287 |
MDExOlB1bGxSZXF1ZXN0NTI3ODAz
| 288 |
Add use_session argument to request method.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/120119?v=4",
"events_url": "https://api.github.com/users/sharat87/events{/privacy}",
"followers_url": "https://api.github.com/users/sharat87/followers",
"following_url": "https://api.github.com/users/sharat87/following{/other_user}",
"gists_url": "https://api.github.com/users/sharat87/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sharat87",
"id": 120119,
"login": "sharat87",
"node_id": "MDQ6VXNlcjEyMDExOQ==",
"organizations_url": "https://api.github.com/users/sharat87/orgs",
"received_events_url": "https://api.github.com/users/sharat87/received_events",
"repos_url": "https://api.github.com/users/sharat87/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sharat87/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sharat87/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sharat87",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2011-11-25T03:18:59Z
|
2021-09-08T13:06:00Z
|
2011-11-26T04:04:24Z
|
CONTRIBUTOR
|
resolved
|
This allows usage of an existing session to make a request with the request and the get, post etc. function.
I made this so that it is easier to create async requests with pre-existing sessions. Currently, we have to do
```
async.map([my_session.get(url, return_response=False, prefetch=True) for url in urls])
```
I got the `return_response` and `prefetch` arguments from inspecting the source of async module. This isn't very pleasant.
With the proposed simple change in this pull request, one can do
```
async.map([async.get(url, use_session=my_session) for url in urls])
```
which feels more natural.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/288/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/288/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/288.diff",
"html_url": "https://github.com/psf/requests/pull/288",
"merged_at": "2011-11-26T04:04:24Z",
"patch_url": "https://github.com/psf/requests/pull/288.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/288"
}
| true |
[
"Thanks! I've been thinking of this lately myself. \n\nCan you change from `user_session` to `session` ?\n",
"That's what I initially did, but that would mean changing the session's import. Ok with that?\n",
"That's fine ;)\n\n## \n\nKenneth Reitz\n\nOn Nov 25, 2011, at 12:04 AM, Shrikant Sharat [email protected] wrote:\n\n> That's what I initially did, but that would mean changing the session's import. Ok with that?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/288#issuecomment-2871395\n",
"Done. Thanks a lot Kenneth :)\n",
"Thanks a ton!\n"
] |
https://api.github.com/repos/psf/requests/issues/287
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/287/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/287/comments
|
https://api.github.com/repos/psf/requests/issues/287/events
|
https://github.com/psf/requests/pull/287
| 2,346,115 |
MDExOlB1bGxSZXF1ZXN0NTI3NzQz
| 287 |
Allow generators or any iterators for async.map
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/120119?v=4",
"events_url": "https://api.github.com/users/sharat87/events{/privacy}",
"followers_url": "https://api.github.com/users/sharat87/followers",
"following_url": "https://api.github.com/users/sharat87/following{/other_user}",
"gists_url": "https://api.github.com/users/sharat87/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sharat87",
"id": 120119,
"login": "sharat87",
"node_id": "MDQ6VXNlcjEyMDExOQ==",
"organizations_url": "https://api.github.com/users/sharat87/orgs",
"received_events_url": "https://api.github.com/users/sharat87/received_events",
"repos_url": "https://api.github.com/users/sharat87/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sharat87/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sharat87/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sharat87",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-25T02:20:07Z
|
2021-09-08T23:08:16Z
|
2011-11-26T15:09:38Z
|
CONTRIBUTOR
|
resolved
|
Hey Kenneth,
If I call `async.map` this way
```
async.map(async.get(u) for u in urls)
```
I get an empty list as the list of responses. But it works if I do
```
async.map([async.get(u) for u in urls])
```
The proposed change fixes this.
If in case, this kind of usage is not intended, i.e., if only a list has to be passed to the `async.map` function, please make it clear in the documentation. Currently it says "A _collection_ of Requests objects" which does not necessarily imply a _list_.
Thanks.
Note: I just hacked up a simple solution in the github editor, you might want to ignore it and fix it up your style :)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/287/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/287/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/287.diff",
"html_url": "https://github.com/psf/requests/pull/287",
"merged_at": "2011-11-26T15:09:38Z",
"patch_url": "https://github.com/psf/requests/pull/287.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/287"
}
| true |
[
":cake: \n\nThanks a ton!\n"
] |
https://api.github.com/repos/psf/requests/issues/286
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/286/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/286/comments
|
https://api.github.com/repos/psf/requests/issues/286/events
|
https://github.com/psf/requests/issues/286
| 2,332,498 |
MDU6SXNzdWUyMzMyNDk4
| 286 |
Session Cookie doublequotes bug
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/173095?v=4",
"events_url": "https://api.github.com/users/benmao/events{/privacy}",
"followers_url": "https://api.github.com/users/benmao/followers",
"following_url": "https://api.github.com/users/benmao/following{/other_user}",
"gists_url": "https://api.github.com/users/benmao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benmao",
"id": 173095,
"login": "benmao",
"node_id": "MDQ6VXNlcjE3MzA5NQ==",
"organizations_url": "https://api.github.com/users/benmao/orgs",
"received_events_url": "https://api.github.com/users/benmao/received_events",
"repos_url": "https://api.github.com/users/benmao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benmao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benmao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benmao",
"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 | 11 |
2011-11-23T17:47:01Z
|
2021-09-09T10:00:40Z
|
2012-01-30T06:15:36Z
|
NONE
|
resolved
|
test code:
``` Python
from requests import session
with session() as c:
c.get('http://www.baidu.com')
#should have cookie headers
c.get('http://www.baidu.com')
```
Server:
``` Python
Set-Cookie: BAIDUID=DC1510722CF5A19A2A4C4E4DB720C5D4:FG=1; expires=Wed, 23-Nov-41 17:44:00 GMT; path=/; domain=.baidu.com
```
Client:
``` Python
Cookie: BAIDUID="DC1510722CF5A19A2A4C4E4DB720C5D4:FG=1"
```
The correct result should be:
``` Python
Cookie: BAIDUID=DC1510722CF5A19A2A4C4E4DB720C5D4:FG=1
```
quote function
``` Python
def _quote(str, LegalChars=_LegalChars,
idmap=_idmap, translate=string.translate):
#
# If the string does not need to be double-quoted,
# then just return the string. Otherwise, surround
# the string in doublequotes and precede quote (with a \)
# special characters.
#
if "" == translate(str, idmap, LegalChars):
return str
else:
return '"' + _nulljoin( map(_Translator.get, str, str) ) + '"'
# end _quote
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/173095?v=4",
"events_url": "https://api.github.com/users/benmao/events{/privacy}",
"followers_url": "https://api.github.com/users/benmao/followers",
"following_url": "https://api.github.com/users/benmao/following{/other_user}",
"gists_url": "https://api.github.com/users/benmao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benmao",
"id": 173095,
"login": "benmao",
"node_id": "MDQ6VXNlcjE3MzA5NQ==",
"organizations_url": "https://api.github.com/users/benmao/orgs",
"received_events_url": "https://api.github.com/users/benmao/received_events",
"repos_url": "https://api.github.com/users/benmao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benmao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benmao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benmao",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/286/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/286/timeline
| null |
completed
| null | null | false |
[
"It's because `:` is not regarded as legal character according to\n `_LegalChars = string.ascii_letters + string.digits + \"!#$%&'*+-.^_`|~[]_\"`\ndeclaration. Do you think it should be regarded as legal? Can you quote specification?\n",
"urllib2 with CookieJia works.\nWeb server can not get the cookie which requests send like this.\n\nYou can test it.\n",
"Yes, I use Chalers to observe the http header.\n",
"Yes, I use wireshark, It wokrs.\nStrange ah.\n",
"Sorry, I have commented the _quote function, so there is still a problem.\n",
"Format of cookies is defined in RFC 2109. In section 4.1 value part of cookie is defined as `token | quoted-string`. `token` is defined in section 2.2 of RFC 2068 as `1*<any CHAR except CTLs or tspecials>` and _tspecials_ are defined as `tspecials = \"(\" | \")\" | \"<\" | \">\" | \"@\" | \",\" | \";\" | \":\" | \"\\\" | <\"> | \"/\" | \"[\" | \"]\" | \"?\" | \"=\" | \"{\" | \"}\" | SP | HT`. According to this `:` is a special character and any cookie's value with this character should be quoted. The behavior of Requests which you observe is in line with the specification. It's worth noting that as every cookie's value can be quoted the server should accept any such cookie. Btw. `[` and `]` are special so they should be absent from `_LegalChars`'s value I guess but it's a question to @kennethreitz\n",
"I think the cookie value should not be handled this way.\n\nFirefox post header\n\n``` Python\nCookie: BAIDUID=F91F6B66270A04AC62CF28612B5F1CFA:FG=1\n```\n",
"Visiting `http://httpbin.org/cookies/set/BAIDUID/7F6CA76A7A24F81BB1A6D40FB6080A05:FG=1` in Firefox 8.0.1 results in the `Set-Cookie: BAIDUID=\"7F6CA76A7A24F81BB1A6D40FB6080A05:FG=1\"; Path=/` in the response and subsequent request to `http://httpbin.org/cookies` has this header `Cookie: BAIDUID=\"7F6CA76A7A24F81BB1A6D40FB6080A05:FG=1\"`. It looks like Firefox keeps and sends the original form of the cookie it receives. That being said it's just how this particular UA works and Borland Web Server (BWS/1.0) is broken in respect to handling quoted cookies if it\n\n> (...) can not get the cookie which requests send like this.\n",
"Yes, so I think Requests should do like Firefox.\n",
"Some server doesn't accept quoted cookie, it is annoying.\nAt least, requests should provide an option/flag to whether to quote cookie.\n",
"This issue burned me too. I got a session cookie with a colon and the server choked on the quotes requests.py was using.\n\nFor multiple requests through the same session, it seems like you could remember how the cookie was encoded and preserve that. For letting users easily specify the behaviour they want when they're passing cookies themselves, I have no idea.\n\nMy solution was to encode the cookie header myself, which wasn't too bad because there was only the one cookie to pass.\n"
] |
https://api.github.com/repos/psf/requests/issues/285
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/285/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/285/comments
|
https://api.github.com/repos/psf/requests/issues/285/events
|
https://github.com/psf/requests/issues/285
| 2,327,462 |
MDU6SXNzdWUyMzI3NDYy
| 285 |
Requests don't allow multiple files for a key
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/617482?v=4",
"events_url": "https://api.github.com/users/obukhov-sergey/events{/privacy}",
"followers_url": "https://api.github.com/users/obukhov-sergey/followers",
"following_url": "https://api.github.com/users/obukhov-sergey/following{/other_user}",
"gists_url": "https://api.github.com/users/obukhov-sergey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/obukhov-sergey",
"id": 617482,
"login": "obukhov-sergey",
"node_id": "MDQ6VXNlcjYxNzQ4Mg==",
"organizations_url": "https://api.github.com/users/obukhov-sergey/orgs",
"received_events_url": "https://api.github.com/users/obukhov-sergey/received_events",
"repos_url": "https://api.github.com/users/obukhov-sergey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/obukhov-sergey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/obukhov-sergey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/obukhov-sergey",
"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 | 8 |
2011-11-23T08:11:59Z
|
2021-09-09T06:00:43Z
|
2012-09-21T22:35:17Z
|
NONE
|
resolved
|
We are a startup developing a programmable email platform and we love using Requests.
However we have encountered a problem recently.
Our API tends to send data in key value pairs where a key could have multiple values.
In order to do so we used multi dictionary and it worked pretty well with Requests 0.7.5.
But with new versions of Requests e.g. 0.8.2 it looks like we won't be able to do that.
The problem is that data structures to store 'params', 'data' and 'files' are explicitly set to be dictionaries.
For 'params' and 'data' we could use a list of values for a key but it won't work for 'files'.
I don't know what the mentioned changes in Requests are based on but
is there a chance that the situation would change regarding multi valued keys?
Any advise regarding the issue?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/285/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/285/timeline
| null |
completed
| null | null | false |
[
"This applies to any HTTP request in general: multiple values for a single key must be allowed, not just file uploads.\n",
"@mailgun Multiple values for singe key **are** allowed. See [`test_urlencoded_post_query_multivalued_and_data`](https://github.com/kennethreitz/requests/blob/develop/test_requests.py#L390)\n",
"So the problem exists only for uploaded files? \n",
"This appears to be a bug in the file upload logic. I'll investigate.\n",
"Thanks!\n\nOn Sat, 26 Nov 2011 07:33:24 -0800\nKenneth Reitz\[email protected]\nwrote:\n\n> This appears to be a bug in the file upload logic. I'll investigate.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/285#issuecomment-2882085\n",
"My pull request was rejected. https://github.com/kennethreitz/requests/pull/422#issuecomment-4058039\nI'm going to submit a new issue for urllib3.\n",
"Now the urllib3's encode_multipart_formdata function supports the list of tuples. Could you please take in the latest urllib3 and then modify like this patch?\n\n```\ndiff --git a/requests/models.py b/requests/models.py\nindex 8368c9f..ca7d0b2 100644\n--- a/requests/models.py\n+++ b/requests/models.py\n@@ -404,11 +404,6 @@ class Request(object):\n if self.files:\n if not isinstance(self.data, str):\n\n- try:\n- fields = self.data.copy()\n- except AttributeError:\n- fields = dict(self.data) \n-\n for (k, v) in list(self.files.items()):\n # support for explicit filename\n if isinstance(v, (tuple, list)):\n@@ -416,9 +411,9 @@ class Request(object):\n else:\n fn = guess_filename(v) or k\n fp = v\n- fields.update({k: (fn, fp.read())})\n+ self.data.append((k: (fn, fp.read())))\n\n- (body, content_type) = encode_multipart_formdata(fields)\n+ (body, content_type) = encode_multipart_formdata(self.data)\n else:\n pass\n # TODO: Conflict?\n```\n",
"Is this fixed now that #179 has been resolved?\n"
] |
https://api.github.com/repos/psf/requests/issues/284
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/284/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/284/comments
|
https://api.github.com/repos/psf/requests/issues/284/events
|
https://github.com/psf/requests/issues/284
| 2,303,319 |
MDU6SXNzdWUyMzAzMzE5
| 284 |
Support passing data and params in ordered dict
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2011-11-21T10:38:12Z
|
2021-09-09T10:00:51Z
|
2011-11-26T15:53:59Z
|
NONE
|
resolved
|
Order of multiple params with the same name is important. To support sending such requests there should be an option to pass data and params in ordered dict (and then keep the ordering when building request of course).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/284/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/284/timeline
| null |
completed
| null | null | false |
[
"Item sequences will be supported everywhere soon (e.g. `[('name', 'kennethreitz'), ('key', 'value')]`\n",
"It has to be supported in urllib3 then, right?\n",
"urllib3 is, as always, a non-issue.\n",
"> Item sequences will be supported everywhere soon (e.g. `[('name', 'kennethreitz'), ('key', 'value')]`\n\nWell this would allow for ordering of arbitrary items, yes. What I need is multivalued param in body and as far as I can see `Request._encode_params` supports this and is used not only for query params but for data as well (`self.data, self._enc_data = self._encode_params(data)`). The name is a bit misleading as it suggests it's being used only for query parameters.\n",
"Closing for #179\n"
] |
https://api.github.com/repos/psf/requests/issues/283
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/283/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/283/comments
|
https://api.github.com/repos/psf/requests/issues/283/events
|
https://github.com/psf/requests/pull/283
| 2,291,742 |
MDExOlB1bGxSZXF1ZXN0NTEyMTk1
| 283 |
Display full URL when logging.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/198537?v=4",
"events_url": "https://api.github.com/users/rgieseke/events{/privacy}",
"followers_url": "https://api.github.com/users/rgieseke/followers",
"following_url": "https://api.github.com/users/rgieseke/following{/other_user}",
"gists_url": "https://api.github.com/users/rgieseke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rgieseke",
"id": 198537,
"login": "rgieseke",
"node_id": "MDQ6VXNlcjE5ODUzNw==",
"organizations_url": "https://api.github.com/users/rgieseke/orgs",
"received_events_url": "https://api.github.com/users/rgieseke/received_events",
"repos_url": "https://api.github.com/users/rgieseke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rgieseke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rgieseke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rgieseke",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-20T09:21:13Z
|
2021-09-08T13:06:00Z
|
2011-11-26T15:10:08Z
|
CONTRIBUTOR
|
resolved
|
Logging should display the query string as well, shouldn't it?
Test script:
``` python
import requests
import sys
my_config = {'verbose': sys.stderr}
my_params = {'q': 'test'}
r = requests.get('http://www.google.de/search', params=my_params, config=my_config)
```
Before:
`2011-11-20T10:13:37.502444 GET http://www.google.de/search`
After:
`2011-11-20T10:14:02.652295 GET http://www.google.de/search?q=test`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/283/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/283/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/283.diff",
"html_url": "https://github.com/psf/requests/pull/283",
"merged_at": "2011-11-26T15:10:08Z",
"patch_url": "https://github.com/psf/requests/pull/283.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/283"
}
| true |
[
"I agree — thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/282
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/282/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/282/comments
|
https://api.github.com/repos/psf/requests/issues/282/events
|
https://github.com/psf/requests/issues/282
| 2,289,237 |
MDU6SXNzdWUyMjg5MjM3
| 282 |
Response.encoding should be available, overridable.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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-11-19T18:15:02Z
|
2021-09-09T11:00:47Z
|
2011-11-19T21:13:19Z
|
CONTRIBUTOR
|
resolved
|
- Japanese websites specify the incorrect charset.
- `r.content` would decode as accessed. only raw response will be cached.
- Exclude compression.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/282/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/282/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/281
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/281/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/281/comments
|
https://api.github.com/repos/psf/requests/issues/281/events
|
https://github.com/psf/requests/issues/281
| 2,289,196 |
MDU6SXNzdWUyMjg5MTk2
| 281 |
Cookies need to be CookieJar-backed again.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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 | 39 |
2011-11-19T17:59:54Z
|
2021-09-09T09:00:31Z
|
2012-05-04T01:59:43Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/376448?v=4",
"events_url": "https://api.github.com/users/slingamn/events{/privacy}",
"followers_url": "https://api.github.com/users/slingamn/followers",
"following_url": "https://api.github.com/users/slingamn/following{/other_user}",
"gists_url": "https://api.github.com/users/slingamn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/slingamn",
"id": 376448,
"login": "slingamn",
"node_id": "MDQ6VXNlcjM3NjQ0OA==",
"organizations_url": "https://api.github.com/users/slingamn/orgs",
"received_events_url": "https://api.github.com/users/slingamn/received_events",
"repos_url": "https://api.github.com/users/slingamn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/slingamn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/slingamn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/slingamn",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/281/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/281/timeline
| null |
completed
| null | null | false |
[
"Why?\n",
"k/v only doesn't account for same keys with different paths.\n",
"So you're gonna use [kennethreitz/oreos](http://github.com/kennethreitz/oreos) then?\n",
"We'll see :)\n",
"Why was this issue closed? I'm having problems with exactly this at the moment. As it is requests can not handle cookies across multiple domains.\n\nThere isn't really a good way to subclass Request or Response, so I ended up patching requests with a modified version of CookieJar that has a partial dict interface. It's not perfect, but at least I am able to take advantage of the many specifics that cookielib handles when deciding whether or not to send a cookie. The Cookie module (which you have patched in oreos), though cleaner than cookielib, contains none of that logic.\n\nI should note also that urllib3 appears to parse headers incorrectly. I had to dig down to the httplib and rfc822 level in order to get a properly parsed cookie header.\n\nIf you think this would be useful, I should be able to share my changes.\n",
"I would love to see the code! Issue is closed because I can't do until later :)\n",
"You can find my changes at https://github.com/dhagrow/requests\n\nYou'll notice I'm using wrappers around requests.Request/Response to work with cookielib. An alternative would be to include a cookielib that's been patched to use requests.\n",
"Is there an official mechanism for interoperating with persistent `FileCookieJar`s?\n\nI wrote tests for using the functions in `requests.utils` to do it:\n\nhttps://github.com/slingamn/requests/compare/lwpcookiejar\n\nbut they fail:\n\n```\n[shivaram@good-fortune ~/workspace/requests/tests]$ python ./test_cookiejars.py \nFF\n======================================================================\nFAIL: test_cookiejar_persistence (__main__.LWPCookieJarTest)\nTest that we can save cookies to a FileCookieJar.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"./test_cookiejars.py\", line 42, in test_cookiejar_persistence\n self.assertEqual(requests.utils.dict_from_cookiejar(cookiejar_2), {'key', 'value'})\nAssertionError: {} != set(['key', 'value'])\n\n======================================================================\nFAIL: test_cookiejar_persistence (__main__.MozCookieJarTest)\nTest that we can save cookies to a FileCookieJar.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"./test_cookiejars.py\", line 42, in test_cookiejar_persistence\n self.assertEqual(requests.utils.dict_from_cookiejar(cookiejar_2), {'key', 'value'})\nAssertionError: {} != set(['key', 'value'])\n\n----------------------------------------------------------------------\nRan 2 tests in 1.207s\n\nFAILED (failures=2)\n```\n\nBTW this library is gorgeous!\n",
"Thanks!\n\nI'll add it back in eventually :)\n",
"Are you interested in pull requests (possibly based on dhagrow's work) that implement this?\n",
"I wasn't aware of this.\n\nrequests' cookie handling has many issues (no security at all: shares cookies between domains, does not handle expiration or secure cookies), and I had to use https://github.com/sashahart/cookies in order to have decent cookie parsing. It passed almost all my tests (for some reason it stripped the '.' before domains) and its API is very clean.\nI ruled out using cookielib either, as the codebase is pretty outdated, and the cost of using wrappers or altering it seemed too high.\n\nI implemented a simple cookie jar which works with requests and Cookies:\nhttps://github.com/laurentb/weboob/tree/browser2/weboob/tools/browser2\nWhile it isn't used yet by the project, it already has many tests.\n\nCurrently to use it I have to erase the Session cookies on requests (because it tries to merge them with the provided cookies), and replace requests' redirect handling by my own (because hooks aren't called on each redirected request).\n\nMy implementation does a bit more than strictly required, i.e. a simpler CookiePolicy could be used.\n\nMaybe a good step could be to use Cookies instead of \"oreos\" and allow cookie handling to be delegated.\n",
"It would be very useful to have good support for cookies - https://github.com/sashahart/cookies looks nice.\n",
"Just my two cents, but I would much rather have either\n1. Support for standard-library `cookielib`\n2. Support for a correct and robust cookie library maintained by kennethreitz himself and tied to the `requests` project\n\nrather than an external cookie library that seems to have no real community and only one maintainer.\n",
"1. That's how it used to be, but it was removed to speed up the urllib3 transition. Would love to have have it back.\n2. That's what oreos' intension is. Right now, it's just a lazy monkeypatch for cookielib though.\n\nI'd rather do #1 if we can get away with it easily w/o urllib2.\n",
"This is a rebase of dhagrow's patches on top of `develop`:\n\nhttps://github.com/slingamn/requests/tree/dhagrow\n\nDoes anyone know how close it is to being finished? It seems mostly right.\n",
"If the answer to that question is \"it's not clear\", tell me and I can puzzle over it on your behalf :-)\n\nWe could also ping dhagrow himself.\n",
"@slingamn\n\nFrom https://github.com/sashahart/cookies\n\n> This doesn't compete with the cookielib (http.cookiejar) module in the Python standard library, which is specifically\n> for implementing cookie storage and similar behavior in an HTTP client such as a browser.\n\nAs to\n\n> rather than an external cookie library that seems to have no real community and only one maintainer.\n\nI wouldn't judge based on community's size or number of maintainers. Wouldn't Requests community become this library's community the moment Request starts using it?\n",
"Just because we can doesn't mean we should. I don't want to maintain a cookie library :)\n",
"@piotr-dobrogost \n\nI actually need cookie storage for my use case. Support for `LWPCookieJar` would be ideal. Cookies are persistent by nature; it seems arbitrary to have a cookie library that can only persist cookies across the lifetime of a single Python process.\n\nAlso, what would the relationship of `cookies` be to `requests` exactly? `cookies` doesn't necessarily seem stable or mature enough to warrant a formal dependency on it as an external library. But the alternative to that is forking it and maintaining it inside the `requests` tree, which seems drastic (even assuming license-compatibility).\n",
"I guess some of these 299 people who forked Requests would help you :)\nYou already created library dealing with cookies; have you created it with the plan to not maintain it? :)\n",
"The module is practically non-existant. I'd be very happy to use the well-tested standard library modules if they're appropriate.\n",
"@kennethreitz \n\nWhat do you mean by _The module is practically non-existant._?\n",
"Oreos isn't an effort.\n",
"OK, I'll plan to look at dhagrow's branch, hopefully relatively soon.\n\nHe's presumably still subscribed to this thread, so I guess this counts as contacting him :-)\n",
"@dhagrow poke, people are interested in your work :-)\n",
"I've tested Python's cookie parsing, oreos, and Cookies.\n\nIt's the only one that correctly parses multiple cookies in one Set-Cookie:, and recognizes and parses all attributes, including a lot of weird cases. My only issue with it is that it removes the starting '.' from the domain entry if it's there; which is easy to overcome but requires monkeypatching at least for now.\n\nIt might not be _popular_, but it's still the only one that does not fail, and it has a lot of tests.\n\nA CookieJar isn't something very complicated to implement — mine is less than 100 lines of code, most of my cookiejar.py is added policies and comments. As long as you have proper cookie objects with a good API.\n\nI quickly looked at dhagrow's branch, and it does not seem to handle cookies in redirects properly — the cookie of the original request are always sent for the next request. I'm positively surprised though, using mock objects seems to require far less code than I thought. But as I said, it's not like the CookieJar is the hard part, and cookielib focuses on RFCs no one uses (sadly, it seems to be a common trend with web browsers, like GET after 302).\n",
"@laurentb \n\nCan you provide a test such that `cookielib` has the incorrect behavior and `Cookies` has the right one?\n\nThere's still the issue with `Cookies` not supporting persistence to files.\n",
"Sorry, I've been away on business. I haven't looked too much at sashahart's `cookies`, but as far as I know `cookielib` is the only complete implementation of client-side cookie handling for Python. `Cookies` has a much nicer interface for accessing cookies, but has none of the logic for whether or not a client should send a particular set of cookies. As laurentb mentions, a lot of the `cookielib` functionality is not often used, but certain important bits are, especially the code which handles the valid domains and paths for a cookie.\n\n`cookielib` is not a very pretty module, and it is written very specifically around the `urllib`/`urllib2` modules, so ideally it should be replaced by something a little cleaner and more modular. But, practically speaking, until someone is willing to put forth the effort to write and maintain such a library, `cookielib` is available and it works. That's why I went with the option to write mock `urllib` objects to pass into `cookielib`. The one part that I know is missing in my patch is correct handling of cookies in redirects, as laurentb mentions. That would require some changes on the `requests` end of things to support adding headers to a request that should not be sent in a redirect.\n\nAs I mentioned in one of my original posts, another option is to patch `cookielib` to use `requests` objects. That would not be very difficult, and for the eventual possibility of including `requests` in the stdlib, might be the preferable option. Unfortunately my own work does not currently allow me the time to do much more work on this than I have already done. So unless that changes or I find some free time to do it, it will be up to someone else to look at.\n",
"@dhagrow Thanks very much! I will look into updating your branch.\n",
"Can someone clarify the expected relationship between `request.cookies` and `request.session.cookies`? I'm thinking of eliminating the first in favor of the second.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/280
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/280/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/280/comments
|
https://api.github.com/repos/psf/requests/issues/280/events
|
https://github.com/psf/requests/pull/280
| 2,285,560 |
MDExOlB1bGxSZXF1ZXN0NTEwNDU4
| 280 |
Updated docs with an example of explicit filename in file uploads section
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4",
"events_url": "https://api.github.com/users/rmax/events{/privacy}",
"followers_url": "https://api.github.com/users/rmax/followers",
"following_url": "https://api.github.com/users/rmax/following{/other_user}",
"gists_url": "https://api.github.com/users/rmax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rmax",
"id": 26015,
"login": "rmax",
"node_id": "MDQ6VXNlcjI2MDE1",
"organizations_url": "https://api.github.com/users/rmax/orgs",
"received_events_url": "https://api.github.com/users/rmax/received_events",
"repos_url": "https://api.github.com/users/rmax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rmax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rmax",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-18T22:58:43Z
|
2021-09-08T13:05:59Z
|
2011-11-19T05:26:08Z
|
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/280/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/280/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/280.diff",
"html_url": "https://github.com/psf/requests/pull/280",
"merged_at": "2011-11-19T05:26:08Z",
"patch_url": "https://github.com/psf/requests/pull/280.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/280"
}
| true |
[
"Awesome, thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/279
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/279/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/279/comments
|
https://api.github.com/repos/psf/requests/issues/279/events
|
https://github.com/psf/requests/pull/279
| 2,285,513 |
MDExOlB1bGxSZXF1ZXN0NTEwNDQw
| 279 |
use session's hooks as defaults for every requests.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4",
"events_url": "https://api.github.com/users/rmax/events{/privacy}",
"followers_url": "https://api.github.com/users/rmax/followers",
"following_url": "https://api.github.com/users/rmax/following{/other_user}",
"gists_url": "https://api.github.com/users/rmax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rmax",
"id": 26015,
"login": "rmax",
"node_id": "MDQ6VXNlcjI2MDE1",
"organizations_url": "https://api.github.com/users/rmax/orgs",
"received_events_url": "https://api.github.com/users/rmax/received_events",
"repos_url": "https://api.github.com/users/rmax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rmax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rmax",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-11-18T22:53:41Z
|
2021-09-08T13:05:59Z
|
2011-11-19T05:26:11Z
|
CONTRIBUTOR
|
resolved
|
Current Session class allows to set a parameter hooks, but this parameter is not used in requests.
This change fixes that by using Session's hooks as defaults for every requests, letting override per request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/279/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/279/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/279.diff",
"html_url": "https://github.com/psf/requests/pull/279",
"merged_at": "2011-11-19T05:26:11Z",
"patch_url": "https://github.com/psf/requests/pull/279.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/279"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/278
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/278/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/278/comments
|
https://api.github.com/repos/psf/requests/issues/278/events
|
https://github.com/psf/requests/pull/278
| 2,285,234 |
MDExOlB1bGxSZXF1ZXN0NTEwMzMz
| 278 |
use session's hooks as defaults for every requests.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4",
"events_url": "https://api.github.com/users/rmax/events{/privacy}",
"followers_url": "https://api.github.com/users/rmax/followers",
"following_url": "https://api.github.com/users/rmax/following{/other_user}",
"gists_url": "https://api.github.com/users/rmax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rmax",
"id": 26015,
"login": "rmax",
"node_id": "MDQ6VXNlcjI2MDE1",
"organizations_url": "https://api.github.com/users/rmax/orgs",
"received_events_url": "https://api.github.com/users/rmax/received_events",
"repos_url": "https://api.github.com/users/rmax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rmax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rmax",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-18T22:21:56Z
|
2021-09-08T13:05:58Z
|
2011-11-18T22:52:17Z
|
CONTRIBUTOR
|
resolved
|
Current `Session` class allows to set a parameter `hooks`, but this parameter is not used in requests.
This change fixes that by using `Session`'s hooks as defaults for every requests, letting override per request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4",
"events_url": "https://api.github.com/users/rmax/events{/privacy}",
"followers_url": "https://api.github.com/users/rmax/followers",
"following_url": "https://api.github.com/users/rmax/following{/other_user}",
"gists_url": "https://api.github.com/users/rmax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rmax",
"id": 26015,
"login": "rmax",
"node_id": "MDQ6VXNlcjI2MDE1",
"organizations_url": "https://api.github.com/users/rmax/orgs",
"received_events_url": "https://api.github.com/users/rmax/received_events",
"repos_url": "https://api.github.com/users/rmax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rmax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rmax",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/278/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/278/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/278.diff",
"html_url": "https://github.com/psf/requests/pull/278",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/278.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/278"
}
| true |
[
"messed up pull request. I'll repeat again.\n"
] |
https://api.github.com/repos/psf/requests/issues/277
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/277/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/277/comments
|
https://api.github.com/repos/psf/requests/issues/277/events
|
https://github.com/psf/requests/pull/277
| 2,273,536 |
MDExOlB1bGxSZXF1ZXN0NTA1OTUx
| 277 |
some additions to .gitignore
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-11-17T20:46:58Z
|
2021-09-08T13:05:58Z
|
2011-11-17T21:05:51Z
|
NONE
|
resolved
|
added Eclipse project files and .egg-info dir
entries sorted alphabetically (case-insensitive)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/277/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/277/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/277.diff",
"html_url": "https://github.com/psf/requests/pull/277",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/277.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/277"
}
| true |
[
"I'll add the `.egg-info`, but not the ecplise files. Those belong in your [global gitignore](http://help.github.com/ignore-files/) :)\n",
"So what's `.idea` entry doing there?\n",
"It should absolutely be removed :)\n",
"Global gitignore wasn't known when I started this :)\n"
] |
https://api.github.com/repos/psf/requests/issues/276
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/276/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/276/comments
|
https://api.github.com/repos/psf/requests/issues/276/events
|
https://github.com/psf/requests/pull/276
| 2,267,845 |
MDExOlB1bGxSZXF1ZXN0NTAzODg1
| 276 |
Converted auth to use callable objects instead of tuples.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22723?v=4",
"events_url": "https://api.github.com/users/idan/events{/privacy}",
"followers_url": "https://api.github.com/users/idan/followers",
"following_url": "https://api.github.com/users/idan/following{/other_user}",
"gists_url": "https://api.github.com/users/idan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/idan",
"id": 22723,
"login": "idan",
"node_id": "MDQ6VXNlcjIyNzIz",
"organizations_url": "https://api.github.com/users/idan/orgs",
"received_events_url": "https://api.github.com/users/idan/received_events",
"repos_url": "https://api.github.com/users/idan/repos",
"site_admin": true,
"starred_url": "https://api.github.com/users/idan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/idan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/idan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 12 |
2011-11-17T11:47:29Z
|
2021-09-08T13:05:57Z
|
2011-11-26T15:14:27Z
|
CONTRIBUTOR
|
resolved
|
My attempt to address #275.
This seems a lot more explicit/clean, though I confess that I'm not aware of the considerations that led to the current implementation.
I also think this is a good first step towards implementing OAuth support (#65).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/276/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/276/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/276.diff",
"html_url": "https://github.com/psf/requests/pull/276",
"merged_at": "2011-11-26T15:14:27Z",
"patch_url": "https://github.com/psf/requests/pull/276.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/276"
}
| true |
[
"@idangazit I can see you referenced this pull request in the main [OAUTH Feature request](https://github.com/kennethreitz/requests/issues/65).\n\nAfter reading the full thread thoroughly I can see how @maraujop [already thought about doing a pull request and then decided better](https://github.com/kennethreitz/requests/issues/65#issuecomment-2257820) to move into a separate hook to avoid a potential raise in issues, bugs, etc, in requests until the OAUTH functionality gets stable enough to consider pulling it in.\n\nI think your code is pretty cool as it brings the HEADER authentication into the mix (although less supported by third parties, it's definitely more standard-friendly and much compact to code!). But, like @maraujop and probably like @kennethreitz, I think your code would be better merged and tested within @maraujop's [requests-oauth](https://github.com/maraujop/requests-oauth) hook.\n\nI'm sure he will be happy to add such an awesome feature to the hook!\n\nCheers,\n",
"I actually integrated OAuth into requests [in an early branch within my fork of requests](https://github.com/maraujop/requests/tree/feature/oauth). I implemented it as part of requests because back then (version 0.5.1) there were no hooks and of course, no pluggable auth.\n\nHowever, now that requests comes with a nicer architecture for third party contributions, I really think that keeping OAUTH out of request will definitely avoid pollution of the bug tracker with unnecesarry issues. After it's stable enough, we can decide if it's core enough to deserve a place within the main project.\n\n@idangazit as we talked today in IRC I am more than happy to merge your implementation of header-OAUTH into my hook. I think having a nice, clean and complete implementation of OAUTH will truly benefit us all! \n\nCheers,\nMiguel\n",
"Per my conversation with @maraujop:\n\nI'm happy with OAuth support being merged wherever, so long as it's merged. I think OAuth is a sufficiently common use-case that requests would be better for having support in the box, so let's say I'm +0 on OAuth in requests, but +1 on it being anywhere that is pip-installable.\n\nFirst this patch needs to land in requests, though.\n",
"@jjmaestro, @maraujop: worth noting that this patch has nothing to do with OAuth, I'm merely saying that it lays a good foundation for OAuth support inside or outside of requests.\n",
"@idangazit sure, I can see how this is not OAuth but I read the main issue #275 (where you link your gist about OAuth) then read the Feature Request for OAuth in requests and saw your mention, clicked and kept reading...\n\nSince everything ties together and since this is the place to discuss the potential foundations of OAuth I thought that it would be very interesting to discuss this with @maraujop and to also talk about your implementation of header-based Oauth.\n\n@maraujop's hook is the de-facto OAuth support in requests (definitely the best available) and it's already pip-installable:\n\npip install requests-oauth\n\nSo what about merging this pull request and then putting your gist into a requests-oauth pull request? That way we get the foundations of a better auth support in requests and we get your nice header-based OAuth thus improving the best hook available. Later, you guys can test the shit out the hook and improve it to the point where @kennethreitz can consider if it makes sense to add it to the requests core :)\n\nWin-Win for me!\n",
"So, originally, all of the authentication systems used their own handlers that were managed by an AuthManager. It was ugly, and my least favorite part of the codebase. \n\nIf tuples were passed in, they were automatically converted to the appropriate AuthObject class, and all was well.\n\nNow that I'm finally off of urllib2, a complete rewrite of that system occured, and that's why I have the callback-based system now.\n",
"That being said, I think we can support both ways properly now that urllib2 is out of the picture.\n\n### Proposal\n1. Use AuthObjects once again (like this pull request suggests)\n2. Support tuple for basic auth.\n3. Build a better mechanism for multi-request authentication. For example, digest auth requires two calls to the server to receive the nonce required to sign the request. OAuth obviously needs to do this as well. Currently, the digest auth is using an hook internally. This is fine, as long as multiple hooks are supported. Currently they are not.\n",
"Also, I do plan to have first class support for all forms of oauth inside requests itself. One thing at a time though :)\n\nCurrently, the best oauth interface I've used is here:\n\nhttps://chrome.google.com/webstore/detail/cokgbflfommojglbmbpenpphppikmonn (https://github.com/codeinchaos/rest-console)\n\n\n\nI'd like to replicate this.\n",
"If I have time, I'm planning on writing this.\n\nInterface axes:\n- oauth version (1 vs 2)\n- signature method (hmac vs plaintext)\n- preferred method (header vs query)\n\nxAuth will also have first class support.\n\nOf course, sending requests with only the consumer key/secret needs to be obvious too (for the auth process). This is done poorly everywhere I've seen. Guided workflow (e.g. 'request token url', 'authorize token url') is out of scope— at least at first. I think it heavily contributes to the confusion around oauth. \n",
"Okay, all this sounds awesome, but I'm not clear on the next steps.\n\nI'm -0 on special-casing basic auth tuples, but It wouldn't be a big deal to implement. I'll hit that up later tonight.\n\nRegarding the multi-request auth: seems orthogonal to this. I'm happy to look into ways to make this better, but can we split that work into a separate effort?\n\nBesides the tuple thing, is this patch ready to merge? It doesn't add or remove any major functionality, and after this has landed we can turn our attention to OAuth.\n\n# Regarding OAuth\n\nAfter looking at all the python OAuth implementations out there, I started cobbling my own together which isn't tied to anybody particular url_/http_ library or requests — basically a spec-compliant generic collection of logic for signing OAuth requests. I'd like to expand that and think it could be useful for requests, but it's also a bit outside the scope of this pull request.\n\nAdding comprehensive, first-class support for OAuth in requests is a bigger effort, let's give that it's own thread :)\n",
"I implemented HTTP Basic Auth in tuples as requested. I added a test to the suite to cover both the callable and tuple ways of adding basic auth, and documented the new behavior as well.\n\nAnything more?\n",
"Thanks a ton, Idan! \n\nEnjoy your cake: :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/275
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/275/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/275/comments
|
https://api.github.com/repos/psf/requests/issues/275/events
|
https://github.com/psf/requests/issues/275
| 2,267,407 |
MDU6SXNzdWUyMjY3NDA3
| 275 |
Custom authentication is broken / incorrect docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22723?v=4",
"events_url": "https://api.github.com/users/idan/events{/privacy}",
"followers_url": "https://api.github.com/users/idan/followers",
"following_url": "https://api.github.com/users/idan/following{/other_user}",
"gists_url": "https://api.github.com/users/idan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/idan",
"id": 22723,
"login": "idan",
"node_id": "MDQ6VXNlcjIyNzIz",
"organizations_url": "https://api.github.com/users/idan/orgs",
"received_events_url": "https://api.github.com/users/idan/received_events",
"repos_url": "https://api.github.com/users/idan/repos",
"site_admin": true,
"starred_url": "https://api.github.com/users/idan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/idan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/idan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-17T10:49:37Z
|
2021-09-09T10:00:53Z
|
2011-11-26T15:50:59Z
|
CONTRIBUTOR
|
resolved
|
# Teh broken
Consider the following code, mostly lifted from the docs:
``` python
def pizza_auth(r, username):
"""Attaches HTTP Pizza Authentication to the given Request object."""
r.headers['X-Pizza'] = username
return r
import requests
r = requests.get('http://www.google.com', auth=(pizza_auth, 'foo'))
print r.request.headers['X-Pizza']
```
It appears that basic auth is hardwired for cases where two params are passed ([source](https://github.com/kennethreitz/requests/blob/master/requests/auth.py#L133-134)).
Either I'm not getting something, or auth doesn't work as documented / the way I expect.
# A proposal
Why not make all auth handlers callable objects? For example:
``` python
class AuthBase(object):
"""Base class that all auth implementations derive from"""
def __call__(self, r):
raise NotImplementedError('Auth hooks must be callable.')
class HTTPBasic(AuthBase):
def __init__(self, username, password):
self.username = str(username)
self.password = str(password)
def __call__(self, r):
auth_s = b64encode('%s:%s' % (self.username, self.password))
r.headers['Authorization'] = ('Basic %s' % auth_s)
return r
# Inline usage
r = requests.get('http://foo.com', auth=HTTPBasic('idan', 'secret'))
# Also in recyclable form!
idan_auth = HTTPBasic('idan', 'secret')
r1 = requests.get('http://foo.com', auth=idan_auth)
r2 = requests.get('http://bar.com', auth=idan_auth)
```
Such an approach has a few benefits:
- Doesn't make the trivial use-case's syntax any worse (if anything, it seems more explicit/clearer to me)
- Makes reuse much simpler if you're not starting a session.
- Facilitates implementation of more complex forms of auth, like OAuth
For the latter case, I could do something like:
``` python
idan_oauth = OAuth(consumer_key, consumer_secret, access_token, access_token_secret)
requests.get(twitter_api_url, auth=idan_oauth)
# or even
client = session(auth=idan_oauth)
r1 = client.get(an_endpoint)
r2 = client.get(another_endpoint)
```
… which would keep the OAuth implementation details neatly encapsulated inside the OAuth class.
This would also make adding OAuth (#65) relatively easier.
Thoughts?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/275/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/275/timeline
| null |
completed
| null | null | false |
[
"Here's an example implementation of header-based OAuth: https://gist.github.com/1373019\n\nI would probably break it into an OAuthBase class with the common methods, and then subclass for every OAuth parameter method (header, querystring, body).\n\nAll in all, it's only ~100 loc.\n",
"Sorry for the delay on this — carrying conversation over to #276\n",
"Closing for #276\n"
] |
https://api.github.com/repos/psf/requests/issues/274
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/274/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/274/comments
|
https://api.github.com/repos/psf/requests/issues/274/events
|
https://github.com/psf/requests/pull/274
| 2,267,285 |
MDExOlB1bGxSZXF1ZXN0NTAzNzA0
| 274 |
Corrected period to comma.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/408526?v=4",
"events_url": "https://api.github.com/users/elpres/events{/privacy}",
"followers_url": "https://api.github.com/users/elpres/followers",
"following_url": "https://api.github.com/users/elpres/following{/other_user}",
"gists_url": "https://api.github.com/users/elpres/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elpres",
"id": 408526,
"login": "elpres",
"node_id": "MDQ6VXNlcjQwODUyNg==",
"organizations_url": "https://api.github.com/users/elpres/orgs",
"received_events_url": "https://api.github.com/users/elpres/received_events",
"repos_url": "https://api.github.com/users/elpres/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elpres/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elpres/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elpres",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-17T10:32:21Z
|
2021-09-08T13:05:57Z
|
2011-11-18T20:06:40Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/274/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/274/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/274.diff",
"html_url": "https://github.com/psf/requests/pull/274",
"merged_at": "2011-11-18T20:06:40Z",
"patch_url": "https://github.com/psf/requests/pull/274.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/274"
}
| true |
[
"Thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/273
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/273/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/273/comments
|
https://api.github.com/repos/psf/requests/issues/273/events
|
https://github.com/psf/requests/pull/273
| 2,263,757 |
MDExOlB1bGxSZXF1ZXN0NTAyNTgy
| 273 |
Correct handling of URLs with quoted slashes.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34695?v=4",
"events_url": "https://api.github.com/users/rfk/events{/privacy}",
"followers_url": "https://api.github.com/users/rfk/followers",
"following_url": "https://api.github.com/users/rfk/following{/other_user}",
"gists_url": "https://api.github.com/users/rfk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rfk",
"id": 34695,
"login": "rfk",
"node_id": "MDQ6VXNlcjM0Njk1",
"organizations_url": "https://api.github.com/users/rfk/orgs",
"received_events_url": "https://api.github.com/users/rfk/received_events",
"repos_url": "https://api.github.com/users/rfk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rfk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rfk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rfk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-11-17T00:04:53Z
|
2021-09-08T23:05:27Z
|
2011-11-18T19:48:49Z
|
CONTRIBUTOR
|
resolved
|
The Request class currently does a urllib.quote(urllib.unquote(path)) cycle to ensure consistent quoting on the input URL. Unfortunately this breaks paths that contain quoted slashes (i.e. "%2F") since they get unquoted by urllib.unquote but are re-quoted by urllib.quote.
This patch adds a requote_path() function that does the same thing but is careful not to destroy quoted slashes.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/273/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/273/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/273.diff",
"html_url": "https://github.com/psf/requests/pull/273",
"merged_at": "2011-11-18T19:48:49Z",
"patch_url": "https://github.com/psf/requests/pull/273.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/273"
}
| true |
[
"still broken. try to run\n\n``` requests.get('http://www.cocktail.uk.com/db/random.asp')\n```\n\nshould have 404\n",
"This appears unrelated to my change, as it also gives a 404 using the latest release build. In any case, I've pushed a change that makes it work for me.\n",
"Oh man, thank you ever so much.\nNow it works for me ;)\n",
"Excellent — thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/272
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/272/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/272/comments
|
https://api.github.com/repos/psf/requests/issues/272/events
|
https://github.com/psf/requests/issues/272
| 2,257,713 |
MDU6SXNzdWUyMjU3NzEz
| 272 |
Session cookies break requests-oauth
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/252257?v=4",
"events_url": "https://api.github.com/users/maraujop/events{/privacy}",
"followers_url": "https://api.github.com/users/maraujop/followers",
"following_url": "https://api.github.com/users/maraujop/following{/other_user}",
"gists_url": "https://api.github.com/users/maraujop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maraujop",
"id": 252257,
"login": "maraujop",
"node_id": "MDQ6VXNlcjI1MjI1Nw==",
"organizations_url": "https://api.github.com/users/maraujop/orgs",
"received_events_url": "https://api.github.com/users/maraujop/received_events",
"repos_url": "https://api.github.com/users/maraujop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maraujop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maraujop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maraujop",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2011-11-16T15:47:52Z
|
2021-09-09T11:00:48Z
|
2011-11-17T13:04:35Z
|
NONE
|
resolved
|
Hi,
requests 0.8 breaks <a href="https://github.com/maraujop/requests-oauth">requests-oauth</a>. See the related issue in requests-oauth:
https://github.com/maraujop/requests-oauth/issues/5
After debugging both together, I've found out the culprit is this line:
https://github.com/kennethreitz/requests/blob/develop/requests/sessions.py#L190
Cookies were not updated automatically in sessions before 0.8. If I add `self.cookies = {}` before sending the request, requests-oauth starts working again.
Not sure if this is a bug or you want me to set cookies to an empty dictionary in my hook.
Cheers,
Miguel
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/252257?v=4",
"events_url": "https://api.github.com/users/maraujop/events{/privacy}",
"followers_url": "https://api.github.com/users/maraujop/followers",
"following_url": "https://api.github.com/users/maraujop/following{/other_user}",
"gists_url": "https://api.github.com/users/maraujop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maraujop",
"id": 252257,
"login": "maraujop",
"node_id": "MDQ6VXNlcjI1MjI1Nw==",
"organizations_url": "https://api.github.com/users/maraujop/orgs",
"received_events_url": "https://api.github.com/users/maraujop/received_events",
"repos_url": "https://api.github.com/users/maraujop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maraujop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maraujop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maraujop",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/272/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/272/timeline
| null |
completed
| null | null | false |
[
"I don't see what the problem is, but the requests behavior is intentional.\n",
"How would cookies break your hook? \n",
"Me neither, but trust me, if I set them to an empty dict, tests start passing again.\n\nI thought you would have a clue about it. I'm guessing Twitter OAuth API doesn't support cookies?\n",
"Poking at this with Charles, so far the only difference I'm seeing is the presence of cookies on the 2nd request.\n\nGist: https://gist.github.com/1371423\n\nTrying out other libraries to see how they behave. Suspecting that this is a bug with Twitter's API.\n",
"Definitely a bug with the Twitter API. Reported upstream: https://dev.twitter.com/discussions/3705.\n",
"Rdio API fails with this version of requests\n",
"My understanding was that Twitter supported specs 1.0 and 1.0a. I've tried removing `oauth_body_hash` and `oauth_verifier` and it breaks the same way. So it's not because passing those parameters with cookies at the same time.\n",
"I'm trying to implement something simple to pass the OAuth bits in headers, and see if they like that more. \n\n-I \n\nOn Thursday, November 17, 2011 at 11:53 AM, Miguel Araujo wrote:\n\n> My understanding was that Twitter supported specs 1.0 and 1.0a. I've tried removing `oauth_body_hash` and `oauth_verifier` and it breaks the same way. So it's not because passing those parameters with cookies at the same time.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/272#issuecomment-2774121\n",
"Also as @juanriaza says, this is not an API specific thing, Rdio fails the same way and it was working before.\n",
"@idangazit\n\nI've moved <a href=\"http://oauth.net/core/1.0/#auth_header\">OAuth bits to headers</a>, but OAuth isn't working for a simple Twitter status POST example, so I must be doing something wrong, but I cannot catch the error.\n\n```\nHeaders: {'Authorization': 'OAuth%20oauth_nonce%3D%2273947544%22%2C%20oauth_timestamp%3D%221321529518%22%2C%20oauth_consumer_key%3D%22CONSUMER_KEY%22%2C%20oauth_signature_method%3D%22HMAC-SHA1%22%2C%20oauth_version%3D%221.0%22%2C%20oauth_token%3D%OAUTH_TOKEN%22%2C%20oauth_signature%3D%225IYmrXKbEMp5npH%2FUrwcH0H%2FZ5s%3D%22', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept-Encoding': 'identity, deflate, compress, gzip', 'Accept': '*/*', 'User-Agent': 'python-requests/0.8.1'}\nURL: http://api.twitter.com/1/statuses/update.json\nParams: {}\nData: {'status': 'Kind of a random message 0.862699448264', 'wrap_links': True}\n2011-11-17T12:31:58.369048 POST http://api.twitter.com/1/statuses/update.json\n{\"error\":\"Could not authenticate with OAuth.\",\"request\":\"\\/1\\/statuses\\/update.json\"}\n```\n\nCan you spot anything wrong here? I've debugged it as much as possible.\n\nEven though I'm not sure this will fix the cookies error, I think it's a good try. If you want to look at the code, I can put it in a branch.\n\nMiguel\n",
"As this doesn't look any longer related to requests, but the problem seems to be in how OAuth API providers handle cookies. I've disabled cookies in requests-oauth and I'm closing both issues.\n\nCheers,\nMiguel\n"
] |
https://api.github.com/repos/psf/requests/issues/271
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/271/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/271/comments
|
https://api.github.com/repos/psf/requests/issues/271/events
|
https://github.com/psf/requests/pull/271
| 2,252,776 |
MDExOlB1bGxSZXF1ZXN0NDk4ODA5
| 271 |
Filenames improvement and cookie fix
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4",
"events_url": "https://api.github.com/users/rmax/events{/privacy}",
"followers_url": "https://api.github.com/users/rmax/followers",
"following_url": "https://api.github.com/users/rmax/following{/other_user}",
"gists_url": "https://api.github.com/users/rmax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rmax",
"id": 26015,
"login": "rmax",
"node_id": "MDQ6VXNlcjI2MDE1",
"organizations_url": "https://api.github.com/users/rmax/orgs",
"received_events_url": "https://api.github.com/users/rmax/received_events",
"repos_url": "https://api.github.com/users/rmax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rmax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rmax",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-16T04:06:32Z
|
2021-09-08T13:05:56Z
|
2011-11-18T20:34:07Z
|
CONTRIBUTOR
|
resolved
|
- added support for explicit filenames
- use ";" as cookie separator for 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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/271/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/271/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/271.diff",
"html_url": "https://github.com/psf/requests/pull/271",
"merged_at": "2011-11-18T20:34:07Z",
"patch_url": "https://github.com/psf/requests/pull/271.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/271"
}
| true |
[
"Thanks! Do you think you could add this to the docs?\n"
] |
https://api.github.com/repos/psf/requests/issues/270
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/270/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/270/comments
|
https://api.github.com/repos/psf/requests/issues/270/events
|
https://github.com/psf/requests/issues/270
| 2,245,579 |
MDU6SXNzdWUyMjQ1NTc5
| 270 |
allow_redirects=True by default also for post-requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/59132?v=4",
"events_url": "https://api.github.com/users/albertz/events{/privacy}",
"followers_url": "https://api.github.com/users/albertz/followers",
"following_url": "https://api.github.com/users/albertz/following{/other_user}",
"gists_url": "https://api.github.com/users/albertz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/albertz",
"id": 59132,
"login": "albertz",
"node_id": "MDQ6VXNlcjU5MTMy",
"organizations_url": "https://api.github.com/users/albertz/orgs",
"received_events_url": "https://api.github.com/users/albertz/received_events",
"repos_url": "https://api.github.com/users/albertz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/albertz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albertz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/albertz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-15T15:53:23Z
|
2021-09-09T10:00:51Z
|
2011-11-26T15:42:16Z
|
NONE
|
resolved
|
I think it makes sense to also have allow_redirects=True as default for POST-requests.
I have seen Ruby on Rails application in the wild which often directly redirect after a POST.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/270/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/270/timeline
| null |
completed
| null | null | false |
[
"Absolutely not. Only 303 responses should be treated this way.\n\nPlease see http://tools.ietf.org/html/rfc1945. \n",
"If we agree to implement change requested in issue [#269](https://github.com/kennethreitz/requests/issues/269) we should also implement automatic redirects for 301 and 302 redirects after POST request as per my [comment](https://github.com/kennethreitz/requests/pull/269#issuecomment-2883086)\n"
] |
https://api.github.com/repos/psf/requests/issues/269
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/269/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/269/comments
|
https://api.github.com/repos/psf/requests/issues/269/events
|
https://github.com/psf/requests/pull/269
| 2,245,134 |
MDExOlB1bGxSZXF1ZXN0NDk2MDU3
| 269 |
fix subsequent redirect request method type
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/59132?v=4",
"events_url": "https://api.github.com/users/albertz/events{/privacy}",
"followers_url": "https://api.github.com/users/albertz/followers",
"following_url": "https://api.github.com/users/albertz/following{/other_user}",
"gists_url": "https://api.github.com/users/albertz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/albertz",
"id": 59132,
"login": "albertz",
"node_id": "MDQ6VXNlcjU5MTMy",
"organizations_url": "https://api.github.com/users/albertz/orgs",
"received_events_url": "https://api.github.com/users/albertz/received_events",
"repos_url": "https://api.github.com/users/albertz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/albertz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albertz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/albertz",
"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 | 19 |
2011-11-15T15:16:15Z
|
2021-09-09T00:01:26Z
|
2012-03-31T03:32:47Z
|
NONE
|
resolved
|
E.g., after a POST with a 302 response, we should do a GET. This is how all browsers do it for historical reasons. And some websites even don't work otherwise.
See also: http://stackoverflow.com/questions/8138137/http-post-request-receives-a-302-should-the-redirect-request-be-a-get
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/269/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/269/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/269.diff",
"html_url": "https://github.com/psf/requests/pull/269",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/269.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/269"
}
| true |
[
"1. If elegance (among other things) means adhering to the spec then according to [10.3.3](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3) of rfc2616 _If the 302 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._\n2. The url in your code is 129 chars long and putting it in one line is against pep8. You can omit question's title from the stackoverflow's url (as a bonus you are not dependent on question's title anymore) so in this case http://stackoverflow.com/questions/8138137/#8138447 would work the same.\n",
"@piotr-dobrogost: exactly. That is exactly why `allow_redirects` was added — and is set to `False` for POST requests. If the user explicitly sets it to `True`, then the redirect will be followed.\n",
"@kennethreitz: You mean `allow_redirects`?\n\nYou should read [this piece](http://codesearch.google.com/#OAMlx_jo-ck/src/net/url_request/url_request.cc&l=701) of the Google Chrome code:\n\n```\n // For 303 redirects, all request methods except HEAD are converted to GET,\n // as per the latest httpbis draft. The draft also allows POST requests to\n // be converted to GETs when following 301/302 redirects, for historical\n // reasons. Most major browsers do this and so shall we. Both RFC 2616 and\n // the httpbis draft say to prompt the user to confirm the generation of new\n // requests, other than GET and HEAD requests, but IE omits these prompts and\n // so shall we.\n // See: https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.3\n bool was_post = method_ == \"POST\";\n if ((http_status_code == 303 && method_ != \"HEAD\") ||\n ((http_status_code == 301 || http_status_code == 302) && was_post)) {\n method_ = \"GET\";\n upload_ = NULL;\n if (was_post) {\n // If being switched from POST to GET, must remove headers that were\n // specific to the POST and don't have meaning in GET. For example\n // the inclusion of a multipart Content-Type header in GET can cause\n // problems with some servers:\n // http://code.google.com/p/chromium/issues/detail?id=843\n StripPostSpecificHeaders(&extra_request_headers_);\n }\n }\n```\n\nThis is also how all other browsers are doing it. I think it makes more sense to follow that instead of doing it different than everybody else.\n\nAlso, as said, some websites/servers even break otherwise because they expect this behavior. (They return 302 instead of a 303 because 303 was too less supported a while ago and browsers do the expected behavior on 302 anyway.)\n\nAlso, it was reported [here](https://github.com/szechuen/CCC-Presale/issues/3#issuecomment-2759174) that Requests indeed did it that way a while ago, at least in 0.7.4. It just broke since 0.8.0.\n",
"If it was working in an older version of requests, that was a bug. Part of the hideousness that way building on top of urllib2 was not knowing exactly how the redirect handling worked. \n",
"Only 303 responses should be treated this way.\n\nPlease see http://tools.ietf.org/html/rfc1945. \n",
"If every major HTTP implementation has agreed to handle this not as in the specs, Requests shouldn't be the only HTTP implementation which behaves different (and thus breaks for some services).\n",
"Hmm. Alright, let's see what cURL does.\n",
"Albert's question on Stackoverflow [HTTP: POST request receives a 302, should the redirect-request be a GET?](http://stackoverflow.com/questions/8138137/) was [answered](http://stackoverflow.com/q/8139246/95735) by Julian Reschke who points to [ticket 160](http://trac.tools.ietf.org/wg/httpbis/trac/ticket/160) of httbis working group. In [comment 29](http://trac.tools.ietf.org/wg/httpbis/trac/ticket/160#comment:29) of this ticket there's a link to [changeset 1428](http://trac.tools.ietf.org/wg/httpbis/trac/changeset/1428) which **allows POST->GET rewriting for 301/302**. In light of this I think Requests should follow current UAs' behavior in regard to rewriting POST to GET for 301 and 302 status codes. This, according to section 7.3 of the [latest](http://trac.tools.ietf.org/wg/httpbis/trac/export/1428/draft-ietf-httpbis/latest/p2-semantics.html) (1428) draft of _HTTP/1.1, part 2: Message Semantics_, also means that redirect can be carried out **without** user intervention because GET method is idempotent.\n",
"Let's see what `curl` does.\n",
"> C:\\Users\\Piotr>curl -v -d \"a=b\" -L http://httpbin.org/redirect/1\n> - About to connect() to httpbin.org port 80 (#0)\n> - Trying 173.230.131.235... connected\n> > POST /redirect/1 HTTP/1.1\n> > User-Agent: curl/7.23.1 (x86_64-pc-win32) libcurl/7.23.1 OpenSSL/0.9.8r zlib/1.2.5\n> > Host: httpbin.org\n> > Accept: _/_\n> > Content-Length: 3\n> > Content-Type: application/x-www-form-urlencoded\n> >\n> - upload completely sent off: 3 out of 3 bytes\n> < HTTP/1.1 301 Moved Permanently\n> < Date: Sun, 27 Nov 2011 10:15:58 GMT\n> < Status: 301 Moved Permanently\n> < Connection: close\n> < Location: http://www.httpbin.org/redirect/1\n> < Content-Type: text/html\n> <\n> - Closing connection #0\n> - Issue another request to this URL: 'http://www.httpbin.org/redirect/1'\n> - Violate RFC 2616/10.3.2 and switch from POST to GET\n> - About to connect() to www.httpbin.org port 80 (#0)\n> - Trying 107.22.180.255... connected\n> > GET /redirect/1 HTTP/1.1\n> > User-Agent: curl/7.23.1 (x86_64-pc-win32) libcurl/7.23.1 OpenSSL/0.9.8r zlib/1.2.5\n> > Host: www.httpbin.org\n> > Accept: _/_\n",
"### Proposal\n1. Non-safe methods still have `allow_redirects` default to `False`.\n2. A new config setting called `strict_mode` will be set to `False` by default.\n3. If `strict_mode` is `False`, a 301'd `POST` will follow the browser behavior.\n4. If `strict_mode` is `True`, a 301'd `POST` will follow the RFC behavior.\n",
"What about `allow_redirects` defaulting to `not strict_mode` for non-safe methods?\n",
"I think that `strict_mode` should default to`True`.\n\nIn general I prefer software to do things the correct way, even if that correct way breaks when other people do things incorrectly. However I also prefer it when software that does do things the correct way gives me the flexibility to relax the restrictions in order to handle the case of someone else doing it wrong.\n\nIn general I think that doing something that violates the spec/RFC/standard etc should require being explicitly allowed which will not only make the consumers of poorly written web sites reflect upon, and maybe find a better way of doing something within the specs, but can also be a trigger to the websites to fix their site to work within the RFC. Which the web as a whole is a much better place when places follow the standards.\n",
"@dstufft: It's quite common to send 302 redirects after a successful POST. Perhaps you could argue that sites doing this are technically broken, but it's how many sites currently work. And it's how many popular frameworks, such as Django, suggest on handling successful POSTs.\n\nI'm all for doing things \"the right way\". But I get the feeling that `strict_mode` will be set to `False` more often than not.\n",
"> In general I prefer software to do things the correct way, even if that correct way breaks when other people do things incorrectly.\n\nThe latest draft of new http specification (called httpbis) in section [7.3.3 302 Found](http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.3.3) states\n\n```\nNote: For historic reasons, user agents MAY change the request\nmethod from POST to GET for the subsequent request. If this\nbehavior is undesired, status code 307 (Temporary Redirect) can be\nused instead.\n```\n\nSo assuming it will obsolete current http spec (RFC 2616) the behavior with `strict_mode` set to `False` will be **conforming**.\nHaving said this, I think introducing `strict_mode` is unnecessary as behavior that will be implemented is de facto standard and in the (hopefully near) future will be de jury standard.\n",
"@piotr-dobrogost thanks for the research. That's compelling.\n",
"I've been bitten by this for exactly the reasons @andymccurdy mentions, that frameworks like Django give 302 redirects. Could we at least add a note in the docs on this?\n",
"Fine, lets do it. :)\n",
"Thanks guys. :)\n"
] |
https://api.github.com/repos/psf/requests/issues/268
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/268/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/268/comments
|
https://api.github.com/repos/psf/requests/issues/268/events
|
https://github.com/psf/requests/pull/268
| 2,240,957 |
MDExOlB1bGxSZXF1ZXN0NDk0ODUy
| 268 |
fixed: 301 request does not use proxy.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/173095?v=4",
"events_url": "https://api.github.com/users/benmao/events{/privacy}",
"followers_url": "https://api.github.com/users/benmao/followers",
"following_url": "https://api.github.com/users/benmao/following{/other_user}",
"gists_url": "https://api.github.com/users/benmao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benmao",
"id": 173095,
"login": "benmao",
"node_id": "MDQ6VXNlcjE3MzA5NQ==",
"organizations_url": "https://api.github.com/users/benmao/orgs",
"received_events_url": "https://api.github.com/users/benmao/received_events",
"repos_url": "https://api.github.com/users/benmao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benmao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benmao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benmao",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-15T07:53:52Z
|
2021-09-08T13:05:55Z
|
2011-11-15T13:58:10Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/268/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/268/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/268.diff",
"html_url": "https://github.com/psf/requests/pull/268",
"merged_at": "2011-11-15T13:58:10Z",
"patch_url": "https://github.com/psf/requests/pull/268.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/268"
}
| true |
[
"thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/267
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/267/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/267/comments
|
https://api.github.com/repos/psf/requests/issues/267/events
|
https://github.com/psf/requests/pull/267
| 2,239,620 |
MDExOlB1bGxSZXF1ZXN0NDk0NDQ1
| 267 |
fixed proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/173095?v=4",
"events_url": "https://api.github.com/users/benmao/events{/privacy}",
"followers_url": "https://api.github.com/users/benmao/followers",
"following_url": "https://api.github.com/users/benmao/following{/other_user}",
"gists_url": "https://api.github.com/users/benmao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benmao",
"id": 173095,
"login": "benmao",
"node_id": "MDQ6VXNlcjE3MzA5NQ==",
"organizations_url": "https://api.github.com/users/benmao/orgs",
"received_events_url": "https://api.github.com/users/benmao/received_events",
"repos_url": "https://api.github.com/users/benmao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benmao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benmao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benmao",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-15T03:01:18Z
|
2021-09-08T13:05:56Z
|
2011-11-15T03:04:03Z
|
NONE
|
resolved
|
https://github.com/kennethreitz/requests/issues/266
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/267/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/267/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/267.diff",
"html_url": "https://github.com/psf/requests/pull/267",
"merged_at": "2011-11-15T03:04:03Z",
"patch_url": "https://github.com/psf/requests/pull/267.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/267"
}
| true |
[
"Excellent, thanks! I need to add a unittest for that....\n"
] |
https://api.github.com/repos/psf/requests/issues/266
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/266/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/266/comments
|
https://api.github.com/repos/psf/requests/issues/266/events
|
https://github.com/psf/requests/issues/266
| 2,231,452 |
MDU6SXNzdWUyMjMxNDUy
| 266 |
Proxy dose not work.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/173095?v=4",
"events_url": "https://api.github.com/users/benmao/events{/privacy}",
"followers_url": "https://api.github.com/users/benmao/followers",
"following_url": "https://api.github.com/users/benmao/following{/other_user}",
"gists_url": "https://api.github.com/users/benmao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benmao",
"id": 173095,
"login": "benmao",
"node_id": "MDQ6VXNlcjE3MzA5NQ==",
"organizations_url": "https://api.github.com/users/benmao/orgs",
"received_events_url": "https://api.github.com/users/benmao/received_events",
"repos_url": "https://api.github.com/users/benmao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benmao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benmao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benmao",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2011-11-14T15:18:20Z
|
2021-09-09T11:00:50Z
|
2011-11-15T15:03:29Z
|
NONE
|
resolved
|
My test Code:
``` Python
import requests
r = requests.get('http://www.google.com', proxies={'http': '127.0.0.1:888'})
print r.content
```
proxy, {'http': '127.0.0.1:888'} does not exist,so there should not return the correct results.
Looks like not using a proxy.
version: 0.8
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/266/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/266/timeline
| null |
completed
| null | null | false |
[
"In addition to that, proxies are not used in redirects.\n",
"Fixed!\n",
"Need to find a way to test proxies btw.\n",
"I use Charles http://www.charlesproxy.com/ .\n",
"I meant in the testsuite.\n",
"v0.8.1 was just released, which fixes this!\n"
] |
https://api.github.com/repos/psf/requests/issues/265
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/265/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/265/comments
|
https://api.github.com/repos/psf/requests/issues/265/events
|
https://github.com/psf/requests/issues/265
| 2,231,010 |
MDU6SXNzdWUyMjMxMDEw
| 265 |
HTTP request uses full URL, should be path only
|
{
"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 | 19 |
2011-11-14T14:30:31Z
|
2021-09-09T05:00:47Z
|
2011-11-15T14:54:51Z
|
CONTRIBUTOR
|
resolved
|
Possibly related to #174: these are links that work just fine in a browser or `curl`/`wget`, but `requests` seems to have trouble with them:
- http://www.rankingz.com
- http://my.jibecompany.com
Example:
```
>>> import requests
>>> requests.get('http://www.rankingz.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/api.py", line 78, in get
return request('get', url, **kwargs)
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/api.py", line 65, in request
prefetch=prefetch
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/sessions.py", line 187, in request
r.send(prefetch=prefetch)
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/models.py", line 432, in send
self._build_response(r)
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/models.py", line 245, in _build_response
request.send()
File "/Users/pennersr/src/ep/opt/python2.6/src/requests/requests/models.py", line 424, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: Max retries exceeded for url: http://www.rankingz.comhttp/www.rankingz.com
```
Examining the HTTP headers reveals...:
```
GET http://www.rankingz.com HTTP/1.1
Host: www.rankingz.com
Accept-Encoding: identity, deflate, compress, gzip
Accept: */*
User-Agent: python-requests/0.8.0
HTTP/1.1 301 Moved Permanently
Server: Apache
X-Powered-By: PHP/5.3.2-1ubuntu4.10
X-Pingback: http://www.rankingz.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Mon, 14 Nov 2011 14:20:48 GMT
Cache-Control: public
Pragma: no-cache
Location: http://www.rankingz.comhttp/www.rankingz.com
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Content-Length: 20
Date: Mon, 14 Nov 2011 14:20:48 GMT
X-Varnish: 875757742
Age: 0
Via: 1.1 varnish
Connection: keep-alive
```
... whereas `curl` shows:
```
GET / HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-apple-darwin11.1.0) libcurl/7.22.0 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
Host: www.rankingz.com
Accept: */*
HTTP/1.1 200 OK
Server: Apache
X-Powered-By: PHP/5.3.2-1ubuntu4.10
X-Pingback: http://www.rankingz.com/xmlrpc.php
Last-Modified: Mon, 14 Nov 2011 14:25:32 GMT
Vary: Cookie,Accept-Encoding
Expires: Mon, 14 Nov 2011 14:26:52 GMT
Pragma: public
Cache-Control: public
Content-Type: text/html; charset=UTF-8
X-Cacheable: NO: Vary: Cookie
Content-Length: 25914
Date: Mon, 14 Nov 2011 14:25:32 GMT
X-Varnish: 875757934
Age: 0
Via: 1.1 varnish
Connection: keep-alive
```
`requests` should be using "GET /" instead of "GET http://www.rankingz.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/265/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/265/timeline
| null |
completed
| null | null | false |
[
"For what it is worth, an earlier version works fine:\n\n```\n>>> requests.__version__\n'0.6.2 (dev)'\n>>> requests.get('http://www.jibecompany.com')\n<Response [200]>\n```\n\nThis one indeed uses the following headers:\n\n```\nGET / HTTP/1.1\nHost: www.jibecompany.com\nUser-Agent: python-requests.org\nConnection: close\nAccept-Encoding: gzip\n```\n\nBtw, the URLs we are experiencing issues with all seem to be Wordpress based (http://www.dancetunesradio.com is another...).\n",
"Compare https://github.com/kennethreitz/requests/issues/256\n",
"Yes, this is also related to #256, apparently related to a bug in [urllib3#8](https://github.com/shazow/urllib3/issues/8)…\n",
"Not a bug in urllib3.\n",
"I'm having a hard time tracking this down. Some debugging print statements show that [_build_url()](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L285) is being called like 4 times for one request. The url is fine after one instance of _build_url(), but after that, self.url becomes the malformed url. The malformed URL first appears at [r.headers](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L207).\n\nNot sure if this is helpful, but it might get someone else on the right track.\n",
"Fixed in 4504953212816c4de0cd8177faf1270e42cb31f9\n",
"v0.8.1 was just released, which fixes this!\n",
"Really nice!\n",
"Awesome! :beer:\n",
"i have same issue in requests '1.1.0'\n",
"the code \"requests.get(self.url%self.version, auth=(self.user, self.pwd))\" i used\nunfortunately, pop up \"Max retries exceeded with url:\"\n",
"@teslachiang: Can you paste your full traceback, please? =)\n",
"@teslachiang also, could you post the URL? \n",
"Sending the full URL instead of the path is [allowed by the RFC](http://www.ietf.org/rfc/rfc2616.txt), so this was not a bug.\n",
"@untitaker: Just because the RFC allows it doesn't stop it being a bug. =)\n",
"@Lukasa If this is not a misbehavior, how would this be a bug then?\n",
"It _is_ a misbehaviour, it's just one that's allowed by the RFC. =D\n\nRFCs allow and require many kinds of behaviour. Some of this behaviour is, in practice, not followed by the overwhelming majority of clients. This can lead to these clients choking on our input. It's all well and good to stand tall and say \"I followed the RFC\", but if every webserver in the world rejects our HTTP input then we've done a crappy job of making an HTTP library.\n\nAn excellent example of what I mean is #1051. A zero-length Content-Type header on a GET is fine, but it killed Amazon. We could file an angry complaint with them and stand on our high horse, or we could just acknowledge that most people don't do it that way, and it's better to work properly than be what I am choosing to call 'aggressively standards compliant'. =D\n",
"Of course it's good to aim at compatibility with servers that don't understand all kinds of RFC-compilant requests, but doing that would be rather a feature than a bugfix in my eyes.\n",
"You are free to call it whatever you like. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/264
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/264/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/264/comments
|
https://api.github.com/repos/psf/requests/issues/264/events
|
https://github.com/psf/requests/pull/264
| 2,228,338 |
MDExOlB1bGxSZXF1ZXN0NDkwODI1
| 264 |
Pass along timeout when following redirects (closes #263)
|
{
"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 | 0 |
2011-11-14T09:04:19Z
|
2021-09-08T13:05:55Z
|
2011-11-14T21:42:18Z
|
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/264/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/264/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/264.diff",
"html_url": "https://github.com/psf/requests/pull/264",
"merged_at": "2011-11-14T21:42:18Z",
"patch_url": "https://github.com/psf/requests/pull/264.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/264"
}
| true |
[] |
|
https://api.github.com/repos/psf/requests/issues/263
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/263/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/263/comments
|
https://api.github.com/repos/psf/requests/issues/263/events
|
https://github.com/psf/requests/issues/263
| 2,228,315 |
MDU6SXNzdWUyMjI4MzE1
| 263 |
Timeout ignored when following redirects
|
{
"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 | 1 |
2011-11-14T08:59:15Z
|
2021-09-09T11:00:51Z
|
2011-11-14T21:42:20Z
|
CONTRIBUTOR
|
resolved
|
To reproduce, add a print to requests.models.Request.send():
```
def send(self, anyway=False, prefetch=False):
"""...."""
print "send with timeout %s" % self.timeout
```
Then:
```
>>> requests.head('http://httpbin.org/redirect/3', timeout=10)
send with timeout 10
send with timeout None
send with timeout None
send with timeout None
<Response [200]>
```
I expected a timeout of 10 everywhere, not None.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/263/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/263/timeline
| null |
completed
| null | null | false |
[
"(Sorry for the closed/reopened -- me typing in the wrong window resulted in accidentally closing the ticket)\n"
] |
https://api.github.com/repos/psf/requests/issues/262
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/262/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/262/comments
|
https://api.github.com/repos/psf/requests/issues/262/events
|
https://github.com/psf/requests/pull/262
| 2,228,213 |
MDExOlB1bGxSZXF1ZXN0NDkwNzkw
| 262 |
Fixing status codes. Somehow these were wrong.
|
{
"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 | null |
[] | null | 0 |
2011-11-14T08:45:15Z
|
2021-09-08T13:05:54Z
|
2011-11-14T21:42:24Z
|
CONTRIBUTOR
|
resolved
|
> > > requests.codes['temporary_redirect']
> > > 307
> > > requests.codes.teapot
> > > 418
> > > requests.codes['\o/']
> > > 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/262/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/262/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/262.diff",
"html_url": "https://github.com/psf/requests/pull/262",
"merged_at": "2011-11-14T21:42:24Z",
"patch_url": "https://github.com/psf/requests/pull/262.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/262"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/261
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/261/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/261/comments
|
https://api.github.com/repos/psf/requests/issues/261/events
|
https://github.com/psf/requests/issues/261
| 2,227,882 |
MDU6SXNzdWUyMjI3ODgy
| 261 |
Version 0.8 breaks something from 0.7.4
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1113284?v=4",
"events_url": "https://api.github.com/users/Mike-Allen/events{/privacy}",
"followers_url": "https://api.github.com/users/Mike-Allen/followers",
"following_url": "https://api.github.com/users/Mike-Allen/following{/other_user}",
"gists_url": "https://api.github.com/users/Mike-Allen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Mike-Allen",
"id": 1113284,
"login": "Mike-Allen",
"node_id": "MDQ6VXNlcjExMTMyODQ=",
"organizations_url": "https://api.github.com/users/Mike-Allen/orgs",
"received_events_url": "https://api.github.com/users/Mike-Allen/received_events",
"repos_url": "https://api.github.com/users/Mike-Allen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Mike-Allen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Mike-Allen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Mike-Allen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-14T07:50:42Z
|
2021-09-09T11:00:51Z
|
2011-11-15T14:00:30Z
|
NONE
|
resolved
|
Something happened between version 0.7.4 and 0.8 that made requests stop working with two embedded devices that I have. One is an Axis video server and the other is a Digital-Loggers web power switch.
I’m using Python 2.6.6 and 2.7.2, under Windows and Linux.
I am able to connect to both devices using 0.7.4. When 0.8 is used it returns a 404 error when trying to connect to the Axis video server and it returns a very basic/simple web page when connection to the web power switch (it’s not the device’s login page but it does have a cookie from the device. Very strange.)
I spent a lot of time trying different options/settings in 0.8 but to no avail.
I have no trouble connecting to these devices using urllib2, htmllib or even wget and of course web browsers.
I’ve been concentrating on projects with these two devices so I haven’t had time to test either version of requests against other servers.
I’m sorry I can’t give you something more specific. I thought I should at least mention that I’ve run into a problem.
Mike
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/261/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/261/timeline
| null |
completed
| null | null | false |
[
"I also have problems with version 0.8.\n\nAt least _all_ Tumblr URLs are not working.\n\n```\n\n>>> a = requests.get('http://status.soundcloud.com/rss')\n>>> a.content\n'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\\n <head>\\n <link rel=\"icon\" href=\"http://assets.tumblr.com/images/favicon.gif?2\" type=\"image/gif\"/>\\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\\n <meta name=\"robots\" content=\"noindex\"/>\\n <link rel=\"stylesheet\" href=\"http://assets.tumblr.com/stylesheets/compressed/status_blue.css\"\\n type=\"text/css\" media=\"screen\" charset=\"utf-8\">\\n <title>We\\'ll be back shortly</title>\\n <style type=\"text/css\">\\n hr { display:none; }\\n address { display:none; }\\n </style>\\n </head>\\n <body onload=\"if (top != self) document.write(\\'<body style=\\\\\\'background:transparent;\\\\\\'></body>\\');\">\\n <table height=\"100%\" width=\"100%\" id=\"tumbeasts\">\\n <tr>\\n <td align=\"center\" valign=\"middle\">\\n <div id=\"tumbeasts_503_container\" style=\"display:none\">\\n <div class=\"tumbeasts_image\"> </div>\\n\\n <h1 id=\"l10n_title\">We\\'ll be back shortly</h1>\\n\\n <div class=\"sorry\" style=\"width:480px;\">\\n <p id=\"l10n_feed_tumbeasts\">\\n We may have forgotten to feed the wild Tumbeasts that roam our datacenter,\\n resulting in gnawing and/or mutiny. Animal control has been alerted.\\n </p>\\n </div>\\n\\n <div style=\"font:11px \\'Lucida Grande\\',Verdana,sans-serif; margin-top:18px; color:#344a5f;\" id=\"l10n_artwork_credit\">\\n Artwork by <a href=\"http://theoatmeal.com/\" target=\"_blank\" style=\"color:#344a5f;\">The Oatmeal</a>\\n </div>\\n </div>\\n\\n <div id=\"container\">\\n <div id=\"plain_503_container\">\\n <h1 id=\"l10n_title_2\">We\\'ll be back shortly</h1>\\n \\n <div class=\"sorry\">\\n <p id=\"l10n_sorry\">\\n Our servers are over capacity and certain pages may be temporarily unavailable.\\n We\\'re incredibly sorry for the inconvenience.\\n </p>\\n </div>\\n </div>\\n </div>\\n </td>\\n </tr>\\n </table>\\n\\n <script type=\"text/javascript\">\\n var window_width = parseInt(window.innerWidth ? window.innerWidth : document.body.clientWidth);\\n \\n if (window.location.hostname == \\'www.tumblr.com\\' && window_width > 510) {\\n document.write(\\'<style type=\"text/css\">#container { display:none; }</style>\\');\\n document.getElementById(\\'tumbeasts_503_container\\').style.display = \\'block\\';\\n }\\n </script>\\n \\n <script type=\"text/javascript\" language=\"javascript\">var status_code = \\'503\\'</script>\\n <script type=\"text/javascript\" language=\"javascript\" src=\"http://assets.tumblr.com/languages/errors.js\"></script>\\n </body>\\n</html>\\n'\n>>> a = requests.get('http://status.soundcloud.com/')\n>>> a.content\n'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\\n <head>\\n <link rel=\"icon\" href=\"http://assets.tumblr.com/images/favicon.gif?2\" type=\"image/gif\"/>\\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\\n <meta name=\"robots\" content=\"noindex\"/>\\n <link rel=\"stylesheet\" href=\"http://assets.tumblr.com/stylesheets/compressed/status_blue.css\"\\n type=\"text/css\" media=\"screen\" charset=\"utf-8\">\\n <title>We\\'ll be back shortly</title>\\n <style type=\"text/css\">\\n hr { display:none; }\\n address { display:none; }\\n </style>\\n </head>\\n <body onload=\"if (top != self) document.write(\\'<body style=\\\\\\'background:transparent;\\\\\\'></body>\\');\">\\n <table height=\"100%\" width=\"100%\" id=\"tumbeasts\">\\n <tr>\\n <td align=\"center\" valign=\"middle\">\\n <div id=\"tumbeasts_503_container\" style=\"display:none\">\\n <div class=\"tumbeasts_image\"> </div>\\n\\n <h1 id=\"l10n_title\">We\\'ll be back shortly</h1>\\n\\n <div class=\"sorry\" style=\"width:480px;\">\\n <p id=\"l10n_feed_tumbeasts\">\\n We may have forgotten to feed the wild Tumbeasts that roam our datacenter,\\n resulting in gnawing and/or mutiny. Animal control has been alerted.\\n </p>\\n </div>\\n\\n <div style=\"font:11px \\'Lucida Grande\\',Verdana,sans-serif; margin-top:18px; color:#344a5f;\" id=\"l10n_artwork_credit\">\\n Artwork by <a href=\"http://theoatmeal.com/\" target=\"_blank\" style=\"color:#344a5f;\">The Oatmeal</a>\\n </div>\\n </div>\\n\\n <div id=\"container\">\\n <div id=\"plain_503_container\">\\n <h1 id=\"l10n_title_2\">We\\'ll be back shortly</h1>\\n \\n <div class=\"sorry\">\\n <p id=\"l10n_sorry\">\\n Our servers are over capacity and certain pages may be temporarily unavailable.\\n We\\'re incredibly sorry for the inconvenience.\\n </p>\\n </div>\\n </div>\\n </div>\\n </td>\\n </tr>\\n </table>\\n\\n <script type=\"text/javascript\">\\n var window_width = parseInt(window.innerWidth ? window.innerWidth : document.body.clientWidth);\\n \\n if (window.location.hostname == \\'www.tumblr.com\\' && window_width > 510) {\\n document.write(\\'<style type=\"text/css\">#container { display:none; }</style>\\');\\n document.getElementById(\\'tumbeasts_503_container\\').style.display = \\'block\\';\\n }\\n </script>\\n \\n <script type=\"text/javascript\" language=\"javascript\">var status_code = \\'503\\'</script>\\n <script type=\"text/javascript\" language=\"javascript\" src=\"http://assets.tumblr.com/languages/errors.js\"></script>\\n </body>\\n</html>\\n'\n>>> \n```\n\nThey both return the same error. First one should show the HTML, second one should show an RSS feed.\n\nI reproduced this on different servers and different times, in Python 2.6.5 and Python 2.7.1+. In Wget and urllib2 they work.\n",
"Version 0.8 introduces major change to the backend side of the library. Starting from this version Requests uses urllib3 instead of urllib2. This introduced some bugs. Take a look at issue [#256](https://github.com/kennethreitz/requests/issues/256)\n",
"Looks like it's related to the url path. Thanks for the report. \n\nLuckily, that's what major releases are for :)\n"
] |
https://api.github.com/repos/psf/requests/issues/260
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/260/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/260/comments
|
https://api.github.com/repos/psf/requests/issues/260/events
|
https://github.com/psf/requests/pull/260
| 2,227,732 |
MDExOlB1bGxSZXF1ZXN0NDkwNjgw
| 260 |
Doc changes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-11-14T07:15:36Z
|
2021-09-08T13:05:54Z
|
2011-11-14T21:43:01Z
|
CONTRIBUTOR
|
resolved
|
Removed some closed issues from todo and added a reference to [requests-oauth](https://github.com/maraujop/requests-oauth) in quickstart.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/260/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/260/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/260.diff",
"html_url": "https://github.com/psf/requests/pull/260",
"merged_at": "2011-11-14T21:43:01Z",
"patch_url": "https://github.com/psf/requests/pull/260.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/260"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/259
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/259/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/259/comments
|
https://api.github.com/repos/psf/requests/issues/259/events
|
https://github.com/psf/requests/issues/259
| 2,227,639 |
MDU6SXNzdWUyMjI3NjM5
| 259 |
Timeout exception not being thrown - NoneType instead
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-14T06:48:41Z
|
2021-09-09T11:00:49Z
|
2011-11-15T15:03:39Z
|
CONTRIBUTOR
|
resolved
|
On OS X, I'm not getting the nice Timeout exception.
``` python
>>> requests.get('http://github.com', timeout=0.001)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "requests/api.py", line 78, in get
return request('get', url, **kwargs)
File "requests/api.py", line 65, in request
prefetch=prefetch
File "requests/sessions.py", line 187, in request
r.send(prefetch=prefetch)
File "/Library/WebServer/Documents/lab/python/requests/requests/models.py", line 418, in send
timeout=self.timeout,
File "requests/packages/urllib3/connectionpool.py", line 342, in urlopen
self.timeout)
TypeError: float argument required, not NoneType
>>> requests.get('http://github.com', timeout=1.0)
<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/259/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/259/timeline
| null |
completed
| null | null | false |
[
"Minor bug in urllib3 — thanks!\n",
"v0.8.1 was just released, which fixes this!\n"
] |
https://api.github.com/repos/psf/requests/issues/258
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/258/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/258/comments
|
https://api.github.com/repos/psf/requests/issues/258/events
|
https://github.com/psf/requests/issues/258
| 2,223,695 |
MDU6SXNzdWUyMjIzNjk1
| 258 |
Make it possible to choose multipart encoding instead of form encoding
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2011-11-13T22:51:09Z
|
2021-09-09T11:00:50Z
|
2011-11-15T14:01:16Z
|
NONE
|
resolved
|
Currently multipart (multipart/form-data) encoding is used only for files. It should be possible to use it instead of form encoding (application/x-www-form-urlencoded) in every place the latter one can be used.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/258/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/258/timeline
| null |
completed
| null | null | false |
[
"Agreed! I've been wanting this for a while. Coming up with an elegant api is tricky though.\n",
"As much as I love elegant code I'm afraid that after reaching some level of complexity one has to leave elegance to others :( Could we just add yet another param (called transfer_encoding) to request method?\n",
"Requests is 100% about API elegance. The API comes before all else. \n\nI have a few ideas about what it would look like, but I'm letting it stew for a little while.\n\nIn the meantime, you can multi-part encode yourself and upload the data as a bytestring.\n",
"> I have a few ideas about what it would look like \n\nPlease share them with us so that we could evaluate them.\n\n> In the meantime, you can multi-part encode yourself and upload the data as a bytestring. \n\nThat's what I'm doing now using Poster and urllib2. I hoped for shorter code when switching to Requests :)\n",
"Add a fake file.\n",
"Deferring for now. Will reopen soon.\n"
] |
https://api.github.com/repos/psf/requests/issues/257
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/257/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/257/comments
|
https://api.github.com/repos/psf/requests/issues/257/events
|
https://github.com/psf/requests/issues/257
| 2,223,544 |
MDU6SXNzdWUyMjIzNTQ0
| 257 |
Support forum
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2011-11-13T22:20:39Z
|
2021-09-09T11:00:50Z
|
2011-11-15T14:01:30Z
|
NONE
|
resolved
|
It would be nice to have some support forum for users.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/257/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/257/timeline
| null |
completed
| null | null | false |
[
"You're on it :)\n\n## \n\nKenneth Reitz\n\nOn Nov 13, 2011, at 5:20 PM, Piotr [email protected] wrote:\n\n> It would be nice to have some support forum for users.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/257\n",
"Am I really? :)\nI proposed this because I feel the best approach is to have both a forum and a tracker. Asking questions on tracker seems an awkward idea. Setting up google group is very easy.\n",
"I can setup some phpbb or vbulletin if you want. just let me know\n",
"We actually already have a mailing list, but it's not in the docs. I'll add a link in the docs.\n\nJust send an email to `[email protected]` :)\n",
"I think a google group would have much more friction.\n",
"Give the existing mailing list a try, please. Librelist is quite wonderful.\n"
] |
https://api.github.com/repos/psf/requests/issues/256
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/256/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/256/comments
|
https://api.github.com/repos/psf/requests/issues/256/events
|
https://github.com/psf/requests/issues/256
| 2,221,215 |
MDU6SXNzdWUyMjIxMjE1
| 256 |
GET request sends full url to server - should be path only
|
{
"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 | 8 |
2011-11-13T12:32:45Z
|
2021-09-09T11:00:48Z
|
2011-11-15T14:04:29Z
|
NONE
|
resolved
|
The command `requests.get("http://www.raumzeit-podcast.de/feed/")` results in
```
GET http://www.raumzeit-podcast.de/feed/ HTTP/1.1
Host: www.raumzeit-podcast.de
Accept-Encoding: identity, deflate, compress, gzip
Accept: */*
User-Agent: python-requests/0.8.0
HTTP/1.1 301 Moved Permanently
Location: http://www.raumzeit-podcast.dehttp/www.raumzeit-podcast.de/feed/
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/html
```
Requests should send `GET /feed/ HTTP/1.1`
Version: 0.8
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/256/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/256/timeline
| null |
completed
| null | null | false |
[
"Confirmed this is an issue. Same issue arises on my rss feed as well\n\n``` python\n>>> r2 = requests.get(\"http://www.vertstudios.com/blog/feed\")\n>>> r2.url\n'http://www.vertstudios.comhttp/www.vertstudios.com/blog/feed'\n```\n",
"I also confirm. It's easy to reproduce:\n\n-) in shell A run \n\n```\npython -m SimpleHTTPServer\n```\n\n-) in shell B run \n\n```\ncurl http://localhost/this/is/a/test\n```\n\nin shell A you see \"GET /this/is/a/test HTTP/1.1\" in the access log, now\n\n-) in shell B run\n\n```\npython -c 'from requests import get; get( \"http://localhost:8000/this/is/a/test\" )'\n```\n\nin shell A this time you have \"GET http://localhost:8000/this/is/a/test HTTP/1.1\" in the access log.\n",
"Apparently the culprit is utlib3, you get the same wrong request using directly\n\n```\npython -c 'from urllib3 import PoolManager; http = PoolManager(); http.request( \"GET\", \"http://localhost:8000/this/is/an/example\" )'\n```\n\nI'm not an urlib3 expert, but I suspect that `_make_request` in `urllib3/connectionpool.py` passes the full URL (scheme and host included) instead of the path (as shown in examples http://docs.python.org/library/httplib.html#examples). I'm filing the issue on urllib3 repo to see what happens…\n",
"Did it here https://github.com/shazow/urllib3/issues/8\n",
"Interesting. Nice find! Looks like some poor handing on the server, but something we should definitely fix.\n",
"Closing for #265\n",
"v0.8.1 was just released, which fixes this!\n",
"Really nice!\n"
] |
https://api.github.com/repos/psf/requests/issues/255
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/255/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/255/comments
|
https://api.github.com/repos/psf/requests/issues/255/events
|
https://github.com/psf/requests/pull/255
| 2,219,857 |
MDExOlB1bGxSZXF1ZXN0NDg5Mzgz
| 255 |
Adding me into a Urllib3 subsection (as was in urllib3-backup).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6292?v=4",
"events_url": "https://api.github.com/users/shazow/events{/privacy}",
"followers_url": "https://api.github.com/users/shazow/followers",
"following_url": "https://api.github.com/users/shazow/following{/other_user}",
"gists_url": "https://api.github.com/users/shazow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shazow",
"id": 6292,
"login": "shazow",
"node_id": "MDQ6VXNlcjYyOTI=",
"organizations_url": "https://api.github.com/users/shazow/orgs",
"received_events_url": "https://api.github.com/users/shazow/received_events",
"repos_url": "https://api.github.com/users/shazow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shazow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shazow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shazow",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-13T02:16:29Z
|
2021-09-08T13:05:54Z
|
2011-11-13T03:52:05Z
|
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/255/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/255/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/255.diff",
"html_url": "https://github.com/psf/requests/pull/255",
"merged_at": "2011-11-13T03:52:05Z",
"patch_url": "https://github.com/psf/requests/pull/255.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/255"
}
| true |
[
"Much needed :)\n"
] |
https://api.github.com/repos/psf/requests/issues/254
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/254/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/254/comments
|
https://api.github.com/repos/psf/requests/issues/254/events
|
https://github.com/psf/requests/issues/254
| 2,216,192 |
MDU6SXNzdWUyMjE2MTky
| 254 |
Ambiguous configuration settings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-12T06:51:01Z
|
2021-09-09T11:00:57Z
|
2011-11-13T00:08:55Z
|
CONTRIBUTOR
|
resolved
|
Couple of examples can be seen [here](https://github.com/kennethreitz/requests/blob/develop/requests/sessions.py#L66-67). `timeout` and `keep_alive` are both parameters by themselves but members of the config dict. I'm not sure if this was intended, but this allows the user to define these parameters ambiguously. I think either the keys in the config dict or the arguments should be removed.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/254/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/254/timeline
| null |
completed
| null | null | false |
[
"Don't worry, `keep_alive` won't be a parameter. Still debating `timeout` though.\n"
] |
https://api.github.com/repos/psf/requests/issues/253
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/253/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/253/comments
|
https://api.github.com/repos/psf/requests/issues/253/events
|
https://github.com/psf/requests/issues/253
| 2,216,075 |
MDU6SXNzdWUyMjE2MDc1
| 253 |
Max timeout won't trigger
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2011-11-12T06:06:10Z
|
2021-09-09T11:00:49Z
|
2011-11-15T15:03:53Z
|
CONTRIBUTOR
|
resolved
|
Haven't looked at the code to see why yet, figured I'd post this here first.
``` python
>>> myconfig = {"timeout": 1.0}
>>> requests.get("www.google.com:81", config=myconfig)
```
The timeout never comes.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/253/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/253/timeline
| null |
completed
| null | null | false |
[
"So I misread the doc, timeout is actually passed as an argument to requests. This seems a bit weird, since timeout is both a possible key in the config= dictionary but also a default value in requests.defaults.\n\nRegardless, the timeout still is not working. \n\n``` python\n>>> r = requests.get(\"http://google.com:81\", timeout=1.0)\n```\n\nThis just hangs forever. \n",
"After checking through the code, this may be a problem with urllib3. \n\nThe following just hangs:\n\n``` python\n>>> import requests.packages.urllib3 as urllib3\n>>> test = urllib3.HTTPConnectionPool(\"www.google.com:81\")\n>>> r = test.urlopen(\"GET\", \"/\", timeout=1.0)\n\n```\n\nHowever, I'm not sure if timeout is ever passed to the urllib3 functions at all anyway (see [models.py](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L398-408) and note the lack of `timeout` argument)\n",
"Yeah, timeout isn't implemented in the `develop` branch quite yet.\n",
"Google is a special case. It works properly on every other server I try. Diverting for now.\n",
"v0.8.1 was just released, which fixes this!\n",
"(not google)\n"
] |
https://api.github.com/repos/psf/requests/issues/252
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/252/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/252/comments
|
https://api.github.com/repos/psf/requests/issues/252/events
|
https://github.com/psf/requests/pull/252
| 2,215,957 |
MDExOlB1bGxSZXF1ZXN0NDg4NDUz
| 252 |
Fix various documentation typos
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-12T05:11:02Z
|
2021-09-08T13:05:53Z
|
2011-11-12T05:17:21Z
|
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/252/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/252/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/252.diff",
"html_url": "https://github.com/psf/requests/pull/252",
"merged_at": "2011-11-12T05:17:21Z",
"patch_url": "https://github.com/psf/requests/pull/252.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/252"
}
| true |
[
"I love these pull requests. Thanks so much :)\n",
"What was I doing at 11 11 11 11? Fixing documentation typos. I know how to party. \n",
":sparkles: :metal: :sparkles:\n"
] |
|
https://api.github.com/repos/psf/requests/issues/251
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/251/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/251/comments
|
https://api.github.com/repos/psf/requests/issues/251/events
|
https://github.com/psf/requests/pull/251
| 2,214,431 |
MDExOlB1bGxSZXF1ZXN0NDg3ODU1
| 251 |
Correct verbose logging documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-11T22:50:37Z
|
2021-09-08T13:05:53Z
|
2011-11-11T23:00:48Z
|
CONTRIBUTOR
|
resolved
|
Includes [Verbose logging example does not work](https://github.com/dasevilla/requests/commit/2d8440ea98301131edd537c4f2010b749f005e3b#commitcomment-712251), from @dasevilla and should close [issue #250](https://github.com/kennethreitz/requests/pull/250)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/251/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/251/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/251.diff",
"html_url": "https://github.com/psf/requests/pull/251",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/251.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/251"
}
| true |
[
"Thanks! However, I would like to discourage (by not documenting) the ability to override the 'defaults'. Global state = bad :)\n",
"Alrighty, closing the request. \n",
"Sorry :)\n"
] |
https://api.github.com/repos/psf/requests/issues/250
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/250/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/250/comments
|
https://api.github.com/repos/psf/requests/issues/250/events
|
https://github.com/psf/requests/pull/250
| 2,204,357 |
MDExOlB1bGxSZXF1ZXN0NDg0NDA5
| 250 |
Verbose logging example does not work
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/162275?v=4",
"events_url": "https://api.github.com/users/dasevilla/events{/privacy}",
"followers_url": "https://api.github.com/users/dasevilla/followers",
"following_url": "https://api.github.com/users/dasevilla/following{/other_user}",
"gists_url": "https://api.github.com/users/dasevilla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dasevilla",
"id": 162275,
"login": "dasevilla",
"node_id": "MDQ6VXNlcjE2MjI3NQ==",
"organizations_url": "https://api.github.com/users/dasevilla/orgs",
"received_events_url": "https://api.github.com/users/dasevilla/received_events",
"repos_url": "https://api.github.com/users/dasevilla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dasevilla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dasevilla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dasevilla",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2011-11-10T23:34:27Z
|
2021-09-08T23:10:59Z
|
2011-11-11T22:56: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/250/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/250/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/250.diff",
"html_url": "https://github.com/psf/requests/pull/250",
"merged_at": "2011-11-11T22:56:17Z",
"patch_url": "https://github.com/psf/requests/pull/250.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/250"
}
| true |
[
"I incorporated your example into pull request [#251](https://github.com/kennethreitz/requests/pull/251).\n",
"Sorry, the docs are a little out of date :) I would like to discourage (by not documenting) the ability to override the 'defaults'. Global state = bad :)\n",
"I understand this issue is closed but how can I enable verbose logging with requests v1.1.0? With earlier versions (v0.14.2), what worked well for me was: requests.session(config={'verbose': sys.stderr}). However, this no longer works. Apologies in advance if I did not read the docs enough.\n",
"All logging performed by requests was removed in the refactor. You can, however, turn on logging for urllib3. I think it is something like\n\n``` python\nfrom requests.packages import urllib3\nurllib3.add_stderr_logger()\n```\n\nThe default level for that logger is going to be DEBUG, so if you want INFO messages too you'll have to import logging as well and pass that function `logging.INFO`.\n",
"Thanks for the quick response. Will try out and look into urllib3 logging.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/249
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/249/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/249/comments
|
https://api.github.com/repos/psf/requests/issues/249/events
|
https://github.com/psf/requests/pull/249
| 2,204,167 |
MDExOlB1bGxSZXF1ZXN0NDg0MzQy
| 249 |
The 'requests-oauth-hook' project was renamed to requests-oauth
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/162275?v=4",
"events_url": "https://api.github.com/users/dasevilla/events{/privacy}",
"followers_url": "https://api.github.com/users/dasevilla/followers",
"following_url": "https://api.github.com/users/dasevilla/following{/other_user}",
"gists_url": "https://api.github.com/users/dasevilla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dasevilla",
"id": 162275,
"login": "dasevilla",
"node_id": "MDQ6VXNlcjE2MjI3NQ==",
"organizations_url": "https://api.github.com/users/dasevilla/orgs",
"received_events_url": "https://api.github.com/users/dasevilla/received_events",
"repos_url": "https://api.github.com/users/dasevilla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dasevilla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dasevilla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dasevilla",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-10T23:14:46Z
|
2021-09-08T13:05:51Z
|
2011-11-12T15:19:04Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/249/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/249/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/249.diff",
"html_url": "https://github.com/psf/requests/pull/249",
"merged_at": "2011-11-12T15:19:11Z",
"patch_url": "https://github.com/psf/requests/pull/249.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/249"
}
| true |
[
"thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/248
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/248/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/248/comments
|
https://api.github.com/repos/psf/requests/issues/248/events
|
https://github.com/psf/requests/pull/248
| 2,171,780 |
MDExOlB1bGxSZXF1ZXN0NDcyNTMw
| 248 |
Added POST to quick start.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/503584?v=4",
"events_url": "https://api.github.com/users/joequery/events{/privacy}",
"followers_url": "https://api.github.com/users/joequery/followers",
"following_url": "https://api.github.com/users/joequery/following{/other_user}",
"gists_url": "https://api.github.com/users/joequery/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joequery",
"id": 503584,
"login": "joequery",
"node_id": "MDQ6VXNlcjUwMzU4NA==",
"organizations_url": "https://api.github.com/users/joequery/orgs",
"received_events_url": "https://api.github.com/users/joequery/received_events",
"repos_url": "https://api.github.com/users/joequery/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joequery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joequery/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joequery",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-11-08T07:39:43Z
|
2021-09-08T13:05:52Z
|
2011-11-10T06:01:50Z
|
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/248/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/248/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/248.diff",
"html_url": "https://github.com/psf/requests/pull/248",
"merged_at": "2011-11-10T06:01:50Z",
"patch_url": "https://github.com/psf/requests/pull/248.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/248"
}
| true |
[
"You changed the GET example, but the line above your change still says \"Let's get GitHub's public timeline\" :)\n",
"Ahhhhhhhhhhhh! I'll fix that real quick. \n",
"I love the POST example, but I'd like to stick to the GitHub example. Doing a get to httpbin is a bit confusing to newcomers, and isn't a very real world example. \n",
"Sure thing! \n"
] |
|
https://api.github.com/repos/psf/requests/issues/247
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/247/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/247/comments
|
https://api.github.com/repos/psf/requests/issues/247/events
|
https://github.com/psf/requests/issues/247
| 2,171,048 |
MDU6SXNzdWUyMTcxMDQ4
| 247 |
POST doesn't appear to be documented
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/663366?v=4",
"events_url": "https://api.github.com/users/r1chardj0n3s/events{/privacy}",
"followers_url": "https://api.github.com/users/r1chardj0n3s/followers",
"following_url": "https://api.github.com/users/r1chardj0n3s/following{/other_user}",
"gists_url": "https://api.github.com/users/r1chardj0n3s/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/r1chardj0n3s",
"id": 663366,
"login": "r1chardj0n3s",
"node_id": "MDQ6VXNlcjY2MzM2Ng==",
"organizations_url": "https://api.github.com/users/r1chardj0n3s/orgs",
"received_events_url": "https://api.github.com/users/r1chardj0n3s/received_events",
"repos_url": "https://api.github.com/users/r1chardj0n3s/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/r1chardj0n3s/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/r1chardj0n3s/subscriptions",
"type": "User",
"url": "https://api.github.com/users/r1chardj0n3s",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2011-11-08T04:50:48Z
|
2021-09-09T11:00:56Z
|
2011-11-13T00:09:09Z
|
CONTRIBUTOR
|
resolved
|
It took me some time to figure out how requests.post worked, and the only mention appears to be in the API doc, and then not in great detail. Am I missing something?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/247/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/247/timeline
| null |
completed
| null | null | false |
[
"http://docs.python-requests.org/en/latest/api/#requests.post\n",
"It definitely needs to be added to the quickstart.\n",
"As I said, it's in the API doc, but not in the main doc, where other much more complex topics are covered but not something as basic as requests.post.\n",
"Yes, please :-)\n",
"I'll put something together in the next couple of hours and see whatcha think. \n"
] |
https://api.github.com/repos/psf/requests/issues/246
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/246/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/246/comments
|
https://api.github.com/repos/psf/requests/issues/246/events
|
https://github.com/psf/requests/pull/246
| 2,169,300 |
MDExOlB1bGxSZXF1ZXN0NDcxNjU1
| 246 |
Added support for OPTIONS method.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/233741?v=4",
"events_url": "https://api.github.com/users/jbrendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrendel/followers",
"following_url": "https://api.github.com/users/jbrendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrendel",
"id": 233741,
"login": "jbrendel",
"node_id": "MDQ6VXNlcjIzMzc0MQ==",
"organizations_url": "https://api.github.com/users/jbrendel/orgs",
"received_events_url": "https://api.github.com/users/jbrendel/received_events",
"repos_url": "https://api.github.com/users/jbrendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrendel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-11-07T23:42:54Z
|
2021-09-08T13:05:52Z
|
2011-11-10T06:16:33Z
|
NONE
|
resolved
|
Hello!
While doing some work with a RESTful API, I noticed that the otherwise excellent requests library does not seem to support the OPTIONS request method. The way it should be handled apparently is the same as the HEAD method. So, this change here merely copies the various definitions and references to the HEAD method and changes it to OPTIONS.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/246/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/246/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/246.diff",
"html_url": "https://github.com/psf/requests/pull/246",
"merged_at": "2011-11-10T06:16:33Z",
"patch_url": "https://github.com/psf/requests/pull/246.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/246"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/245
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/245/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/245/comments
|
https://api.github.com/repos/psf/requests/issues/245/events
|
https://github.com/psf/requests/issues/245
| 2,168,108 |
MDU6SXNzdWUyMTY4MTA4
| 245 |
malformed url when using digest with query-strings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/160125?v=4",
"events_url": "https://api.github.com/users/mfeif/events{/privacy}",
"followers_url": "https://api.github.com/users/mfeif/followers",
"following_url": "https://api.github.com/users/mfeif/following{/other_user}",
"gists_url": "https://api.github.com/users/mfeif/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mfeif",
"id": 160125,
"login": "mfeif",
"node_id": "MDQ6VXNlcjE2MDEyNQ==",
"organizations_url": "https://api.github.com/users/mfeif/orgs",
"received_events_url": "https://api.github.com/users/mfeif/received_events",
"repos_url": "https://api.github.com/users/mfeif/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mfeif/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mfeif/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mfeif",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-07T22:08:26Z
|
2021-09-09T11:00:56Z
|
2011-11-13T00:10:11Z
|
NONE
|
resolved
|
When using digest auth and a URL containing a "?" the question mark is removed, it seems, from the url.
For example,
r = requests.get('http://foo.com/bar.json', auth=('digest', 'blah', 'bloh'))
works, but:
r = requests.get('http://foo.com/bar.json?really=yes', auth=('digest', 'blah', 'bloh'))
Fails. Inspecting r.request.headers['uri'] shows:
'http://foo.com/bar.jsonreally=yes'
Of course, this could be just an output but, not the actual url that it's trying to hit. Unfortunately, I only have access to one side of this conversation, so I can't tell you what the library is actually sending/asking for. I'll try and find another server that I can test.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/245/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/245/timeline
| null |
completed
| null | null | false |
[
"For URL parameters, use the parameters argument in your request.\n\n``` python\n>>> url = \"http://httpbin.org/digest-auth/auth/user/passwd\"\n>>> auth = (\"digest\", \"user\", \"passwd\")\n>>> params = {\"really\":\"yes\"}\n>>> r = requests.get(url, auth=auth, params=params)\n>>> r.ok\nTrue\n>>> dir(r.request)\n['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_build_response', '_build_url', '_enc_data', '_enc_params', '_encode_params', '_get_opener', 'allow_redirects', 'auth', 'config', 'cookies', 'data', 'files', 'headers', 'hooks', 'method', 'params', 'proxies', 'redirect', 'response', 'send', 'sent', 'timeout', 'url']\n>>> r.request.url\n'http://httpbin.org/digest-auth/auth/user/passwd'\n>>> r.request.params\n[('really', 'yes')]\n>>> r.request.auth\n(<function http_digest at 0x1ea3e60>, ('user', 'passwd'))\n\n```\n",
"Ok, I didn't see that in any docs. In fact, I don't see it now, other than the low-level API docs.\n\nThe spirit of requests is that it's supposed to be simple; a URL that works in a browser should work in requests, right? At the very least it shouldn't fail silently and corrupt the URL: I think it's still a bug.\n\nIn the mean time, I'll use the feature tip you pointed out. Thanks.\n",
"I agree that the documentation should cover that, and I'll try to get to it in the next couple of days.\n\nAs for your error, I was actually not able to replicate the disappearing '?'\n\n``` python\n>>> r = requests.get(\"http://httpbin.org/get?really=yes\", auth=(\"digest\", \"blah\", \"bloh\"))\n>>> r.request.url\n'http://httpbin.org/get?really=yes'\n```\n\nTry pulling from the develop branch and see if you still get the issue. \n"
] |
https://api.github.com/repos/psf/requests/issues/244
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/244/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/244/comments
|
https://api.github.com/repos/psf/requests/issues/244/events
|
https://github.com/psf/requests/pull/244
| 2,159,490 |
MDExOlB1bGxSZXF1ZXN0NDY4NDEy
| 244 |
Updated your 2001, to 2011... unless you went back in time ;)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/141967?v=4",
"events_url": "https://api.github.com/users/neogenix/events{/privacy}",
"followers_url": "https://api.github.com/users/neogenix/followers",
"following_url": "https://api.github.com/users/neogenix/following{/other_user}",
"gists_url": "https://api.github.com/users/neogenix/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neogenix",
"id": 141967,
"login": "neogenix",
"node_id": "MDQ6VXNlcjE0MTk2Nw==",
"organizations_url": "https://api.github.com/users/neogenix/orgs",
"received_events_url": "https://api.github.com/users/neogenix/received_events",
"repos_url": "https://api.github.com/users/neogenix/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neogenix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neogenix/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neogenix",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-07T03:57:55Z
|
2021-09-08T13:05:51Z
|
2011-11-07T03:58:34Z
|
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/244/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/244/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/244.diff",
"html_url": "https://github.com/psf/requests/pull/244",
"merged_at": "2011-11-07T03:58:34Z",
"patch_url": "https://github.com/psf/requests/pull/244.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/244"
}
| true |
[
"whoops :)\n",
"I was hoping for time travel, personally ;)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/243
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/243/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/243/comments
|
https://api.github.com/repos/psf/requests/issues/243/events
|
https://github.com/psf/requests/pull/243
| 2,157,862 |
MDExOlB1bGxSZXF1ZXN0NDY3OTc0
| 243 |
#GH-241
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/554079?v=4",
"events_url": "https://api.github.com/users/juanriaza/events{/privacy}",
"followers_url": "https://api.github.com/users/juanriaza/followers",
"following_url": "https://api.github.com/users/juanriaza/following{/other_user}",
"gists_url": "https://api.github.com/users/juanriaza/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/juanriaza",
"id": 554079,
"login": "juanriaza",
"node_id": "MDQ6VXNlcjU1NDA3OQ==",
"organizations_url": "https://api.github.com/users/juanriaza/orgs",
"received_events_url": "https://api.github.com/users/juanriaza/received_events",
"repos_url": "https://api.github.com/users/juanriaza/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/juanriaza/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/juanriaza/subscriptions",
"type": "User",
"url": "https://api.github.com/users/juanriaza",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-11-06T20:49:17Z
|
2021-09-08T13:05:50Z
|
2011-11-06T20:59:43Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/554079?v=4",
"events_url": "https://api.github.com/users/juanriaza/events{/privacy}",
"followers_url": "https://api.github.com/users/juanriaza/followers",
"following_url": "https://api.github.com/users/juanriaza/following{/other_user}",
"gists_url": "https://api.github.com/users/juanriaza/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/juanriaza",
"id": 554079,
"login": "juanriaza",
"node_id": "MDQ6VXNlcjU1NDA3OQ==",
"organizations_url": "https://api.github.com/users/juanriaza/orgs",
"received_events_url": "https://api.github.com/users/juanriaza/received_events",
"repos_url": "https://api.github.com/users/juanriaza/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/juanriaza/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/juanriaza/subscriptions",
"type": "User",
"url": "https://api.github.com/users/juanriaza",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/243/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/243/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/243.diff",
"html_url": "https://github.com/psf/requests/pull/243",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/243.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/243"
}
| true |
[] |
|
https://api.github.com/repos/psf/requests/issues/242
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/242/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/242/comments
|
https://api.github.com/repos/psf/requests/issues/242/events
|
https://github.com/psf/requests/issues/242
| 2,157,295 |
MDU6SXNzdWUyMTU3Mjk1
| 242 |
Non-blocking async.map
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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 | 2 |
2011-11-06T18:32:00Z
|
2021-09-09T09:00:40Z
|
2012-03-31T07:16:09Z
|
CONTRIBUTOR
|
resolved
|
``` python
q = [...list-of-requests...]
async.dispatch(q, size=10)
# Immediately continues.
q.append(...request...)
# Adds a new request to the queue.
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/242/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/242/timeline
| null |
completed
| null | null | false |
[
"map should block. I modified requests.async.send to address this and to give a non-blocking option.\n",
"This has been implemented.\n"
] |
https://api.github.com/repos/psf/requests/issues/241
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/241/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/241/comments
|
https://api.github.com/repos/psf/requests/issues/241/events
|
https://github.com/psf/requests/issues/241
| 2,157,198 |
MDU6SXNzdWUyMTU3MTk4
| 241 |
Add Throttling to async.map
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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-11-06T18:11:23Z
|
2021-09-09T11:00:57Z
|
2011-11-12T15:43:56Z
|
CONTRIBUTOR
|
resolved
|
Currently, `async.map` will send all of the request objects at the same time. It'd be nice to limit the number of current connections.
``` python
async.map(size=3)
```
`size` would default to `None`, obviously.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/241/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/241/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/240
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/240/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/240/comments
|
https://api.github.com/repos/psf/requests/issues/240/events
|
https://github.com/psf/requests/issues/240
| 2,152,275 |
MDU6SXNzdWUyMTUyMjc1
| 240 |
Timing HTTP Responses
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37787?v=4",
"events_url": "https://api.github.com/users/daleharvey/events{/privacy}",
"followers_url": "https://api.github.com/users/daleharvey/followers",
"following_url": "https://api.github.com/users/daleharvey/following{/other_user}",
"gists_url": "https://api.github.com/users/daleharvey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daleharvey",
"id": 37787,
"login": "daleharvey",
"node_id": "MDQ6VXNlcjM3Nzg3",
"organizations_url": "https://api.github.com/users/daleharvey/orgs",
"received_events_url": "https://api.github.com/users/daleharvey/received_events",
"repos_url": "https://api.github.com/users/daleharvey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daleharvey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daleharvey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daleharvey",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-05T15:05:30Z
|
2021-09-09T11:00:58Z
|
2011-11-05T15:28:56Z
|
NONE
|
resolved
|
I would like to be able to time HTTP responses, logging the url along with the time taken to a file
It seems like this should be reasonably easy with pre + post request hooks, I havent tried yet, this is mostly a feature request / asking if anyone else had already implemented this as I cant see a mailing list or anywhere to discuss these things.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/240/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/240/timeline
| null |
completed
| null | null | false |
[
"Super simple :)\n\n``` python\nimport time\nimport requests\n\n\ntime0 = time.time()\nr = requests.get('http://github.com')\ntime1 = time.time()\n\nprint time1 - time0\n```\n",
"heh yeh, I was looking more for the ability to inject the timing, as the requests code is buried inside various libraries and most of the time the timing wouldnt matter, but during load tests it would be useful\n\neither way it isnt actually an issue, cheers\n",
"Ah, you could do it with hooks then, but that wouldn't be ideal.\n"
] |
https://api.github.com/repos/psf/requests/issues/239
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/239/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/239/comments
|
https://api.github.com/repos/psf/requests/issues/239/events
|
https://github.com/psf/requests/issues/239
| 2,151,723 |
MDU6SXNzdWUyMTUxNzIz
| 239 |
Too many open files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37787?v=4",
"events_url": "https://api.github.com/users/daleharvey/events{/privacy}",
"followers_url": "https://api.github.com/users/daleharvey/followers",
"following_url": "https://api.github.com/users/daleharvey/following{/other_user}",
"gists_url": "https://api.github.com/users/daleharvey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daleharvey",
"id": 37787,
"login": "daleharvey",
"node_id": "MDQ6VXNlcjM3Nzg3",
"organizations_url": "https://api.github.com/users/daleharvey/orgs",
"received_events_url": "https://api.github.com/users/daleharvey/received_events",
"repos_url": "https://api.github.com/users/daleharvey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daleharvey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daleharvey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daleharvey",
"user_view_type": "public"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 191274,
"name": "Contributor Friendly",
"node_id": "MDU6TGFiZWwxOTEyNzQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Contributor%20Friendly"
}
] |
closed
| true | null |
[] | null | 81 |
2011-11-05T12:37:30Z
|
2021-09-08T01:21:03Z
|
2012-07-27T06:07:41Z
|
NONE
|
resolved
|
I am building a basic load generator and started running into file descriptor limits, I havent seen any documentation pertaining to how to release resources, so either I am doing it wrong and the docs need updated, or requests is leaking file descriptors somewhere (without support for keepalive I am slightly confused at why any files would be left open at all)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/239/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/239/timeline
| null |
completed
| null | null | false |
[
"Where you using `requests.async`?\n",
"nope, all requests were reasonably plain requests.get / requests.post, I am still seeing a few in there\n\n```\n$ lsof | grep localhost | wc -l\n110\n```\n\nall but 4/5 of them are of the format\n\n```\nPython 82117 daleharvey 123u IPv4 0xffffff800da304e0 0t0 TCP localhost:61488->localhost:http (CLOSE_WAIT)\n```\n",
"I'm a bit baffled by this, to be honest. \n",
"Hah ill take another shot at reproducing it reliably, if I cant ill close\n",
"I've seen this happening to me, but only when I'm using the async module w/ 200+ simultaneous connections.\n",
"Hi,\nI got exactly the same problem using requests and monkey patching with gevent : some connections staying in CLOSE_WAIT .\nMaybe a problem with gevent so .\n",
"It may be problem of ulimit -n. Try with a higher value.\n",
"\"Too many open files\" is the result of the bug caused by sockets staying in CLOSE_WAIT .\nSo ulimit won't fix just make a workaround .\n",
"@tamiel how do we fix this?\n",
"I will do more tests asap and try to fix .\n",
"I've looked into it, and seems to be a problem with all libraries using httplib.HTTPSConnection. \n",
"Posted an example here :\n\nhttps://gist.github.com/1512329\n",
"I just encountered a very similar error using an async pool with only HTTP connections - I'm still investigating but passing a pool size to async.map makes the error reproduce quickly.\n",
"Any fixes to this? This makes Requests unusable with gevent..\n",
"It's all about the `CLOSE_WAIT`s. Just have to close them. I'm not sure why they're still open though.\n",
"Is it a urllib3 issue? Having to close these by ourselves isnt a great idea i feel.\n",
"It's more of a general issue. We can keep the conversation here. \n",
"Ok just to give you a perspective, we are trying to move from httplib2 to requests, and we dont see this issue with httplib2. So its not a general issue for sure.\n",
"By general i mean that it's a very serious issue that effects everyone involved.\n",
"so how do we solve this? we really want to use requests + slumber moving forward\n",
"I'd love to know the answer to that.\n",
"The leak appears to be due to the internal redirect handling, which causes new requests to be generated before the pending responses have been consumed. In testing acdha@730c0e2e2bef77968a86962f9d5f2bebba4d19ec has an under-satisfying but effective fix simply by forcing each response to be consumed before continuing.\n\nThis required changes in two places which makes me want to refactor the interface slightly but I'm out of time to continue currently.\n",
"#399 has a fix which works well in my async load generator (https://github.com/acdha/webtoolbox/blob/master/bin/http_bench.py) with thousands of requests and a low fd ulimit\n",
"I have run into the same issue when using async -- kludged a workaround by chunking requests and deleting responses / calling gc.collect\n",
"I believe I was running into this today connecting to a licensed server that only allows 5 connections. \n\nUsing async I could only GET 4 things before it paused for 60 seconds.\n\nUsing the normal GET with consumption I could fetch about 150 things serially in under 40 seconds.\n\nHaven't made my kludge yet since I saw this issue. \n",
"Just got this error while using ipython and got this message. This is just making each request one at a time, but I think I got something similar when using async. \n\n```\nERROR: Internal Python error in the inspect module.\nBelow is the traceback from this internal error.\nTraceback (most recent call last):\n File \"/Library/Python/2.7/site-packages/IPython/core/ultratb.py\", line 756, in structured_traceback\n File \"/Library/Python/2.7/site-packages/IPython/core/ultratb.py\", line 242, in _fixed_getinnerframes\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py\", line 1035, in getinnerframes\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py\", line 995, in getframeinfo\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py\", line 456, in getsourcefile\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py\", line 485, in getmodule\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py\", line 469, in getabsfile\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py\", line 347, in abspath\nOSError: [Errno 24] Too many open files\n\nUnfortunately, your original traceback can not be constructed.\n```\n\nOddly, I think when using just the normal Python interpreter I get a \"Max Retries Error\" but I think that is another issue with me doing requests on all the same domain, but not sure.\n",
"I ran into this on the first project I had where allow_redirects was True; it appears to be caused by the redirection chain leaking response objects which aren't released even with prefetch=True. This fixed it in my initial testing:\n\n```\n [i.raw.release_conn() for i in resp.history]\n resp.raw.release_conn()\n```\n",
"Hmmm..\n",
"@acdha setting:\n\n```\nrequests.defaults.defaults['allow_redirects'] = False\n```\n\nbefore I make any requests still results in the same error, but I think this isn't an option for my implementation as all the requests I'm making will require a redirect =/ \n",
"@dalanmiller How are you processing your responses? I was previously using `async.map` with a response hook and it _appears_ to be more stable using a simple loop over `async.imap`:\n\n``` python\nfor resp in requests.async.imap(reqs, size=8):\n try:\n print resp.status_code, resp.url\n finally:\n [i.raw.release_conn() for i in resp.history]\n resp.raw.release_conn()\n```\n"
] |
https://api.github.com/repos/psf/requests/issues/238
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/238/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/238/comments
|
https://api.github.com/repos/psf/requests/issues/238/events
|
https://github.com/psf/requests/pull/238
| 2,144,513 |
MDExOlB1bGxSZXF1ZXN0NDY0MDUw
| 238 |
Fixed a broken link in the docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31269?v=4",
"events_url": "https://api.github.com/users/brutasse/events{/privacy}",
"followers_url": "https://api.github.com/users/brutasse/followers",
"following_url": "https://api.github.com/users/brutasse/following{/other_user}",
"gists_url": "https://api.github.com/users/brutasse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brutasse",
"id": 31269,
"login": "brutasse",
"node_id": "MDQ6VXNlcjMxMjY5",
"organizations_url": "https://api.github.com/users/brutasse/orgs",
"received_events_url": "https://api.github.com/users/brutasse/received_events",
"repos_url": "https://api.github.com/users/brutasse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brutasse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brutasse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brutasse",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-11-04T14:50:30Z
|
2021-09-08T12:01:36Z
|
2011-11-04T14:51:07Z
|
CONTRIBUTOR
|
resolved
|
The link to the advanced section on http://docs.python-requests.org/en/latest/user/quickstart/ was broken, so here's a quick fix!
Thanks,
Bruno
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/238/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/238/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/238.diff",
"html_url": "https://github.com/psf/requests/pull/238",
"merged_at": "2011-11-04T14:51:07Z",
"patch_url": "https://github.com/psf/requests/pull/238.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/238"
}
| true |
[
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/237
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/237/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/237/comments
|
https://api.github.com/repos/psf/requests/issues/237/events
|
https://github.com/psf/requests/issues/237
| 2,138,560 |
MDU6SXNzdWUyMTM4NTYw
| 237 |
infinite recursion on 401 error
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/160125?v=4",
"events_url": "https://api.github.com/users/mfeif/events{/privacy}",
"followers_url": "https://api.github.com/users/mfeif/followers",
"following_url": "https://api.github.com/users/mfeif/following{/other_user}",
"gists_url": "https://api.github.com/users/mfeif/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mfeif",
"id": 160125,
"login": "mfeif",
"node_id": "MDQ6VXNlcjE2MDEyNQ==",
"organizations_url": "https://api.github.com/users/mfeif/orgs",
"received_events_url": "https://api.github.com/users/mfeif/received_events",
"repos_url": "https://api.github.com/users/mfeif/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mfeif/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mfeif/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mfeif",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2011-11-03T22:42:02Z
|
2021-09-09T04:00:35Z
|
2012-07-27T06:07:16Z
|
NONE
|
resolved
|
I'm using requests 0.7.4, and am having a strange problem with a GET that is digest protected.
The request takes a long time (2-3 minutes) to come back, and when it does, I get this:
hooks.py:38: UserWarning: maximum recursion depth exceeded while calling a Python object
warnings.warn(str(why))
401
HTTP Digest: Access denied.
The same request works fine in a browser using the same auth credentials.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/237/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/237/timeline
| null |
completed
| null | null | false |
[
"Ouch — Thanks for the the bug! \n",
"In 0.7.5 \"digest\" authentication fails for me too.\nI am sending a GET request with parameters (against Apache)\n\nIf I change line 70 of auth.py from:\n\n```\npath = urlparse(r.request.url).path\n```\n\nto:\n\n```\npath = r.url\n```\n\nauthentication succeeds.\n",
"@osuchw, that makes all of my digest auth endpoints fail. What service are you using?\n",
"Unfortunately the service is not public :/.\nI believe the file I try to access is served by httpd from busybox.\n\nComparing the Auth headers generated by 0.6.6 (which works) and 0.7.5 the difference is that 0.6.6 version includes url parameters in the \"uri\" and 0.7.5 does not. For example:\n\n0.7.5:\nDigest username=\"FakeUser\", realm=\"Sage Digital ENDEC\", nonce=\"lJq1Tg==24beb53fdc1227725609de6067a97e743b33e2ec\", uri=\"/cgi-bin/logcgi.cgi\", response=\"a2eca1bd05b3aea2a65f506dd3c7b957\", algorithm=\"MD5\", qop=auth, nc=00000001, cnonce=\"79715aa24c676321\"\n\n0.6.6\nDigest username=\"FakeUser\", realm=\"Sage Digital ENDEC\", nonce=\"uum1Tg==a95c28cb289c85c35760855764c6dcb991f3da27\", uri=\"/cgi-bin/logcgi.cgi?xmlfile=xml+file&NumRecs=100&StartRec=0\", response=\"a0e4e98576a094412962a9542d994acb\", algorithm=\"MD5\", qop=auth, nc=00000001, cnonce=\"e99903411b95b469\"\n",
"ah! That'll be simple to fix. Thanks :) \n\n## \n\nKenneth Reitz\n\nOn Sunday, November 6, 2011 at 6:45 PM, osuchw wrote:\n\n> Unfortunately the service is not public :/.\n> I believe the file I try to access is served by httpd from busybox.\n> \n> Comparing the Auth headers generated by 0.6.6 (which works) and 0.7.5 the difference is that 0.6.6 version includes url parameters in the \"uri\" and 0.7.5 does not. For example:\n> \n> 0.7.5:\n> Digest username=\"FakeUser\", realm=\"Sage Digital ENDEC\", nonce=\"lJq1Tg==24beb53fdc1227725609de6067a97e743b33e2ec\", uri=\"/cgi-bin/logcgi.cgi\", response=\"a2eca1bd05b3aea2a65f506dd3c7b957\", algorithm=\"MD5\", qop=auth, nc=00000001, cnonce=\"79715aa24c676321\"\n> \n> 0.6.6\n> Digest username=\"FakeUser\", realm=\"Sage Digital ENDEC\", nonce=\"uum1Tg==a95c28cb289c85c35760855764c6dcb991f3da27\", uri=\"/cgi-bin/logcgi.cgi?xmlfile=xml+file&NumRecs=100&StartRec=0\", response=\"a0e4e98576a094412962a9542d994acb\", algorithm=\"MD5\", qop=auth, nc=00000001, cnonce=\"e99903411b95b469\"\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/237#issuecomment-2648588\n",
"So should we roll back to 0.6.6 for the time being if we need digest?\n",
"@mfeif, Requests v0.7.6 was just released that fixes this :)\n",
"The new rev didn't solve my bug... what do you need from me to help track it down?\n",
"One thing I discovered is that requests seems to be stripping a query string out of the URL, thus:\n\nurl=\"/testfeed.json?foo=bar\"\n\nbecomes\n\nurl=\"/testfeed.jsonfoo=bar\"\n\nAt least as inspected by doing r.request.headers after the failed request comes back.\n\nI confirmed that the feed works if I take off the query strings.\n\nI'll open a new bug; I can't re-open this one.\n",
"Any word on this? I don't see another open bug that covers this as indicated by @mfeif. \nI'm bumping up against infinite recursion with 401 responses using digest auth. \n\n```\nFile \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/api.py\", line 98, in put\n return request('put', url, data=data, **kwargs)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/api.py\", line 44, in request\n return session.request(method=method, url=url, **kwargs)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/sessions.py\", line 279, in request\n resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/sessions.py\", line 374, in send\n r = adapter.send(request, **kwargs)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 219, in send\n r = self.build_response(request, resp)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 113, in build_response\n response = dispatch_hook('response', req.hooks, response)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/hooks.py\", line 39, in dispatch_hook\n _hook_data = hook(hook_data)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/auth.py\", line 156, in handle_401\n _r = r.connection.send(r.request)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 219, in send\n r = self.build_response(request, resp)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 113, in build_response\n response = dispatch_hook('response', req.hooks, response)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/hooks.py\", line 39, in dispatch_hook\n _hook_data = hook(hook_data)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/auth.py\", line 156, in handle_401\n _r = r.connection.send(r.request)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 219, in send\n r = self.build_response(request, resp)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/adapters.py\", line 113, in build_response\n response = dispatch_hook('response', req.hooks, response)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/hooks.py\", line 39, in dispatch_hook\n _hook_data = hook(hook_data)\n File \"/Users/jmakeig/Library/Python/2.7/lib/python/site-packages/requests/auth.py\", line 156, in handle_401\n```\n",
"@jmakeig could you file a new issue for this?\n"
] |
https://api.github.com/repos/psf/requests/issues/236
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/236/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/236/comments
|
https://api.github.com/repos/psf/requests/issues/236/events
|
https://github.com/psf/requests/issues/236
| 2,130,686 |
MDU6SXNzdWUyMTMwNjg2
| 236 |
AttributeError while trying to read `content` attr
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/111193?v=4",
"events_url": "https://api.github.com/users/OldhamMade/events{/privacy}",
"followers_url": "https://api.github.com/users/OldhamMade/followers",
"following_url": "https://api.github.com/users/OldhamMade/following{/other_user}",
"gists_url": "https://api.github.com/users/OldhamMade/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/OldhamMade",
"id": 111193,
"login": "OldhamMade",
"node_id": "MDQ6VXNlcjExMTE5Mw==",
"organizations_url": "https://api.github.com/users/OldhamMade/orgs",
"received_events_url": "https://api.github.com/users/OldhamMade/received_events",
"repos_url": "https://api.github.com/users/OldhamMade/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/OldhamMade/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/OldhamMade/subscriptions",
"type": "User",
"url": "https://api.github.com/users/OldhamMade",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2011-11-03T09:46:18Z
|
2021-09-09T11:00:59Z
|
2011-11-05T03:24:45Z
|
NONE
|
resolved
|
It seems that if there's a problem with obtaining the body of a request, `requests` throws an error while trying to read it.
Code:
``` python
import requests
def main():
r = requests.get("some-flaky-url")
if not r.content:
raise Exception('content was flaky')
return r.content
main()
```
error:
```
Traceback (most recent call last):
File "test.py", line 5, in main:
if not r.content:
File "eggs/requests-0.7.4-py2.6.egg/requests/models.py", line 499, in content
self._content = self.raw.read()
AttributeError: 'NoneType' object has no attribute 'read'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/236/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/236/timeline
| null |
completed
| null | null | false |
[
"It would be better to check the `ok` attribute on the response:\n\n``` python\nr = requests.get(\"some-flaky-url\")\nif not r.ok:\n raise Exception('content was flaky')\nreturn r.content\n```\n",
"Isn't it more pythonic to check what you're actually returning/working with (eg, the `content`)? One would expect that, in the case of something like a 304, `r.ok` would be `True` and `r.content` would be `None`; my example would return the required exception, whereas yours may cause failures further along.\n\nI guess I could modify my example to check `if not r.ok and not r.content`, but I believe that would still raise the `AttributeError` in the same circumstance?\n",
"`r.content` should definitely be `None` in this situation.\n"
] |
https://api.github.com/repos/psf/requests/issues/235
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/235/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/235/comments
|
https://api.github.com/repos/psf/requests/issues/235/events
|
https://github.com/psf/requests/pull/235
| 2,129,755 |
MDExOlB1bGxSZXF1ZXN0NDU5MTg1
| 235 |
Fixes an issue with auth and redirects
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/185043?v=4",
"events_url": "https://api.github.com/users/davidfischer/events{/privacy}",
"followers_url": "https://api.github.com/users/davidfischer/followers",
"following_url": "https://api.github.com/users/davidfischer/following{/other_user}",
"gists_url": "https://api.github.com/users/davidfischer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidfischer",
"id": 185043,
"login": "davidfischer",
"node_id": "MDQ6VXNlcjE4NTA0Mw==",
"organizations_url": "https://api.github.com/users/davidfischer/orgs",
"received_events_url": "https://api.github.com/users/davidfischer/received_events",
"repos_url": "https://api.github.com/users/davidfischer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidfischer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidfischer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidfischer",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-03T06:36:05Z
|
2021-09-08T12:01:35Z
|
2011-11-05T03:32:04Z
|
CONTRIBUTOR
|
resolved
|
The `auth.dispatch` method creates a modified `auth` tuple. When the tuple is passed to a new request (as a result of a redirect) then the new `auth` is incorrect and authorization will fail. This one-liner simply resets the `auth` tuple to the original tuple.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/235/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/235/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/235.diff",
"html_url": "https://github.com/psf/requests/pull/235",
"merged_at": "2011-11-05T03:32:04Z",
"patch_url": "https://github.com/psf/requests/pull/235.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/235"
}
| true |
[
"After sleeping on it, I don't think this solution is the best one. I think a better solution is to save the original `auth` tuple (`_auth`?) and then pass that to any new requests.\n",
"Excellent, thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/234
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/234/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/234/comments
|
https://api.github.com/repos/psf/requests/issues/234/events
|
https://github.com/psf/requests/pull/234
| 2,104,154 |
MDExOlB1bGxSZXF1ZXN0NDUxMDEw
| 234 |
ch ch chcnages
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/773186?v=4",
"events_url": "https://api.github.com/users/shanemcd/events{/privacy}",
"followers_url": "https://api.github.com/users/shanemcd/followers",
"following_url": "https://api.github.com/users/shanemcd/following{/other_user}",
"gists_url": "https://api.github.com/users/shanemcd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shanemcd",
"id": 773186,
"login": "shanemcd",
"node_id": "MDQ6VXNlcjc3MzE4Ng==",
"organizations_url": "https://api.github.com/users/shanemcd/orgs",
"received_events_url": "https://api.github.com/users/shanemcd/received_events",
"repos_url": "https://api.github.com/users/shanemcd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shanemcd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shanemcd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shanemcd",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-11-01T01:52:18Z
|
2021-09-08T13:05:50Z
|
2011-11-01T01:53:07Z
|
CONTRIBUTOR
|
resolved
|
via @kennethreitz
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/234/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/234/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/234.diff",
"html_url": "https://github.com/psf/requests/pull/234",
"merged_at": "2011-11-01T01:53:07Z",
"patch_url": "https://github.com/psf/requests/pull/234.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/234"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/233
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/233/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/233/comments
|
https://api.github.com/repos/psf/requests/issues/233/events
|
https://github.com/psf/requests/pull/233
| 2,104,022 |
MDExOlB1bGxSZXF1ZXN0NDUwOTc0
| 233 |
Update docs/_themes/kr/static/flasky.css_t
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/773186?v=4",
"events_url": "https://api.github.com/users/shanemcd/events{/privacy}",
"followers_url": "https://api.github.com/users/shanemcd/followers",
"following_url": "https://api.github.com/users/shanemcd/following{/other_user}",
"gists_url": "https://api.github.com/users/shanemcd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shanemcd",
"id": 773186,
"login": "shanemcd",
"node_id": "MDQ6VXNlcjc3MzE4Ng==",
"organizations_url": "https://api.github.com/users/shanemcd/orgs",
"received_events_url": "https://api.github.com/users/shanemcd/received_events",
"repos_url": "https://api.github.com/users/shanemcd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shanemcd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shanemcd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shanemcd",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2011-11-01T01:25:09Z
|
2021-09-08T12:01:34Z
|
2011-11-01T01:26: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/233/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/233/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/233.diff",
"html_url": "https://github.com/psf/requests/pull/233",
"merged_at": "2011-11-01T01:26:52Z",
"patch_url": "https://github.com/psf/requests/pull/233.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/233"
}
| true |
[
"THANK YOU HERE IS CAKE :cake:\n",
"See #234 for more\n"
] |
|
https://api.github.com/repos/psf/requests/issues/232
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/232/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/232/comments
|
https://api.github.com/repos/psf/requests/issues/232/events
|
https://github.com/psf/requests/issues/232
| 2,095,132 |
MDU6SXNzdWUyMDk1MTMy
| 232 |
Document what exceptions may be raised
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/73564?v=4",
"events_url": "https://api.github.com/users/rboulton/events{/privacy}",
"followers_url": "https://api.github.com/users/rboulton/followers",
"following_url": "https://api.github.com/users/rboulton/following{/other_user}",
"gists_url": "https://api.github.com/users/rboulton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rboulton",
"id": 73564,
"login": "rboulton",
"node_id": "MDQ6VXNlcjczNTY0",
"organizations_url": "https://api.github.com/users/rboulton/orgs",
"received_events_url": "https://api.github.com/users/rboulton/received_events",
"repos_url": "https://api.github.com/users/rboulton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rboulton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rboulton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rboulton",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2011-10-31T09:29:53Z
|
2021-09-09T11:00:55Z
|
2011-11-13T00:10:42Z
|
CONTRIBUTOR
|
resolved
|
I'd like to be able to write something which will catch any exceptions raised when performing a request, so I can handle them appropriately. However, I'm not sure which exceptions might get raised; looking at the code, I think urllib{,2,3} exceptions can occur, as well as ones from requests.exceptions.
Ideally, I'd like to be able to do try:... except requests.exceptions.RequestException and have that catch any exceptions due to making the HTTP request; this could probably be accomplished by monkeypatching the urllib exceptions to add RequestException as a base class, though maybe that's too ugly. Some documentation of what I need to catch, though, would be a good start.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/232/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/232/timeline
| null |
completed
| null | null | false |
[
":+1:\n",
"@bitprophet has some further thoughts on connection issues that I may or may not agree with.\n",
"Yea, thoughts like \"man, that @kennethreitz is such a jerk!\". ;)\n\n---\n\nA weak Monday morning attempt to recapture my IRC arguments:\n\nThere are, IMO, two types of failure modes in this kind of library: network failures, such that you never connect to or hear back from the HTTP server; and HTTP failures, such that you successfully get back a non-200 response.\n\nKenneth's default is to suppress exceptions, return a valid Request object, and require the user to explicitly ask about exceptions via `Request.raise_for_<whatever>`. (IIRC he does this for both types of failures, but had a thought to create a 2nd `Request.raise_*` method so users could tell the failure types apart.)\n\nMy opinion is that this is un-Pythonic and surprising; somebody new to the library but not new to Python will be confused upon getting a successful-but-empty `Request` object, even if the server was down/DNS was down/bad URL/etc.\n\nFurthermore, one will get a \"farther down the road\" traceback (e.g. `None has no attribute 'blah'` or `IndexError`s or etc etc) when trying to use the `Request` object as if it had succeeded, e.g. using its `.content` or `.raw` attributes, which is more confusing and harder to debug than an obvious, at-connection-time `NetworkError` or whatnot.\n\nSuch error suppression needs to have a serious, obvious benefit to offset the negative effects of forcing them to appear in strange ways farther down the stack. I don't see such a benefit here, other than Kenneth's noted use case of making N requests in a row/simultaneously, and not wanting connection errors to abort the entire run.\n\nIn that situation, my opinion is one should use an opt-in, \"please suppress errors, I will check for them myself\" setting, and that it should not be the default behavior.\n",
"I'm leaning more towards this myself.\n",
"Interesting.\n\nFWIW, I certainly expected exceptions to be raised automatically; didn't even think to look for raise_for_\\* methods! +1 to @bitprophet's suggestion of making this behaviour opt-in.\n\nMaking it easy to catch all possible exceptions raised by Requests (without doing an \"except:\" thing) would be helpful, though. Either by some fiddling to rebase the exceptions (so I can do \"except Requests.Error:\") or by some nicer technique if you can come up with one...\n",
"I never did really finish my thoughts; I should point out that most of the above relates to the 1st category of errors, i.e. \"did not receive any HTTP response due to network troubles.\"\n\nWhen actually receiving a non-200 response, or when one successfully connects but gets some sort of garbage back from the server (though that's kind of a gray area) I think the question of whether to raise or depend on the user to check, is not as clear cut.\n\nI still think raising an exception would not be a _bad_ thing (again with the \"fail fast\" philosophy) but I could see the argument for telling the user \"you got some response; but you need to make sure it's the right kind.\"\n\n_~fin~_\n",
"To be clear: this discussion is limited only to network and protocol exceptions.\n",
"I'm new to the Python scene, but I agree with @bitprophet. Requests that have no chance of bringing back any meaningful data should fail fast and fail loudly, especially when it comes to malformed URLs. \n"
] |
https://api.github.com/repos/psf/requests/issues/231
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/231/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/231/comments
|
https://api.github.com/repos/psf/requests/issues/231/events
|
https://github.com/psf/requests/pull/231
| 2,094,640 |
MDExOlB1bGxSZXF1ZXN0NDQ3NzU4
| 231 |
Added support for source address selection.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/84084?v=4",
"events_url": "https://api.github.com/users/maximbo/events{/privacy}",
"followers_url": "https://api.github.com/users/maximbo/followers",
"following_url": "https://api.github.com/users/maximbo/following{/other_user}",
"gists_url": "https://api.github.com/users/maximbo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maximbo",
"id": 84084,
"login": "maximbo",
"node_id": "MDQ6VXNlcjg0MDg0",
"organizations_url": "https://api.github.com/users/maximbo/orgs",
"received_events_url": "https://api.github.com/users/maximbo/received_events",
"repos_url": "https://api.github.com/users/maximbo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maximbo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maximbo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maximbo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2011-10-31T08:07:55Z
|
2021-09-08T12:01:35Z
|
2011-11-05T03:30:42Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/231/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/231/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/231.diff",
"html_url": "https://github.com/psf/requests/pull/231",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/231.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/231"
}
| true |
[
"Unfortunately, I won't be able to add this in right now. I'm currently porting requests off of urllib2. See `feature/rewrite` branch for more details.\n\nI love this functionality though. I think that it may be best as a `utils` function.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/230
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/230/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/230/comments
|
https://api.github.com/repos/psf/requests/issues/230/events
|
https://github.com/psf/requests/pull/230
| 2,090,418 |
MDExOlB1bGxSZXF1ZXN0NDQ2NTQx
| 230 |
Wrong default types for params and data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/252257?v=4",
"events_url": "https://api.github.com/users/maraujop/events{/privacy}",
"followers_url": "https://api.github.com/users/maraujop/followers",
"following_url": "https://api.github.com/users/maraujop/following{/other_user}",
"gists_url": "https://api.github.com/users/maraujop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maraujop",
"id": 252257,
"login": "maraujop",
"node_id": "MDQ6VXNlcjI1MjI1Nw==",
"organizations_url": "https://api.github.com/users/maraujop/orgs",
"received_events_url": "https://api.github.com/users/maraujop/received_events",
"repos_url": "https://api.github.com/users/maraujop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maraujop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maraujop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maraujop",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2011-10-30T12:24:39Z
|
2021-09-08T23:11:09Z
|
2011-11-05T03:30:29Z
|
NONE
|
resolved
|
`params` and `data` are marked as dictionaries in the constructor prototype. However `_encode_params` returns lists or None sometimes.
There is a big inconsistency in `_encode_params` that could affect hooks. It's affecting me in request-oauth-hook. Thus I have to do these type of checkings:
https://github.com/maraujop/requests-oauth-hook/blob/dev/oauth_hook/hook.py#L184
So if params is a dictionary, I understand it should be an empty dictionary or a filled dictionary, but not a list or None. The same happens to data.
I haven't been able to run `requests_tests` sorry, they failed before I did a change to the code. This will likely affect you in other parts of the code.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/230/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/230/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/230.diff",
"html_url": "https://github.com/psf/requests/pull/230",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/230.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/230"
}
| true |
[
"I forgot to say that I'm working on a better test suite for requests-oauth-hook, and some Request inconsistencies, make it very hard to write.\n",
"This will change in the next release.\n",
"This means it is fixed in version 0.7.6 ? \n\nAre you using my patch?\n",
"No, this will change in the next major release.\n"
] |
https://api.github.com/repos/psf/requests/issues/229
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/229/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/229/comments
|
https://api.github.com/repos/psf/requests/issues/229/events
|
https://github.com/psf/requests/issues/229
| 2,073,036 |
MDU6SXNzdWUyMDczMDM2
| 229 |
retracted
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/330954?v=4",
"events_url": "https://api.github.com/users/devjones/events{/privacy}",
"followers_url": "https://api.github.com/users/devjones/followers",
"following_url": "https://api.github.com/users/devjones/following{/other_user}",
"gists_url": "https://api.github.com/users/devjones/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/devjones",
"id": 330954,
"login": "devjones",
"node_id": "MDQ6VXNlcjMzMDk1NA==",
"organizations_url": "https://api.github.com/users/devjones/orgs",
"received_events_url": "https://api.github.com/users/devjones/received_events",
"repos_url": "https://api.github.com/users/devjones/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/devjones/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/devjones/subscriptions",
"type": "User",
"url": "https://api.github.com/users/devjones",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2011-10-27T21:40:35Z
|
2021-09-09T11:01:00Z
|
2011-10-27T22:32:22Z
|
NONE
|
resolved
|
...
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/330954?v=4",
"events_url": "https://api.github.com/users/devjones/events{/privacy}",
"followers_url": "https://api.github.com/users/devjones/followers",
"following_url": "https://api.github.com/users/devjones/following{/other_user}",
"gists_url": "https://api.github.com/users/devjones/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/devjones",
"id": 330954,
"login": "devjones",
"node_id": "MDQ6VXNlcjMzMDk1NA==",
"organizations_url": "https://api.github.com/users/devjones/orgs",
"received_events_url": "https://api.github.com/users/devjones/received_events",
"repos_url": "https://api.github.com/users/devjones/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/devjones/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/devjones/subscriptions",
"type": "User",
"url": "https://api.github.com/users/devjones",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/229/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/229/timeline
| null |
completed
| null | null | false |
[] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.