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/728
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/728/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/728/comments
|
https://api.github.com/repos/psf/requests/issues/728/events
|
https://github.com/psf/requests/pull/728
| 5,622,998 |
MDExOlB1bGxSZXF1ZXN0MTc5NzM4Mg==
| 728 |
Document Logging, issue #695
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1618875?v=4",
"events_url": "https://api.github.com/users/muhtasib/events{/privacy}",
"followers_url": "https://api.github.com/users/muhtasib/followers",
"following_url": "https://api.github.com/users/muhtasib/following{/other_user}",
"gists_url": "https://api.github.com/users/muhtasib/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhtasib",
"id": 1618875,
"login": "muhtasib",
"node_id": "MDQ6VXNlcjE2MTg4NzU=",
"organizations_url": "https://api.github.com/users/muhtasib/orgs",
"received_events_url": "https://api.github.com/users/muhtasib/received_events",
"repos_url": "https://api.github.com/users/muhtasib/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhtasib/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhtasib/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhtasib",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-07-14T21:15:30Z
|
2021-09-08T23:07:24Z
|
2012-07-27T05:34:07Z
|
CONTRIBUTOR
|
resolved
|
This is a fix for issue #695.
Additional co-authors:
@smargonz
@vickimo
@tgebru
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/728/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/728/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/728.diff",
"html_url": "https://github.com/psf/requests/pull/728",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/728.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/728"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1866717) (merged 9135530d into a97a5133).\n",
"@smargonz and I noticed this hasn't been implemented yet. Would you like us to implement it? Let us know if you have any design considerations you'd like us to follow.\n",
"Are you thinking of the urllib3 logging?\n",
"Closing until further update :)\n"
] |
https://api.github.com/repos/psf/requests/issues/727
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/727/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/727/comments
|
https://api.github.com/repos/psf/requests/issues/727/events
|
https://github.com/psf/requests/pull/727
| 5,622,692 |
MDExOlB1bGxSZXF1ZXN0MTc5NzI2MA==
| 727 |
Fix infinite loop on wrong Digest Authentication (Issue #541 and #547)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1755286?v=4",
"events_url": "https://api.github.com/users/vickimo/events{/privacy}",
"followers_url": "https://api.github.com/users/vickimo/followers",
"following_url": "https://api.github.com/users/vickimo/following{/other_user}",
"gists_url": "https://api.github.com/users/vickimo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vickimo",
"id": 1755286,
"login": "vickimo",
"node_id": "MDQ6VXNlcjE3NTUyODY=",
"organizations_url": "https://api.github.com/users/vickimo/orgs",
"received_events_url": "https://api.github.com/users/vickimo/received_events",
"repos_url": "https://api.github.com/users/vickimo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vickimo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vickimo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vickimo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-07-14T20:12:25Z
|
2021-09-08T23:01:01Z
|
2012-07-14T22:48:07Z
|
CONTRIBUTOR
|
resolved
|
Modified code to use the current fix versus the old fix, which was broken.
Co-Authored By: Timnit Gebru [email protected] @tgebru
Co-Authored By: Sarah Gonzalez [email protected] @smargonz
Co-Authored By: Leila Muhtasib [email protected] @muhtasib
This is a fix for issue #541 and #547.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/727/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/727/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/727.diff",
"html_url": "https://github.com/psf/requests/pull/727",
"merged_at": "2012-07-14T22:48:07Z",
"patch_url": "https://github.com/psf/requests/pull/727.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/727"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1866392) (merged 5296b8be into a97a5133).\n",
"looks good to me, thanks!\n",
"Great! Thanks for checking :).\n\nVicki\n\nOn Sat, Jul 14, 2012 at 6:48 PM, Kenneth Reitz <\[email protected]\n\n> wrote:\n> \n> looks good to me, thanks!\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/727#issuecomment-6987314\n"
] |
https://api.github.com/repos/psf/requests/issues/726
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/726/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/726/comments
|
https://api.github.com/repos/psf/requests/issues/726/events
|
https://github.com/psf/requests/issues/726
| 5,621,094 |
MDU6SXNzdWU1NjIxMDk0
| 726 |
how to set max_retries
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1829337?v=4",
"events_url": "https://api.github.com/users/moon126/events{/privacy}",
"followers_url": "https://api.github.com/users/moon126/followers",
"following_url": "https://api.github.com/users/moon126/following{/other_user}",
"gists_url": "https://api.github.com/users/moon126/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moon126",
"id": 1829337,
"login": "moon126",
"node_id": "MDQ6VXNlcjE4MjkzMzc=",
"organizations_url": "https://api.github.com/users/moon126/orgs",
"received_events_url": "https://api.github.com/users/moon126/received_events",
"repos_url": "https://api.github.com/users/moon126/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moon126/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moon126/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moon126",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-07-14T15:45:43Z
|
2021-09-09T00:10:15Z
|
2012-07-15T18:52:20Z
|
NONE
|
resolved
|
I don't know how to set max_retries.
In a low speed, how to optimize the configuration to Improve the connection success rate?
thank you.
---------I LOVE REQUESTS--------
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1829337?v=4",
"events_url": "https://api.github.com/users/moon126/events{/privacy}",
"followers_url": "https://api.github.com/users/moon126/followers",
"following_url": "https://api.github.com/users/moon126/following{/other_user}",
"gists_url": "https://api.github.com/users/moon126/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moon126",
"id": 1829337,
"login": "moon126",
"node_id": "MDQ6VXNlcjE4MjkzMzc=",
"organizations_url": "https://api.github.com/users/moon126/orgs",
"received_events_url": "https://api.github.com/users/moon126/received_events",
"repos_url": "https://api.github.com/users/moon126/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moon126/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moon126/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moon126",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/726/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/726/timeline
| null |
completed
| null | null | false |
[
"Check out this gist. Those are 2 ways that you can achieve it.\n\nhttps://gist.github.com/3116429\n\nI also believe that you can import the requests defaults and set those as well, haven't tried that before though\n",
"This gist does not work for me on requests v2.21:\n\n```\na = requests.get('http://gidjisao.com',config={\"max_retries\":10},timeout=1)\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"/Users/pbaxi/.virtualenvs/qualysapi/lib/python2.7/site-packages/requests/api.py\", line 55, in get\n return request('get', url, **kwargs)\n File \"/Users/pbaxi/.virtualenvs/qualysapi/lib/python2.7/site-packages/requests/api.py\", line 44, in request\n return session.request(method=method, url=url, **kwargs)\nTypeError: request() got an unexpected keyword argument 'config'\n```\n",
"@paragbaxi this issue was last commented on over 2 years ago. The proper place for questions about requests is [StackOverflow](http://stackoverflow.com/questions/tagged/python-requests) which you've already done. I will answer your question there.\n"
] |
https://api.github.com/repos/psf/requests/issues/725
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/725/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/725/comments
|
https://api.github.com/repos/psf/requests/issues/725/events
|
https://github.com/psf/requests/pull/725
| 5,612,109 |
MDExOlB1bGxSZXF1ZXN0MTc5Mjg0Mw==
| 725 |
Differentiate between two types of timeout errors from urllib3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1618875?v=4",
"events_url": "https://api.github.com/users/muhtasib/events{/privacy}",
"followers_url": "https://api.github.com/users/muhtasib/followers",
"following_url": "https://api.github.com/users/muhtasib/following{/other_user}",
"gists_url": "https://api.github.com/users/muhtasib/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhtasib",
"id": 1618875,
"login": "muhtasib",
"node_id": "MDQ6VXNlcjE2MTg4NzU=",
"organizations_url": "https://api.github.com/users/muhtasib/orgs",
"received_events_url": "https://api.github.com/users/muhtasib/received_events",
"repos_url": "https://api.github.com/users/muhtasib/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhtasib/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhtasib/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhtasib",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-07-13T19:25:50Z
|
2021-09-08T23:06:11Z
|
2012-07-13T20:49:13Z
|
CONTRIBUTOR
|
resolved
|
This is a fix for issue #699
A simple solution was to bubble up the error from urllib3. TimeoutError inherits from _HTTPError, so we could just add a line and raise a Timeout.
The error message will indicate whether the error is of type socket timeout or of type no connections available in the connection pool.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/725/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/725/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/725.diff",
"html_url": "https://github.com/psf/requests/pull/725",
"merged_at": "2012-07-13T20:49:13Z",
"patch_url": "https://github.com/psf/requests/pull/725.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/725"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1859013) (merged 318f2460 into c3ab38ed).\n",
"\\o/\n",
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/724
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/724/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/724/comments
|
https://api.github.com/repos/psf/requests/issues/724/events
|
https://github.com/psf/requests/pull/724
| 5,609,148 |
MDExOlB1bGxSZXF1ZXN0MTc5MTM0MA==
| 724 |
Differentiate between two types of timeout errors from urllib3.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1618875?v=4",
"events_url": "https://api.github.com/users/muhtasib/events{/privacy}",
"followers_url": "https://api.github.com/users/muhtasib/followers",
"following_url": "https://api.github.com/users/muhtasib/following{/other_user}",
"gists_url": "https://api.github.com/users/muhtasib/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhtasib",
"id": 1618875,
"login": "muhtasib",
"node_id": "MDQ6VXNlcjE2MTg4NzU=",
"organizations_url": "https://api.github.com/users/muhtasib/orgs",
"received_events_url": "https://api.github.com/users/muhtasib/received_events",
"repos_url": "https://api.github.com/users/muhtasib/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhtasib/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhtasib/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhtasib",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-07-13T17:02:07Z
|
2021-09-08T16:00:47Z
|
2012-07-13T19:26:00Z
|
CONTRIBUTOR
|
resolved
|
This is a fix for issue #699
A simple solution was to bubble up the error from urllib3. TimeoutError inherits from _HTTPError, so we could just add a line and raise a Timeout.
The error message will indicate whether the error is of type socket timeout or of type no connections available in the connection pool.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1618875?v=4",
"events_url": "https://api.github.com/users/muhtasib/events{/privacy}",
"followers_url": "https://api.github.com/users/muhtasib/followers",
"following_url": "https://api.github.com/users/muhtasib/following{/other_user}",
"gists_url": "https://api.github.com/users/muhtasib/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhtasib",
"id": 1618875,
"login": "muhtasib",
"node_id": "MDQ6VXNlcjE2MTg4NzU=",
"organizations_url": "https://api.github.com/users/muhtasib/orgs",
"received_events_url": "https://api.github.com/users/muhtasib/received_events",
"repos_url": "https://api.github.com/users/muhtasib/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhtasib/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhtasib/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhtasib",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/724/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/724/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/724.diff",
"html_url": "https://github.com/psf/requests/pull/724",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/724.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/724"
}
| true |
[
"Hmm, would you mind merging with the latest 'release' branch? This is a bit out of date, so has some merge conflicts :)\n\nIt looks great though! Excellent contribution. :)\n",
"Yes, I'll send a more updated pull request in a few.\n",
"thanks for the fix for this issue @muhtasib and @kennethreitz . \n"
] |
https://api.github.com/repos/psf/requests/issues/723
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/723/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/723/comments
|
https://api.github.com/repos/psf/requests/issues/723/events
|
https://github.com/psf/requests/issues/723
| 5,588,513 |
MDU6SXNzdWU1NTg4NTEz
| 723 |
Plesse Support Socks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1829337?v=4",
"events_url": "https://api.github.com/users/moon126/events{/privacy}",
"followers_url": "https://api.github.com/users/moon126/followers",
"following_url": "https://api.github.com/users/moon126/following{/other_user}",
"gists_url": "https://api.github.com/users/moon126/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moon126",
"id": 1829337,
"login": "moon126",
"node_id": "MDQ6VXNlcjE4MjkzMzc=",
"organizations_url": "https://api.github.com/users/moon126/orgs",
"received_events_url": "https://api.github.com/users/moon126/received_events",
"repos_url": "https://api.github.com/users/moon126/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moon126/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moon126/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moon126",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-07-13T05:53:33Z
|
2021-09-09T07:05:33Z
|
2012-07-13T21:01:34Z
|
NONE
|
resolved
|
I am very love requests. I hope it can support socks(socks4/socks5).I know can use socksipy,But inefficient.I hope you can improve socksipy and added to the requests.thank you.
sorry, I am not good at english.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1829337?v=4",
"events_url": "https://api.github.com/users/moon126/events{/privacy}",
"followers_url": "https://api.github.com/users/moon126/followers",
"following_url": "https://api.github.com/users/moon126/following{/other_user}",
"gists_url": "https://api.github.com/users/moon126/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moon126",
"id": 1829337,
"login": "moon126",
"node_id": "MDQ6VXNlcjE4MjkzMzc=",
"organizations_url": "https://api.github.com/users/moon126/orgs",
"received_events_url": "https://api.github.com/users/moon126/received_events",
"repos_url": "https://api.github.com/users/moon126/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moon126/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moon126/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moon126",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/723/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/723/timeline
| null |
completed
| null | null | false |
[
"No worries :) \n\nWork is being done on socks, actually! You can track the development here: https://github.com/shazow/urllib3/pull/68\n"
] |
https://api.github.com/repos/psf/requests/issues/722
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/722/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/722/comments
|
https://api.github.com/repos/psf/requests/issues/722/events
|
https://github.com/psf/requests/issues/722
| 5,583,187 |
MDU6SXNzdWU1NTgzMTg3
| 722 |
Can't use params in a get() with OAuth creds
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/352270?v=4",
"events_url": "https://api.github.com/users/michaelhelmick/events{/privacy}",
"followers_url": "https://api.github.com/users/michaelhelmick/followers",
"following_url": "https://api.github.com/users/michaelhelmick/following{/other_user}",
"gists_url": "https://api.github.com/users/michaelhelmick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michaelhelmick",
"id": 352270,
"login": "michaelhelmick",
"node_id": "MDQ6VXNlcjM1MjI3MA==",
"organizations_url": "https://api.github.com/users/michaelhelmick/orgs",
"received_events_url": "https://api.github.com/users/michaelhelmick/received_events",
"repos_url": "https://api.github.com/users/michaelhelmick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michaelhelmick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michaelhelmick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michaelhelmick",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-07-12T21:56:26Z
|
2021-09-09T07:05:31Z
|
2012-07-27T05:49:19Z
|
NONE
|
resolved
|
So, seeing that the params being handled was fixed https://github.com/kennethreitz/requests/pull/712
I tried to update `Twython` to use `requests` 0.13.3
Params are still not being handled correctly with OAuth.
``` python
app_key = u'***'
app_secret = u'***'
oauth_token = u'***'
oauth_token_secret = u'***'
auth = OAuth1(app_key, app_secret, oauth_token, oauth_token_secret,
signature_type='auth_header')
client = requests.session(auth=auth)
client.get('http://api.twitter.com/1/statuses/home_timeline.json', params={'count':2}) # Returns a 401
```
But this works fine:
``` python
client.get('http://api.twitter.com/1/statuses/home_timeline.json') # Returns a 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/722/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/722/timeline
| null |
completed
| null | null | false |
[
"It looks like https://github.com/kennethreitz/requests/pull/712 was only for URLs with fragments, which doesn't match your case. I haven't had much of a chance to look at it again since you commented on https://github.com/kennethreitz/requests/pull/684 except to verify that I was testing with LinkedIn, which apparently verifies the signature differently, so it wasn't erroring out. I took that as confirmation that this was no longer an issue, without testing it with other providers, such as your case with Twitter.\n\nI'm starting to wonder if there might be a bug in oauthlib, which provides the signature functionality. I'll have to do some more digging to determine if that's the case.\n",
"@gulopine Ah, thanks! I couldn't find my comment in 684! Haha, I was looking for it. And what does Linkedin use? Query or body? \n",
"I guess I have to look at it some more. I've looked at so many providers for foauth.org that I think I'm getting really confused. I know I have Dropbox working with params, and that may be what I'm thinking of, not LinkedIn. Dropbox and Twitter both use the Authorization header for the signature payload, but Dropbox uses the plaintext approach, which doesn't take parameters into account at all. So it's not surprising to me now that it would behave very differently from Twitter.\n",
"Oh, I didn't know you were behind foauth. Haha. Nice service. \nAnyways, yeah, I wish that there was more of a standard behind all API of which OAuth should be used. The amount of services that use OAuth2 is terrible compared to OAuth1, not sure why major companies are not deprecating OAuth1 support. But yes, Dropbox does use plaintext instead of HMAC >.>\n\n## \n\nMike Helmick\n\nOn Friday, July 13, 2012 at 1:14 PM, Marty Alchin wrote:\n\n> I guess I have to look at it some more. I've looked at so many providers for foauth.org (http://foauth.org) that I think I'm getting really confused. I know I have Dropbox working with params, and that may be what I'm thinking of, not LinkedIn. Dropbox and Twitter both use the Authorization header for the signature payload, but Dropbox uses the plaintext approach, which doesn't take parameters into account at all. So it's not surprising to me now that it would behave very differently from Twitter.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/722#issuecomment-6969266\n",
"So I figured out what's going on here, but I'm not sure yet how to best fix it. The fix I put in for https://github.com/kennethreitz/requests/pull/684 does help it generate the correct signature, but then requests rewrites the URL based on the result from oauthlib, in case it added OAuth parameters to the QueryString. Unfortunately, it rewrites the base URL, which then has all the parameters added to it later, before firing it off to the provider.\n\nSo in a nutshell, here's the URL that requests is actually sending Twitter, in this case:\n\n```\nhttp://api.twitter.com/1/statuses/home_timeline.json?count=2&count=2\n```\n\nNotice how `count=2` shows up twice, even though the signature assumes it only shows up once. So of course it fails verification on Twitter's end.\n\nThe trouble is, we need it to rewrite the URL in case OAuth parameters get added to it, but we can't let it add non-OAuth parameters to it, because requests will add those later. So it seems like there are a couple options:\n1. Remove non-OAuth parameters from the URL retrieved from oauthlib _before_ assigning to the request in requests.\n2. Make `request.full_url` a writable property, which will parse the QueryString and assign things back to `params`.\n3. Something else I'm not thinking of right now.\n\nI like the second option the best overall, because it seems more useful in the long run, in case something else like this happens elsewhere. But it might be more practical to go with the first option since it probably won't come up anywhere else anyway. I'll sleep on it and see what tomorrow brings.\n",
"I agree, second does sound best, but the first is more practical.. but for some reason I feel like it's #3\n\nI just woke up, so let me think about this to.\n",
"After trying out a few alternatives, I talked with @kennethreitz briefly about this on IRC, and he came up with the obvious solution:\n\nhttps://github.com/gulopine/requests/commit/cf24d37caf567c0e89122dc4943315c974f5b3b8\n\nI think I screwed up my fork, so I don't know if I can submit a proper pull request, much less attach it to this ticket. That commit should illustrate the point, though.\n"
] |
https://api.github.com/repos/psf/requests/issues/721
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/721/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/721/comments
|
https://api.github.com/repos/psf/requests/issues/721/events
|
https://github.com/psf/requests/pull/721
| 5,581,495 |
MDExOlB1bGxSZXF1ZXN0MTc4MzExOA==
| 721 |
adding clarification to the history API.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/505230?v=4",
"events_url": "https://api.github.com/users/karlcow/events{/privacy}",
"followers_url": "https://api.github.com/users/karlcow/followers",
"following_url": "https://api.github.com/users/karlcow/following{/other_user}",
"gists_url": "https://api.github.com/users/karlcow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/karlcow",
"id": 505230,
"login": "karlcow",
"node_id": "MDQ6VXNlcjUwNTIzMA==",
"organizations_url": "https://api.github.com/users/karlcow/orgs",
"received_events_url": "https://api.github.com/users/karlcow/received_events",
"repos_url": "https://api.github.com/users/karlcow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/karlcow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/karlcow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/karlcow",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-12T20:41:31Z
|
2021-09-08T16:00:46Z
|
2012-07-12T21:13:37Z
|
CONTRIBUTOR
|
resolved
|
The history list after a few redirects is sorted with the oldest first and the most recent one being the last one of the list. Added a simple line to explain it. It was not obvious at first when you do something like.
```
for resp in history:
print resp
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/721/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/721/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/721.diff",
"html_url": "https://github.com/psf/requests/pull/721",
"merged_at": "2012-07-12T21:13:37Z",
"patch_url": "https://github.com/psf/requests/pull/721.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/721"
}
| true |
[
"Beautiful.\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1849932) (merged 9fe4a993 into 884fc333).\n"
] |
https://api.github.com/repos/psf/requests/issues/720
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/720/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/720/comments
|
https://api.github.com/repos/psf/requests/issues/720/events
|
https://github.com/psf/requests/pull/720
| 5,580,639 |
MDExOlB1bGxSZXF1ZXN0MTc4MjY2NQ==
| 720 |
Workaround for an ImportError on AppEngine
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/691823?v=4",
"events_url": "https://api.github.com/users/erlichmen/events{/privacy}",
"followers_url": "https://api.github.com/users/erlichmen/followers",
"following_url": "https://api.github.com/users/erlichmen/following{/other_user}",
"gists_url": "https://api.github.com/users/erlichmen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erlichmen",
"id": 691823,
"login": "erlichmen",
"node_id": "MDQ6VXNlcjY5MTgyMw==",
"organizations_url": "https://api.github.com/users/erlichmen/orgs",
"received_events_url": "https://api.github.com/users/erlichmen/received_events",
"repos_url": "https://api.github.com/users/erlichmen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erlichmen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erlichmen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erlichmen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-07-12T20:04:32Z
|
2021-09-08T16:00:46Z
|
2012-07-27T05:35:06Z
|
NONE
|
resolved
|
On Google App Engine (runtime 2.7 thread safe) there is a ImportError
when ever calling get_netrc_auth (stacktrace at the end of the comment)
I'm adding a except pass on the Import error to workaround that error. I
will open an issues on the App Engine tracker so that will fix that on
thier end also.
File "/base/data/home/apps/.../requests/api.py", line 87, in post
return request('post', url, data=data, *_kwargs)
File "/base/data/home/apps/.../requests/safe_mode.py", line 37, in
wrapped
return function(method, url, *_kwargs)
File "/base/data/home/apps/.../requests/api.py", line 42, in request
return s.request(method=method, url=url, **kwargs)
File "/base/data/home/apps/.../requests/sessions.py", line 230, in
request
r.send(prefetch=prefetch)
File "/base/data/home/apps/.../requests/models.py", line 483, in send
self.auth = get_netrc_auth(url)
File "/base/data/home/apps/.../requests/utils.py", line 79, in
get_netrc_auth
for loc in locations:
File "/base/data/home/apps/.../requests/utils.py", line 76, in <genexpr>
locations = (os.path.expanduser('~/{0}'.format(f)) for f in NETRC_FILES)
File "/base/python27_runtime/python27_dist/lib/python2.7/posixpath.py",
line 259, in expanduser
import pwd
ImportError: No module named pwd
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/720/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/720/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/720.diff",
"html_url": "https://github.com/psf/requests/pull/720",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/720.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/720"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1849548) (merged f823a2b2 into b222ff94).\n"
] |
https://api.github.com/repos/psf/requests/issues/719
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/719/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/719/comments
|
https://api.github.com/repos/psf/requests/issues/719/events
|
https://github.com/psf/requests/issues/719
| 5,567,696 |
MDU6SXNzdWU1NTY3Njk2
| 719 |
no option to turn off retry
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1938957?v=4",
"events_url": "https://api.github.com/users/shadowing/events{/privacy}",
"followers_url": "https://api.github.com/users/shadowing/followers",
"following_url": "https://api.github.com/users/shadowing/following{/other_user}",
"gists_url": "https://api.github.com/users/shadowing/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shadowing",
"id": 1938957,
"login": "shadowing",
"node_id": "MDQ6VXNlcjE5Mzg5NTc=",
"organizations_url": "https://api.github.com/users/shadowing/orgs",
"received_events_url": "https://api.github.com/users/shadowing/received_events",
"repos_url": "https://api.github.com/users/shadowing/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shadowing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shadowing/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shadowing",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-07-12T09:23:35Z
|
2021-09-09T07:05:34Z
|
2012-07-12T18:00:15Z
|
NONE
|
resolved
|
it is good that requests could handle retrying upon general connection errors. but in a web scraper project, it'll be better for the outside scheduler to handle these kind of exceptions and make corresponding logging procedures, don't you think?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/719/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/719/timeline
| null |
completed
| null | null | false |
[
"Requests doesn't do retries :)\n",
"@kennethreitz Then what does the max_retries do in requests.defaults?\n\nhttp://docs.python-requests.org/en/latest/api/#configurations\n",
"It's set to 0 :)\n",
"Ahh, it was just the way you stated that **requests doesn't do retries**, I thought you meant it collectively, rather than just as a default.\n",
"Sorry for the confusion :)\n",
"Documentation should be improved here.\n",
"the confusion starts with a testdrive. I inserted a invalid Host string in the header, and launch a request, it got immediately bounced back with the exception:\n\nrequests.exceptions.ConnectionError: MaxRetryError(\"HTTPConnectionPool(host='202.104.xx.xxx', port=80): Max retries exceeded with url:\n"
] |
https://api.github.com/repos/psf/requests/issues/718
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/718/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/718/comments
|
https://api.github.com/repos/psf/requests/issues/718/events
|
https://github.com/psf/requests/issues/718
| 5,566,517 |
MDU6SXNzdWU1NTY2NTE3
| 718 |
401 digest fail causes infinite loop
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/168469?v=4",
"events_url": "https://api.github.com/users/suyuan1203/events{/privacy}",
"followers_url": "https://api.github.com/users/suyuan1203/followers",
"following_url": "https://api.github.com/users/suyuan1203/following{/other_user}",
"gists_url": "https://api.github.com/users/suyuan1203/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/suyuan1203",
"id": 168469,
"login": "suyuan1203",
"node_id": "MDQ6VXNlcjE2ODQ2OQ==",
"organizations_url": "https://api.github.com/users/suyuan1203/orgs",
"received_events_url": "https://api.github.com/users/suyuan1203/received_events",
"repos_url": "https://api.github.com/users/suyuan1203/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/suyuan1203/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/suyuan1203/subscriptions",
"type": "User",
"url": "https://api.github.com/users/suyuan1203",
"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": "2012-07-12T21:20:00Z",
"closed_issues": 1,
"created_at": "2012-07-12T21:12:04Z",
"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/14",
"id": 144647,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/14/labels",
"node_id": "MDk6TWlsZXN0b25lMTQ0NjQ3",
"number": 14,
"open_issues": 0,
"state": "closed",
"title": "v0.10.3",
"updated_at": "2012-07-12T21:20:00Z",
"url": "https://api.github.com/repos/psf/requests/milestones/14"
}
| 2 |
2012-07-12T08:02:03Z
|
2021-09-09T07:05:34Z
|
2012-07-12T21:20:00Z
|
NONE
|
resolved
|
I'm using 0.13.2
In models.py, line 491
# Allow auth to make its changes.
r = self.auth(self)
In https://github.com/kennethreitz/requests/pull/547
it will deregister the hook, after the first request failed, but in the second request it will register a new hook 'response', which causes infinite loop.
Is this the right way to fix it?
if not anyway:
r = self.auth(self)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/718/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/718/timeline
| null |
completed
| null | null | false |
[
"Fixed!\n",
"Do yo mean it's already a fixed issue when I open this one?\n"
] |
https://api.github.com/repos/psf/requests/issues/717
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/717/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/717/comments
|
https://api.github.com/repos/psf/requests/issues/717/events
|
https://github.com/psf/requests/pull/717
| 5,565,985 |
MDExOlB1bGxSZXF1ZXN0MTc3NTg1Ng==
| 717 |
Updated documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/238652?v=4",
"events_url": "https://api.github.com/users/schlamar/events{/privacy}",
"followers_url": "https://api.github.com/users/schlamar/followers",
"following_url": "https://api.github.com/users/schlamar/following{/other_user}",
"gists_url": "https://api.github.com/users/schlamar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schlamar",
"id": 238652,
"login": "schlamar",
"node_id": "MDQ6VXNlcjIzODY1Mg==",
"organizations_url": "https://api.github.com/users/schlamar/orgs",
"received_events_url": "https://api.github.com/users/schlamar/received_events",
"repos_url": "https://api.github.com/users/schlamar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schlamar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schlamar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schlamar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-12T07:22:27Z
|
2021-09-08T16:00:46Z
|
2012-07-12T07:29:00Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/717/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/717/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/717.diff",
"html_url": "https://github.com/psf/requests/pull/717",
"merged_at": "2012-07-12T07:29:00Z",
"patch_url": "https://github.com/psf/requests/pull/717.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/717"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1843672) (merged ea99d5e0 into 23aa6c44).\n",
"Much needed, thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/716
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/716/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/716/comments
|
https://api.github.com/repos/psf/requests/issues/716/events
|
https://github.com/psf/requests/issues/716
| 5,560,034 |
MDU6SXNzdWU1NTYwMDM0
| 716 |
Timeouts not working when importing gevent
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1095574?v=4",
"events_url": "https://api.github.com/users/JakeAustwick/events{/privacy}",
"followers_url": "https://api.github.com/users/JakeAustwick/followers",
"following_url": "https://api.github.com/users/JakeAustwick/following{/other_user}",
"gists_url": "https://api.github.com/users/JakeAustwick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JakeAustwick",
"id": 1095574,
"login": "JakeAustwick",
"node_id": "MDQ6VXNlcjEwOTU1NzQ=",
"organizations_url": "https://api.github.com/users/JakeAustwick/orgs",
"received_events_url": "https://api.github.com/users/JakeAustwick/received_events",
"repos_url": "https://api.github.com/users/JakeAustwick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JakeAustwick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JakeAustwick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JakeAustwick",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-07-11T22:02:20Z
|
2021-09-09T07:05:36Z
|
2012-07-12T17:40:03Z
|
NONE
|
resolved
|
I'm going to open this here, as I believe the issue/bug is in the requests library, rather than the gevent library, as other http libs work with gevent. If you don't agree with this, feel free to close.
After importing gevent and monkeypatching the socket class, Requests simply ignores the timeout parameter. This wouldn't be a huge problem on its own, the problem is that it then defaults to **never** timing out, bringing the whole script to a halt if you try requesting a page that never responds, or takes a extremely long time. I don't have time right now to dig through the requests code (or likely enough Python knowledge), but the below example demonstrates the error:
Example 1:
``` python
>>> import requests
>>> from gevent import monkey
>>> monkey.patch_all(thread=False, select=False)
# This site takes a ridiculously long time to respond, so brings the whole script to a stop.
>>> requests.get('http://www.whatzonip.com/wiki9/index.php', timeout=5)
```
Example 2:
``` python
>>> import requests
>>> from gevent import monkey
>>> monkey.patch_all(thread=False, select=False)
# This shouldn't return a response, as should raise a TimeoutError first.
# But ignores the timeout, and returns the Response object after 10 seconds.
>>> requests.get('http://httpbin.org/delay/10', timeout=5)
<Response [200]>
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1095574?v=4",
"events_url": "https://api.github.com/users/JakeAustwick/events{/privacy}",
"followers_url": "https://api.github.com/users/JakeAustwick/followers",
"following_url": "https://api.github.com/users/JakeAustwick/following{/other_user}",
"gists_url": "https://api.github.com/users/JakeAustwick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JakeAustwick",
"id": 1095574,
"login": "JakeAustwick",
"node_id": "MDQ6VXNlcjEwOTU1NzQ=",
"organizations_url": "https://api.github.com/users/JakeAustwick/orgs",
"received_events_url": "https://api.github.com/users/JakeAustwick/received_events",
"repos_url": "https://api.github.com/users/JakeAustwick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JakeAustwick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JakeAustwick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JakeAustwick",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/716/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/716/timeline
| null |
completed
| null | null | false |
[
"Hi,\n\nI'm looking into this for you. I'll let you know what I find by this evening. \n",
"It might be gevent related after all. See this: https://github.com/shazow/urllib3/issues/69\n",
"Seems it was gevent related. The fix isn't in any releases yet though, so have to install from the git repo.\n\nThanks for your help.\n"
] |
https://api.github.com/repos/psf/requests/issues/715
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/715/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/715/comments
|
https://api.github.com/repos/psf/requests/issues/715/events
|
https://github.com/psf/requests/pull/715
| 5,552,569 |
MDExOlB1bGxSZXF1ZXN0MTc2OTU5NQ==
| 715 |
Do not hide SSLErrors behind Timeouts.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-11T16:37:18Z
|
2021-09-08T23:01:00Z
|
2012-07-12T07:09:22Z
|
MEMBER
|
resolved
|
Following discussion on Issue #701, it seems like we should rethrow SSLErrors regardless of whether `verify` is true or not. SSLErrors are not raised by invalid certificates with `verify = False` anyway, so anything caused by anything else should be rethrown.
I can't think of a good test for this, so if you have an idea I'd love to hear 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/715/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/715/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/715.diff",
"html_url": "https://github.com/psf/requests/pull/715",
"merged_at": "2012-07-12T07:09:21Z",
"patch_url": "https://github.com/psf/requests/pull/715.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/715"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1837636) (merged 523906c5 into c19ff038).\n",
"I agree, thanks for the contribution!\n"
] |
https://api.github.com/repos/psf/requests/issues/714
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/714/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/714/comments
|
https://api.github.com/repos/psf/requests/issues/714/events
|
https://github.com/psf/requests/pull/714
| 5,536,616 |
MDExOlB1bGxSZXF1ZXN0MTc2MjU3OQ==
| 714 |
Documentation Update
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1618875?v=4",
"events_url": "https://api.github.com/users/muhtasib/events{/privacy}",
"followers_url": "https://api.github.com/users/muhtasib/followers",
"following_url": "https://api.github.com/users/muhtasib/following{/other_user}",
"gists_url": "https://api.github.com/users/muhtasib/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhtasib",
"id": 1618875,
"login": "muhtasib",
"node_id": "MDQ6VXNlcjE2MTg4NzU=",
"organizations_url": "https://api.github.com/users/muhtasib/orgs",
"received_events_url": "https://api.github.com/users/muhtasib/received_events",
"repos_url": "https://api.github.com/users/muhtasib/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhtasib/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhtasib/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhtasib",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-10T22:39:43Z
|
2021-09-08T16:00:45Z
|
2012-07-10T22:48:08Z
|
CONTRIBUTOR
|
resolved
|
This is the documentation fix for issue #567 and issue #523.
We tested and verified the behavior of the code in the examples.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/714/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/714/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/714.diff",
"html_url": "https://github.com/psf/requests/pull/714",
"merged_at": "2012-07-10T22:48:08Z",
"patch_url": "https://github.com/psf/requests/pull/714.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/714"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1831264) (merged 6413c063 into b7fd0e81).\n",
"Thanks for this :)\n"
] |
https://api.github.com/repos/psf/requests/issues/713
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/713/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/713/comments
|
https://api.github.com/repos/psf/requests/issues/713/events
|
https://github.com/psf/requests/issues/713
| 5,534,645 |
MDU6SXNzdWU1NTM0NjQ1
| 713 |
Support for "Expects" http header
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12426?v=4",
"events_url": "https://api.github.com/users/edevil/events{/privacy}",
"followers_url": "https://api.github.com/users/edevil/followers",
"following_url": "https://api.github.com/users/edevil/following{/other_user}",
"gists_url": "https://api.github.com/users/edevil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/edevil",
"id": 12426,
"login": "edevil",
"node_id": "MDQ6VXNlcjEyNDI2",
"organizations_url": "https://api.github.com/users/edevil/orgs",
"received_events_url": "https://api.github.com/users/edevil/received_events",
"repos_url": "https://api.github.com/users/edevil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/edevil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/edevil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/edevil",
"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"
},
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
}
] |
closed
| true | null |
[] | null | 38 |
2012-07-10T21:25:00Z
|
2021-09-08T14:00:48Z
|
2015-01-19T09:28:39Z
|
NONE
|
resolved
|
It would be nice to have support for the Expect -> 100 Continue flow. This is specially important when we are doing uploads, since we will not need to transfer the whole data before we encounter a 401, for example.
A typical use-case would be a streaming upload, with the data coming from a client and proxied on-the-fly to our destination server. Requests would read the data from the input source socket only if the destination server had already sent the 100-Continue header. When we are dealing with S3, 401 errors are common, and if the data is not read we can retry the request.
Requests can check the request headers, and if it finds an "Expect" header it will wait for the 100 Continue response from the server. If it does not come, this error should flow to the caller in a way that it can distinguish a network problem from a failed expectation error.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/713/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/713/timeline
| null |
completed
| null | null | false |
[
"This would be wonderful.\n\nI believe @durin42 has some thoughts about this as well.\n",
"_nod_ We can do this, but it'll be easiest with a rewritten http client library. I've got one that's mostly API compatible with httplib (http://code.google.com/p/httpplus/) that I'm writing as part of my 20% work on Mercurial that we could try.\n\nNote that the flow proposed in the initial bug isn't strictly RFC compliant - you can't wait indefinitely for the response to the Expect: header. You have to wait an unspecified delay and then continue optimistically, as servers SHOULD (not MUST) understand Expect: headers. Reverse proxies are allowed to strip Expect headers entirely, and many do so.\n\n@kennethreitz I don't have any particular time to dedicate to this, but I'm happy to chat more about what we can do to make this better. Are you going to be at OSCON?\n",
"Since we now have streaming uploads (if I remember correctly) is anyone interested in taking care of this? \n",
"@kennethreitz do you have support for streaming uploads? I've not followed development of requests closely.\n",
"@durdin42 yessir! http://docs.python-requests.org/en/latest/user/advanced/#streaming-uploads\n",
"I haven't really thought about this for any length of time, but is this a Requests-level issue or a urllib3-level issue? Put another way, does it belong in the HTTP Adapter or in urllib3?\n",
"I think we can handle it on our end.\n",
"Having looked at this a little this morning, it'll be very challenging to implement fully proper expect header handling, because some servers assume that if you send an expect header you can handle an early response, and can close the socket early in a way that breaks httplib.\n\nThat said, you should be able to fix this by waiting ~500ms after you send headers and peeking for a response, and if you have a non-100-continue response pretend to the httplib guts that the request body was completely sent.\n",
"In particular, if you tried to read from the low_conn.sock() here with a timeout, I think that might be the right jumping-off point:\n\nhttps://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L185\n",
"Ah `time.sleep` the cause of and solution to, all of life's problems.\n\nWe could do:\n\n``` python\nif 'expects' in request.headers:\n time.sleep(0.5)\n```\n\nSo we don't degrade performance for other cases, correct?\n",
"Any progress on this?\n",
"@edevil Nope. Feel free to pick it up if you want something to hack on. =)\n",
"I don't have the Python/requests/httplib proficiency to do this, but as a user and big fan of HTTPie, I'd love to see this implemented. =) Thanks for the consideration, and good luck with the implementation!\n",
"So I'm starting to wonder if this is entirely an adapter-level change. I hadn't thought much about this, but I think it would be easiest and make the most sense to be on the adapter level. My reasoning why:\n- The adapter handles the connection details\n- The adapter returns a response object not a partial response object\n- The session expects a response and so the fact that we'd have to handle a non-100-continue response should be handled before we return a response to the session.\n",
"Any update on this? \nThis would be very useful for our use case (Uploading large objects to openstack swift.)\nWe're awaiting this feature.\n",
"There's been no progress on this, and it's not high on the list of priorities for any of the core development team. This is only likely to happen any time soon if someone else develops it. =)\n",
"Are there any updates on this bit? We're facing an issue and 100-continue can help make our lives much better. \n",
"See my above comment.\n",
"For those interested, this is probably not possible with our current stack. We talked with @durin42 tonight and it seems that httplib just swallows the 100-Continue and does not really wait for it either. This may be far more difficult than originally thought.\n",
"To continue keeping this issue up to date, the HTTPbis WG is considering deprecating the entire 1XX series of status codes as an erratum to RFC 723[0-5]. It's not entirely clear that this will happen, but what _is_ clear is that the prevailing opinion in the WG is that `100 Continue` is bad.\n\nThe most recent relevant WG thread is [here](http://lists.w3.org/Archives/Public/ietf-http-wg/2014JulSep/1136.html). Note that the discussion is heavily informed by HTTP/2, which has no need of the `100 Continue` mechanism. It's not clear exactly where this will go, but it puts the 1XX codes at risk.\n",
"I think this issue can now be characterised as \"impossible without massive rewrite of httplib\". For that reason, I want to close this down: having issues we cannot take action on is problematic.\n",
"If anyone needs a feature like this I ended up going with a patched httplib:\n\nhttp://bugs.python.org/issue1346874\n",
"@edevil Id your patched httplib available anywhere for as a package?\n\nBTW, Amazon S3 recommends using 100-continues: http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTRedirect.html\n",
"@cancan101 Sorry, no. But you have the patch in the ticket: http://bugs.python.org/file26357/issue1346874-273.patch\n",
"This is how this is supported in the AWS s3 python cli:\n\nhttps://github.com/boto/botocore/blob/develop/botocore/awsrequest.py#L57\n\nThis would be useful for OpenStack Swift for the same reasons it's useful for s3: you get a 401 back before you've uploaded any data. This prevents wasted (potentially large) uploads and allows you to retry if your input is a stream.\n",
"We're _desperately_ trying to avoid further patching `httplib`. I highly recommend trying to make this enhancement upstream if OpenStack values it: that would make it much easier for us to backport that support to earlier versions.\n",
"upstream: ie httplib?\n",
"Correct. =)\n",
"Right, it would definitely be nice and clean to have it in there.\n\nThe patch to httplib referenced above (http://bugs.python.org/issue1346874) has been up since 2005!\n\nHave the requests folks had any luck in fixing functionality gaps by pushing stuff upstream?\n",
"_Some_, but it's not been as fast as we'd like in all cases. However, our only other option is to jettison httplib entirely, which is a bit excessive and puts a substantial maintenance burden on us. Where possible, working with upstream is the ideal thing to do.\n"
] |
https://api.github.com/repos/psf/requests/issues/712
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/712/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/712/comments
|
https://api.github.com/repos/psf/requests/issues/712/events
|
https://github.com/psf/requests/pull/712
| 5,511,657 |
MDExOlB1bGxSZXF1ZXN0MTc1MTY0OA==
| 712 |
fixed param handling in Request.full_url
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1228739?v=4",
"events_url": "https://api.github.com/users/siebenschlaefer/events{/privacy}",
"followers_url": "https://api.github.com/users/siebenschlaefer/followers",
"following_url": "https://api.github.com/users/siebenschlaefer/following{/other_user}",
"gists_url": "https://api.github.com/users/siebenschlaefer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/siebenschlaefer",
"id": 1228739,
"login": "siebenschlaefer",
"node_id": "MDQ6VXNlcjEyMjg3Mzk=",
"organizations_url": "https://api.github.com/users/siebenschlaefer/orgs",
"received_events_url": "https://api.github.com/users/siebenschlaefer/received_events",
"repos_url": "https://api.github.com/users/siebenschlaefer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/siebenschlaefer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/siebenschlaefer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/siebenschlaefer",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-09T23:14:22Z
|
2021-09-08T16:00:45Z
|
2012-07-12T19:06:53Z
|
CONTRIBUTOR
|
resolved
|
I noticed that the params were not correctly handled in the presence of a fragment.
``` python
requests.get('http://example.com/path?key=value#fragment',
params={'a': 'b'}, return_response=False).full_url
```
Is my fix ok?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/712/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/712/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/712.diff",
"html_url": "https://github.com/psf/requests/pull/712",
"merged_at": "2012-07-12T19:06:53Z",
"patch_url": "https://github.com/psf/requests/pull/712.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/712"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1821406) (merged 08cebb3c into b7fd0e81).\n",
"this looks great, thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/711
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/711/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/711/comments
|
https://api.github.com/repos/psf/requests/issues/711/events
|
https://github.com/psf/requests/issues/711
| 5,487,979 |
MDU6SXNzdWU1NDg3OTc5
| 711 |
Parse Link headers (rfc5988)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/701?v=4",
"events_url": "https://api.github.com/users/jokull/events{/privacy}",
"followers_url": "https://api.github.com/users/jokull/followers",
"following_url": "https://api.github.com/users/jokull/following{/other_user}",
"gists_url": "https://api.github.com/users/jokull/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jokull",
"id": 701,
"login": "jokull",
"node_id": "MDQ6VXNlcjcwMQ==",
"organizations_url": "https://api.github.com/users/jokull/orgs",
"received_events_url": "https://api.github.com/users/jokull/received_events",
"repos_url": "https://api.github.com/users/jokull/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jokull/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jokull/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jokull",
"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"
},
{
"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 | 18 |
2012-07-08T17:59:16Z
|
2021-09-08T23:00:45Z
|
2012-08-20T15:11:30Z
|
NONE
|
resolved
|
[Web Linking RFC](http://www.rfc-editor.org/rfc/rfc5988.txt)
GitHub uses these for pagination in their API for example. Potentially they make API’s more self describing and discoverable.
I’d like to invite the discussion of requests making an effort to consume these and expose them on `Response.links` as a dictionary or dict-like object.
A HTTP Link header looks like this:
```
Link: <http://example.com/TheBook/chapter2>; rel="previous";
title="previous chapter"
```
It’d be cool to access the links like so
```
response.links.previous
>>> Link <http://example.com/TheBook/chapter2> title="previous chapter"
```
Maybe this belongs in a `requests-hypermedia` library.
References:
- [Link header parsing gist](https://gist.github.com/1103172)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/711/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/711/timeline
| null |
completed
| null | null | false |
[
"Taking it further:\n\nEnable HTTP verb actions on links. Think: `response.links.next.get()`\n\nChained request/response! :relaxed: \n\n[More on Hypermedia API linking](https://secure.designinghypermediaapis.com/terms/linking)\n",
"I've been thinking about something like this for a long time.\n\nIf the API was kept this simple, I think we could keep this directly in Requests.\n",
"`response.links.next` vs. `response.rel.next`\n",
"HAL is now an [Internet-Draft](http://tools.ietf.org/html/draft-kelly-json-hal-03). This is likely to become _the_ hypermedia guideline for expressing connections between resources (what the Link header does) with many more features. \n\nAlso @mitsuhiko expressed his hate for embedding \"new things\" into headers. I think it might have something to do with cachability or intermediaries that mess with headers.\n\nSee more:\n- [Backbone.HAL](https://github.com/mikekelly/backbone.hal)\n- [frenetic](http://dlindahl.github.com/frenetic/)\n",
"One of the reasons people don't use Link headers is the lack of tooling, so I'd love to see this in Requests, for obvious reasons.\n\n> This is likely to become the hypermedia guideline for expressing connections between resources (what the Link header does)\n\nHAL is described my mike as \"HTML for machines,\" so I think this description is slightly off. That said, I don't see why it's relevant to this discussion, exactly, so I should just shut up. :)\n",
"One thought..\n\n```\nresponse.links.attr\n```\n\nshould return the URI, rather than the raw data. We already have means of accessing headers.\n",
"@steveklabnik I suppose Link headers aren't going anywhere just because of HAL. \n\nOne question you might be more familiar with .. is the rel attribute a namespace of sorts for links? So suppose you had two ;rel=profile headers should one of them be ignored? I'm asking because the implementation would be nice as an attribute accessor like so:\n\n```\nresponse.links.profile\n>>> \"/some/uri\"\n```\n\nHTML pages can link to multiple stylesheets, as is common.\n",
"@jokull this is quickly getting off topic, and this might be a great question for the [email protected] list, but quickly:\n\nNot so much a namespace as like a tag. Think about a collection: \n\n``` html\n<ul class=\"collection\">\n <li><a rel=\"item current\" href=\"...\">one</a>\n <li><a rel=\"item\" href=\"...\">two</a>\n <li><a rel=\"item\" href=\"...\">three</a>\n</ul>\n```\n\nEach one is an `item`, so each one would get an `item` rel. http://www.iana.org/assignments/link-relations/link-relations.xml\n\nYou could easily have it return an array rather than a string.\n\nNote that [non-standard link relations are supposed to be URIs](http://tools.ietf.org/html/rfc5988#section-4.2), so accessing it via a method (sorry, Rubyist here primarily) means that when I have\n\n``` html\n<a href=\"...\" rel=\"http://mysite.com/rels/blog-post\">Links are awesome</a>\n```\n\nyou're not gonna be able to use this interface to get `response.links.http://mysite.com/rels/blog-post`.\n",
"Requests doesn't want to be involved with anything in the response body. Only headers.\n",
"Link Relations work on any link, link header or in the response body. The issue is the same: two Link headers with an `item` relation is 100% compliant.\n",
"@kennethreitz Good point about headers vs body. Are you looking for contributors or suggested implementations? \n\nOne more reference: the [official Link Relations](http://www.iana.org/assignments/link-relations/link-relations.xml).\n",
"FWIW, parser here:\n https://github.com/mnot/redbot/blob/master/redbot/headers/link.py\n",
"This is happening now.\n\n```\n>>> r.links['previous']\n{'url': 'http://blahblah', 'type': 'whatever'}\n```\n",
"Oh it is so happening.\n",
"I guess it’s a MultiDict with `get_list`? \n",
"A happier man today, I could not be. \n\n:sparkles: :cake: :sparkles:\n",
"f3159ed4f619124ab4b47c4e0f06f96daed762ce handles basic functionality\n",
"Very handy, thank you. :-) :heart: \n"
] |
https://api.github.com/repos/psf/requests/issues/710
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/710/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/710/comments
|
https://api.github.com/repos/psf/requests/issues/710/events
|
https://github.com/psf/requests/pull/710
| 5,484,834 |
MDExOlB1bGxSZXF1ZXN0MTc0MDg4OQ==
| 710 |
Add try/catch for simplejson vs json
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/172692?v=4",
"events_url": "https://api.github.com/users/zachwill/events{/privacy}",
"followers_url": "https://api.github.com/users/zachwill/followers",
"following_url": "https://api.github.com/users/zachwill/following{/other_user}",
"gists_url": "https://api.github.com/users/zachwill/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zachwill",
"id": 172692,
"login": "zachwill",
"node_id": "MDQ6VXNlcjE3MjY5Mg==",
"organizations_url": "https://api.github.com/users/zachwill/orgs",
"received_events_url": "https://api.github.com/users/zachwill/received_events",
"repos_url": "https://api.github.com/users/zachwill/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zachwill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zachwill/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zachwill",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-08T04:20:38Z
|
2021-09-08T23:06:12Z
|
2012-07-08T04:21:55Z
|
CONTRIBUTOR
|
resolved
|
Just a minor change that opts to use the `simplejson` library if it's available rather than the standard library's `json` package. Nothing too fancy — could provide some minor speed-ups from the `simplejson` C extension.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/710/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/710/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/710.diff",
"html_url": "https://github.com/psf/requests/pull/710",
"merged_at": "2012-07-08T04:21:55Z",
"patch_url": "https://github.com/psf/requests/pull/710.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/710"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1806954) (merged 25299400 into 808b0ad8).\n",
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/709
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/709/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/709/comments
|
https://api.github.com/repos/psf/requests/issues/709/events
|
https://github.com/psf/requests/pull/709
| 5,482,718 |
MDExOlB1bGxSZXF1ZXN0MTc0MDE3Mw==
| 709 |
Have User Agent include more details
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/145979?v=4",
"events_url": "https://api.github.com/users/dstufft/events{/privacy}",
"followers_url": "https://api.github.com/users/dstufft/followers",
"following_url": "https://api.github.com/users/dstufft/following{/other_user}",
"gists_url": "https://api.github.com/users/dstufft/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dstufft",
"id": 145979,
"login": "dstufft",
"node_id": "MDQ6VXNlcjE0NTk3OQ==",
"organizations_url": "https://api.github.com/users/dstufft/orgs",
"received_events_url": "https://api.github.com/users/dstufft/received_events",
"repos_url": "https://api.github.com/users/dstufft/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dstufft/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dstufft/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dstufft",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2012-07-07T20:18:40Z
|
2021-09-08T16:00:45Z
|
2012-07-08T07:42:17Z
|
CONTRIBUTOR
|
resolved
|
With this change the default user agent will include more details by default.
Python:
```
python -c "import requests; print requests.get('http://httpbin.org/user-agent').json"
{u'user-agent': u'python-requests/0.13.2 CPython/2.7.3 Darwin/11.4.0'}
```
PyPy:
```
pypy -c "import requests; print requests.get('http://httpbin.org/user-agent').json"
{u'user-agent': u'python-requests/0.13.2 PyPy/1.9.0 Darwin/11.4.0'}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/709/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/709/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/709.diff",
"html_url": "https://github.com/psf/requests/pull/709",
"merged_at": "2012-07-08T07:42:17Z",
"patch_url": "https://github.com/psf/requests/pull/709.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/709"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1805051) (merged 11433d94 into 808b0ad8).\n",
"Awesome! i might swap this out to use its.py\n",
"its.py?\n",
"actually, most of it exists in requests.compat\n\n## \n\nKenneth Reitz\n\nOn Sunday, July 8, 2012 at 12:18 AM, Donald Stufft wrote:\n\n> its.py?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/709#issuecomment-6828782\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1807040) (merged 523433f2 into 808b0ad8).\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1807082) (merged 21f60fe8 into 808b0ad8).\n",
"\\o/\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1807579) (merged 21f60fe8 into 808b0ad8).\n",
"Finally tried this. Absolutely incredible :)\n"
] |
https://api.github.com/repos/psf/requests/issues/708
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/708/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/708/comments
|
https://api.github.com/repos/psf/requests/issues/708/events
|
https://github.com/psf/requests/pull/708
| 5,377,944 |
MDExOlB1bGxSZXF1ZXN0MTY5Mjc2Nw==
| 708 |
Adding nice rounded corners for the pre element of Sphinx theme
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/412328?v=4",
"events_url": "https://api.github.com/users/perone/events{/privacy}",
"followers_url": "https://api.github.com/users/perone/followers",
"following_url": "https://api.github.com/users/perone/following{/other_user}",
"gists_url": "https://api.github.com/users/perone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/perone",
"id": 412328,
"login": "perone",
"node_id": "MDQ6VXNlcjQxMjMyOA==",
"organizations_url": "https://api.github.com/users/perone/orgs",
"received_events_url": "https://api.github.com/users/perone/received_events",
"repos_url": "https://api.github.com/users/perone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/perone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/perone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/perone",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-07-02T00:09:30Z
|
2021-09-08T16:00:44Z
|
2012-07-02T03:00:28Z
|
NONE
|
resolved
|
Just adding some nice rounded corners for the **pre** element of Sphinx theme, I don't know if you want to commit it, it looks like in this project: http://odbrasil.readthedocs.org
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/708/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/708/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/708.diff",
"html_url": "https://github.com/psf/requests/pull/708",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/708.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/708"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1753881) (merged c19a83d1 into d983cfab).\n",
"Thanks for the contribution. I've actually played around with adding rounded corners to the theme a few times, and decided against it. \n\nThanks though :)\n"
] |
https://api.github.com/repos/psf/requests/issues/707
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/707/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/707/comments
|
https://api.github.com/repos/psf/requests/issues/707/events
|
https://github.com/psf/requests/issues/707
| 5,375,971 |
MDU6SXNzdWU1Mzc1OTcx
| 707 |
Duplicate cookie in session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/381451?v=4",
"events_url": "https://api.github.com/users/kiennt/events{/privacy}",
"followers_url": "https://api.github.com/users/kiennt/followers",
"following_url": "https://api.github.com/users/kiennt/following{/other_user}",
"gists_url": "https://api.github.com/users/kiennt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kiennt",
"id": 381451,
"login": "kiennt",
"node_id": "MDQ6VXNlcjM4MTQ1MQ==",
"organizations_url": "https://api.github.com/users/kiennt/orgs",
"received_events_url": "https://api.github.com/users/kiennt/received_events",
"repos_url": "https://api.github.com/users/kiennt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kiennt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kiennt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kiennt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-07-01T18:39:41Z
|
2021-09-09T07:05:31Z
|
2012-07-27T05:49:29Z
|
NONE
|
resolved
|
I am using `requests` 0.13.1, this code produces the specified exception:
```
>>> import requests
>>> s = requests.session()
>>> s.get("http:///www.google.com")
>>> s.cookies.items()
[('NID', '61=WDudE-2jKmX8WQjZbiH0QUi__G_kGOVDbs5XCTQO634x51d99mHYi-VptWUURDSJco_IwTTJLAM-Dp_LurBU-WWyz_3xy0BTsMHBJ5Sf6wZrgGwvyDDupLLcA86ypDUt'), ('PREF', 'ID=a7055cc9168cd7d3:FF=0:TM=1341167514:LM=1341167514:S=vbL-Ih__itkxmGxQ'), ('NID', '61=gLhy_qaWV5hZ9VcKxzUXfeJt1yRYmkVzPDVmtbYJshr01gWXNtDSwmHDaRByaNTYWJDzP_z_FjzPhy5EsZ6k74uaZDjX0sUNzgecF7si6Z-50GaemVbN3eNa22Z86T7s'), ('PREF', 'ID=b06021225aa97775:FF=0:TM=1341167515:LM=1341167515:S=wdaMCYeYlNZ-3tnS')]
```
There are two cookies with name `NID`? It seems like when server update old cookies, session did not update it but insert new one.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/707/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/707/timeline
| null |
completed
| null | null | false |
[
"Could you show more details of the cookie objects? What are the domains, etc.?\n",
"@kiennt Google is redirecting to a localized domain, so there is a cookie for `google.com` and `google.xyz`.\n\nYou can verify this with:\n\n```\n>>> s.get(\"http://www.google.com\", allow_redirects=False)\n<Response [302]>\n>>> s.cookies.items()\n[('NID', '61=pNDDIx0Bj7mHfVejY_ZUY1h-8VYOo-W6GuYkX-lyeAPHHrFxLDb-I7wR8vspIl2Yf0x\nF1lpK8ReuFa6ZTkxVUcHIX1_m7uy5KjPK9KUNwdy7k7PrOsdMOoMEnteMdE1w'), ('PREF', 'ID=6d\ne3b5315cd0659c:FF=0:TM=1341305909:LM=1341305909:S=R3lLroX9nHdc_Ixa')]\n```\n",
"Those look like two cookies to me?\n",
"The confusion here is probably related to the fact that a `RequestsCookieJar` isn't a dictionary, but can be manipulated like a dictionary. There is no guarantee that a cookie has a unique name, only that its combination of name and domain (and maybe path?) are unique. Each regional Google homepage sets two cookies, one called NID and one called PREF.\n\nThis behaviour is totally correct.\n"
] |
https://api.github.com/repos/psf/requests/issues/706
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/706/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/706/comments
|
https://api.github.com/repos/psf/requests/issues/706/events
|
https://github.com/psf/requests/pull/706
| 5,370,813 |
MDExOlB1bGxSZXF1ZXN0MTY5MDYyNg==
| 706 |
travis ci png linked
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/492603?v=4",
"events_url": "https://api.github.com/users/westonplatter/events{/privacy}",
"followers_url": "https://api.github.com/users/westonplatter/followers",
"following_url": "https://api.github.com/users/westonplatter/following{/other_user}",
"gists_url": "https://api.github.com/users/westonplatter/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westonplatter",
"id": 492603,
"login": "westonplatter",
"node_id": "MDQ6VXNlcjQ5MjYwMw==",
"organizations_url": "https://api.github.com/users/westonplatter/orgs",
"received_events_url": "https://api.github.com/users/westonplatter/received_events",
"repos_url": "https://api.github.com/users/westonplatter/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westonplatter/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westonplatter/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westonplatter",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-30T22:47:28Z
|
2021-09-08T16:00:44Z
|
2012-07-01T01:07:12Z
|
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/706/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/706/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/706.diff",
"html_url": "https://github.com/psf/requests/pull/706",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/706.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/706"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1746549) (merged bf20e9a2 into 4c41ae62).\n",
"Thanks for the help, but closing because this will just make merging a pain.\n",
"Cool.\n",
"Otherwise, it's awesome. Sorry :)\n",
"yep. many things are possible, they just cost a lot of effort.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/705
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/705/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/705/comments
|
https://api.github.com/repos/psf/requests/issues/705/events
|
https://github.com/psf/requests/pull/705
| 5,370,808 |
MDExOlB1bGxSZXF1ZXN0MTY5MDYyNA==
| 705 |
travis ci png linked
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/492603?v=4",
"events_url": "https://api.github.com/users/westonplatter/events{/privacy}",
"followers_url": "https://api.github.com/users/westonplatter/followers",
"following_url": "https://api.github.com/users/westonplatter/following{/other_user}",
"gists_url": "https://api.github.com/users/westonplatter/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westonplatter",
"id": 492603,
"login": "westonplatter",
"node_id": "MDQ6VXNlcjQ5MjYwMw==",
"organizations_url": "https://api.github.com/users/westonplatter/orgs",
"received_events_url": "https://api.github.com/users/westonplatter/received_events",
"repos_url": "https://api.github.com/users/westonplatter/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westonplatter/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westonplatter/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westonplatter",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-30T22:46:32Z
|
2021-09-08T16:00:43Z
|
2012-07-01T01:07:27Z
|
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/705/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/705/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/705.diff",
"html_url": "https://github.com/psf/requests/pull/705",
"merged_at": "2012-07-01T01:07:27Z",
"patch_url": "https://github.com/psf/requests/pull/705.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/705"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1746545) (merged 81e86a35 into d983cfab).\n",
"thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/704
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/704/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/704/comments
|
https://api.github.com/repos/psf/requests/issues/704/events
|
https://github.com/psf/requests/pull/704
| 5,370,798 |
MDExOlB1bGxSZXF1ZXN0MTY5MDYyMA==
| 704 |
made the cache README.rest TravisCI PNG link to TravisCI project status page
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/492603?v=4",
"events_url": "https://api.github.com/users/westonplatter/events{/privacy}",
"followers_url": "https://api.github.com/users/westonplatter/followers",
"following_url": "https://api.github.com/users/westonplatter/following{/other_user}",
"gists_url": "https://api.github.com/users/westonplatter/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westonplatter",
"id": 492603,
"login": "westonplatter",
"node_id": "MDQ6VXNlcjQ5MjYwMw==",
"organizations_url": "https://api.github.com/users/westonplatter/orgs",
"received_events_url": "https://api.github.com/users/westonplatter/received_events",
"repos_url": "https://api.github.com/users/westonplatter/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westonplatter/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westonplatter/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westonplatter",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-30T22:45:19Z
|
2021-09-08T16:00:43Z
|
2012-07-01T01:07:35Z
|
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/704/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/704/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/704.diff",
"html_url": "https://github.com/psf/requests/pull/704",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/704.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/704"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1746530) (merged 879df2a3 into dc0cd95d).\n"
] |
|
https://api.github.com/repos/psf/requests/issues/703
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/703/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/703/comments
|
https://api.github.com/repos/psf/requests/issues/703/events
|
https://github.com/psf/requests/pull/703
| 5,370,780 |
MDExOlB1bGxSZXF1ZXN0MTY5MDYxNA==
| 703 |
made the develop README.rest TravisCI PNG link to TravisCI project status page
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/492603?v=4",
"events_url": "https://api.github.com/users/westonplatter/events{/privacy}",
"followers_url": "https://api.github.com/users/westonplatter/followers",
"following_url": "https://api.github.com/users/westonplatter/following{/other_user}",
"gists_url": "https://api.github.com/users/westonplatter/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westonplatter",
"id": 492603,
"login": "westonplatter",
"node_id": "MDQ6VXNlcjQ5MjYwMw==",
"organizations_url": "https://api.github.com/users/westonplatter/orgs",
"received_events_url": "https://api.github.com/users/westonplatter/received_events",
"repos_url": "https://api.github.com/users/westonplatter/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westonplatter/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westonplatter/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westonplatter",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-30T22:41:34Z
|
2021-09-08T16:00:43Z
|
2012-07-02T11:31:09Z
|
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/703/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/703/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/703.diff",
"html_url": "https://github.com/psf/requests/pull/703",
"merged_at": "2012-07-02T11:31:09Z",
"patch_url": "https://github.com/psf/requests/pull/703.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/703"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1746486) (merged 0512132b into d983cfab).\n",
"thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/702
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/702/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/702/comments
|
https://api.github.com/repos/psf/requests/issues/702/events
|
https://github.com/psf/requests/issues/702
| 5,361,081 |
MDU6SXNzdWU1MzYxMDgx
| 702 |
Customizable MIME
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/328191?v=4",
"events_url": "https://api.github.com/users/wecing/events{/privacy}",
"followers_url": "https://api.github.com/users/wecing/followers",
"following_url": "https://api.github.com/users/wecing/following{/other_user}",
"gists_url": "https://api.github.com/users/wecing/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wecing",
"id": 328191,
"login": "wecing",
"node_id": "MDQ6VXNlcjMyODE5MQ==",
"organizations_url": "https://api.github.com/users/wecing/orgs",
"received_events_url": "https://api.github.com/users/wecing/received_events",
"repos_url": "https://api.github.com/users/wecing/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wecing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wecing/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wecing",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-29T20:19:07Z
|
2021-09-09T07:05:35Z
|
2012-07-12T21:27:36Z
|
NONE
|
resolved
|
Some formats could be matched to multiple content-types. e.g. .avi.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/702/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/702/timeline
| null |
completed
| null | null | false |
[
"You can just set the content-type yourself?\n",
"Oh sorry. I mean make it customizable for uploading multiple files with POST.\n",
"Ah, I think this is a bit out of scope for now, since you can always generate the whole body yourself.\n"
] |
https://api.github.com/repos/psf/requests/issues/701
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/701/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/701/comments
|
https://api.github.com/repos/psf/requests/issues/701/events
|
https://github.com/psf/requests/issues/701
| 5,357,057 |
MDU6SXNzdWU1MzU3MDU3
| 701 |
SSL errors shouldn't be converted to Timeouts when verify=False
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/77170?v=4",
"events_url": "https://api.github.com/users/ternus/events{/privacy}",
"followers_url": "https://api.github.com/users/ternus/followers",
"following_url": "https://api.github.com/users/ternus/following{/other_user}",
"gists_url": "https://api.github.com/users/ternus/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ternus",
"id": 77170,
"login": "ternus",
"node_id": "MDQ6VXNlcjc3MTcw",
"organizations_url": "https://api.github.com/users/ternus/orgs",
"received_events_url": "https://api.github.com/users/ternus/received_events",
"repos_url": "https://api.github.com/users/ternus/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ternus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ternus/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ternus",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-06-29T16:30:25Z
|
2021-09-09T07:05:32Z
|
2012-07-27T05:46:18Z
|
NONE
|
resolved
|
Spent a while figuring out why I was getting timeouts that return almost instantly. It's possible to use SSL and not verify certificates (yes, this is actually what I want), so SSLError exceptions shouldn't be converted to Timeout exceptions unless they really are timeouts.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/701/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/701/timeline
| null |
completed
| null | null | false |
[
"They aren't. I'm assuming you're referring to [this section](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L603) of `models.py`, which seems to throw `Timeouts` if it gets urllib3 `SSLErrors`. However, if you examine the code that runs before that try;except block, you'll note that [if verify is set to `False`, we tell urllib3 not to check the certificate](https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L536). The relevant section is reproduced here:\n\n``` python\nif url.startswith('https') and self.verify:\n [...snip...]\nelse:\n conn.cert_reqs = 'CERT_NONE'\n conn.ca_certs = None\n```\n\nThis change prevents the python `ssl` module from verifying the certificate in any way, which means it won't throw `SSLErrors`, which means you won't hit that try;except block.\n\nWould it be possible for you to provide a code snippet that can reproduce the problem, so I can take a look at it?\n\n**EDIT**: I find it helpful to format things correctly.\n",
"Yes, but SSL errors are not limited to problems with the certificate. I'm seeing this same problem with a server that requires sslv3 while requests or urllib3 or whatever assumes something different. I think it has something to do with the ssl libraries that ship with ubuntu precise, because curl suffers from similar issues.\n",
"If curl is suffering it is probably the fault of your distro, because the Python `ssl` module uses system calls to the OS socket APIs.\n\nAs for your response, you're correct that `ssl.SSLError` is not only raised when the certificate fails to match, but when any problem occurs in the SSL layer. Within the scope of the OPs question, however, my answer was correct: his `Timeout`s were symptomatic of some other problem, not of `requests` or `urllib3` checking the certificate and throwing a `Timeout`.\n\nWith that said, I think the idea that legitimate SSLErrors shouldn't be hidden is correct. It's unclear to me why that check of `self.verify` is present at all. I've opened a Pull Request removing that check as Issue #715.\n",
"I can confirm this issue too. The bug causing this is much lower level, but it's still weird to see a Timeout error: https://github.com/kennethreitz/requests/issues/730\n",
"This _should_ (no guarantees) have been fixed in Pull Request #715. This pull request was included as part of [Requests v0.13.3](https://github.com/kennethreitz/requests/zipball/v0.13.3), so if you run your code in Issue #730 using that version of Requests you should get an SSLError.\n\nDoesn't fix your main problem of course. =P\n",
"Ah missed the pull request. Looks suitable indeed. Thanks :)\n"
] |
https://api.github.com/repos/psf/requests/issues/700
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/700/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/700/comments
|
https://api.github.com/repos/psf/requests/issues/700/events
|
https://github.com/psf/requests/pull/700
| 5,341,055 |
MDExOlB1bGxSZXF1ZXN0MTY3OTk2NQ==
| 700 |
Caching Support!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
[
{
"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 |
[] |
{
"closed_at": "2012-11-27T18:32:58Z",
"closed_issues": 1,
"created_at": "2012-07-12T21:17:04Z",
"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/17",
"id": 144651,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/17/labels",
"node_id": "MDk6TWlsZXN0b25lMTQ0NjUx",
"number": 17,
"open_issues": 0,
"state": "closed",
"title": "v0.11.0",
"updated_at": "2012-11-27T18:32:58Z",
"url": "https://api.github.com/repos/psf/requests/milestones/17"
}
| 38 |
2012-06-29T03:12:25Z
|
2021-09-08T23:01:08Z
|
2012-11-27T18:32:58Z
|
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/700/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/700/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/700.diff",
"html_url": "https://github.com/psf/requests/pull/700",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/700.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/700"
}
| true |
[
"PULL 700\n",
"Going to use cachecore.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1734725) (merged dc0cd95d into d983cfab).\n",
"Get an ID for a request: `sha1('{method}-{url}')'?\n",
"key: `SHA256(type-method-url)`\n",
"Plan is for `cache=True` (on session) to be shorthand for:\n\n```\ncache=Cache(backend=SimpleCache(), conditional=True, content=False)\n```\n",
"Going to implement conditional gets first, content will come at a later date.\n\n/c @dstufft\n",
"Going to implement conditional gets first, content will come at a later date.\n\n/c @dstufft\n",
"example:\n\n``` python\ncache=Cache(backend=SimpleCache(), conditional=True, content=False)\n```\n\n`backend=` sets the default for conditional and content if `True`\n\nyou could also do\n\n``` python\ncache=Cache(conditional=BlahCache(), content=BlahCache())\n```\n",
":sparkles: :beer: :sparkles:\n",
"https://bitbucket.org/elarson/httpcache\n",
"httpcache looks perfect.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1756672) (merged 7f19fc59 into d983cfab).\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1792303) (merged 706f88fe into d983cfab).\n",
"Are you going to implement a HTTP cache here? \n",
"That's the plan :)\n",
"Cool.\n\nWhen you get to it, FYI this is about to go into IETF Last Call as the specification of HTTP/1.1 caching - \n https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p6-cache.html\n\nIt should be significantly easier to understand / implement than RFC2616 section 13. Feedback appreciated, of course.\n",
"https://github.com/django/django/blob/master/django/middleware/cache.py#L46\n",
"@kennethreitz : Are you abandoning plans to add caching support, or is this work continuing elsewhere?\n",
"@inactivist I didn't intentionally close the ticket! I am doing some cleanup and switched the default branch from 'develop' to 'master'. That apparently closed all pending pull requests :(\n",
"I'll reopen soon.\n",
"@kennethreitz : Thanks. Actually, I was interested in helping with the effort, as I'd like to take advantage of caching. What can I do to assist?\n",
"+1 to this; I could use it right now.\n\nthis looks like it was a nice solution using event hooks (and Kenneth agreed), but support for the `pre_request` event hook has since been removed. \n",
"To be perfectly honest, this is why I still use httplib2 in new projects. I'm already used to its API and I don't have to reinvent caching.\n",
"@ssokolow your comment seems entirely baffling to me given that there are several options to use when you want to use caching in requests. The last comment on this issue is over a year old and the issue is closed. If you're looking for those resources, I suggest you look elsewhere.\n",
"Take a look at Cache-Control: https://pypi.python.org/pypi/CacheControl\n",
"@sigmavirus24\n\nAhh. Sorry about that.\n\nI went looking but only managed to find a cache implementation which was purely timer based (no ETags, no `If-Modified-Since`) so I assumed they didn't exist and this was the most promising avenue.\n\nIt's quite likely I just screwed up my search keywords somehow but it'd still be a good idea to to add some kind of \"Related Projects\" list to the wiki.\n\n@Lukasa Thanks! That couldn't be more perfect.\n",
"Yes, thanks, @Lukasa, I searched recently and missed Cache-Control as well. If it's not there now, why not mention it in the Requests docs? (Hmm.... pull request, anyone?)\n",
"The main reason we don't mention it is because, by and large, we don't mention third-party plugins in our documentation. We explicitly mention a few of our authentication providers, but that's because they're managed by the Requests project but live outside of the core repository.\n\nI would also be against explicitly referring to third-party projects in our documentation, because it provides the suggestion that we believe that project to be superior to any of its competitors. It also puts us on the hook for ensuring that the project remains compatible and maintained, neither of which are things we want to do for third-party projects.\n\nInterestingly, if I google \"python requests caching\" I find [my own (deprecated) project](http://httpcache.readthedocs.org/en/latest/) towards the top, and that page explicitly mentions CacheControl.\n",
"What about on the wiki then?\n\nIt does match the wiki's \"either hasn't made into the documentation yet, or doesn't belong there\" criterion and given the following points, it's pretty intuitive that wiki contents are community-supplied and neither endorsed nor supported by the project:\n- The project doesn't use the wiki for its website or documentation.\n- The project's documentation is much more polished than the wiki\n- It's pretty well understood that, when a project has both Sphinx documentation **and** a wiki, the wiki is there to take advantage of the \"anyone can edit\" aspect of wiki-ness.\n- The Wiki's \"Home\" page specifically encourages people to add things.\n\n(I'd add it myself, but I don't know all of the \"several options\" that @sigmavirus24 mentioned existing. I'd rather have all known caching extensions listed, both to let people make their own decisions and to further drive home the \"this is not advice\" point.)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/699
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/699/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/699/comments
|
https://api.github.com/repos/psf/requests/issues/699/events
|
https://github.com/psf/requests/issues/699
| 5,312,880 |
MDU6SXNzdWU1MzEyODgw
| 699 |
more information about cause when a Timeout exception occurs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/64242?v=4",
"events_url": "https://api.github.com/users/amenasse/events{/privacy}",
"followers_url": "https://api.github.com/users/amenasse/followers",
"following_url": "https://api.github.com/users/amenasse/following{/other_user}",
"gists_url": "https://api.github.com/users/amenasse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/amenasse",
"id": 64242,
"login": "amenasse",
"node_id": "MDQ6VXNlcjY0MjQy",
"organizations_url": "https://api.github.com/users/amenasse/orgs",
"received_events_url": "https://api.github.com/users/amenasse/received_events",
"repos_url": "https://api.github.com/users/amenasse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/amenasse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amenasse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/amenasse",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-28T05:57:22Z
|
2021-09-09T07:05:29Z
|
2012-07-27T05:51:25Z
|
NONE
|
resolved
|
We were experiencing a lot of time out exceptions in production which were triggered on a get using requests.
```
response = requests.get(url,verify=False, prefetch=True)
```
was occasionally raising a Timeout exception ('Request timed out.')
We weren't setting timeout explicitly in the request so it was confusing that our request was timing out at all.
I dug around in urllib3 and realised there are two types of timeout error that can be raised, a socket timeout and a timeout caused by no connections available in the connection pool:
line 406 in requests/packages/urllib3/connectionpool.py:
```
except Empty as e:
# Timed out by queue
raise TimeoutError(self, "Request timed out. (pool_timeout=%s)" %
pool_timeout)
except SocketTimeout as e:
# Timed out by socket
raise TimeoutError(self, "Request timed out. (timeout=%s)" %
timeout)
```
currently both of thse get raised as a generic Timeout errors by requests:
in requests/models.py line 618
```
except (_SSLError, _HTTPError) as e:
if self.verify and isinstance(e, _SSLError):
raise SSLError(e)
raise Timeout('Request timed out.')
```
I think its usefull for us to know the difference between a socket time out error or a timeout due to no more connections available in the connection pool .
Let me know if you are interested in accepting a patch for this issue.
Thanks
Anthony
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/699/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/699/timeline
| null |
completed
| null | null | false |
[
"Hi @amenasse, I'm +1 on differentiating between the two timeouts. If you're going to do this on the urllib3 side, please make the pull request on that repo.\n\nI'd suggest keeping TimeoutError as the base exception class for the two new ones you want to create. Something like SocketTimeout(TimeoutError) and PoolTimeout(TimeoutError).\n",
"Done!\n"
] |
https://api.github.com/repos/psf/requests/issues/698
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/698/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/698/comments
|
https://api.github.com/repos/psf/requests/issues/698/events
|
https://github.com/psf/requests/issues/698
| 5,289,045 |
MDU6SXNzdWU1Mjg5MDQ1
| 698 |
Wierd behavior
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/486199?v=4",
"events_url": "https://api.github.com/users/c00w/events{/privacy}",
"followers_url": "https://api.github.com/users/c00w/followers",
"following_url": "https://api.github.com/users/c00w/following{/other_user}",
"gists_url": "https://api.github.com/users/c00w/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/c00w",
"id": 486199,
"login": "c00w",
"node_id": "MDQ6VXNlcjQ4NjE5OQ==",
"organizations_url": "https://api.github.com/users/c00w/orgs",
"received_events_url": "https://api.github.com/users/c00w/received_events",
"repos_url": "https://api.github.com/users/c00w/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/c00w/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/c00w/subscriptions",
"type": "User",
"url": "https://api.github.com/users/c00w",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-27T04:19:11Z
|
2021-09-09T07:05:35Z
|
2012-07-12T21:43:23Z
|
NONE
|
resolved
|
Hi,
So my code is dieing in a fire after a while with the following error message.
HttpConnectionPool is full, discarding connection: ra.mining.eligius.st
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/698/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/698/timeline
| null |
completed
| null | null | false |
[
"Can you show us the code in question? Maybe use a [gist](https://gist.github.com/) if you're so inclined.\n"
] |
https://api.github.com/repos/psf/requests/issues/697
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/697/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/697/comments
|
https://api.github.com/repos/psf/requests/issues/697/events
|
https://github.com/psf/requests/issues/697
| 5,280,431 |
MDU6SXNzdWU1MjgwNDMx
| 697 |
Catch UnicodeError coming from encodings/idna.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/132978?v=4",
"events_url": "https://api.github.com/users/terrycojones/events{/privacy}",
"followers_url": "https://api.github.com/users/terrycojones/followers",
"following_url": "https://api.github.com/users/terrycojones/following{/other_user}",
"gists_url": "https://api.github.com/users/terrycojones/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/terrycojones",
"id": 132978,
"login": "terrycojones",
"node_id": "MDQ6VXNlcjEzMjk3OA==",
"organizations_url": "https://api.github.com/users/terrycojones/orgs",
"received_events_url": "https://api.github.com/users/terrycojones/received_events",
"repos_url": "https://api.github.com/users/terrycojones/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/terrycojones/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/terrycojones/subscriptions",
"type": "User",
"url": "https://api.github.com/users/terrycojones",
"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 | 6 |
2012-06-26T18:31:32Z
|
2021-09-09T06:00:52Z
|
2012-08-13T21:14:51Z
|
NONE
|
resolved
|
Here's a Python 2.6 Requests 0.13.1 traceback. Looks like the call to `netloc.encode('idna').decode('utf-8')` needs a try/except.
```
File "/srv/import-service/lib/python2.6/site-packages/requests/api.py", line 76, in head
return request('head', url, **kwargs)
File "/srv/import-service/lib/python2.6/site-packages/requests/safe_mode.py", line 37, in wrapped
return function(method, url, **kwargs)
File "/srv/import-service/lib/python2.6/site-packages/requests/api.py", line 42, in request
return s.request(method=method, url=url, **kwargs)
File "/srv/import-service/lib/python2.6/site-packages/requests/sessions.py", line 230, in request
r.send(prefetch=prefetch)
File "/srv/import-service/lib/python2.6/site-packages/requests/models.py", line 618, in send
self._build_response(r)
File "/srv/import-service/lib/python2.6/site-packages/requests/models.py", line 305, in _build_response
request.send()
File "/srv/import-service/lib/python2.6/site-packages/requests/models.py", line 474, in send
url = self.full_url
File "/srv/import-service/lib/python2.6/site-packages/requests/models.py", line 388, in full_url
netloc = netloc.encode('idna').decode('utf-8')
File "/srv/import-service/lib/python2.6/encodings/idna.py", line 164, in encode
result.append(ToASCII(label))
File "/srv/import-service/lib/python2.6/encodings/idna.py", line 73, in ToASCII
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/697/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/697/timeline
| null |
completed
| null | null | false |
[
"This incredibly unhelpful exception is sometimes thrown because the URL is invalid. For example:\n\n``` python\n>>> u'google.com'.encode('idna')\n'google.com'\n>>> u'.google.com'.encode('idna')\nUnicodeError: label empty or too long\n```\n\nWould it be possible for you to check the URL you're using, or alternatively to post it here so I can take a look?\n",
"@terrycojones Is this bug still affecting you, or has it been resolved?\n",
"Fixed by #774.\n",
"Hi, sorry, I missed the comment from 4 days ago about whether this was still affecting me. Is that still relevant?\n",
"No worries.\n\nI decided to be conservative and filed a Pull Request that replaces the `UnicodeError` with a `requests.exceptions.InvalidURL`, which is the actual problem. If that solves your problem, all is well in the world. If not, I've misunderstood what your problem is. =)\n",
"Replacing with requests.exceptions.InvalidURL sounds good to me. Thanks!\n\nTerry\n"
] |
https://api.github.com/repos/psf/requests/issues/696
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/696/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/696/comments
|
https://api.github.com/repos/psf/requests/issues/696/events
|
https://github.com/psf/requests/pull/696
| 5,262,779 |
MDExOlB1bGxSZXF1ZXN0MTY0NzkwNg==
| 696 |
client certificates are ignored when verify=False
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32112?v=4",
"events_url": "https://api.github.com/users/craigds/events{/privacy}",
"followers_url": "https://api.github.com/users/craigds/followers",
"following_url": "https://api.github.com/users/craigds/following{/other_user}",
"gists_url": "https://api.github.com/users/craigds/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/craigds",
"id": 32112,
"login": "craigds",
"node_id": "MDQ6VXNlcjMyMTEy",
"organizations_url": "https://api.github.com/users/craigds/orgs",
"received_events_url": "https://api.github.com/users/craigds/received_events",
"repos_url": "https://api.github.com/users/craigds/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/craigds/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/craigds/subscriptions",
"type": "User",
"url": "https://api.github.com/users/craigds",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-06-26T00:43:24Z
|
2021-09-08T15:01:20Z
|
2012-06-26T00:56:44Z
|
CONTRIBUTOR
|
resolved
|
Our dev machines don't have valid server certificates for a web service we run. So we use `verify=False` for dev machines.
However our web service requires client certificates, so we use `cert=(cert, key)`. This fails because requests only sets the client certificate if `verify=True`.
Tested with 0.13.1 and latest develop branch. This pull request fixes the issue.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/696/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/696/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/696.diff",
"html_url": "https://github.com/psf/requests/pull/696",
"merged_at": "2012-06-26T00:56:44Z",
"patch_url": "https://github.com/psf/requests/pull/696.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/696"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1706719) (merged 74a4d06d into 8f0ac668).\n",
"So you want to provide client certificates but not verify them?\n",
"From what I understand `verify=True` verifies server certs, it's not related to client certs. The server can verify the client certs, that's not `requests`'s job.\n",
"Ah, understood. Thanks for the patch!\n",
"Can we make verify=False for all the requests?? Kind of default option for all the requests...\n",
"Yes you can:\n\n``` python\nimport requests\ns = requests.Session()\ns.verify = False\n\nr = s.get(url)\n```\n\nUse a `Session` object to make all your requests. The [relevant part of the documentation is here](http://docs.python-requests.org/en/latest/user/advanced/#session-objects).\n\nIn the future, requests for help shouldn't be made on this issue tracker, they should be made on [StackOverflow](http://stackoverflow.com/). =)\n",
"@Lukasa Thanks :) Sorry for posting here, will take care from next time.\n"
] |
https://api.github.com/repos/psf/requests/issues/695
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/695/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/695/comments
|
https://api.github.com/repos/psf/requests/issues/695/events
|
https://github.com/psf/requests/issues/695
| 5,216,851 |
MDU6SXNzdWU1MjE2ODUx
| 695 |
Document Logging
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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 |
2012-06-22T14:56:05Z
|
2021-09-09T07:05:31Z
|
2012-07-27T05:49:37Z
|
CONTRIBUTOR
|
resolved
|
```
import logging
requests_log = logging.getLogger("requests")
requests_log.setLevel(logging.WARNING)python
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/695/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/695/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/694
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/694/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/694/comments
|
https://api.github.com/repos/psf/requests/issues/694/events
|
https://github.com/psf/requests/issues/694
| 5,202,909 |
MDU6SXNzdWU1MjAyOTA5
| 694 |
requests 0.13.1 not working with https and proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1876227?v=4",
"events_url": "https://api.github.com/users/tsbo/events{/privacy}",
"followers_url": "https://api.github.com/users/tsbo/followers",
"following_url": "https://api.github.com/users/tsbo/following{/other_user}",
"gists_url": "https://api.github.com/users/tsbo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tsbo",
"id": 1876227,
"login": "tsbo",
"node_id": "MDQ6VXNlcjE4NzYyMjc=",
"organizations_url": "https://api.github.com/users/tsbo/orgs",
"received_events_url": "https://api.github.com/users/tsbo/received_events",
"repos_url": "https://api.github.com/users/tsbo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tsbo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tsbo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tsbo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-06-21T20:39:15Z
|
2021-09-09T07:05:37Z
|
2012-06-22T13:40:14Z
|
NONE
|
resolved
|
The results is too may retries. I checked the same with the "standard" urllib2 and it was working without any issues.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1876227?v=4",
"events_url": "https://api.github.com/users/tsbo/events{/privacy}",
"followers_url": "https://api.github.com/users/tsbo/followers",
"following_url": "https://api.github.com/users/tsbo/following{/other_user}",
"gists_url": "https://api.github.com/users/tsbo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tsbo",
"id": 1876227,
"login": "tsbo",
"node_id": "MDQ6VXNlcjE4NzYyMjc=",
"organizations_url": "https://api.github.com/users/tsbo/orgs",
"received_events_url": "https://api.github.com/users/tsbo/received_events",
"repos_url": "https://api.github.com/users/tsbo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tsbo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tsbo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tsbo",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/694/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/694/timeline
| null |
completed
| null | null | false |
[
"One possible cause of getting a `ConnectionError` with the text `Too Many Retries` is that you've incorrectly specified your proxy. Are you 100% sure your proxy code matches the example [here](https://github.com/kennethreitz/requests/blob/develop/docs/user/advanced.rst#proxies)?\n",
"import requests\n\nproxy_host = 'http://1.2.3.4:3128'\nproxies={'http':proxy_host,\n 'https':proxy_host}\n\nh = requests.get(\"https://www.example.com\", verify=False, proxies=proxies)\nprint h.status_code, h.error\n\nThis is my test code. I got as output\n503 None\n\nThis 503 is result from proxy host.\n",
"Hmm. Your code seems fine, but that status code is odd. 503 is Service Unavailable, which is an odd error code to report. Does your proxy assign an unusual meaning to 503 Service Unavailable? If not, are you sure your proxy allows the proxying of HTTPS traffic?\n\nIf those aren't the reasons, could you tell me what proxy you're using so I can try to test it myself?\n",
"While trying to retrieve the URL:\n<A HREF=\"https://www.gmail.com/\">https://www.gmail.com/</A>\n<P>\nThe following error was encountered:\n\n<UL>\n<LI>\n<STRONG>\nConnection to 173.194.70.17 Failed\n</STRONG>\n</UL>\n\n<P>\nThe system returned:\n\n<PRE><I> (13) Permission denied</I></PRE>\n\n<P>\nThe remote host or network may be down. Please try the request again.\n<P>Your cache administrator is <A HREF=\"mailto:webmaster\">webmaster</A>. \n<BR clear=\"all\">\n\n<HR noshade size=\"1px\">\n\n<ADDRESS>\nGenerated Fri, 22 Jun 2012 10:57:50 GMT by 1.2.3.4 (squid/2.6.STABLE6-NT)\n</ADDRESS>\n\n# \n\nthis is the output while trying to access https://www.gmail.com\nAll browsers are able to access https via this proxy. The proxy is the only way out to the internet.\nthis is the proxy id: (squid/2.6.STABLE6-NT), if you can try it yourself.\n\nThanks,\n",
"So, I have a theory. It's just a theory, and it'd be great if someone who knows more about HTTPS proxies could try to back me up here (@kennethreitz, any ideas?), but here goes.\n\n[According to the Squid wiki](http://wiki.squid-cache.org/Features/HTTPS), SSL/TLS can be tunnelled through Squid using the HTTP CONNECT method or, in some tiny subset of cases, insert itself as a man-in-the-middle in your HTTPS connection. The issue with presenting itself as a man-in-the-middle is that it'll cause browsers to alert about mismatching certificates (and it's a little unethical if the proxy is controlled by someone who isn't you).\n\nI'd be prepared to be £5 (maybe more) that your browser is using the CONNECT verb to handle the connection, and AFAIK `requests` doesn't do that. A quick reading of `urllib3.request.RequestMethods` shows that `urllib3` [doesn't handle the CONNECT verb](https://github.com/shazow/urllib3/blob/master/urllib3/request.py#L41), which suggests that if you want the functionality you'd need to submit a pull request to `urllib3`.\n\n**tl;dr**: `requests` can't use the only HTTPS proxying method your setup of Squid allows. Probably.\n",
"Indeed urllib2 is using CONNECT, which is missing into urllib3. I rewrote the sample from above for gmail.com with urllib2:\n\nsend: 'CONNECT www.gmail.com:443 HTTP/1.0\\r\\n'\nsend: '\\r\\n'\nsend: 'GET / HTTP/1.1\\r\\nAccept-Encoding: identity\\r\\nHost: www.gmail.com\\r\\nConnection: close\\r\\nUser-Agent: Python-urllib/2.7\\r\\n\\r\\n'\nreply: 'HTTP/1.1 301 Moved Permanently\\r\\n'\n",
"Ok. In this case, this isn't a bug, but a feature that has not been implemented in `urllib3`. The good news is that [there is active development in `urllib3` on improved support for proxies](https://github.com/shazow/urllib3/pull/68), which according to my reading should help with this issue a great deal. Until then, the easiest thing to do is probably continuing to use `urllib2`. Sorry!\n",
"Ok, thanks for the help!\n\nTake care,\nBogomil\n"
] |
https://api.github.com/repos/psf/requests/issues/693
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/693/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/693/comments
|
https://api.github.com/repos/psf/requests/issues/693/events
|
https://github.com/psf/requests/pull/693
| 5,201,176 |
MDExOlB1bGxSZXF1ZXN0MTYyMTY2Nw==
| 693 |
Fix Response Status Codes in the docs.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-21T19:10:08Z
|
2021-09-08T15:01:20Z
|
2012-06-26T00:57:02Z
|
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/693/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/693/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/693.diff",
"html_url": "https://github.com/psf/requests/pull/693",
"merged_at": "2012-06-26T00:57:02Z",
"patch_url": "https://github.com/psf/requests/pull/693.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/693"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1676532) (merged 3aa7f24e into 64da351e).\n",
"thanks!\n",
"Thank you for requests.\n",
"Thank you for the support :)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/692
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/692/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/692/comments
|
https://api.github.com/repos/psf/requests/issues/692/events
|
https://github.com/psf/requests/issues/692
| 5,195,575 |
MDU6SXNzdWU1MTk1NTc1
| 692 |
Ipv6 support : integration of urllib3's patch?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/532063?v=4",
"events_url": "https://api.github.com/users/kapouille/events{/privacy}",
"followers_url": "https://api.github.com/users/kapouille/followers",
"following_url": "https://api.github.com/users/kapouille/following{/other_user}",
"gists_url": "https://api.github.com/users/kapouille/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kapouille",
"id": 532063,
"login": "kapouille",
"node_id": "MDQ6VXNlcjUzMjA2Mw==",
"organizations_url": "https://api.github.com/users/kapouille/orgs",
"received_events_url": "https://api.github.com/users/kapouille/received_events",
"repos_url": "https://api.github.com/users/kapouille/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kapouille/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kapouille/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kapouille",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-21T15:06:12Z
|
2021-09-09T07:05:30Z
|
2012-07-27T05:49:45Z
|
NONE
|
resolved
|
urllib3 has very recently been patched to support ipv6 (https://github.com/shazow/urllib3/issues/72). I reckon that's the only thing that prevents requests from supporting it.
How long would it take to integrate this bug into the packaged version that requests ship with?
Many thanks!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/692/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/692/timeline
| null |
completed
| null | null | false |
[
"Yes this would be very good, I'm currently bumping up against this, I'm wondering why git sub-modules are not used here\n\nNote it looks like this was fixed in 8f0ac668da796b04df9901db58f5d4215be308dd \n\nBut it's yet to be pushed to PyPi. @kennethreitz can you do this?\n"
] |
https://api.github.com/repos/psf/requests/issues/691
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/691/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/691/comments
|
https://api.github.com/repos/psf/requests/issues/691/events
|
https://github.com/psf/requests/pull/691
| 5,191,321 |
MDExOlB1bGxSZXF1ZXN0MTYxNzYwMw==
| 691 |
Remove try/except block for JSON decoding
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/243823?v=4",
"events_url": "https://api.github.com/users/ludovic-gasc/events{/privacy}",
"followers_url": "https://api.github.com/users/ludovic-gasc/followers",
"following_url": "https://api.github.com/users/ludovic-gasc/following{/other_user}",
"gists_url": "https://api.github.com/users/ludovic-gasc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ludovic-gasc",
"id": 243823,
"login": "ludovic-gasc",
"node_id": "MDQ6VXNlcjI0MzgyMw==",
"organizations_url": "https://api.github.com/users/ludovic-gasc/orgs",
"received_events_url": "https://api.github.com/users/ludovic-gasc/received_events",
"repos_url": "https://api.github.com/users/ludovic-gasc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ludovic-gasc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ludovic-gasc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ludovic-gasc",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 20 |
2012-06-21T12:05:33Z
|
2021-09-08T23:08:25Z
|
2012-06-21T14:48:26Z
|
NONE
|
resolved
|
Hi,
I use requests a lot to interact with some applications made by other developers who use a programming language where a JSON encoding implementation doesn't exist.
Sometimes, their JSON content is wrong, I must notify them.
For me, it's important to catch the JSON decoding problem in the same way as the others errors, with an exception.
With this patch, the user of requests can handle the exception himself.
Thanks for your feedback.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/691/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/691/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/691.diff",
"html_url": "https://github.com/psf/requests/pull/691",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/691.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/691"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1673216) (merged 6f13ea71 into 64da351e).\n",
"In this case, I think you should be decoding the json yourself.\n\nThanks for the contribution though. Sorry I can't include it :)\n",
"Ok, it's already the case for me ;-)\n\nMy comment was on the error handling. To my knowledge, the good practice it's always use exceptions, instead of an if block.\n\nIf you prefer keep this behaviour, I won't use .json(), that's it, the alternative is very easy to implement :-)\n",
"Well, the intention is to simply decode JSON if it's there. If the content of the response isn't JSON, there's no need to raise an exception, there simply isn't any JSON, so the value is None. \n\nThis behaves much like Flask/Werkzeug's handling of request objects.\n",
"Ok, now, I understand the goal of .json method. My use case is specific for me to handle JSON encoding errors, forget this pull request.\n",
"@kennethreitz I got bitten by this today. To me the behavior of `response.json` is very unintuitive. If I use `response.json` that's because I expect the response to actually be json-formatted. And I expect this call to fail in case it's not proper json. Say an API I use is mis-behaving and returns weird errors, if an exception occurs here I know something is wrong. Otherwise I just get a `None` object, things start to fail elsewhere in my system and I need to figure out why an object is `None` instead of a proper api response and where this comes from.\n\nThis is also inconsistent with python's `json.loads`.\n\nAt the very least this property should be renamed to `try_json` or `json_or_none` / `json_maybe` ;). But the current implementation is weak. When you say:\n\n> there simply isn't any JSON, so the value is None\n\nIf I translate this to reading a file, this could also mean `open(filename, 'r')` returning `None` if the file doesn't exist. What you're currently saying is basically \"if you expect json data. don't use `response.json`\", which makes me wonder why there is such an API in the first place.\n\nSorry to be that guy, I'm rather strongly opposed to silent errors because they tend to catch you by surprise at the wrong moment. Hope you'll reconsider this change.\n\nThanks!\n",
"@brutasse If you keep the request object then you can test if `r.json` is None. If so, then check the response object for the content of the response (e.g., `r.content`) and that will tell you what was returned by the API. I'm handling things that way myself.\n",
"@sigmavirus24 I know I can do it this way but it doesn't address the fact that the API is misleading: I expect some decoding happen and if the content is malformed then this decoding should fail loudly. I'd rather use json.loads on the response content directly but again, why is there a helper for json decoding if you have to hack around it to even notice there was a decoding error…\n\nTo quote pep20, \"Errors should never pass silently unless explicitly silenced.\" I know this silencing is documented but I wouldn't qualify it as explicit.\n",
"I'm not exactly sure how writing a function that does something like:\n\n``` python\ndef get_json_or_error(request):\n if request.json is None:\n # Check content for encoding error and throw error\n return request.json\n```\n\nAnd then wrapping that in your own try/except block is any different \nfrom requests removing it from that for you. For one thing, if the API \nreturned a 404 (not found) error in which no json was sent, then it \nmakes perfect sense that request.json would be None. How would \nrequest.json throwing an error in that case be in the least bit \ninformative?\n\nAs per being explicit, is requests supposed to throw an error if someone \ntries to access json when there is no json (say on an HTML document), \ne.g., \n\n``` python\nr = requests.get('http://google.com')\nr.json\n```\n\nWould make any sense. The person may have been expecting to see json for \nwhatever reason but there isn't so requests doesn't return any. Maybe \nthe json property could be more intelligent and check the content_type \nin the headers, but then the user still has to check the original \nrequest object. Say it was written like so:\n\n``` python\n@property\ndef json(self):\n if 'json' in self.headers.get('content-encoding'):\n return json.loads(self.text or self.content)\n return None\n```\n\nThen you might have an exception thrown or you might get json or you \nmight get None. If you're expecting json and you don't check afterwards \nif the object is None (assuming no exception was thrown) then you're \napplication is still poorly coded. As it is now, I'm not certain how \nmuch more explicit you want it to be. Returning None is fairly obvious \nto me at least. And beyond that, I'm not certain that headers will be \nset by that point (it should be) but it's also entirely possible that \nyou (or someone else) accidentally change them and then regardless of \nthe response, you get None. Sure that may be easy to find and fix but \nthen requests gets blamed for that as they are getting blamed now for \nnot throwing an exception.\n",
"This isn't really up for discussion. The json property is to be considered a filter. If the content contains no json, the value is None.\n\nJust like in Flask.\n",
"### What if the response body is `null` which decodes as `None`?\n\nThere is an ambiguity: does `response.json==None` means it is not valid json body OR the reponse body is the json value `null`?\n\nFor your information, this is actually the case on several facebook graph api methods.\ni.e.: Facebook subscription APIs for real time updates return `null` in case of success.\n\n### Why use `Response.json` then?\n\nBecause of this ambiguity, why should we use `Response.json` then?\n\nFrom the documentation:\n\n> There’s also a builtin JSON decoder, in case you’re dealing with JSON data\n\nAny proper JSON decoder fails decoding malformated data. \n\nI think lots of folks would expect same behaviour when using the `response.json` properly.\n",
"Indeed, Pyramid, WebOb, WebTest and others don’t silence exceptions if you access request.json_body / response.json / etc and it’s malformed. Likewise, if you access request.POST and the request body is not proper multipart/form-data, you get an exception. I find this behavior is intuitive and helpful, and wish I could use requests’ json attribute in the same way.\n",
"I'm agree with @brutasse and @merwok \n",
"Again, this isn't really up for discussion.\n\nThank for your feedback though, it's well noted and will be considered in future releases.\n",
"Rather, I fully understand why you'd want it that way. No need for further elaboration.\n",
"I see this is not up for discussion, but, for the record, one more evidence the current behavior is less useful that is could be: https://github.com/jgorset/facepy/issues/54\n",
"> Thank for your feedback though, it's well noted and will be considered in future releases.\n\nIt means I can reopen my pull request, or you'll implement an other thing in a future release ?\n",
"+1.\n\nI don't mind using a control flow that doesn't involve catching an exception to facilitate for an unexpected response (though I, too, think it would be more pythonic to raise an exception in this case), but the ambiguity of `None` makes this a dubious feature in an otherwise excellent library.\n",
"This is implemented now, btw :)\n",
"And this is why we love you. Happy holidays season!\n"
] |
https://api.github.com/repos/psf/requests/issues/690
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/690/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/690/comments
|
https://api.github.com/repos/psf/requests/issues/690/events
|
https://github.com/psf/requests/pull/690
| 5,152,115 |
MDExOlB1bGxSZXF1ZXN0MTYwMDMyOQ==
| 690 |
Temporary fix for unicode literal breaking test.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-19T17:44:47Z
|
2021-09-08T15:01:19Z
|
2012-06-19T18:04:04Z
|
MEMBER
|
resolved
|
As discussed in #687.
I'm not really wild about this commit. The awkward `if` block mentioned in #687 is present here, which isn't lovely, as is the awkward dependence on `sys.version_info`. This also relies on the fact that the parser will only look for a method when it's called, not when it's parsed, which means that `str.decode()` won't throw `AttributeErrors` in Python 3.
This is butt-ugly, and if it had to live in the codebase for all time I would ask you not to actually pull it. If you're planning to only test against 3.3 when it's released, however, then it's probably ok.
If you (or anyone else) can think of a nicer way to use this split, by all means use it and don't accept this pull request. =D
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/690/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/690/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/690.diff",
"html_url": "https://github.com/psf/requests/pull/690",
"merged_at": "2012-06-19T18:04:04Z",
"patch_url": "https://github.com/psf/requests/pull/690.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/690"
}
| true |
[
"Thanks :)\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1657575) (merged f8076fee into bcf04d5e).\n"
] |
https://api.github.com/repos/psf/requests/issues/689
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/689/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/689/comments
|
https://api.github.com/repos/psf/requests/issues/689/events
|
https://github.com/psf/requests/issues/689
| 5,147,356 |
MDU6SXNzdWU1MTQ3MzU2
| 689 |
urllib3 overwrites 'Accept' header
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1867950?v=4",
"events_url": "https://api.github.com/users/ZechyW/events{/privacy}",
"followers_url": "https://api.github.com/users/ZechyW/followers",
"following_url": "https://api.github.com/users/ZechyW/following{/other_user}",
"gists_url": "https://api.github.com/users/ZechyW/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ZechyW",
"id": 1867950,
"login": "ZechyW",
"node_id": "MDQ6VXNlcjE4Njc5NTA=",
"organizations_url": "https://api.github.com/users/ZechyW/orgs",
"received_events_url": "https://api.github.com/users/ZechyW/received_events",
"repos_url": "https://api.github.com/users/ZechyW/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ZechyW/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZechyW/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ZechyW",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-19T14:24:02Z
|
2021-09-09T08:00:32Z
|
2012-06-19T14:24:38Z
|
NONE
|
resolved
|
Custom 'Accept' headers are overwritten by the ProxyManager._set_proxy_headers function in urllib3's poolmanager.py (line 124)
I did a bit of googling but couldn't come up with a reason why this should be done; if this modification of the 'Accept' header is not needed, would it be possible to get it removed somehow?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/689/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/689/timeline
| null |
completed
| null | null | false |
[
"You should open this on urllib3's repo :)\n",
"Ah good point, will do :)\n"
] |
https://api.github.com/repos/psf/requests/issues/688
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/688/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/688/comments
|
https://api.github.com/repos/psf/requests/issues/688/events
|
https://github.com/psf/requests/issues/688
| 5,147,324 |
MDU6SXNzdWU1MTQ3MzI0
| 688 |
requests.get() doesn't use given proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1866578?v=4",
"events_url": "https://api.github.com/users/YS-/events{/privacy}",
"followers_url": "https://api.github.com/users/YS-/followers",
"following_url": "https://api.github.com/users/YS-/following{/other_user}",
"gists_url": "https://api.github.com/users/YS-/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/YS-",
"id": 1866578,
"login": "YS-",
"node_id": "MDQ6VXNlcjE4NjY1Nzg=",
"organizations_url": "https://api.github.com/users/YS-/orgs",
"received_events_url": "https://api.github.com/users/YS-/received_events",
"repos_url": "https://api.github.com/users/YS-/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/YS-/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/YS-/subscriptions",
"type": "User",
"url": "https://api.github.com/users/YS-",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-06-19T14:23:01Z
|
2021-09-09T07:05:28Z
|
2012-07-27T05:54:29Z
|
NONE
|
resolved
|
I'm trying to use a proxy in a GET request
proxy = {'http:': '127.0.0.1:8080'}
...
...
res = requests.get(url, headers=headers, prefetch=True, proxies = proxy)
...
the request is made directly without using the http proxy I have running (BURP).
is there a way to force the request?
Thanks!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/688/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/688/timeline
| null |
completed
| null | null | false |
[
"Try this: \n\n```\nproxy = {'http:': 'http://127.0.0.1:8080'}\n```\n",
"will be updated.\n",
"I can't understand why the request object isn't using the proxy all the time, I'm trying to create requests in different variations (I'm using PyScripter).\n\n> > > re = requests.get(\"http://www.google.com\", proxies = {'http:': 'http://127.0.0.1:8080'})\n> > > I'm using python's interpreter, this line of code used to use the proxy I have installed, I then changed to fetch other URLs and passed the dict proxy as a variable (proxies = proxy, prefetch = True).\n\nThe code doesn't use the proxy here -\n\n> > > re = requests.get(\"http://www.google.com\", proxies = proxy, prefetch = True)\n\nWireShark shows regular direct HTTP requests.\n\nHow can I debug it?\n",
"Works fine for me. Check your `proxy` variable is actually the dictionary you want to pass, e.g.:\n\n``` python\nproxy = {'http': 'http://127.0.0.1:8080'}\n```\n\nMake sure that you have the full schema present.\n\nEDIT: Just did a copy-paste of @kennethreitz's code, and noticed that it just made standard requests. The issue seems to be that there is a colon in the dict key that shouldn't be there. Try removing that colon.\n",
"I've double checked it, still happens. \nwhat may cause it?\n",
"That's very odd. Can you copy and paste the exact code you're using so I can take a look? (Removing personally identifying information, obviously.)\n"
] |
https://api.github.com/repos/psf/requests/issues/687
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/687/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/687/comments
|
https://api.github.com/repos/psf/requests/issues/687/events
|
https://github.com/psf/requests/issues/687
| 5,144,804 |
MDU6SXNzdWU1MTQ0ODA0
| 687 |
Unicode Strings in Tests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-19T12:12:40Z
|
2021-09-09T08:00:32Z
|
2012-06-19T18:07:47Z
|
MEMBER
|
resolved
|
Pull request #686 is failing Travis-CI testing because of [lines 354 and 355](https://github.com/kennethreitz/requests/blob/develop/tests/test_requests.py#L354) in [`test_requests.py`](https://github.com/kennethreitz/requests/blob/develop/tests/test_requests.py). This failure occurs only in Python 2.*, and is because the string needs to be a unicode literal.
An simple and butt-ugly fix would be to change the section of the test from:
``` python
post6 = post(url, files={'fname.txt': '\xe9'})
self.assertEqual(post6.status_code, 200)
```
to:
``` python
if (sys.version_info[0] == 2):
fnamedata = u'\xe9'
else:
fnamedata = '\xe9'
post6 = post(url, files={'fname.txt': fnamedata})
self.assertEqual(post6.status_code, 200)
```
I'm not putting this into a pull request because I hate this code so much it makes me want to break things. I'm happy to look into a better way, but I'm putting this issue up so that people are aware of it. Also so that someone smarter than me can fix it. ;)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/687/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/687/timeline
| null |
completed
| null | null | false |
[
"That actually won't work because unicode literals aren't valid in 3 until 3.3 :)\n\nOnce 3.3 is out though, I'll drop official support for 3.1 and 3.2 and only test 3.3, which will make things a LOT easier.\n",
"Good point, forgot the parser would still encounter the literal and choke. \n\nAs for 3.3, according to [PEP398](http://www.python.org/dev/peps/pep-0398/) the final release date is August 25. Do we want a (potentially very hacky) fix for this test before then, or are we happy to just let it fail/comment it out?\n",
"Yeah, either that or we can comment it out :)\n"
] |
https://api.github.com/repos/psf/requests/issues/686
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/686/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/686/comments
|
https://api.github.com/repos/psf/requests/issues/686/events
|
https://github.com/psf/requests/pull/686
| 5,144,281 |
MDExOlB1bGxSZXF1ZXN0MTU5Njc3OQ==
| 686 |
Fix failing setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-19T11:36:34Z
|
2021-09-08T15:01:19Z
|
2012-06-19T13:28:57Z
|
MEMBER
|
resolved
|
Commit d3acb783b95623d0378db02bd9832fb11850204b updated `urllib3`, which involved the removal of the `mimetools_choose_boundary` package. This package is still being referred to in `setup.py`, which is causing the install to fail. This pull request resolves this problem, and therefore also resolves Issue #685.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/686/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/686/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/686.diff",
"html_url": "https://github.com/psf/requests/pull/686",
"merged_at": "2012-06-19T13:28:57Z",
"patch_url": "https://github.com/psf/requests/pull/686.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/686"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1654489) (merged 80ceaa47 into 38db8c21).\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/685
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/685/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/685/comments
|
https://api.github.com/repos/psf/requests/issues/685/events
|
https://github.com/psf/requests/issues/685
| 5,141,548 |
MDU6SXNzdWU1MTQxNTQ4
| 685 |
Can't install requests on python 2.7 (win7)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1866578?v=4",
"events_url": "https://api.github.com/users/YS-/events{/privacy}",
"followers_url": "https://api.github.com/users/YS-/followers",
"following_url": "https://api.github.com/users/YS-/following{/other_user}",
"gists_url": "https://api.github.com/users/YS-/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/YS-",
"id": 1866578,
"login": "YS-",
"node_id": "MDQ6VXNlcjE4NjY1Nzg=",
"organizations_url": "https://api.github.com/users/YS-/orgs",
"received_events_url": "https://api.github.com/users/YS-/received_events",
"repos_url": "https://api.github.com/users/YS-/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/YS-/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/YS-/subscriptions",
"type": "User",
"url": "https://api.github.com/users/YS-",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-19T08:22:52Z
|
2021-09-09T08:00:33Z
|
2012-06-19T13:33:02Z
|
NONE
|
resolved
|
C:\Users[user]\Downloads\kennethreitz-requests-v0.13.1-23-g38db8c2>setup.py build install
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'include_package_data'
warnings.warn(msg)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'install_requires'
warnings.warn(msg)
running build
running build_py
creating build
creating build\lib
creating build\lib\requests
copying requests\api.py -> build\lib\requests
copying requests\async.py -> build\lib\requests
copying requests\auth.py -> build\lib\requests
copying requests\compat.py -> build\lib\requests
copying requests\cookies.py -> build\lib\requests
copying requests\defaults.py -> build\lib\requests
copying requests\exceptions.py -> build\lib\requests
copying requests\hooks.py -> build\lib\requests
copying requests\models.py -> build\lib\requests
copying requests\safe_mode.py -> build\lib\requests
copying requests\sessions.py -> build\lib\requests
copying requests\status_codes.py -> build\lib\requests
copying requests\structures.py -> build\lib\requests
copying requests\utils.py -> build\lib\requests
copying requests__init__.py -> build\lib\requests
creating build\lib\requests\packages
copying requests\packages__init__.py -> build\lib\requests\packages
creating build\lib\requests\packages\urllib3
copying requests\packages\urllib3\connectionpool.py -> build\lib\requests\packag
es\urllib3
copying requests\packages\urllib3\exceptions.py -> build\lib\requests\packages\u
rllib3
copying requests\packages\urllib3\filepost.py -> build\lib\requests\packages\url
lib3
copying requests\packages\urllib3\poolmanager.py -> build\lib\requests\packages\
urllib3
copying requests\packages\urllib3\request.py -> build\lib\requests\packages\urll
ib3
copying requests\packages\urllib3\response.py -> build\lib\requests\packages\url
lib3
copying requests\packages\urllib3\util.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3_collections.py -> build\lib\requests\packages
\urllib3
copying requests\packages\urllib3__init__.py -> build\lib\requests\packages\url
lib3
creating build\lib\requests\packages\urllib3\packages
copying requests\packages\urllib3\packages\six.py -> build\lib\requests\packages
\urllib3\packages
copying requests\packages\urllib3\packages__init__.py -> build\lib\requests\pac
kages\urllib3\packages
creating build\lib\requests\packages\urllib3\packages\ssl_match_hostname
copying requests\packages\urllib3\packages\ssl_match_hostname__init__.py -> bui
ld\lib\requests\packages\urllib3\packages\ssl_match_hostname
error: package directory 'requests\packages\urllib3\packages\mimetools_choose_bo
undary' does not exist
Thanks.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/685/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/685/timeline
| null |
completed
| null | null | false |
[
"The problem here is that `setup.py` in the current develop repository specifies `'requests.packages.urllib3.packages.mimetools_choose_boundary'` as a package to be installed, but that package is not provided by the source.\n\nI don't have this problem when using `pip` to install requests, though. If you don't need the current development version of requests, do you want to try installing it from pip?\n",
"I installed it with easy_install for the meanwhile, thanks!\n",
"Fixed in #686 :)\n"
] |
https://api.github.com/repos/psf/requests/issues/684
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/684/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/684/comments
|
https://api.github.com/repos/psf/requests/issues/684/events
|
https://github.com/psf/requests/pull/684
| 5,138,994 |
MDExOlB1bGxSZXF1ZXN0MTU5NDU5MA==
| 684 |
Sign querystring parameters in OAuth 1.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2522?v=4",
"events_url": "https://api.github.com/users/gulopine/events{/privacy}",
"followers_url": "https://api.github.com/users/gulopine/followers",
"following_url": "https://api.github.com/users/gulopine/following{/other_user}",
"gists_url": "https://api.github.com/users/gulopine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gulopine",
"id": 2522,
"login": "gulopine",
"node_id": "MDQ6VXNlcjI1MjI=",
"organizations_url": "https://api.github.com/users/gulopine/orgs",
"received_events_url": "https://api.github.com/users/gulopine/received_events",
"repos_url": "https://api.github.com/users/gulopine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gulopine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gulopine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gulopine",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-06-19T04:04:13Z
|
2021-09-08T15:01:17Z
|
2012-06-20T23:52:38Z
|
CONTRIBUTOR
|
resolved
|
Existing usage doesn't pass GET querystring parameters along to oauthlib,
so it wasn't signing those properly, which causes problems with APIs that
rely heavily on GET parameters. By passing in r.full_url instead of r.url,
oauthlib can parse out the correct parameters and sign them properly.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/684/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/684/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/684.diff",
"html_url": "https://github.com/psf/requests/pull/684",
"merged_at": "2012-06-20T23:52:38Z",
"patch_url": "https://github.com/psf/requests/pull/684.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/684"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1652457) (merged 4e568c18 into 38db8c21).\n",
"Yes! Thank you.\nI was actually just going to make an issue. \n\nI was updating a lib and was wondering why my signatures were invalid when passing the `params` kwarg and were valid when I just did `http://api.example.com/method/?myquerystring=parameters` and thought of this issue to be the only explanation \n\n@gulopine Think you can get @travisbot to successfully pass?\n\n :+1:\n",
"I'm pretty sure Travis was breaking on some things unrelated to my code. It's been failing for several days now, but it looks like some other work was just done (ba7215f8f53e7cd820b8f79d0a87f20573a167d2 and 28dc45a30cba480177f7bfad5ee13fd87014bf4e) to resolve those issues. I can't find a way to re-run the Travis job without committing more code, though, so I think somebody will have to just merge it anyway. :)\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1669371) (merged 4e568c18 into 38db8c21).\n",
"Thanks, Marty! \n",
"@kennethreitz @gulopine I feel like this didn't fix the issue. I went to update `Twython` to use\n\n``` python\nrequests.get(url, params=params)\n```\n\ninstead of \n\n``` python\nurl = url + '?' + urllib.urlencode(params)\nrequests.get(url)\n```\n\nand the request failed, response was None :(\n",
"The response was None? I can't think of why that would happen. If it was just a signing issue, you should get a response from Twitter saying so. I'll do some more testing tonight and see if I can reproduce it. To make sure I'm doing the same you are, can you provide a the `url` and `params` you're using?\n",
"url = 'https://api.twitter.com/1/statuses/home_timeline.json' \nparams = {'count': 2}\n\nYou'll have to grab your own app key/secret, token key/secret if that's okay? haha \n\n## \n\nMike Helmick\n@mikehelmick\n\nOn Friday, June 29, 2012 at 12:49 PM, Marty Alchin wrote:\n\n> The response was None? I can't think of why that would happen. If it was just a signing issue, you should get a response from Twitter saying so. I'll do some more testing tonight and see if I can reproduce it. To make sure I'm doing the same you are, can you provide a the `url` and `params` you're using?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/684#issuecomment-6667600\n"
] |
https://api.github.com/repos/psf/requests/issues/683
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/683/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/683/comments
|
https://api.github.com/repos/psf/requests/issues/683/events
|
https://github.com/psf/requests/pull/683
| 5,132,963 |
MDExOlB1bGxSZXF1ZXN0MTU5MTY1Ng==
| 683 |
Update quickstart docs raise_for_status() exception output.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/931505?v=4",
"events_url": "https://api.github.com/users/jkleint/events{/privacy}",
"followers_url": "https://api.github.com/users/jkleint/followers",
"following_url": "https://api.github.com/users/jkleint/following{/other_user}",
"gists_url": "https://api.github.com/users/jkleint/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jkleint",
"id": 931505,
"login": "jkleint",
"node_id": "MDQ6VXNlcjkzMTUwNQ==",
"organizations_url": "https://api.github.com/users/jkleint/orgs",
"received_events_url": "https://api.github.com/users/jkleint/received_events",
"repos_url": "https://api.github.com/users/jkleint/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jkleint/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jkleint/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jkleint",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-18T20:28:30Z
|
2021-09-08T15:01:18Z
|
2012-06-18T20:33:00Z
|
NONE
|
resolved
|
Show that requests.exceptions.HTTPError is raised, not urllib2.HTTPError.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/683/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/683/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/683.diff",
"html_url": "https://github.com/psf/requests/pull/683",
"merged_at": "2012-06-18T20:33:00Z",
"patch_url": "https://github.com/psf/requests/pull/683.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/683"
}
| true |
[
"Thanks for the fix :)\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1650084) (merged 234a55da into f178219d).\n"
] |
https://api.github.com/repos/psf/requests/issues/682
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/682/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/682/comments
|
https://api.github.com/repos/psf/requests/issues/682/events
|
https://github.com/psf/requests/pull/682
| 5,106,517 |
MDExOlB1bGxSZXF1ZXN0MTU4MTE3NQ==
| 682 |
Cast the URL as string before using it
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1174078?v=4",
"events_url": "https://api.github.com/users/costash/events{/privacy}",
"followers_url": "https://api.github.com/users/costash/followers",
"following_url": "https://api.github.com/users/costash/following{/other_user}",
"gists_url": "https://api.github.com/users/costash/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/costash",
"id": 1174078,
"login": "costash",
"node_id": "MDQ6VXNlcjExNzQwNzg=",
"organizations_url": "https://api.github.com/users/costash/orgs",
"received_events_url": "https://api.github.com/users/costash/received_events",
"repos_url": "https://api.github.com/users/costash/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/costash/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/costash/subscriptions",
"type": "User",
"url": "https://api.github.com/users/costash",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-16T14:22:30Z
|
2021-09-08T23:11:04Z
|
2012-07-12T21:47:04Z
|
NONE
|
resolved
|
This patch solves the issue #423 https://github.com/kennethreitz/requests/issues/423
We added a small test file showing that now a request like
<code>requests.get(furl('http://example.com/ ').set({'query': 'string'}))</code>
is working properly.
Authors:
Iulian Stana
Vlad Traistă-Popescu
Constantin Șerban-Rădoi
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/682/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/682/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/682.diff",
"html_url": "https://github.com/psf/requests/pull/682",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/682.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/682"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1635261) (merged 48c94214 into f178219d).\n"
] |
https://api.github.com/repos/psf/requests/issues/681
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/681/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/681/comments
|
https://api.github.com/repos/psf/requests/issues/681/events
|
https://github.com/psf/requests/issues/681
| 5,104,885 |
MDU6SXNzdWU1MTA0ODg1
| 681 |
File upload with digest auth doesn't work
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/652492?v=4",
"events_url": "https://api.github.com/users/richardsyeo/events{/privacy}",
"followers_url": "https://api.github.com/users/richardsyeo/followers",
"following_url": "https://api.github.com/users/richardsyeo/following{/other_user}",
"gists_url": "https://api.github.com/users/richardsyeo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/richardsyeo",
"id": 652492,
"login": "richardsyeo",
"node_id": "MDQ6VXNlcjY1MjQ5Mg==",
"organizations_url": "https://api.github.com/users/richardsyeo/orgs",
"received_events_url": "https://api.github.com/users/richardsyeo/received_events",
"repos_url": "https://api.github.com/users/richardsyeo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/richardsyeo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/richardsyeo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/richardsyeo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-16T07:42:22Z
|
2021-09-09T07:05:29Z
|
2012-07-27T05:51:49Z
|
NONE
|
resolved
|
I think this issue still exists
https://github.com/kennethreitz/requests/issues/298
I am using latest version of Requests as of 15/06/2012
It still unnecessary uploads the file even though it knows it is going to receive a 401 but then fails to upload the file for the second request
My code...
import requests
from requests.auth import HTTPDigestAuth
url = 'http://localhost:8080/'
user = 'demo'
password = 'test'
filename = 'C:\Users\Public\Pictures\Sample Pictures\koala.jpg'
file = {'file': (filename, open(filename, 'rb'))}
r = requests.post(url, auth = HTTPDigestAuth(user, password), files = file)
print r.status_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/681/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/681/timeline
| null |
completed
| null | null | false |
[
"Thanks for the report! Investigation will continue. \n"
] |
https://api.github.com/repos/psf/requests/issues/680
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/680/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/680/comments
|
https://api.github.com/repos/psf/requests/issues/680/events
|
https://github.com/psf/requests/pull/680
| 5,104,866 |
MDExOlB1bGxSZXF1ZXN0MTU4MDcyMw==
| 680 |
Add rauth.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/619795?v=4",
"events_url": "https://api.github.com/users/mahmoudhossam/events{/privacy}",
"followers_url": "https://api.github.com/users/mahmoudhossam/followers",
"following_url": "https://api.github.com/users/mahmoudhossam/following{/other_user}",
"gists_url": "https://api.github.com/users/mahmoudhossam/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mahmoudhossam",
"id": 619795,
"login": "mahmoudhossam",
"node_id": "MDQ6VXNlcjYxOTc5NQ==",
"organizations_url": "https://api.github.com/users/mahmoudhossam/orgs",
"received_events_url": "https://api.github.com/users/mahmoudhossam/received_events",
"repos_url": "https://api.github.com/users/mahmoudhossam/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mahmoudhossam/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mahmoudhossam/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mahmoudhossam",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-16T07:36:45Z
|
2021-09-08T15:01:17Z
|
2012-06-16T07:51:26Z
|
CONTRIBUTOR
|
resolved
|
Added rauth to the list of modules.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/680/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/680/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/680.diff",
"html_url": "https://github.com/psf/requests/pull/680",
"merged_at": "2012-06-16T07:51:26Z",
"patch_url": "https://github.com/psf/requests/pull/680.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/680"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1633647) (merged 5cc2129c into 8de9b2e1).\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/679
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/679/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/679/comments
|
https://api.github.com/repos/psf/requests/issues/679/events
|
https://github.com/psf/requests/pull/679
| 5,098,850 |
MDExOlB1bGxSZXF1ZXN0MTU3Nzk3OQ==
| 679 |
Fixes #649, take 2.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/359029?v=4",
"events_url": "https://api.github.com/users/mwielgoszewski/events{/privacy}",
"followers_url": "https://api.github.com/users/mwielgoszewski/followers",
"following_url": "https://api.github.com/users/mwielgoszewski/following{/other_user}",
"gists_url": "https://api.github.com/users/mwielgoszewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwielgoszewski",
"id": 359029,
"login": "mwielgoszewski",
"node_id": "MDQ6VXNlcjM1OTAyOQ==",
"organizations_url": "https://api.github.com/users/mwielgoszewski/orgs",
"received_events_url": "https://api.github.com/users/mwielgoszewski/received_events",
"repos_url": "https://api.github.com/users/mwielgoszewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwielgoszewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwielgoszewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwielgoszewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-15T19:21:11Z
|
2021-09-08T23:08:29Z
|
2012-07-27T05:34:44Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/679/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/679/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/679.diff",
"html_url": "https://github.com/psf/requests/pull/679",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/679.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/679"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1630497) (merged ede7b7eb into 8de9b2e1).\n",
"Fails because my tests are broken. Will look again as soon as they're fixed.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1630512) (merged 50988dc4 into 8de9b2e1).\n",
"Can you merge upstream? Tests are fixed now :)\n",
"Closing until further update.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/678
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/678/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/678/comments
|
https://api.github.com/repos/psf/requests/issues/678/events
|
https://github.com/psf/requests/pull/678
| 5,098,585 |
MDExOlB1bGxSZXF1ZXN0MTU3Nzg1MA==
| 678 |
fix issue #649
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/359029?v=4",
"events_url": "https://api.github.com/users/mwielgoszewski/events{/privacy}",
"followers_url": "https://api.github.com/users/mwielgoszewski/followers",
"following_url": "https://api.github.com/users/mwielgoszewski/following{/other_user}",
"gists_url": "https://api.github.com/users/mwielgoszewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwielgoszewski",
"id": 359029,
"login": "mwielgoszewski",
"node_id": "MDQ6VXNlcjM1OTAyOQ==",
"organizations_url": "https://api.github.com/users/mwielgoszewski/orgs",
"received_events_url": "https://api.github.com/users/mwielgoszewski/received_events",
"repos_url": "https://api.github.com/users/mwielgoszewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwielgoszewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwielgoszewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwielgoszewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-15T19:06:27Z
|
2021-09-08T15:01:17Z
|
2012-07-27T05:37:13Z
|
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/678/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/678/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/678.diff",
"html_url": "https://github.com/psf/requests/pull/678",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/678.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/678"
}
| true |
[
"Hmm, looks like you did this against an old version of the codebase.\n",
"Ref #649\n",
"Alright, will try again.\n",
"Much appreciated!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/677
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/677/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/677/comments
|
https://api.github.com/repos/psf/requests/issues/677/events
|
https://github.com/psf/requests/pull/677
| 5,092,740 |
MDExOlB1bGxSZXF1ZXN0MTU3NTA0Mg==
| 677 |
Simplify Request()._encode_data()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2012-06-15T14:03:36Z
|
2021-09-08T15:01:16Z
|
2012-06-21T19:04:18Z
|
CONTRIBUTOR
|
resolved
|
The logic is the same. The only time we don't want to return 'data' is when it
isn't a file and can be iterated over.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/677/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/677/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/677.diff",
"html_url": "https://github.com/psf/requests/pull/677",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/677.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/677"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1628120) (merged 2e5dd3a1 into 08ac9897).\n",
"The failure is unrelated to the change as far as I can tell.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1651099) (merged 0624b040 into 38db8c21).\n",
"The latter commit fixes what @lukasa noticed on #503\n",
"Hmm, wonder if i can get travisbot to trigger again.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1669350) (merged 0624b040 into 38db8c21).\n",
"I wonder if merging what fixed the old tests will fix this pull request. Unfortunately my history is horribly ugly merging in usptream so if this passes you might cherry-pick the commits and I'll just forcibly rewrite my history.\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1669883) (merged e0274a65 into 64da351e).\n",
"The comment I deleted stands: I ran the tests on my machine with python 3000 and nose and got the same errors on my upstream branch as I get on my branch. I'll dig in to see if I can figure out where these tests are breaking.\n\n**Update**: I tried running the tests individually, e.g.,\n\n```\n$ make simple # nosetests tests/test_requests.py\n$ nosetests tests/test_cookies.py\n$ nosetests tests/test_requests_https.py\n```\n\nOnly the last one passes with python3 on my machine on my branch tracking develop\n\n**Update #2** After getting the tests working (thanks again @kennethreitz), I have a feeling the failure is related to nose and not requests or my changes. From what I can tell, the exception is occurring because of my having OpenDNS installed and running. This causes an error to be raised in the test for invalid content which causes the exception in nosetests. @jpellerin, @kumar303, any clues about the message above?\n",
"I disagree, the tests are legitimately failing. The four tests that are erroring out provide `data` as a string. In Python 3, strings implement the `__iter__` method. The same problem occurs with byte arrays in Python 3, which also implement `__iter__`. The tests will pass if you adjust your conditional to:\n\n``` python\nif hasattr(data, '__iter__') and not hasattr(data, 'read') and not isinstance(data, str) and not isinstance(data, bytes):\n```\n\nThat said, the conditional becomes less nice in that form. I'm ok with having the `else` block all in one place, but I think this is about what PEP 20 suggests. I don't know which form fits PEP 20 better, and @kennethreitz has a better understanding of it than I do.\n",
"@Lukasa I was trying to find the bug using virtualenvs as well and couldn't get any better output than I described.\n\nI'll take your word for it even though I don't understand why `not isinstance(data, str) and not isinstance(data, bytes)` would be necessary - neither has an `__iter__` attribute.\n\nAnd yeah, if this is in fact the case, I'm all in favor of keeping it in the old style because that conditional would be horribly ugly. I just vastly dislike having so many return statements in one function.\n\nAnyway, the other commit 0624b04 should still be considered since it's only a documentation change.\n\nSorry for the confusion\n",
"@sigmavirus24 Try opening a Python3 interpreter and typing the following:\n\n``` python\na = 'test string'\nhasattr(a, '__iter__')\n```\n\nIt should return True. Strings and Bytes both have `__iter__` methods in Python 3, which is why your tests fail in Python 3. No need to apologise, I didn't know Python 3 strings had `__iter__` methods either, until I did my investigation.\n",
"Huh. When I was testing the hooks section the API wrapper I'm working on \nthis morning, I thought I saw that this was passing on python 3 and \nfailing on python 2. \n\n_shrug_. I'll close this and re-work my fork to only have the \ndocumentation change (and maybe one more that I promised @kennethreitz).\n\nThanks again for your help @Lukasa\n"
] |
https://api.github.com/repos/psf/requests/issues/676
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/676/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/676/comments
|
https://api.github.com/repos/psf/requests/issues/676/events
|
https://github.com/psf/requests/pull/676
| 5,070,893 |
MDExOlB1bGxSZXF1ZXN0MTU2NTY1NQ==
| 676 |
Additional Documentation for Requests and Responses
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1164112?v=4",
"events_url": "https://api.github.com/users/mikeholler/events{/privacy}",
"followers_url": "https://api.github.com/users/mikeholler/followers",
"following_url": "https://api.github.com/users/mikeholler/following{/other_user}",
"gists_url": "https://api.github.com/users/mikeholler/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikeholler",
"id": 1164112,
"login": "mikeholler",
"node_id": "MDQ6VXNlcjExNjQxMTI=",
"organizations_url": "https://api.github.com/users/mikeholler/orgs",
"received_events_url": "https://api.github.com/users/mikeholler/received_events",
"repos_url": "https://api.github.com/users/mikeholler/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikeholler/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikeholler/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikeholler",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-14T14:21:22Z
|
2021-09-08T23:11:06Z
|
2012-06-14T16:50:40Z
|
CONTRIBUTOR
|
resolved
|
I've edited the advanced docs with a simple tutorial of how to access the request object from a response, and I also provided a listing of methods and attributes accessible using a Request object and a Response object. This section is entitled "Request and Response Objects". I would have found this simple listing tremendously useful had it existed in the original documentation, and I hope others find it useful as well.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/676/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/676/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/676.diff",
"html_url": "https://github.com/psf/requests/pull/676",
"merged_at": "2012-06-14T16:50:40Z",
"patch_url": "https://github.com/psf/requests/pull/676.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/676"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1620348) (merged 87637c9b into 1d193133).\n",
"This is awesome — thanks!\n",
"I'll be removing the big list of attributes though, we should just be linking to the [api docs](http://docs.python-requests.org/en/latest/api/)\n",
"Sounds good. I do agree about the list now that i think about it. Glad I could help!\n",
"Keep the pull requests coming :)\n"
] |
https://api.github.com/repos/psf/requests/issues/675
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/675/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/675/comments
|
https://api.github.com/repos/psf/requests/issues/675/events
|
https://github.com/psf/requests/pull/675
| 5,062,387 |
MDExOlB1bGxSZXF1ZXN0MTU2MjE1MQ==
| 675 |
Make sure OAuth doesn't fall off
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2522?v=4",
"events_url": "https://api.github.com/users/gulopine/events{/privacy}",
"followers_url": "https://api.github.com/users/gulopine/followers",
"following_url": "https://api.github.com/users/gulopine/following{/other_user}",
"gists_url": "https://api.github.com/users/gulopine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gulopine",
"id": 2522,
"login": "gulopine",
"node_id": "MDQ6VXNlcjI1MjI=",
"organizations_url": "https://api.github.com/users/gulopine/orgs",
"received_events_url": "https://api.github.com/users/gulopine/received_events",
"repos_url": "https://api.github.com/users/gulopine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gulopine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gulopine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gulopine",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-14T04:18:19Z
|
2021-09-08T15:01:16Z
|
2012-06-14T17:18:23Z
|
CONTRIBUTOR
|
resolved
|
In particular, this happens when encountering redirects. The first request doesn't have a Content-Type, but the second request does (it was added by the OAuth1 object), so when it tries to apply the authorization details again, it falls off and returns None instead of the original response. This change simply moves the return up one level, so it always returns the request regardless of whether it was modified along the 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/675/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/675/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/675.diff",
"html_url": "https://github.com/psf/requests/pull/675",
"merged_at": "2012-06-14T17:18:23Z",
"patch_url": "https://github.com/psf/requests/pull/675.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/675"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1616331) (merged 9a30e029 into 1d193133).\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/674
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/674/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/674/comments
|
https://api.github.com/repos/psf/requests/issues/674/events
|
https://github.com/psf/requests/issues/674
| 5,060,739 |
MDU6SXNzdWU1MDYwNzM5
| 674 |
Response Hook not updating when non-2XX
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/800430?v=4",
"events_url": "https://api.github.com/users/mikeknoop/events{/privacy}",
"followers_url": "https://api.github.com/users/mikeknoop/followers",
"following_url": "https://api.github.com/users/mikeknoop/following{/other_user}",
"gists_url": "https://api.github.com/users/mikeknoop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikeknoop",
"id": 800430,
"login": "mikeknoop",
"node_id": "MDQ6VXNlcjgwMDQzMA==",
"organizations_url": "https://api.github.com/users/mikeknoop/orgs",
"received_events_url": "https://api.github.com/users/mikeknoop/received_events",
"repos_url": "https://api.github.com/users/mikeknoop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikeknoop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikeknoop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikeknoop",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-14T01:02:11Z
|
2021-09-09T08:00:39Z
|
2012-06-14T01:22:53Z
|
NONE
|
resolved
|
When using response hooks, if I transform the passed-in response and the it becomes a non-2XX response, requests does not honor the new value.
This is important when dealing with successive failing requests. Test case:
```
import requests
def try_again(response):
if response.status_code == 401:
return requests.get('http://httpbin.org/status/400', hooks={'response': try_again})
response = requests.get('http://httpbin.org/status/401', hooks={'response': try_again})
print response.status_code
```
Expected output: `400`
Actual output: `401`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/800430?v=4",
"events_url": "https://api.github.com/users/mikeknoop/events{/privacy}",
"followers_url": "https://api.github.com/users/mikeknoop/followers",
"following_url": "https://api.github.com/users/mikeknoop/following{/other_user}",
"gists_url": "https://api.github.com/users/mikeknoop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikeknoop",
"id": 800430,
"login": "mikeknoop",
"node_id": "MDQ6VXNlcjgwMDQzMA==",
"organizations_url": "https://api.github.com/users/mikeknoop/orgs",
"received_events_url": "https://api.github.com/users/mikeknoop/received_events",
"repos_url": "https://api.github.com/users/mikeknoop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikeknoop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikeknoop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikeknoop",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/674/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/674/timeline
| null |
completed
| null | null | false |
[
"Added a test suite to the latest master branch, and turns out this is fixed in 0.13.1 (is broken in 0.12.1)\n"
] |
https://api.github.com/repos/psf/requests/issues/673
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/673/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/673/comments
|
https://api.github.com/repos/psf/requests/issues/673/events
|
https://github.com/psf/requests/issues/673
| 5,058,242 |
MDU6SXNzdWU1MDU4MjQy
| 673 |
support for chunked Transfer-Encoding
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/340979?v=4",
"events_url": "https://api.github.com/users/fruch/events{/privacy}",
"followers_url": "https://api.github.com/users/fruch/followers",
"following_url": "https://api.github.com/users/fruch/following{/other_user}",
"gists_url": "https://api.github.com/users/fruch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fruch",
"id": 340979,
"login": "fruch",
"node_id": "MDQ6VXNlcjM0MDk3OQ==",
"organizations_url": "https://api.github.com/users/fruch/orgs",
"received_events_url": "https://api.github.com/users/fruch/received_events",
"repos_url": "https://api.github.com/users/fruch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fruch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fruch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fruch",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-13T21:53:27Z
|
2021-09-09T08:00:38Z
|
2012-06-15T18:26:32Z
|
NONE
|
resolved
|
I'm tried to use requests to PUT a big file to a WebDev server
that server that support only support chunked Transfer-Encoding
(see http://en.wikipedia.org/wiki/Chunked_transfer_encoding)
I know it's kind of a broken server, that it can't stream those files, with out this mechnizem.
it would be nice if it can be implemented on requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/673/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/673/timeline
| null |
completed
| null | null | false |
[
"This is currently planned, but not supported at the moment. \n"
] |
https://api.github.com/repos/psf/requests/issues/672
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/672/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/672/comments
|
https://api.github.com/repos/psf/requests/issues/672/events
|
https://github.com/psf/requests/issues/672
| 5,050,971 |
MDU6SXNzdWU1MDUwOTcx
| 672 |
Programmatically Finding requests Object's HTTP Verb
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1164112?v=4",
"events_url": "https://api.github.com/users/mikeholler/events{/privacy}",
"followers_url": "https://api.github.com/users/mikeholler/followers",
"following_url": "https://api.github.com/users/mikeholler/following{/other_user}",
"gists_url": "https://api.github.com/users/mikeholler/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikeholler",
"id": 1164112,
"login": "mikeholler",
"node_id": "MDQ6VXNlcjExNjQxMTI=",
"organizations_url": "https://api.github.com/users/mikeholler/orgs",
"received_events_url": "https://api.github.com/users/mikeholler/received_events",
"repos_url": "https://api.github.com/users/mikeholler/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikeholler/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikeholler/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikeholler",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 10 |
2012-06-13T16:13:24Z
|
2021-09-09T08:00:39Z
|
2012-06-14T14:24:25Z
|
CONTRIBUTOR
|
resolved
|
I would like to do something equivalent to the following. I have looked through the documentation and the source code and it does not currently look like this is possible, but feel free to tell me if I'm wrong. I realize this is a redundant example, but it's the clearest way to illustrate my problem. My real use for knowing the HTTP verb from a requests object is for writing my own AuthBase, since our auth needs to know what type of method is being used.
``` python
r = requests.get('http://some.url.com/endpoint')
print r.verb
>>> 'GET'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1164112?v=4",
"events_url": "https://api.github.com/users/mikeholler/events{/privacy}",
"followers_url": "https://api.github.com/users/mikeholler/followers",
"following_url": "https://api.github.com/users/mikeholler/following{/other_user}",
"gists_url": "https://api.github.com/users/mikeholler/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikeholler",
"id": 1164112,
"login": "mikeholler",
"node_id": "MDQ6VXNlcjExNjQxMTI=",
"organizations_url": "https://api.github.com/users/mikeholler/orgs",
"received_events_url": "https://api.github.com/users/mikeholler/received_events",
"repos_url": "https://api.github.com/users/mikeholler/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikeholler/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikeholler/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikeholler",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/672/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/672/timeline
| null |
completed
| null | null | false |
[
"``` pycon\n>>> r.method\n'GET'\n```\n",
"Thanks! Is there a way that can be added to the documentation? I did a Ctrl+f on all the docs and didn't find it (on both python-requests.org and github) and couldn't find anything. I'm assuming this kind of thing is also possible for any of the params `r.data`, for example. If you don't have time I'd be happy to make an attempt at adding it myself sometime in the next day or two.\n",
"Working from the repository I don't see this attribute on the Response object.\n\n```\n>>> import requests \n>>> requests \n<module 'requests' from 'requests/__init__.py'> \n>>> requests.__build__, requests.__version__\n(4865, '0.13.1')\n>>> r = requests.get('http://httpbin.org/') \n>>> r \n<Response [200]> \n>>> r.method \nTraceback (most recent call last): \n File \"<stdin>\", line 1, in <module> \nAttributeError: 'Response' object has no attribute 'method'\n```\n",
"Ah, sorry, it's on the Request object.\n\n`r.request.method`\n",
"Ah yeah. Knew I'd done something like that before. Just wanted to make sure the functionality had not been removed.\n",
"+1 to adding it to the docs\n",
"Is there any point in adding a method attribute on the Response object to make access to the request attribute easier? If not, I'll see where this can be added to the docs.\n",
"No, not when the full request object is available.\n",
"Didn't think there would be. Thanks for the confirmation.\n",
"Thanks all for the responses! I've edited the docs and submitted a pull request, so if y'all want to discuss this further we could talk there. But as this issue is resolved I am closing it.\n"
] |
https://api.github.com/repos/psf/requests/issues/671
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/671/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/671/comments
|
https://api.github.com/repos/psf/requests/issues/671/events
|
https://github.com/psf/requests/pull/671
| 5,015,363 |
MDExOlB1bGxSZXF1ZXN0MTU0MDgwNg==
| 671 |
Fixes safe mode when not sending requests immediately (issue #639)
|
{
"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 | 7 |
2012-06-12T00:12:46Z
|
2021-09-08T23:05:22Z
|
2012-11-27T18:32:58Z
|
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/671/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/671/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/671.diff",
"html_url": "https://github.com/psf/requests/pull/671",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/671.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/671"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1597016) (merged 52f3344b into 1d193133).\n",
"@kennethreitz Any comments why it was closed? I believe that failing tests have nothing to do with this pull request.\n",
"Seems this is related to #888?\n",
"@sigmavirus24\nYes, I believe it fixes #888 too.\n",
"@piotr-dobrogost can you not re-open this? If not, rebase and push to the same branch and re-open. It'll trigger Travis and your fix should work.\n",
"Well I don't see any option to reopen this or any of issues I created for a matter of fact... Should I?\n",
"Either way it has been done.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/670
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/670/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/670/comments
|
https://api.github.com/repos/psf/requests/issues/670/events
|
https://github.com/psf/requests/pull/670
| 4,991,447 |
MDExOlB1bGxSZXF1ZXN0MTUzMDk1MA==
| 670 |
Fixes issue #669
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-10T13:35:56Z
|
2021-09-08T15:01:15Z
|
2012-06-10T13:37:07Z
|
NONE
|
resolved
|
NamedTemporaryFile was being automatically deleted on Windows thus couldn't be opened later for reading.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/670/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/670/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/670.diff",
"html_url": "https://github.com/psf/requests/pull/670",
"merged_at": "2012-06-10T13:37:07Z",
"patch_url": "https://github.com/psf/requests/pull/670.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/670"
}
| true |
[
"thanks!\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1583236) (merged 8d75cdf7 into f413d0eb).\n"
] |
https://api.github.com/repos/psf/requests/issues/669
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/669/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/669/comments
|
https://api.github.com/repos/psf/requests/issues/669/events
|
https://github.com/psf/requests/issues/669
| 4,991,159 |
MDU6SXNzdWU0OTkxMTU5
| 669 |
test_file_post_data error on Windows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2012-06-10T12:33:23Z
|
2021-09-09T08:00:40Z
|
2012-06-10T21:16:41Z
|
NONE
|
resolved
|
```
(requests) C:\requests\tests>python test_requests.py RequestsTestSuite.test_file_post_data
E
======================================================================
ERROR: test_file_post_data (__main__.RequestsTestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_requests.py", line 476, in test_file_post_data
r = post(service('post'), data=open(testfile.name, "rb"),
IOError: [Errno 13] Permission denied: 'c:\\users\\piotr\\appdata\\local\\temp\\tmpfpitom'
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (errors=1)
```
see [How do you fix the following Django Error: “Type: IOError” “Value: [Errno 13] Permission denied”](http://stackoverflow.com/questions/4125859/)
|
{
"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/669/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/669/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/668
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/668/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/668/comments
|
https://api.github.com/repos/psf/requests/issues/668/events
|
https://github.com/psf/requests/pull/668
| 4,970,160 |
MDExOlB1bGxSZXF1ZXN0MTUyMjQ2MA==
| 668 |
Send the original response url to `urlparse` rather than the `Response` object
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/212893?v=4",
"events_url": "https://api.github.com/users/ig0774/events{/privacy}",
"followers_url": "https://api.github.com/users/ig0774/followers",
"following_url": "https://api.github.com/users/ig0774/following{/other_user}",
"gists_url": "https://api.github.com/users/ig0774/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ig0774",
"id": 212893,
"login": "ig0774",
"node_id": "MDQ6VXNlcjIxMjg5Mw==",
"organizations_url": "https://api.github.com/users/ig0774/orgs",
"received_events_url": "https://api.github.com/users/ig0774/received_events",
"repos_url": "https://api.github.com/users/ig0774/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ig0774/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ig0774/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ig0774",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-08T13:01:54Z
|
2021-09-08T15:01:16Z
|
2012-06-09T11:30:19Z
|
CONTRIBUTOR
|
resolved
|
`urlparse` cannot handle `Response` objects, so the way this is written this code always results in an exception.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/668/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/668/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/668.diff",
"html_url": "https://github.com/psf/requests/pull/668",
"merged_at": "2012-06-09T11:30:19Z",
"patch_url": "https://github.com/psf/requests/pull/668.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/668"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1567008) (merged 98b8316c into f733ff01).\n",
"Nice catch :)\n"
] |
https://api.github.com/repos/psf/requests/issues/667
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/667/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/667/comments
|
https://api.github.com/repos/psf/requests/issues/667/events
|
https://github.com/psf/requests/issues/667
| 4,969,068 |
MDU6SXNzdWU0OTY5MDY4
| 667 |
Can't use requests for mime-encoded data as per RFC 1341 sec. 7.2.1
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/445723?v=4",
"events_url": "https://api.github.com/users/mcnemesis/events{/privacy}",
"followers_url": "https://api.github.com/users/mcnemesis/followers",
"following_url": "https://api.github.com/users/mcnemesis/following{/other_user}",
"gists_url": "https://api.github.com/users/mcnemesis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mcnemesis",
"id": 445723,
"login": "mcnemesis",
"node_id": "MDQ6VXNlcjQ0NTcyMw==",
"organizations_url": "https://api.github.com/users/mcnemesis/orgs",
"received_events_url": "https://api.github.com/users/mcnemesis/received_events",
"repos_url": "https://api.github.com/users/mcnemesis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mcnemesis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mcnemesis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mcnemesis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-08T12:09:24Z
|
2021-09-09T08:00:39Z
|
2012-06-11T12:45:22Z
|
NONE
|
resolved
|
I've been sweating on this for the past 48 hours, I just can't seem to find a way (not even in the docs) to use requests to send a custom mime entity digest payload to a server over http.
The use case am dealing with requires the composition and posting (via HTTP) of a MIME encoded SOAP MMS Message. This requires the use of the "multipart/*" family of Content Types and the ability to have the "boundary" and "start" parameters of Content-Type also included (see RFC 1341 Sec. 7.2.1). Am sure even the common "multipart/*" kinds supported by HTTP POST ought to have these values set, a closer probing of the payload of requests.post (even with files!) shows that these values aren't used in the body (or am I wrong?)
Please, am suspecting there must be a not-far-fetched means to achieve this in requests. Please advise.
NOTE: This kind of ability would allow the composition of such a message (see below) as the payload sent using HTTP POST:
```
POST /mms-rs/mm7 HTTP/1.1
Host: mms.omms.com
Content-Type: multipart/related; boundary=”NextPart_000_0028_01C19839.84698430"; type=text/xml;
start=”</tnn-200102/mm7-submit>”
Content-Length: nnnn
SOAPAction: “”
-- NextPart_000_0028_01C19839.84698430
Content-Type:text/xml; charset=”utf-8”
Content-ID: </tnn-200102/mm7-submit>
<?xml version=’1.0’ ?>
<env:Envelope xmlns:env="http:// schemas.xmlsoap.org/soap /soap-envelope">
<env:Header>
<mm7:TransactionID xmlns:mm7=”http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-env:mustUnderstand=”1”>
vas00001-sub
</mm7:TransactionID>
</env:Header>
<env:Body>
<mm7:SubmitReq xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0<MM7Version>5.3.0</MM7Version>
<SenderIdentification>
<VASPID>TNN</VASPID>
<VASID>News</VASID>
</SenderIdentification>
<Recipients>
<To>
<Number>7255441234</Number>
<RFC2822Address displayOnly=”True”>[email protected]</RFC2822Address>
</To>
<Cc>
<Number>7255443333</Number>
</Cc>
<Bcc>
<RFC2822Address>[email protected]</RFC2822Address>
</Bcc>
</Recipients>
<ServiceCode>gold-sp33-im42</ServiceCode>
<LinkedID>mms00016666</LinkedID>
<MessageClass>Informational</MessageClass>
<TimeStamp>2002-01-02T09:30:47-05:00</Date>
<EarliestDeliveryTime>2002-01-02T09:30:47-05:00</EarliestDeliveryTime>
<ExpiryDate>P90D</ExpiryDate>
<DeliveryReport>True</DeliveryReport>
<Priority>Normal</Priority>
<ChargedParty>Sender</ChargedParty>
<DistributionIndicator>True</ DistributionIndicator>
<Subject>News for today</Subject>
<Content href=”cid:[email protected]”; allowAdaptations=”True”/>
</mm7:SubmitReq>
</env:Body>
</env:Envelope>
-- NextPart_000_0028_01C19839.84698430
Content-Type: multipart/mixed; boundary=”StoryParts 74526 8432 2002-77645”
Content-ID:< [email protected]>
-- StoryParts 74526 8432 2002-77645
Content-Type: text/plain; charset="us-ascii"
Science news, new Saturn pictures...
-- StoryParts 74526 8432 2002-77645
Content-Type: image/gif;
Content-ID:<saturn.gif>
R0lGODdhZAAwAOMAAAAAAIGJjGltcDE0OOfWo6Ochbi1n1pmcbGojpKbnP/lpW54fBMTE1RYXEFO
-- StoryParts 74526 8432 2002-77645 --
--_NextPart_000_0028_01C19839.84698430--
```
Note the use the "boundary" and "start" parameters and fields to demarcate where XML starts, where binary data is, where text is, etc. Please help.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/445723?v=4",
"events_url": "https://api.github.com/users/mcnemesis/events{/privacy}",
"followers_url": "https://api.github.com/users/mcnemesis/followers",
"following_url": "https://api.github.com/users/mcnemesis/following{/other_user}",
"gists_url": "https://api.github.com/users/mcnemesis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mcnemesis",
"id": 445723,
"login": "mcnemesis",
"node_id": "MDQ6VXNlcjQ0NTcyMw==",
"organizations_url": "https://api.github.com/users/mcnemesis/orgs",
"received_events_url": "https://api.github.com/users/mcnemesis/received_events",
"repos_url": "https://api.github.com/users/mcnemesis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mcnemesis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mcnemesis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mcnemesis",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/667/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/667/timeline
| null |
completed
| null | null | false |
[
"Requests doesn't stop you from doing this.\n",
"Just pass everything you want as a bytestring to the `data` parameter.\n",
"Am mostly concerned about the very first headers:\n\n```\nPOST /mms-rs/mm7 HTTP/1.1\nHost: mms.omms.com\nContent-Type: multipart/related; boundary=”NextPart_000_0028_01C19839.84698430\"; type=text/xml;\nstart=”</tnn-200102/mm7-submit>”\nContent-Length: nnnn\nSOAPAction: “”\n```\n\nWill those get used as the HTTP Headers instead? Because in this case the very first headers are important as they specify the entry into the rest of the SOAP Message Body. In this case (based on your theory), I would assume that the default Content-Type \"multipart/*\" for the HTTP POST would get replaced with the above? I'd already tried constructing this entire payload manually, but didn't seem to succeed, so I thought otherwise.\n",
"True, I was able to solve this very nicely by setting a custom \"Content-Type\" in the HTTP headers, and then putting all my other SOAP Mime stuff in the bytestring like you said. Thanks for this awesome lib :-)\n"
] |
https://api.github.com/repos/psf/requests/issues/666
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/666/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/666/comments
|
https://api.github.com/repos/psf/requests/issues/666/events
|
https://github.com/psf/requests/issues/666
| 4,964,445 |
MDU6SXNzdWU0OTY0NDQ1
| 666 |
about Custom Headers
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1829337?v=4",
"events_url": "https://api.github.com/users/moon126/events{/privacy}",
"followers_url": "https://api.github.com/users/moon126/followers",
"following_url": "https://api.github.com/users/moon126/following{/other_user}",
"gists_url": "https://api.github.com/users/moon126/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moon126",
"id": 1829337,
"login": "moon126",
"node_id": "MDQ6VXNlcjE4MjkzMzc=",
"organizations_url": "https://api.github.com/users/moon126/orgs",
"received_events_url": "https://api.github.com/users/moon126/received_events",
"repos_url": "https://api.github.com/users/moon126/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moon126/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moon126/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moon126",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-08T04:41:09Z
|
2021-09-09T08:00:38Z
|
2012-06-15T18:26:44Z
|
NONE
|
resolved
|
import requests
UA=“Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)”
Fref = file("C:/ref.txt", 'r')
dat1 = Fref.readlines()
Fref.close()
ref= random.choice(dat1)
headers = {
'User-Agent': UA,
'Accept': '_/_',
'Accept-Charset': 'ISO-8859-1,utf-8',
'Accept-Encoding': 'gzip,deflate',
'Accept-Language': 'en-us,en',
'Connection': 'keep-alive',
'Referer':ref }
r = requests.get('http://httpbin.org/get', timeout=30, headers=headers)
r.content
---
## Result
{
"url": "http://httpbin.org/get",
"headers": {
"Content-Length": "",
"Accept-Encoding": "identity, deflate, compress, gzip",
"Accept": "_/_",
"Host": "httpbin.org",
"Referer": "http://www.python.org/",
"Content-Type": ""
},
"args": {},
"origin": "10.108.62.241"
}
sorry,I am not good at english. when run with headers like this, the page say it haven't User-Agent . when removed Referer,it is ok .any ideas?
Update:
F0=file("C:/ref.txt", 'r').readlines()
# print result is ['http://www.python.org/\n', 'http://www.google.com/\n']
ref1=map(lambda x: x.strip(), F0)
ref = random.choice(ref1)
then, it is fine.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/666/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/666/timeline
| null |
completed
| null | null | false |
[
"Everything should be fine, but there's no reason to add all of those headers. A big chunk of them are already included.\n\nTry this\n\n``` python\nimport requests\n\nagent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'\nheaders = {'User-Agent': agent}\n\nr = requests.get('http://httpbin.org/get, headers=headers)\n```\n"
] |
https://api.github.com/repos/psf/requests/issues/665
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/665/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/665/comments
|
https://api.github.com/repos/psf/requests/issues/665/events
|
https://github.com/psf/requests/pull/665
| 4,962,025 |
MDExOlB1bGxSZXF1ZXN0MTUxODg4OA==
| 665 |
If requests.async has been removed, the docs should point people to the right place.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/863286?v=4",
"events_url": "https://api.github.com/users/dalanmiller/events{/privacy}",
"followers_url": "https://api.github.com/users/dalanmiller/followers",
"following_url": "https://api.github.com/users/dalanmiller/following{/other_user}",
"gists_url": "https://api.github.com/users/dalanmiller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dalanmiller",
"id": 863286,
"login": "dalanmiller",
"node_id": "MDQ6VXNlcjg2MzI4Ng==",
"organizations_url": "https://api.github.com/users/dalanmiller/orgs",
"received_events_url": "https://api.github.com/users/dalanmiller/received_events",
"repos_url": "https://api.github.com/users/dalanmiller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dalanmiller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dalanmiller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dalanmiller",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-07T23:54:19Z
|
2021-09-08T22:01:20Z
|
2012-06-07T23:55:06Z
|
CONTRIBUTOR
|
resolved
|
If this [comment is true](https://github.com/kennethreitz/requests/issues/239#issuecomment-6180202) and requests.async has been removed and is now GRequests, then we want to make sure that people are being pointed in the right place :).
If this isn't the case then disregard this request.
Thank you for all your work @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/665/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/665/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/665.diff",
"html_url": "https://github.com/psf/requests/pull/665",
"merged_at": "2012-06-07T23:55:06Z",
"patch_url": "https://github.com/psf/requests/pull/665.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/665"
}
| true |
[
"Thanks! I'll try to get a documentation site up for grequests soon.\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1562994) (merged c589d8a2 into c0ae3dd3).\n"
] |
https://api.github.com/repos/psf/requests/issues/664
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/664/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/664/comments
|
https://api.github.com/repos/psf/requests/issues/664/events
|
https://github.com/psf/requests/issues/664
| 4,954,708 |
MDU6SXNzdWU0OTU0NzA4
| 664 |
Requests breaks on certain urls that use : in the query string
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/163426?v=4",
"events_url": "https://api.github.com/users/lsemel/events{/privacy}",
"followers_url": "https://api.github.com/users/lsemel/followers",
"following_url": "https://api.github.com/users/lsemel/following{/other_user}",
"gists_url": "https://api.github.com/users/lsemel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lsemel",
"id": 163426,
"login": "lsemel",
"node_id": "MDQ6VXNlcjE2MzQyNg==",
"organizations_url": "https://api.github.com/users/lsemel/orgs",
"received_events_url": "https://api.github.com/users/lsemel/received_events",
"repos_url": "https://api.github.com/users/lsemel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lsemel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lsemel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lsemel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-07T17:18:48Z
|
2021-09-09T08:00:33Z
|
2012-06-15T18:31:26Z
|
NONE
|
resolved
|
> > > import requests
> > > requests.get('http://online.wsj.com?CALL_URL=http://online.wsj.com/article/SB10001424052702303640104577436251166644714.html%3fmod=googlenews_wsj')
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/api.py", line 51, in get
> > > return request('get', url, *_kwargs)
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/api.py", line 39, in request
> > > return s.request(method=method, url=url, *_kwargs)
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/sessions.py", line 200, in request
> > > r.send(prefetch=prefetch)
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/models.py", line 463, in send
> > > conn = self._poolmanager.connection_from_url(url)
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/packages/urllib3/poolmanager.py", line 89, in connection_from_url
> > > scheme, host, port = get_host(url)
> > > File "/Users/lsemel/www/virtualenvs/muckrack/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 557, in get_host
> > > port = int(port)
> > > ValueError: invalid literal for int() with base 10: ''
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/664/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/664/timeline
| null |
completed
| null | null | false |
[
"https://github.com/kennethreitz/requests/blob/develop/requests/packages/urllib3/util.py#L75 should probably chop off the query string before checking for a :\n",
"/me is embarrassed.\n\nCould you open this bug under urllib3 please?\n",
"No problem, here you go: https://github.com/shazow/urllib3/issues/73\n",
"This is fixed in shazow/urllib3@1c22dec48bc57199d71b86476dbed8f027877824, feel free to pull @kennethreitz.\n\nAlso worth noting that this bug is partly due to the improperly encoded param. It does not manifest if we do this instead:\n\n``` python\nimport requests\nrequests.get('http://online.wsj.com', params={'CALL_URL', 'http://online.wsj.com/article/SB10001424052702303640104577436251166644714.html%3fmod=googlenews_wsj'})\n```\n",
"Thanks @shazow @kennethreitz!\n"
] |
https://api.github.com/repos/psf/requests/issues/663
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/663/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/663/comments
|
https://api.github.com/repos/psf/requests/issues/663/events
|
https://github.com/psf/requests/issues/663
| 4,952,784 |
MDU6SXNzdWU0OTUyNzg0
| 663 |
Progress object/callbacks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/181952?v=4",
"events_url": "https://api.github.com/users/dandrzejewski/events{/privacy}",
"followers_url": "https://api.github.com/users/dandrzejewski/followers",
"following_url": "https://api.github.com/users/dandrzejewski/following{/other_user}",
"gists_url": "https://api.github.com/users/dandrzejewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dandrzejewski",
"id": 181952,
"login": "dandrzejewski",
"node_id": "MDQ6VXNlcjE4MTk1Mg==",
"organizations_url": "https://api.github.com/users/dandrzejewski/orgs",
"received_events_url": "https://api.github.com/users/dandrzejewski/received_events",
"repos_url": "https://api.github.com/users/dandrzejewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dandrzejewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dandrzejewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dandrzejewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-07T15:44:54Z
|
2021-09-09T07:05:33Z
|
2012-07-17T17:50:51Z
|
NONE
|
resolved
|
It would be nice to have a progress object/callback available, similar to urlgrabber's progress_obj. This would allow, for example, progress logging on a large PUT 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/663/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/663/timeline
| null |
completed
| null | null | false |
[
"Ideally you'd be able to just provide a generator for the contents of the stream, and you could track progress there.\n",
"An example of download/upload progress callbacks, from Pycurl: http://pycurl.sourceforge.net/doc/callbacks.html (PROGRESSFUNCTION option). Not the greatest API, but relatively simple. \nI'm using pycurl on a project only to avoid monkey-patching urlblib2 to track the upload of large media files over multipart uploads.\n"
] |
https://api.github.com/repos/psf/requests/issues/662
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/662/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/662/comments
|
https://api.github.com/repos/psf/requests/issues/662/events
|
https://github.com/psf/requests/issues/662
| 4,952,692 |
MDU6SXNzdWU0OTUyNjky
| 662 |
More information on ConnectionError exceptions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/181952?v=4",
"events_url": "https://api.github.com/users/dandrzejewski/events{/privacy}",
"followers_url": "https://api.github.com/users/dandrzejewski/followers",
"following_url": "https://api.github.com/users/dandrzejewski/following{/other_user}",
"gists_url": "https://api.github.com/users/dandrzejewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dandrzejewski",
"id": 181952,
"login": "dandrzejewski",
"node_id": "MDQ6VXNlcjE4MTk1Mg==",
"organizations_url": "https://api.github.com/users/dandrzejewski/orgs",
"received_events_url": "https://api.github.com/users/dandrzejewski/received_events",
"repos_url": "https://api.github.com/users/dandrzejewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dandrzejewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dandrzejewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dandrzejewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-07T15:40:58Z
|
2021-09-09T08:00:37Z
|
2012-06-15T18:29:33Z
|
NONE
|
resolved
|
It doesn't appear that much information is available on ConnectionError exceptions. It might be useful for diagnostic logging to have at least the error text, if not the exception object (SocketError or whatever it might be) available.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/662/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/662/timeline
| null |
completed
| null | null | false |
[
"This ticket should be opened at urllib3 I believe.\n"
] |
https://api.github.com/repos/psf/requests/issues/661
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/661/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/661/comments
|
https://api.github.com/repos/psf/requests/issues/661/events
|
https://github.com/psf/requests/issues/661
| 4,952,687 |
MDU6SXNzdWU0OTUyNjg3
| 661 |
POSTing just data works; with data and files it fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34607?v=4",
"events_url": "https://api.github.com/users/miikka/events{/privacy}",
"followers_url": "https://api.github.com/users/miikka/followers",
"following_url": "https://api.github.com/users/miikka/following{/other_user}",
"gists_url": "https://api.github.com/users/miikka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/miikka",
"id": 34607,
"login": "miikka",
"node_id": "MDQ6VXNlcjM0NjA3",
"organizations_url": "https://api.github.com/users/miikka/orgs",
"received_events_url": "https://api.github.com/users/miikka/received_events",
"repos_url": "https://api.github.com/users/miikka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/miikka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/miikka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/miikka",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-07T15:40:52Z
|
2021-09-09T02:11:53Z
|
2012-07-27T05:50:01Z
|
CONTRIBUTOR
|
resolved
|
These work:
```
requests.post("http://httpbin.org/post", data={'a': 0})
requests.post("http://httpbin.org/post", data={'a': 0.0})
requests.post("http://httpbin.org/post", data={'a': 0}, files={'b': 'foo'})
```
However, this fails:
```
requests.post("http://httpbin.org/post", data={'a': 0.0}, files={'b': 'foo'})
```
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../dev/lib/python2.7/site-packages/requests/api.py", line 87, in post
return request('post', url, data=data, **kwargs)
File ".../dev/lib/python2.7/site-packages/requests/safe_mode.py", line 37, in wrapped
return function(method, url, **kwargs)
File ".../dev/lib/python2.7/site-packages/requests/api.py", line 42, in request
return s.request(method=method, url=url, **kwargs)
File ".../dev/lib/python2.7/site-packages/requests/sessions.py", line 230, in request
r.send(prefetch=prefetch)
File ".../dev/lib/python2.7/site-packages/requests/models.py", line 505, in send
(body, content_type) = self._encode_files(self.files)
File ".../dev/lib/python2.7/site-packages/requests/models.py", line 364, in _encode_files
(body, content_type) = encode_multipart_formdata(fields)
File ".../dev/lib/python2.7/site-packages/requests/packages/urllib3/filepost.py", line 80, in encode_multipart_formdata
body.write(data)
TypeError: 'float' does not have the buffer interface
```
`encode_multipart_formdata` expect the keys of the data dict to be buffer-like objects or ints (a special case), whereas `urlencode` puts things through str. In the hindsight I'm not sure if I should have expected this to work, but I was pretty surprised when I encountered this.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/661/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/661/timeline
| null |
completed
| null | null | false |
[
"ints shouldn't be working, I just left that in as a special case for backwards compatibility with much earlier versions of urllib3. You shouldn't be passing arbitrary objects as values, just string/buffer-like things. Perhaps removing int support and/or clearer docs would help?\n",
"The int support confused me until I properly looked at the docs/source and I think urllib3 docs on this are fine. In the requests docs, however, I see no mention on the allowed types in the data dict. Maybe there should be something? (Or maybe requests should convert data values to strings before passing them to encode_multipart_formdata, as non-string values work with urlencode?)\n",
"There is a problem when sending lists in data with files as well\n\n``` python\nimport requests\n\nfiles = {'robots.txt' : open('robots.txt', 'rb') }\n\nr = requests.post(\"http://postbin.heroku.com/f8012248\",\n auth=(\"api\", 'key-secret'),\n files = files,\n data={\n \"from\": '[email protected]',\n \"to\": ['[email protected]', '[email protected]'],\n \"subject\": 'sending from console, file attached',\n \"html\": '<p>that my full body</p>' * 10\n }\n )\n```\n\n```\nTraceback (most recent call last):\n File \"<stdin>\", line 8, in <module>\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/api.py\", line 87, in post\n return request('post', url, data=data, **kwargs)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/safe_mode.py\", line 37, in wrapped\n return function(method, url, **kwargs)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/api.py\", line 42, in request\n return s.request(method=method, url=url, **kwargs)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/sessions.py\", line 230, in request\n r.send(prefetch=prefetch)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/models.py\", line 499, in send\n (body, content_type) = self._encode_files(self.files)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/models.py\", line 358, in _encode_files\n (body, content_type) = encode_multipart_formdata(fields)\n File \"/home/roman/virt_env/swan_dev/local/lib/python2.7/site-packages/requests/packages/urllib3/filepost.py\", line 83, in encode_multipart_formdata\n body.write(data)\nTypeError: 'list' does not have the buffer interface\n\n```\n\nwhich works if \"to\" is just a string or without \"files\" parameter\n\nP.S. \nactually it works with tuple : \"to\": ('[email protected]', '[email protected]'),\n"
] |
https://api.github.com/repos/psf/requests/issues/660
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/660/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/660/comments
|
https://api.github.com/repos/psf/requests/issues/660/events
|
https://github.com/psf/requests/issues/660
| 4,949,034 |
MDU6SXNzdWU0OTQ5MDM0
| 660 |
Checking text on a HEAD verb Request breaks!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/445723?v=4",
"events_url": "https://api.github.com/users/mcnemesis/events{/privacy}",
"followers_url": "https://api.github.com/users/mcnemesis/followers",
"following_url": "https://api.github.com/users/mcnemesis/following{/other_user}",
"gists_url": "https://api.github.com/users/mcnemesis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mcnemesis",
"id": 445723,
"login": "mcnemesis",
"node_id": "MDQ6VXNlcjQ0NTcyMw==",
"organizations_url": "https://api.github.com/users/mcnemesis/orgs",
"received_events_url": "https://api.github.com/users/mcnemesis/received_events",
"repos_url": "https://api.github.com/users/mcnemesis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mcnemesis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mcnemesis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mcnemesis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-07T12:23:02Z
|
2021-09-08T23:10:58Z
|
2012-06-08T01:55:26Z
|
NONE
|
resolved
|
When trying to check whether I can override the standard header 'Content-Type', I encountered what I consider to be a bug when I tried to do this:
```
>>> requests.__version__
'0.12.1'
>>> res = requests.head('http://httpbin.org/headers')
>>> res.headers
{'content-length': '349', 'via': '1.0 mail.ds.co.ug (squid/3.1.6)', 'x-cache': 'MISS from mail.ds.co.ug', 'x-cache-lookup': 'MISS from mail.ds.co.ug:
3128', 'server': 'gunicorn/0.13.4', 'connection': 'close', 'date': 'Thu, 07 Jun 2012 12:15:19 GMT', 'content-type': 'application/json'}
>>> res.text
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 809, in text
content = str(self.content, encoding, errors='replace')
TypeError: unicode() argument 2 must be string, not None
```
I think the favorable way (if at all the HEAD verb shouldn't provide a body -- which I think it doesn't), would be to set text to None. Am not yet sure whether this is a bug or feature, the docs on the HEAD verb don't clarify on what to expect of 'text' in this case.
Anyway, my intended usage seems to be this:
```
>>> requests.__version__
'0.12.1'
>>> res = requests.get('http://httpbin.org/headers')
>>> res.text
u'{\n "headers": {\n "Content-Length": "", \n "Via": "1.1 mail.ds.co.ug (squid/3.1.6)", \n "Accept-Encoding": "identity, deflate, compress,
gzip", \n "Host": "httpbin.org", \n "Accept": "*/*", \n "User-Agent": "python-requests/0.12.1", \n "Connection": "keep-alive", \n "Ca
che-Control": "max-age=2419200", \n "Content-Type": ""\n }\n}'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/660/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/660/timeline
| null |
completed
| null | null | false |
[
"Looks like we should be checking if `response.content is None` before we do the conversion\n",
"+1 also the same for `res.json`\n",
"Fixed!\n",
":cake: Awesome!\n",
"%-) nice\n"
] |
https://api.github.com/repos/psf/requests/issues/659
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/659/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/659/comments
|
https://api.github.com/repos/psf/requests/issues/659/events
|
https://github.com/psf/requests/pull/659
| 4,946,024 |
MDExOlB1bGxSZXF1ZXN0MTUxMTI2NQ==
| 659 |
Allow passing a file or file-like object as data.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/975735?v=4",
"events_url": "https://api.github.com/users/Bluehorn/events{/privacy}",
"followers_url": "https://api.github.com/users/Bluehorn/followers",
"following_url": "https://api.github.com/users/Bluehorn/following{/other_user}",
"gists_url": "https://api.github.com/users/Bluehorn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Bluehorn",
"id": 975735,
"login": "Bluehorn",
"node_id": "MDQ6VXNlcjk3NTczNQ==",
"organizations_url": "https://api.github.com/users/Bluehorn/orgs",
"received_events_url": "https://api.github.com/users/Bluehorn/received_events",
"repos_url": "https://api.github.com/users/Bluehorn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Bluehorn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Bluehorn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Bluehorn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-07T08:34:03Z
|
2021-09-08T15:01:15Z
|
2012-06-08T02:06:50Z
|
NONE
|
resolved
|
The underlying httplib already allows passing an open file object as body
to its HTTPConnection.request method. I think requests should allow that
as well.
This also fixes issue #292 in requests. httplib will automatically add the content-length header if a real file object is passed. This will most likely break for non-file streams but it is a 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/659/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/659/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/659.diff",
"html_url": "https://github.com/psf/requests/pull/659",
"merged_at": "2012-06-08T02:06:50Z",
"patch_url": "https://github.com/psf/requests/pull/659.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/659"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1555287) (merged f0e327f9 into c0ae3dd3).\n",
"This is a great change, thanks!\n\nIn the future, I plan to support streaming uploads with generators.\n",
":sparkles: :cake: :sparkles:\n",
":thumbsup: Thanks for accepting and for adding me to the AUTHORS file for the few lines I contributed ;-)\n"
] |
https://api.github.com/repos/psf/requests/issues/658
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/658/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/658/comments
|
https://api.github.com/repos/psf/requests/issues/658/events
|
https://github.com/psf/requests/issues/658
| 4,934,196 |
MDU6SXNzdWU0OTM0MTk2
| 658 |
SSL module cannot handle unicode filenames
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/238652?v=4",
"events_url": "https://api.github.com/users/schlamar/events{/privacy}",
"followers_url": "https://api.github.com/users/schlamar/followers",
"following_url": "https://api.github.com/users/schlamar/following{/other_user}",
"gists_url": "https://api.github.com/users/schlamar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schlamar",
"id": 238652,
"login": "schlamar",
"node_id": "MDQ6VXNlcjIzODY1Mg==",
"organizations_url": "https://api.github.com/users/schlamar/orgs",
"received_events_url": "https://api.github.com/users/schlamar/received_events",
"repos_url": "https://api.github.com/users/schlamar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schlamar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schlamar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schlamar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-06-06T17:26:57Z
|
2021-09-09T07:05:36Z
|
2012-06-15T18:30:28Z
|
CONTRIBUTOR
|
resolved
|
Here is the related bug report on [bugs.python.org](http://bugs.python.org/issue14907)
This problem will produce the following error:
```
>>> requests.get('https://google.com', cert=u'öäü.pem')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/api.py", line 54, in get
return request('get', url, **kwargs)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/safe_mode.py", line 37, in wrapped
return function(method, url, **kwargs)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/api.py", line 42, in request
return s.request(method=method, url=url, **kwargs)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/sessions.py", line 230, in request
r.send(prefetch=prefetch)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/models.py", line 602, in send
timeout=self.timeout,
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 384, in urlopen
body=body, headers=headers)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 254, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 100, in connect
ca_certs=self.ca_certs)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/ssl.py", line 381, in wrap_socket
ciphers=ciphers)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/ssl.py", line 141, in __init__
ciphers)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/658/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/658/timeline
| null |
completed
| null | null | false |
[
"I this this is a `wont-fix` for now. I suspect this will work fine in Python3, for obvious reasons :)\n",
"But it does not work for Python 2.x. Why is it closed?\n",
"@kennethreitz ?\n",
"Because you're not expected to pass unicode strings to most standard libraries in Py2 (unless explicitly stated so).\n",
"@simukis Well, the user is passing the string to `requests` and **not** to a standard library.\n",
"what @simukis said\n"
] |
https://api.github.com/repos/psf/requests/issues/657
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/657/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/657/comments
|
https://api.github.com/repos/psf/requests/issues/657/events
|
https://github.com/psf/requests/pull/657
| 4,931,252 |
MDExOlB1bGxSZXF1ZXN0MTUwNDU4MA==
| 657 |
response.json: document ALL the awesome features!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/105168?v=4",
"events_url": "https://api.github.com/users/dbrgn/events{/privacy}",
"followers_url": "https://api.github.com/users/dbrgn/followers",
"following_url": "https://api.github.com/users/dbrgn/following{/other_user}",
"gists_url": "https://api.github.com/users/dbrgn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbrgn",
"id": 105168,
"login": "dbrgn",
"node_id": "MDQ6VXNlcjEwNTE2OA==",
"organizations_url": "https://api.github.com/users/dbrgn/orgs",
"received_events_url": "https://api.github.com/users/dbrgn/received_events",
"repos_url": "https://api.github.com/users/dbrgn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbrgn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbrgn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbrgn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-06T15:10:47Z
|
2021-09-08T15:01:14Z
|
2012-06-07T01:02:46Z
|
CONTRIBUTOR
|
resolved
|
I just saw `response.json` in your #djangocon presentation, which is awesome and was still unknown to me. I updated the docs accordingly.
In case you don't like the 2nd commit, just ignore or revert 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/657/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/657/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/657.diff",
"html_url": "https://github.com/psf/requests/pull/657",
"merged_at": "2012-06-07T01:02:46Z",
"patch_url": "https://github.com/psf/requests/pull/657.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/657"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1548245) (merged f968fe01 into aa423183).\n",
"Thanks a ton :)\n",
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/656
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/656/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/656/comments
|
https://api.github.com/repos/psf/requests/issues/656/events
|
https://github.com/psf/requests/issues/656
| 4,925,555 |
MDU6SXNzdWU0OTI1NTU1
| 656 |
Async
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/105168?v=4",
"events_url": "https://api.github.com/users/dbrgn/events{/privacy}",
"followers_url": "https://api.github.com/users/dbrgn/followers",
"following_url": "https://api.github.com/users/dbrgn/following{/other_user}",
"gists_url": "https://api.github.com/users/dbrgn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbrgn",
"id": 105168,
"login": "dbrgn",
"node_id": "MDQ6VXNlcjEwNTE2OA==",
"organizations_url": "https://api.github.com/users/dbrgn/orgs",
"received_events_url": "https://api.github.com/users/dbrgn/received_events",
"repos_url": "https://api.github.com/users/dbrgn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbrgn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbrgn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbrgn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-06T09:20:35Z
|
2021-09-09T05:29:57Z
|
2012-06-08T02:49:51Z
|
CONTRIBUTOR
|
resolved
|
I just realized that you removed `requests.async`in Commit 32327f8f7c2f457d38130b5df664ec8f29cf3053. What are the reasons for it?
In case it's not going back, the async section needs to be removed from the docs: http://docs.python-requests.org/en/latest/user/advanced/#asynchronous-requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/656/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/656/timeline
| null |
completed
| null | null | false |
[
"It does indeed :)\n\nThe `async` submodule was removed to keep requests sharp and focused. \n\nThe code was moved to a new module, called `grequests`:\n\nhttps://github.com/kennethreitz/grequests\n\nDocumentation needs to updated for this.\n",
"the doc still has an empty section labelled 'async'.\n",
"Documentation needs to updated for this. :)\n",
"This is still confusing, and there are many links to the old page for anyone searching for \"requests async\", for example\n\nhttp://stackoverflow.com/a/9522864/329700\n\nMight want to keep the header/tag, and then link people to the other library, so they don't wonder what happened to it.\n"
] |
https://api.github.com/repos/psf/requests/issues/655
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/655/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/655/comments
|
https://api.github.com/repos/psf/requests/issues/655/events
|
https://github.com/psf/requests/issues/655
| 4,923,314 |
MDU6SXNzdWU0OTIzMzE0
| 655 |
Requests is not doing SSL cert verification
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/238652?v=4",
"events_url": "https://api.github.com/users/schlamar/events{/privacy}",
"followers_url": "https://api.github.com/users/schlamar/followers",
"following_url": "https://api.github.com/users/schlamar/following{/other_user}",
"gists_url": "https://api.github.com/users/schlamar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schlamar",
"id": 238652,
"login": "schlamar",
"node_id": "MDQ6VXNlcjIzODY1Mg==",
"organizations_url": "https://api.github.com/users/schlamar/orgs",
"received_events_url": "https://api.github.com/users/schlamar/received_events",
"repos_url": "https://api.github.com/users/schlamar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schlamar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schlamar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schlamar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 20 |
2012-06-06T05:59:13Z
|
2021-09-09T01:22:21Z
|
2012-07-27T05:54:03Z
|
CONTRIBUTOR
|
resolved
|
This works fine and shouldn't:
```
>>> requests.get('https://kennethreitz.com', verify=True)
<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/655/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/655/timeline
| null |
completed
| null | null | false |
[
"`requests.exceptions.SSLError: hostname 'kennethreitz.com' doesn't match either of '*.herokuapp.com', 'herokuapp.com'`\n",
"Yes, this is what I am expecting. But I don't get an error.\n",
"What version of Requests are you using? What operating system? \n",
"```\n>>> requests.__version__ \n'0.13.0'\n```\n\nWindows 7, 64bit.\n",
"Ok, hacking a `print scheme` in urllib3.connectionpool.connection_from_url is interesting:\n\n```\n>>> import requests; requests.get('https://google.com')\nhttp\nhttp\nhttp\n<Response [200]>\n```\n",
"That's... interesting. @shazow ?\n",
"There is an issue with the proxy handling, `print url,scheme` gives:\n\n```\n$ python -c \"import requests; requests.get('https://google.com')\"\nhttp://.../ http\nhttp://.../ http\nhttp://.../ http\n```\n",
"What proxies do you have set, where, and how?\n",
"```\n>>> os.environ['http_proxy']\n'http://.../'\n>>> os.environ['https_proxy']\n'http://.../'\n```\n",
"Additional note: HTTPS is fully disabled, the data is sent in plain text. Just checked my network traffic.\n",
"I'm not positive, but I believe it should be:\n\n``` pycon\n>>> os.environ['https_proxy']\n'https://10.10.1.1:4128/'\n```\n",
"Nope:\n\n```\n>>> os.environ['https_proxy'] = 'https://.../'\n>>> import requests; requests.get('https://google.com')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"C:\\Python27\\lib\\site-packages\\requests\\api.py\", line 54, in get\n return request('get', url, **kwargs)\n File \"C:\\Python27\\lib\\site-packages\\requests\\safe_mode.py\", line 37, in wrapped\n return function(method, url, **kwargs)\n File \"C:\\Python27\\lib\\site-packages\\requests\\api.py\", line 42, in request\n return s.request(method=method, url=url, **kwargs)\n File \"C:\\Python27\\lib\\site-packages\\requests\\sessions.py\", line 230, in request\n r.send(prefetch=prefetch)\n File \"C:\\Python27\\lib\\site-packages\\requests\\models.py\", line 611, in send\n raise SSLError(e)\nrequests.exceptions.SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of\n protocol\n```\n",
"Anything going on here? I think this is a serious security flaw which should be fixed ASAP.\n",
"@shazow, any insight here?\n",
"@ms4py Can you reproduce this with plain urllib3? If so, could you open a bug there please?\n",
"@shazow I think the problem is that I am doing HTTPS over an HTTP proxy. It seems that this is fixed in #478. \n\n@kennethreitz I think this pull request hadn't made it into requests, right?\n",
"@ms4py merged. It'll be included in the next release of requests. :cake:\n",
"@kennethreitz Not sure what you merged, but if it was anything to do with this bug, it probably isn't a good idea. :)\n\nurllib3 has some related pull requests and an in-progress branch but none of them are ready (and in fact has known bugs).\n",
"1. Why is this marked as closed?\n2. Why isn't this mentioned somewhere in the docs as long as it isn't fixed. This is a really **BIG** security issue as data is sent in plain text when user is expecting an encrypted connection and he isn't secure against MITM attacks.\n",
"The best behavior right now (as long as `urllib3` does not support SSL via proxies) would be to throw an exception instead of silently switching to HTTP.\n"
] |
https://api.github.com/repos/psf/requests/issues/654
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/654/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/654/comments
|
https://api.github.com/repos/psf/requests/issues/654/events
|
https://github.com/psf/requests/issues/654
| 4,922,974 |
MDU6SXNzdWU0OTIyOTc0
| 654 |
requests.get() ignores charset=UTF-8 and BOM
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/115677?v=4",
"events_url": "https://api.github.com/users/jadient/events{/privacy}",
"followers_url": "https://api.github.com/users/jadient/followers",
"following_url": "https://api.github.com/users/jadient/following{/other_user}",
"gists_url": "https://api.github.com/users/jadient/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jadient",
"id": 115677,
"login": "jadient",
"node_id": "MDQ6VXNlcjExNTY3Nw==",
"organizations_url": "https://api.github.com/users/jadient/orgs",
"received_events_url": "https://api.github.com/users/jadient/received_events",
"repos_url": "https://api.github.com/users/jadient/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jadient/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jadient/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jadient",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-06-06T05:09:33Z
|
2021-09-09T00:34:21Z
|
2012-06-15T18:27:12Z
|
NONE
|
resolved
|
I've seen some discussion that charset=UTF-8 isn't sufficient because requests looks at the http headers rather than the body of the request (and I can understand the desire to avoid parsing the html looking for the META tag). However, if a page has a UTF-8 Byte Order Mark, I'd think that would be sufficient indication to treat the body as UTF-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/654/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/654/timeline
| null |
completed
| null | null | false |
[
"If the server doesn't specify an encoding, one will automatically be detected via [chardet](http://pypi.python.org/pypi/chardet)\n",
"If you're saying that _requests_ uses _chardet_, then this isn't working properly for me. Perhaps I need to dive into the code to see what's happening?\n",
"Requests uses chardet if it is available, yes.\n\nCan you share the URL you're having trouble with?\n",
"http://www.stanford.edu/dept/visitorinfo/activities/dining.html\n",
"Ah, this is because the server responds with `'content-type': 'text/html'`.\n\nThis is standards compliance behavior: http://en.wikipedia.org/wiki/ISO/IEC_8859-1#History\n\nYou can do the following to ignore server-set encodings:\n\n``` python\nr = requests.get('http://www.stanford.edu/dept/visitorinfo/activities/dining.html')\nr.encoding = None\n```\n\nThen, the contents of `r.text` will be accurate, as the chardet detection will kick in.\n",
"If there is a BOM, wouldn't it be reasonable to override `text/html`?\n"
] |
https://api.github.com/repos/psf/requests/issues/653
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/653/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/653/comments
|
https://api.github.com/repos/psf/requests/issues/653/events
|
https://github.com/psf/requests/issues/653
| 4,921,014 |
MDU6SXNzdWU0OTIxMDE0
| 653 |
Support for streaming POST data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/143504?v=4",
"events_url": "https://api.github.com/users/fmoo/events{/privacy}",
"followers_url": "https://api.github.com/users/fmoo/followers",
"following_url": "https://api.github.com/users/fmoo/following{/other_user}",
"gists_url": "https://api.github.com/users/fmoo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fmoo",
"id": 143504,
"login": "fmoo",
"node_id": "MDQ6VXNlcjE0MzUwNA==",
"organizations_url": "https://api.github.com/users/fmoo/orgs",
"received_events_url": "https://api.github.com/users/fmoo/received_events",
"repos_url": "https://api.github.com/users/fmoo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fmoo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fmoo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fmoo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-06-06T00:50:15Z
|
2021-09-09T06:00:52Z
|
2012-06-15T18:27:21Z
|
NONE
|
resolved
|
This used to work in previous versions of requests (I think I was on 0.8 before). I had something like this in my code:
headers = {'Content-Length': str(cmd.getLength())}
requests.post(..., data=cmd.genPayload(), headers=headers)
Where genPayload() was a generator that yielded the chunks of payload based on the command format.
In the latest builds of requests, I get a ValueError stating that it is "Unable to encode lists with elements that are not 2-tuples.".
I could set data="".join(cmd.genPayload()), but for large commands, this causes all the data to get buffered into memory.
Is there a way to support streaming POSTs with requests?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/653/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/653/timeline
| null |
completed
| null | null | false |
[
"This is probably related to #635\n",
"Not yet, but planned for the near future :)\n",
"Why did this get closed, I just re-tested on 0.13.6, and I'm still getting:\n\n`ValueError: Unable to encode lists with elements that are not 2-tuples.`\n",
"Streaming uploads are in the mid-term roadmap.\n",
"Got it. Is there a way I can track that work / milestone?\n",
"Well, this is the plan:\n\nhttp://kennethreitz.com/the-future-of-python-http.html\n",
"Armin and I need to get started :) \n"
] |
https://api.github.com/repos/psf/requests/issues/652
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/652/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/652/comments
|
https://api.github.com/repos/psf/requests/issues/652/events
|
https://github.com/psf/requests/pull/652
| 4,909,570 |
MDExOlB1bGxSZXF1ZXN0MTQ5NDYzMg==
| 652 |
Add support for tox (http://tox.testrun.org/)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/305268?v=4",
"events_url": "https://api.github.com/users/msabramo/events{/privacy}",
"followers_url": "https://api.github.com/users/msabramo/followers",
"following_url": "https://api.github.com/users/msabramo/following{/other_user}",
"gists_url": "https://api.github.com/users/msabramo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/msabramo",
"id": 305268,
"login": "msabramo",
"node_id": "MDQ6VXNlcjMwNTI2OA==",
"organizations_url": "https://api.github.com/users/msabramo/orgs",
"received_events_url": "https://api.github.com/users/msabramo/received_events",
"repos_url": "https://api.github.com/users/msabramo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/msabramo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/msabramo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/msabramo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-06-05T14:28:27Z
|
2021-09-08T15:01:13Z
|
2012-06-07T00:00: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/652/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/652/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/652.diff",
"html_url": "https://github.com/psf/requests/pull/652",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/652.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/652"
}
| true |
[
"Tox used to be included in the source tree, but I excluded it because it doesn't see much use and the configuration is highly specific to the environment.\n\nThanks though :)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/651
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/651/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/651/comments
|
https://api.github.com/repos/psf/requests/issues/651/events
|
https://github.com/psf/requests/pull/651
| 4,896,004 |
MDExOlB1bGxSZXF1ZXN0MTQ4ODk2Mw==
| 651 |
Auto-detect CA Cert path instead of requiring users to hack setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/113362?v=4",
"events_url": "https://api.github.com/users/schmichael/events{/privacy}",
"followers_url": "https://api.github.com/users/schmichael/followers",
"following_url": "https://api.github.com/users/schmichael/following{/other_user}",
"gists_url": "https://api.github.com/users/schmichael/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schmichael",
"id": 113362,
"login": "schmichael",
"node_id": "MDQ6VXNlcjExMzM2Mg==",
"organizations_url": "https://api.github.com/users/schmichael/orgs",
"received_events_url": "https://api.github.com/users/schmichael/received_events",
"repos_url": "https://api.github.com/users/schmichael/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schmichael/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schmichael/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schmichael",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-06-04T20:20:40Z
|
2021-09-08T15:01:14Z
|
2012-06-04T22:24:14Z
|
CONTRIBUTOR
|
resolved
|
Also fixed nearby comments to wrap at 79 characters as per PEP8
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/651/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/651/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/651.diff",
"html_url": "https://github.com/psf/requests/pull/651",
"merged_at": "2012-06-04T22:24:14Z",
"patch_url": "https://github.com/psf/requests/pull/651.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/651"
}
| true |
[
"Closing.\n\nI want everyone to be using certifi for a large number of reasons. The only reason I have the `get_os_ca_bundle_path` function is for people with heavily managed systems.\n\nIf they don't want to install it, they can specify `--no-deps`.\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1528603) (merged 62a23bfb into b026def9).\n"
] |
https://api.github.com/repos/psf/requests/issues/650
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/650/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/650/comments
|
https://api.github.com/repos/psf/requests/issues/650/events
|
https://github.com/psf/requests/pull/650
| 4,893,598 |
MDExOlB1bGxSZXF1ZXN0MTQ4NzgyMw==
| 650 |
Bug 637
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] | null | 6 |
2012-06-04T18:22:19Z
|
2014-07-20T01:35:35Z
|
2012-06-05T15:52:19Z
|
NONE
| null |
Should solve #637.
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/650/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/650/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/650.diff",
"html_url": "https://github.com/psf/requests/pull/650",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/650.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/650"
}
| true |
[
"Is this better than setting `'Content-Type': ''`?\n",
"@travisbot ?\n",
"\"Is this better than setting 'Content-Type': ''?\"\n\nBut, in #637, you told me that ignoring content-type as None is categorized as a Bug.\n\nSettings as empty string should solve the dataXform problem.\n\nNevertheless, both of the proposed solution still lack proper multi-dict urlencoding handling.\n\nIf it is a design decision, then I think it should have some note on the docs regarding that.\nIf it is not, then it is another Bug.\n",
"Can you reopen? I was just asking to see if anyone had any opnions :)\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1527630) (merged fe2a0747 into b026def9).\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1536918) (merged 176d26f4 into 62a23bfb).\n"
] |
https://api.github.com/repos/psf/requests/issues/649
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/649/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/649/comments
|
https://api.github.com/repos/psf/requests/issues/649/events
|
https://github.com/psf/requests/issues/649
| 4,874,272 |
MDU6SXNzdWU0ODc0Mjcy
| 649 |
CaseInsensitiveDict __setitem__ faulty for differing-case keys
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/882547?v=4",
"events_url": "https://api.github.com/users/cdunklau/events{/privacy}",
"followers_url": "https://api.github.com/users/cdunklau/followers",
"following_url": "https://api.github.com/users/cdunklau/following{/other_user}",
"gists_url": "https://api.github.com/users/cdunklau/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cdunklau",
"id": 882547,
"login": "cdunklau",
"node_id": "MDQ6VXNlcjg4MjU0Nw==",
"organizations_url": "https://api.github.com/users/cdunklau/orgs",
"received_events_url": "https://api.github.com/users/cdunklau/received_events",
"repos_url": "https://api.github.com/users/cdunklau/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cdunklau/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cdunklau/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cdunklau",
"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 |
2012-06-03T00:59:23Z
|
2021-09-09T03:00:42Z
|
2012-07-27T05:54:43Z
|
CONTRIBUTOR
|
resolved
|
I think I figured out the cause of the issue described here: https://github.com/kennethreitz/requests/pull/59
It appears that if one isn't careful to use a common case convention when assigning a header after it has been assigned before, the header will fail to work. The request will use the old header value... I think I know why, too. Here's an example:
test.py
``` python
from requests.structures import CaseInsensitiveDict
print "Initializing CID = CaseInsensitiveDict()"
CID = CaseInsensitiveDict()
print "Setting 'spam': 'eggs'"
CID['spam'] = 'eggs'
print "Setting 'Spam': 'Eggs'"
CID['Spam'] = 'Eggs'
print "Setting 'sPAM': 'eGGS'"
CID['sPAM'] = 'eGGS'
print "Contents of CID:", CID
print "CID['spam']: '%s'" % CID['spam']
print "CID['Spam']: '%s'" % CID['Spam']
print "CID['sPAM']: '%s'" % CID['sPAM']
print "\n\n\n"
print "Initializing CID = CaseInsensitiveDict()"
CID = CaseInsensitiveDict()
print "Setting 'sPAM': 'eGGS'"
CID['sPAM'] = 'eGGS'
print "Setting 'Spam': 'Eggs'"
CID['Spam'] = 'Eggs'
print "Setting 'spam': 'eggs'"
CID['spam'] = 'eggs'
print "Contents of CID:", CID
print "CID['spam']: '%s'" % CID['spam']
print "CID['Spam']: '%s'" % CID['Spam']
print "CID['sPAM']: '%s'" % CID['sPAM']
```
The output:
```
Initializing CID = CaseInsensitiveDict()
Setting 'spam': 'eggs'
Setting 'Spam': 'Eggs'
Setting 'sPAM': 'eGGS'
Contents of CID: {'sPAM': 'eGGS', 'Spam': 'Eggs', 'spam': 'eggs'}
CID['spam']: 'eggs'
CID['Spam']: 'eggs'
CID['sPAM']: 'eggs'
Initializing CID = CaseInsensitiveDict()
Setting 'sPAM': 'eGGS'
Setting 'Spam': 'Eggs'
Setting 'spam': 'eggs'
Contents of CID: {'spam': 'eggs', 'Spam': 'Eggs', 'sPAM': 'eGGS'}
CID['spam']: 'eGGS'
CID['Spam']: 'eGGS'
CID['sPAM']: 'eGGS'
```
Notice how in both passes, only the first assignment actually "works". It stores the data for all three assignments, but will only return the value set by the initial key.
I believe the only change necessary would be to the **setitem** method on CaseInsensitiveDict:
Broken:
``` python
def __setitem__(self, key, value):
dict.__setitem__(self, key, value)
self._clear_lower_keys()
```
Fixed:
``` python
def __setitem__(self, key, value):
dict.__setitem__(self, key.lower(), value)
self._clear_lower_keys()
```
When I use the corrected module, the CaseInsensitiveDict behaves as I believe it should:
```
Initializing CID = CaseInsensitiveDict()
Setting 'spam': 'eggs'
Setting 'Spam': 'Eggs'
Setting 'sPAM': 'eGGS'
Contents of CID: {'spam': 'eGGS'}
CID['spam']: 'eGGS'
CID['Spam']: 'eGGS'
CID['sPAM']: 'eGGS'
Initializing CID = CaseInsensitiveDict()
Setting 'sPAM': 'eGGS'
Setting 'Spam': 'Eggs'
Setting 'spam': 'eggs'
Contents of CID: {'spam': 'eggs'}
CID['spam']: 'eggs'
CID['Spam']: 'eggs'
CID['sPAM']: 'eggs'
```
Note that the value for that key is the last one assigned, instead of the first.
If needed, I can put together a pull request for this, but it might take some time since I've never done it before :)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/649/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/649/timeline
| null |
completed
| null | null | false |
[
"The same issue arises when initializing a CaseInsensitiveDict using a dictionary of differing-case keys or differing-case keyword arguments. Example:\n\n```\n>>> from requests.structures import CaseInsensitiveDict\n>>> CaseInsensitiveDict(a=1, A=2, B=3)\n{'A': 2, 'a': 1, 'B': 3}\n>>> CaseInsensitiveDict({'a': 1, 'A': 2, 'B': 3})\n{'A': 2, 'a': 1, 'B': 3}\n```\n\nI'm not sure what the best approach is to addressing this issue, since we are going to run into problems with Cookie and Set-Cookie headers. The first, sends cookies in a semi-colon delimited fashion, whereas the latter sends a unique header for each cookie being set. In the case of Set-Cookie, some clients (such as Firefox) do not parse headers whose values were combined with a comma as delimiter as suggested in http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2. Though neither does `Cookie.SimpleCookie`:\n\n```\n>>> SimpleCookie('Set-Cookie: a=1; b=2')['a']\n<Morsel: a='1'>\n>>> SimpleCookie('Set-Cookie: a=1; b=2')['b'] \n<Morsel: b='2'>\n>>> SimpleCookie('Set-Cookie: a=1, b=2')['a'] # incorrect?\n<Morsel: a='1,'>\n>>> SimpleCookie('Set-Cookie: a=1, b=2')['b']\n<Morsel: b='2'>\n>>> SimpleCookie('Set-Cookie: a=1 b=2')['a'] \n<Morsel: a='1'>\n>>> SimpleCookie('Set-Cookie: a=1 b=2')['b']\n<Morsel: b='2'>\n```\n\nurllib3 combines headers with a comma as well: https://github.com/shazow/urllib3/blob/master/urllib3/response.py#L174\n\nSince the CaseInsensitiveDict is used as a container for HTTP headers, would it make more sense to change values to be lists instead of strings?\n",
"We should fix this.\n",
"I've submitted a pull request to address this issue. Behavior when initializing a case-insensitive dict with differing-case keys is undefined, as is the case when initializing a dict with multiple values for the same key.\n",
"Original PRs to fix this were apparently not merged. Fixed in e6e9b55.\n"
] |
https://api.github.com/repos/psf/requests/issues/648
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/648/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/648/comments
|
https://api.github.com/repos/psf/requests/issues/648/events
|
https://github.com/psf/requests/pull/648
| 4,868,172 |
MDExOlB1bGxSZXF1ZXN0MTQ3OTE4Mg==
| 648 |
Change log level to debug for connection pool operations.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1300?v=4",
"events_url": "https://api.github.com/users/lgastako/events{/privacy}",
"followers_url": "https://api.github.com/users/lgastako/followers",
"following_url": "https://api.github.com/users/lgastako/following{/other_user}",
"gists_url": "https://api.github.com/users/lgastako/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lgastako",
"id": 1300,
"login": "lgastako",
"node_id": "MDQ6VXNlcjEzMDA=",
"organizations_url": "https://api.github.com/users/lgastako/orgs",
"received_events_url": "https://api.github.com/users/lgastako/received_events",
"repos_url": "https://api.github.com/users/lgastako/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lgastako/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lgastako/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lgastako",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-06-02T02:10:27Z
|
2021-09-08T23:08:21Z
|
2012-06-02T02:23:10Z
|
NONE
|
resolved
|
Please?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/648/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/648/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/648.diff",
"html_url": "https://github.com/psf/requests/pull/648",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/648.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/648"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1504749) (merged ce71b722 into 355b9716).\n",
"This is an issue that should be raised with urllib3.\n",
"@lgastako See also: https://github.com/shazow/urllib3/pull/71\n\nIf you have anything to add to the conversation, I'd like to hear it. :)\n"
] |
https://api.github.com/repos/psf/requests/issues/647
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/647/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/647/comments
|
https://api.github.com/repos/psf/requests/issues/647/events
|
https://github.com/psf/requests/pull/647
| 4,865,364 |
MDExOlB1bGxSZXF1ZXN0MTQ3Nzc4NA==
| 647 |
Implement GSSAPI/Kerberos authentication for requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/826?v=4",
"events_url": "https://api.github.com/users/mkomitee/events{/privacy}",
"followers_url": "https://api.github.com/users/mkomitee/followers",
"following_url": "https://api.github.com/users/mkomitee/following{/other_user}",
"gists_url": "https://api.github.com/users/mkomitee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mkomitee",
"id": 826,
"login": "mkomitee",
"node_id": "MDQ6VXNlcjgyNg==",
"organizations_url": "https://api.github.com/users/mkomitee/orgs",
"received_events_url": "https://api.github.com/users/mkomitee/received_events",
"repos_url": "https://api.github.com/users/mkomitee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mkomitee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mkomitee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mkomitee",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2012-06-01T21:19:42Z
|
2021-09-08T23:07:29Z
|
2012-07-27T05:36:41Z
|
CONTRIBUTOR
|
resolved
|
Currently has two issues which may be related:
- doesn't work with redirects, we try to authenticate the server a second
time with a fully completed kerberos context.
- 403 responses result in the wrong response object being returned, but
this is also true for http digest authentication due to a bug in hook
handling in general.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/647/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/647/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/647.diff",
"html_url": "https://github.com/psf/requests/pull/647",
"merged_at": "2012-07-27T05:36:41Z",
"patch_url": "https://github.com/psf/requests/pull/647.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/647"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1503217) (merged c803e3af into 355b9716).\n",
"This looks awesome! Do you know of any way i can test this?\n",
"Unfortunately no, not without a kerberos kdc and a web server setup with gssapi/kerberos support.\n",
"Oh, nice. I just downloaded this, and it works just fine against the internal server I was using while writing http://python-notes.boredomandlaziness.org/en/latest/python_kerberos.html\n\nFor an automated test, you could look at doing something based on the python-kerberos unit tests: http://trac.calendarserver.org/browser/PyKerberos/trunk/test.py\n\nSpecifically, if you look at testGSSAPI, the server side of that could be pulled out into a handler in a temporary HTTP server that extracts the Authorization header from the request, calls GSSServerStep and GSSServerRespone, and then sets the WWW-Authenticate header on the response.\n\nMix and match to cover the following three cases with mutual_auth enabled and disabled:\n- server sets the WWW-Authenticate response correctly\n- server doesn't set the header at all\n- server sets the header to an invalid value\n\nOne use case that this doesn't yet cover is that once a browser has seen the Negotiate header for a particular URL, _all_ future requests to that URL will have the header added (which can be damn annoying if you want to test dropping your connection!). A custom client like mine which _knows_ the server is expecting Kerberos also doesn't want to wait until the 401 - I want to force the transmission of the Kerberos ticket details immediately.\n\nPerhaps an extra \"always_auth\" flag? Either that or two different authentication handlers:\nHTTPKerberosAuth - always sets the Authorization header\nHTTPNegotiateAuth - does the 401 dance before setting the Authorization header\n",
"Can't wait for this to be pulled, so that I can pull. :)\n\nThank you, @ncoghlan for the write-up.\n",
"Merging! Looking forward to further improvements :)\n",
"Huzzah!\n\nJust a follow up on the test situation - I realised my idea wouldn't work, as both the client and server side of the GSS API code expects the Kerberos infrastructure to exist.\n\nHowever, I realised that what _could_ be done for regression test purposes is to stub out the GSS API calls with an object that keeps track of the call sequence to ensure it doesn't change unexpectedly. That way, if the tests _did_ break, Kenneth would know that it needed to be rechecked against a real Kerberos setup to make sure it was still working.\n",
"I don't test OAuth at the moment either, and I don't want to officially maintain it, so let's just let twitter/github issues be the test suite in the meantime ;)\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/646
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/646/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/646/comments
|
https://api.github.com/repos/psf/requests/issues/646/events
|
https://github.com/psf/requests/pull/646
| 4,865,010 |
MDExOlB1bGxSZXF1ZXN0MTQ3NzYwNQ==
| 646 |
Allowing hooks to return responses that indicate errors
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/826?v=4",
"events_url": "https://api.github.com/users/mkomitee/events{/privacy}",
"followers_url": "https://api.github.com/users/mkomitee/followers",
"following_url": "https://api.github.com/users/mkomitee/following{/other_user}",
"gists_url": "https://api.github.com/users/mkomitee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mkomitee",
"id": 826,
"login": "mkomitee",
"node_id": "MDQ6VXNlcjgyNg==",
"organizations_url": "https://api.github.com/users/mkomitee/orgs",
"received_events_url": "https://api.github.com/users/mkomitee/received_events",
"repos_url": "https://api.github.com/users/mkomitee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mkomitee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mkomitee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mkomitee",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-06-01T20:58:18Z
|
2021-09-08T15:01:13Z
|
2012-06-04T14:44:56Z
|
CONTRIBUTOR
|
resolved
|
Since response objects for failures (4xx/5xx responses) evaluate to False
in a boolean context, any hook which returns such a failure response will
evaluate to False.
The way hooks were setup, any failure response resulting from a hook would
be ignored, and the initial response before it got processed by the hook
would be substituted in its place. This commit changes that logic to test
for None so that hooks that return failures can do so.
This would close out issue 644 (https://github.com/kennethreitz/requests/issues/644) which I opened earlier. It has some discussion about my findings, so you may want to look there for reference.
I've run the tests before and after this and the only tests that break as a result of this (as far as I can tell since I'm running python 2.6) are those in test_DIGESTAUTH_WRONG_HTTP_401_GET. That's because the bug that this fixes was hiding a bug in httpbin which is returning a 403 instead of a 401 on a failed digest authentication (it gets http basic right). I've submitted a pull request for httpbin that should address that (https://github.com/kennethreitz/httpbin/pull/48).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/646/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/646/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/646.diff",
"html_url": "https://github.com/psf/requests/pull/646",
"merged_at": "2012-06-04T14:44:56Z",
"patch_url": "https://github.com/psf/requests/pull/646.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/646"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1502992) (merged 662c3eda into 355b9716).\n",
"Yay for travisbot. As expected, it looks like the only test(s) that are failing are the tests associated with test_DIGESTAUTH_WRONG_HTTP_401_GET.\n",
"Excellent find! :cake:\n",
"http://travis-ci.org/#!/kennethreitz/requests/builds/1533375 :)\n"
] |
https://api.github.com/repos/psf/requests/issues/645
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/645/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/645/comments
|
https://api.github.com/repos/psf/requests/issues/645/events
|
https://github.com/psf/requests/pull/645
| 4,864,938 |
MDExOlB1bGxSZXF1ZXN0MTQ3NzU2NA==
| 645 |
Using unittest2 where available for running tests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/826?v=4",
"events_url": "https://api.github.com/users/mkomitee/events{/privacy}",
"followers_url": "https://api.github.com/users/mkomitee/followers",
"following_url": "https://api.github.com/users/mkomitee/following{/other_user}",
"gists_url": "https://api.github.com/users/mkomitee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mkomitee",
"id": 826,
"login": "mkomitee",
"node_id": "MDQ6VXNlcjgyNg==",
"organizations_url": "https://api.github.com/users/mkomitee/orgs",
"received_events_url": "https://api.github.com/users/mkomitee/received_events",
"repos_url": "https://api.github.com/users/mkomitee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mkomitee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mkomitee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mkomitee",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-06-01T20:53:14Z
|
2021-09-08T15:01:13Z
|
2012-06-29T00:23:15Z
|
CONTRIBUTOR
|
resolved
|
We're using some features that weren't available in unittest in python
2.6, but they are available in unittest2 which can be pip installed.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/645/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/645/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/645.diff",
"html_url": "https://github.com/psf/requests/pull/645",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/645.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/645"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1502951) (merged 54df76f0 into 355b9716).\n",
"Instead, I think we should just use the features available in Python 2.6, unless there's a good reason not to.\n",
"That could be a significant amount of effort.\n",
"Can you give an example?\n",
"Unfortunately I run 2.7 at home and can't test at the moment to see what specifically is incompatible with 2.6. I'll get back to you when I have some time at work to test on 2.6.\n\n## \n\nMichael Komitee\n\nOn Sunday, June 10, 2012 at 1:30 AM, Kenneth Reitz wrote:\n\n> Can you give an example?\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/pull/645#issuecomment-6226074\n"
] |
https://api.github.com/repos/psf/requests/issues/644
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/644/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/644/comments
|
https://api.github.com/repos/psf/requests/issues/644/events
|
https://github.com/psf/requests/issues/644
| 4,863,166 |
MDU6SXNzdWU0ODYzMTY2
| 644 |
Request digest-auth eats 4xx and 5xx response codes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/826?v=4",
"events_url": "https://api.github.com/users/mkomitee/events{/privacy}",
"followers_url": "https://api.github.com/users/mkomitee/followers",
"following_url": "https://api.github.com/users/mkomitee/following{/other_user}",
"gists_url": "https://api.github.com/users/mkomitee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mkomitee",
"id": 826,
"login": "mkomitee",
"node_id": "MDQ6VXNlcjgyNg==",
"organizations_url": "https://api.github.com/users/mkomitee/orgs",
"received_events_url": "https://api.github.com/users/mkomitee/received_events",
"repos_url": "https://api.github.com/users/mkomitee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mkomitee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mkomitee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mkomitee",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-06-01T19:06:51Z
|
2021-09-09T08:00:40Z
|
2012-06-05T08:29:05Z
|
CONTRIBUTOR
|
resolved
|
Presently, if you use the HTTPDigestAuth auth handler and authenticate successfully, but the resource you are requesting results in a 4xx or a 5xx error, the response object returned is always a 401.
I've tested this with a modified version of your httpbin web application (thanks for that) which allows me to set the desired status code on a successful digest authentication.
Testing this with every status code from 101 -> 599 yields the following (i skipped instances where redirects occurred correctly):
expected 400, got 401 - this is unexpected
expected 401, got 401 - while this status code is expected, it's the wrong 401. I captured the traffic on the wire and the headers sent in the 401 response do not match that which are present on the response object I get from requests.
expected 402-499, got 401 - this is unexpected
expected 500-599, got 401 - this is unexpected
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/644/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/644/timeline
| null |
completed
| null | null | false |
[
"FYI I noticed this when working on generating an HTTPKerberosAuth handler for requests. My code has the same problem and I'm not sure where the problem is coming from, within the handlers, or elsewhere.\n",
"I think this has to do with the dispatch_hook code. In hooks.py, you have the line:\n\n```\nhook_data = hook(hook_data) or hook_data\n```\n\nSince 400 and 500 level responses evaluate to False in a boolean context, we throw out the response returned by a hook if it's a 400 or 500 level response, and use the initial response that got passed into the dispatch_hook call. I'm not certain why you have that line, so I'm not 100% certain it's safe to change, but I suspect you want to test for None instead of truthiness.\n",
"I have a fix for this, but it breaks some tests:\n\ntest_DIGESTAUTH_WRONG_HTTP_401_GET complains because we are testing for 401's even though httpbin was actually returning a 403. I'll include an updated test for that.\n\nI don't see anything else that is broken by this change, but it's hard to tell because I can't run the full test suite even before I make this change. I get lots of errors (not failures) -- this is likely due to me using python 2.6 (work, ugh).\n",
"FYI, the errors I get when running the tests are all of the form:\n\n```\nTypeError: unicode() argument 2 must be string, not None¶\n```\n\nand\n\n```\nAttributeError: 'RequestsTestSuite' object has no attribute 'assertIn'\n```\n\nThe assertIn exception is because in python 2.6 assertIn isn't part of unittest, though it's available in unittest2. I'm going to include a commit in my pull request that opts to use unittest2 if it's available.\n",
"Actually correction on my update about test_DIGESTAUTH_WRONG_HTTP_401_GET. The test is correctly testing for 401, but the bug is actually with httpbin. It's returning a 403 on failed authentication. It should be returning a 401:\n\n```\n10.4.2 401 Unauthorized\n\nThe request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in \"HTTP Authentication: Basic and Digest Access Authentication\" [43].\n```\n\nvs\n\n```\n10.4.4 403 Forbidden\n\nThe server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.\n```\n",
"http://travis-ci.org/#!/kennethreitz/requests/builds/1533375 :)\n"
] |
https://api.github.com/repos/psf/requests/issues/643
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/643/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/643/comments
|
https://api.github.com/repos/psf/requests/issues/643/events
|
https://github.com/psf/requests/pull/643
| 4,818,132 |
MDExOlB1bGxSZXF1ZXN0MTQ1NjE3MQ==
| 643 |
Added information about HTTP proxy authentication to docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/105168?v=4",
"events_url": "https://api.github.com/users/dbrgn/events{/privacy}",
"followers_url": "https://api.github.com/users/dbrgn/followers",
"following_url": "https://api.github.com/users/dbrgn/following{/other_user}",
"gists_url": "https://api.github.com/users/dbrgn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbrgn",
"id": 105168,
"login": "dbrgn",
"node_id": "MDQ6VXNlcjEwNTE2OA==",
"organizations_url": "https://api.github.com/users/dbrgn/orgs",
"received_events_url": "https://api.github.com/users/dbrgn/received_events",
"repos_url": "https://api.github.com/users/dbrgn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbrgn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbrgn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbrgn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-30T15:36:33Z
|
2021-09-08T23:06:29Z
|
2012-05-30T19:48:33Z
|
CONTRIBUTOR
|
resolved
|
I added the following part to the docs ("Proxies" section):

|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/643/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/643/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/643.diff",
"html_url": "https://github.com/psf/requests/pull/643",
"merged_at": "2012-05-30T19:48:33Z",
"patch_url": "https://github.com/psf/requests/pull/643.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/643"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1478221) (merged d81dfe26 into 77a57c0e).\n",
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/642
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/642/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/642/comments
|
https://api.github.com/repos/psf/requests/issues/642/events
|
https://github.com/psf/requests/issues/642
| 4,781,522 |
MDU6SXNzdWU0NzgxNTIy
| 642 |
Is the redirect history consistent ?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1588733?v=4",
"events_url": "https://api.github.com/users/echomarat/events{/privacy}",
"followers_url": "https://api.github.com/users/echomarat/followers",
"following_url": "https://api.github.com/users/echomarat/following{/other_user}",
"gists_url": "https://api.github.com/users/echomarat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/echomarat",
"id": 1588733,
"login": "echomarat",
"node_id": "MDQ6VXNlcjE1ODg3MzM=",
"organizations_url": "https://api.github.com/users/echomarat/orgs",
"received_events_url": "https://api.github.com/users/echomarat/received_events",
"repos_url": "https://api.github.com/users/echomarat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/echomarat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/echomarat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/echomarat",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-28T14:58:36Z
|
2021-09-09T07:05:19Z
|
2012-07-27T05:51:11Z
|
NONE
|
resolved
|
I have written a small example to fetch http://www.google.com ( from France that is why there is a redirect )
So it seems the history is not really consistent or more exactly I would have expected the first redirect response object to have a value for the request.
Any thought? Is it bug ? In this case i can have a look to fix it or the expected behaviour?
```
urls = ["http://www.google.com"]
for url in urls:
print 'Fetching %s' % url
r = requests.get(url, prefetch=True)
history.append(r)
for r in history:
print r.request.url
print r.url
for redirected in r.history:
print redirected.request
print redirected.url
```
Output
http://www.google.com
http://www.google.fr/
None !!!!!
http://www.google.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/642/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/642/timeline
| null |
completed
| null | null | false |
[
"you should check `r.history`\n",
"This is what i use. If you look carefully to the line \"for redirected in r.history:\".\n"
] |
https://api.github.com/repos/psf/requests/issues/641
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/641/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/641/comments
|
https://api.github.com/repos/psf/requests/issues/641/events
|
https://github.com/psf/requests/pull/641
| 4,781,519 |
MDExOlB1bGxSZXF1ZXN0MTQ0MDIwMw==
| 641 |
fix for #630 - unquote_unreserved raising ValueError on invalid URI-esca...
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/359029?v=4",
"events_url": "https://api.github.com/users/mwielgoszewski/events{/privacy}",
"followers_url": "https://api.github.com/users/mwielgoszewski/followers",
"following_url": "https://api.github.com/users/mwielgoszewski/following{/other_user}",
"gists_url": "https://api.github.com/users/mwielgoszewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwielgoszewski",
"id": 359029,
"login": "mwielgoszewski",
"node_id": "MDQ6VXNlcjM1OTAyOQ==",
"organizations_url": "https://api.github.com/users/mwielgoszewski/orgs",
"received_events_url": "https://api.github.com/users/mwielgoszewski/received_events",
"repos_url": "https://api.github.com/users/mwielgoszewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwielgoszewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwielgoszewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwielgoszewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-28T14:58:25Z
|
2021-09-08T15:01:12Z
|
2012-05-29T23:55:04Z
|
CONTRIBUTOR
|
resolved
|
...pe sequences
Especially relevent to security testing, an HTTP client will be asked to send requests containing invalid uri-escape sequences. This raises a ValueError if an attempt is made to parse a string argument as a signed integer with radix 16. The method unquote_unreserved attempts to unquote any uri-escaped sequences in the unreserved character set. Because a uri-escaped character is hex-encoded, we can simply add a check to ensure the sequence is alphanumeric prior to parsing.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/641/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/641/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/641.diff",
"html_url": "https://github.com/psf/requests/pull/641",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/641.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/641"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1456398) (merged d60970ea into de1637c3).\n",
"Merge conflict, so added manually.\n\n---\n\nThanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/640
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/640/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/640/comments
|
https://api.github.com/repos/psf/requests/issues/640/events
|
https://github.com/psf/requests/pull/640
| 4,780,307 |
MDExOlB1bGxSZXF1ZXN0MTQzOTcxNw==
| 640 |
Small correction on a comment.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/919180?v=4",
"events_url": "https://api.github.com/users/JuhaS/events{/privacy}",
"followers_url": "https://api.github.com/users/JuhaS/followers",
"following_url": "https://api.github.com/users/JuhaS/following{/other_user}",
"gists_url": "https://api.github.com/users/JuhaS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JuhaS",
"id": 919180,
"login": "JuhaS",
"node_id": "MDQ6VXNlcjkxOTE4MA==",
"organizations_url": "https://api.github.com/users/JuhaS/orgs",
"received_events_url": "https://api.github.com/users/JuhaS/received_events",
"repos_url": "https://api.github.com/users/JuhaS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JuhaS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JuhaS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JuhaS",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-28T13:29:34Z
|
2021-09-08T15:01:11Z
|
2012-05-29T23:45:54Z
|
CONTRIBUTOR
|
resolved
|
self.encoding is accessed in text-property instead of content-property.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/640/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/640/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/640.diff",
"html_url": "https://github.com/psf/requests/pull/640",
"merged_at": "2012-05-29T23:45:54Z",
"patch_url": "https://github.com/psf/requests/pull/640.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/640"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1455797) (merged ba4cc326 into de1637c3).\n",
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/639
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/639/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/639/comments
|
https://api.github.com/repos/psf/requests/issues/639/events
|
https://github.com/psf/requests/issues/639
| 4,778,913 |
MDU6SXNzdWU0Nzc4OTEz
| 639 |
safe mode doesn't work when not returning response
|
{
"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"
}
|
[
{
"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 | 3 |
2012-05-28T11:28:42Z
|
2021-09-09T05:30:06Z
|
2012-12-18T20:15:20Z
|
NONE
|
resolved
|
``` python
from requests import get
if __name__ == '__main__':
invalid_url = 'http://_/'
req = get(invalid_url,
config=dict(safe_mode=True),
return_response=False)
res = req.send() # throws ConnectionError
```
The reason is catch_exceptions_if_in_safe_mode() decorates request() which calls Session.request() which does not call Request.send() when send_request is False which is the case with async requests. I guess we should decorate Request.send() not request()
See issue #583
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/639/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/639/timeline
| null |
completed
| null | null | false |
[
"We will also have to change the catch_exceptions_if_in_safe_mode decorator a bit, so that it can decorate a method rather than a function, but that shouldn't be difficult.\n",
"+1 for this @piotr-dobrogost requests fork fixes exceptions when using grequest\n",
"an obsolete request since safe_mode is removed in 1.0?\n"
] |
https://api.github.com/repos/psf/requests/issues/638
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/638/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/638/comments
|
https://api.github.com/repos/psf/requests/issues/638/events
|
https://github.com/psf/requests/pull/638
| 4,772,474 |
MDExOlB1bGxSZXF1ZXN0MTQzNjg3OA==
| 638 |
no_proxy support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/691049?v=4",
"events_url": "https://api.github.com/users/mher/events{/privacy}",
"followers_url": "https://api.github.com/users/mher/followers",
"following_url": "https://api.github.com/users/mher/following{/other_user}",
"gists_url": "https://api.github.com/users/mher/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mher",
"id": 691049,
"login": "mher",
"node_id": "MDQ6VXNlcjY5MTA0OQ==",
"organizations_url": "https://api.github.com/users/mher/orgs",
"received_events_url": "https://api.github.com/users/mher/received_events",
"repos_url": "https://api.github.com/users/mher/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mher/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mher/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mher",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-05-27T18:30:27Z
|
2021-09-08T15:01:12Z
|
2012-05-29T23:44:56Z
|
CONTRIBUTOR
|
resolved
|
Adds support for no_proxy environment variable
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/638/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/638/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/638.diff",
"html_url": "https://github.com/psf/requests/pull/638",
"merged_at": "2012-05-29T23:44:56Z",
"patch_url": "https://github.com/psf/requests/pull/638.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/638"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1449524) (merged b8561cda into de1637c3).\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1454295) (merged cb8f9756 into de1637c3).\n",
"This is great. Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/637
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/637/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/637/comments
|
https://api.github.com/repos/psf/requests/issues/637/events
|
https://github.com/psf/requests/issues/637
| 4,768,761 |
MDU6SXNzdWU0NzY4NzYx
| 637 |
Dict data is not being properly urlencoded
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[
{
"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 | 7 |
2012-05-27T00:01:10Z
|
2021-09-09T08:00:37Z
|
2012-06-15T18:32:14Z
|
NONE
|
resolved
|
I was trying to use FB Graph API and notice a little problem.
Consider the following example:
``` python
destination = 'https://graph.facebook.com/me/feed/'
info = {'access_token': '1234567890', 'message': 'TEST', 'privacy': {'friends': 'NO_FRIENDS', 'value': 'CUSTOM'}}
requests.post(destination, data=info)
```
The above example will be rejected by FB Api (error400).
At first, I thought it was a content-type problem, because of the default application/x-www-form-urlencoded
that requests set as content-type when post data is not a string.
So, I just change the above example to force content-type header to be None:
``` python
...
headers = {'content-type': None}
requests.post(destination, data=info, headers=headers)
```
But, since I'm not making info a string, requests keep trying to send a content-type=application/x-www-form-urlencoded
Recently, I've tried with success to mix urllib with requests and discover that
although I can't force a content-type header to be None (is this another issue?),
the problem with FB rejecting my Post is related with a wrong urlencoding of post data.
This is the example version which actually is working (and I'm using in my code):
```
import urllib
info = urllib.urlencode(info)
requests.post(destination, data=info, headers=headers) # profit
```
urllib.urlencode transform info into
'access_token=1234567890&message=TEST&privacy=%7B%27friends%27%3A+%27NO_FRIENDS%27%2C+%27value%27%3A+%27CUSTOM%27%7D'
and this string is correctly accepted as a post request by FB.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/637/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/637/timeline
| null |
completed
| null | null | false |
[
"If you set the value to `None`, we shouldn't be assigning it at all. This is a bug.\n\nThanks for finding it :)\n",
"So...\nAre you saying that the `headers = {'content-type': None}` being ignored is the proper Bug ?\n\nOr .. are you referering to both \"content-type\" being ignored AND data being not properly urlencoded\n as a whole bug ?\n\nThanks\n",
"The first :)\n",
"I see.\nI should investigate the causes on the next weekend \nand if anything useful has been found, propose some commits to your evaluation.\n",
"I just sent a pull request fixing the `content-type=None` issue described above.\n\nBut, requests still have some trouble trying to urlencode multi-dict data.\n\nFor example: \n\n``` python\ndata={'another_dict': {'a': 10, 'b':100}}\n```\n\nI'm having a little hard time trying to figure out if this is actually a bug\nor some design decision (let's say that: If you want a multi-dict data, then you should provide an already formatted\nurlencoded string rather than use the built-in urlencode feature, which should be only used to encoded form data).\n\nWhat are your thoughts on this ?\n",
"@rafaelmachado since we're handling headers as a case-insensitive dict, shouldn't you do `if v is not None and k.lower() != 'content-type'` instead?\n",
"Very true. You are probably trying to remember me about RFC2616 \n(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).\n\nThanks.\n"
] |
https://api.github.com/repos/psf/requests/issues/636
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/636/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/636/comments
|
https://api.github.com/repos/psf/requests/issues/636/events
|
https://github.com/psf/requests/issues/636
| 4,763,952 |
MDU6SXNzdWU0NzYzOTUy
| 636 |
Include rauth in docs.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/619795?v=4",
"events_url": "https://api.github.com/users/mahmoudhossam/events{/privacy}",
"followers_url": "https://api.github.com/users/mahmoudhossam/followers",
"following_url": "https://api.github.com/users/mahmoudhossam/following{/other_user}",
"gists_url": "https://api.github.com/users/mahmoudhossam/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mahmoudhossam",
"id": 619795,
"login": "mahmoudhossam",
"node_id": "MDQ6VXNlcjYxOTc5NQ==",
"organizations_url": "https://api.github.com/users/mahmoudhossam/orgs",
"received_events_url": "https://api.github.com/users/mahmoudhossam/received_events",
"repos_url": "https://api.github.com/users/mahmoudhossam/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mahmoudhossam/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mahmoudhossam/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mahmoudhossam",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-05-26T03:22:16Z
|
2021-09-09T08:00:37Z
|
2012-06-15T18:32:59Z
|
CONTRIBUTOR
|
resolved
|
[Rauth](https://github.com/litl/rauth) should be included in the [modules](http://docs.python-requests.org/en/latest/community/out-there/#modules) section.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/636/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/636/timeline
| null |
completed
| null | null | false |
[
"+10. You should send a pull request :)\n"
] |
https://api.github.com/repos/psf/requests/issues/635
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/635/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/635/comments
|
https://api.github.com/repos/psf/requests/issues/635/events
|
https://github.com/psf/requests/issues/635
| 4,754,780 |
MDU6SXNzdWU0NzU0Nzgw
| 635 |
Unable to POST data and files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/46565?v=4",
"events_url": "https://api.github.com/users/acdha/events{/privacy}",
"followers_url": "https://api.github.com/users/acdha/followers",
"following_url": "https://api.github.com/users/acdha/following{/other_user}",
"gists_url": "https://api.github.com/users/acdha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/acdha",
"id": 46565,
"login": "acdha",
"node_id": "MDQ6VXNlcjQ2NTY1",
"organizations_url": "https://api.github.com/users/acdha/orgs",
"received_events_url": "https://api.github.com/users/acdha/received_events",
"repos_url": "https://api.github.com/users/acdha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/acdha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/acdha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/acdha",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-25T14:44:04Z
|
2021-09-09T08:00:38Z
|
2012-06-15T18:29:06Z
|
CONTRIBUTOR
|
resolved
|
I found a logic error while doing something experimental:
If you call `requests.post(data="urlencoded string")`, everything works.
If you call `requests.post(data="urlencoded string", files=<dict>)`, requests will raise a `ValueError` in `_encode_files`:
https://github.com/kennethreitz/requests/blob/develop/requests/models.py#L349
By that time `str` in the local scope is actually `unicode`, so the `isinstance` check fails. It seems like this should either be `isinstance(self.data, basestring)` or simply raise something like `TypeError` to indicate that attempting to send both a pre-encoded string and files is pointless and should not be done.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/635/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/635/timeline
| null |
completed
| null | null | false |
[
"+1 for `(TypeError, RequestsException)`\n",
"`data=<dict>, files=<dict>` should work fine. \n\nI don't think injecting content into a fully-provided request body is a good idea. Feel free to re-open if I misunderstand.\n"
] |
https://api.github.com/repos/psf/requests/issues/634
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/634/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/634/comments
|
https://api.github.com/repos/psf/requests/issues/634/events
|
https://github.com/psf/requests/issues/634
| 4,748,821 |
MDU6SXNzdWU0NzQ4ODIx
| 634 |
add no_proxy environment support as in urllib ?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/291129?v=4",
"events_url": "https://api.github.com/users/jwfang/events{/privacy}",
"followers_url": "https://api.github.com/users/jwfang/followers",
"following_url": "https://api.github.com/users/jwfang/following{/other_user}",
"gists_url": "https://api.github.com/users/jwfang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jwfang",
"id": 291129,
"login": "jwfang",
"node_id": "MDQ6VXNlcjI5MTEyOQ==",
"organizations_url": "https://api.github.com/users/jwfang/orgs",
"received_events_url": "https://api.github.com/users/jwfang/received_events",
"repos_url": "https://api.github.com/users/jwfang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jwfang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jwfang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jwfang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-05-25T07:07:38Z
|
2021-09-09T08:00:41Z
|
2012-05-31T05:27:46Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/634/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/634/timeline
| null |
completed
| null | null | false |
[
"We should support this.\n",
"Pull request: https://github.com/kennethreitz/requests/pull/638\n\n[Didn't know that this bug was being worked on, until I saw the pull request. I am putting the link here so that others can see it too]\n",
"Ah, this has been released :)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/633
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/633/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/633/comments
|
https://api.github.com/repos/psf/requests/issues/633/events
|
https://github.com/psf/requests/pull/633
| 4,725,076 |
MDExOlB1bGxSZXF1ZXN0MTQxNzY4OQ==
| 633 |
poor man's patch for issue #630
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7790?v=4",
"events_url": "https://api.github.com/users/zuriby/events{/privacy}",
"followers_url": "https://api.github.com/users/zuriby/followers",
"following_url": "https://api.github.com/users/zuriby/following{/other_user}",
"gists_url": "https://api.github.com/users/zuriby/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zuriby",
"id": 7790,
"login": "zuriby",
"node_id": "MDQ6VXNlcjc3OTA=",
"organizations_url": "https://api.github.com/users/zuriby/orgs",
"received_events_url": "https://api.github.com/users/zuriby/received_events",
"repos_url": "https://api.github.com/users/zuriby/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zuriby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zuriby/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zuriby",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-05-24T03:18:20Z
|
2021-09-08T15:01:11Z
|
2012-05-29T23:51:48Z
|
CONTRIBUTOR
|
resolved
|
```
this try catch is a poor man's patch for issue #630
https://github.com/kennethreitz/requests/issues/630
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/633/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/633/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/633.diff",
"html_url": "https://github.com/psf/requests/pull/633",
"merged_at": "2012-05-29T23:51:48Z",
"patch_url": "https://github.com/psf/requests/pull/633.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/633"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1418645) (merged 7125fe55 into de1637c3).\n",
"Thanks!\n",
"Hey Kenneth, I would recommend against wrapping the whole method within a try/except ValueError block. I think my pull request #641 should be sufficient in addressing @tzuryby's issue. If there is another edge case that would raise an exception here, it would be valuable for us to understand why it did so. Catching the exception and continuing would prevent us or the developer from even knowing there was an issue with the URI.\n",
"> I would recommend against wrapping the whole method within a try/except ValueError block\n\nAgree.\n",
"that's a far better fix than my catch-all approach, no doubt.\nthat's why I called it \"poor man's patch..\" ;-)\n"
] |
https://api.github.com/repos/psf/requests/issues/632
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/632/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/632/comments
|
https://api.github.com/repos/psf/requests/issues/632/events
|
https://github.com/psf/requests/pull/632
| 4,721,047 |
MDExOlB1bGxSZXF1ZXN0MTQxNTYyMA==
| 632 |
Issue #505: Changed the store_cookie configuration to be part of the conig dict, instead of being a new argument
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/65202?v=4",
"events_url": "https://api.github.com/users/amalakar/events{/privacy}",
"followers_url": "https://api.github.com/users/amalakar/followers",
"following_url": "https://api.github.com/users/amalakar/following{/other_user}",
"gists_url": "https://api.github.com/users/amalakar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/amalakar",
"id": 65202,
"login": "amalakar",
"node_id": "MDQ6VXNlcjY1MjAy",
"organizations_url": "https://api.github.com/users/amalakar/orgs",
"received_events_url": "https://api.github.com/users/amalakar/received_events",
"repos_url": "https://api.github.com/users/amalakar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/amalakar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amalakar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/amalakar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-05-23T21:14:10Z
|
2021-09-08T15:01:11Z
|
2012-05-29T23:41:39Z
|
CONTRIBUTOR
|
resolved
|
Hi,
Reforked the repository to do away with the git mess I had created. Hope this works this time.
Thanks,
Arup
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/632/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/632/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/632.diff",
"html_url": "https://github.com/psf/requests/pull/632",
"merged_at": "2012-05-29T23:41:39Z",
"patch_url": "https://github.com/psf/requests/pull/632.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/632"
}
| true |
[
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1416011) (merged b2867336 into de1637c3).\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1416113) (merged 4a309796 into de1637c3).\n",
"Hi @kennethreitz,\n\nAny update on this pull request? I understand if you are busy with other things.\nJus trying to \"bug the maintainer\" :) \n\nAlso let me know if this requires any other change.\n\nThanks,\nArup \n",
"@amalakar :cake: :)\n",
"This is perfect. Exciting :)\n",
"Yay! Thanks @kennethreitz for the encouraging words. We can close Issue #505 now. I need to find the next bug to fix now. Feel free to assign/recommend something :)\n"
] |
https://api.github.com/repos/psf/requests/issues/631
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/631/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/631/comments
|
https://api.github.com/repos/psf/requests/issues/631/events
|
https://github.com/psf/requests/pull/631
| 4,718,597 |
MDExOlB1bGxSZXF1ZXN0MTQxNDM0OQ==
| 631 |
Add openSUSE bundle paths
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1350280?v=4",
"events_url": "https://api.github.com/users/jimfunk/events{/privacy}",
"followers_url": "https://api.github.com/users/jimfunk/followers",
"following_url": "https://api.github.com/users/jimfunk/following{/other_user}",
"gists_url": "https://api.github.com/users/jimfunk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jimfunk",
"id": 1350280,
"login": "jimfunk",
"node_id": "MDQ6VXNlcjEzNTAyODA=",
"organizations_url": "https://api.github.com/users/jimfunk/orgs",
"received_events_url": "https://api.github.com/users/jimfunk/received_events",
"repos_url": "https://api.github.com/users/jimfunk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jimfunk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jimfunk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jimfunk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-23T19:08:21Z
|
2021-09-08T15:01:10Z
|
2012-05-23T20:40:49Z
|
NONE
|
resolved
|
Also use the preferred directory-based certificate store if supported by the SSL module (openSUSE 12.2+)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1350280?v=4",
"events_url": "https://api.github.com/users/jimfunk/events{/privacy}",
"followers_url": "https://api.github.com/users/jimfunk/followers",
"following_url": "https://api.github.com/users/jimfunk/following{/other_user}",
"gists_url": "https://api.github.com/users/jimfunk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jimfunk",
"id": 1350280,
"login": "jimfunk",
"node_id": "MDQ6VXNlcjEzNTAyODA=",
"organizations_url": "https://api.github.com/users/jimfunk/orgs",
"received_events_url": "https://api.github.com/users/jimfunk/received_events",
"repos_url": "https://api.github.com/users/jimfunk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jimfunk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jimfunk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jimfunk",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/631/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/631/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/631.diff",
"html_url": "https://github.com/psf/requests/pull/631",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/631.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/631"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1414508) (merged 73b5cab9 into de1637c3).\n",
"Didn't realize there was already an open request. Closing\n"
] |
https://api.github.com/repos/psf/requests/issues/630
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/630/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/630/comments
|
https://api.github.com/repos/psf/requests/issues/630/events
|
https://github.com/psf/requests/issues/630
| 4,710,270 |
MDU6SXNzdWU0NzEwMjcw
| 630 |
invalid literal for int() error for complex URIs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7790?v=4",
"events_url": "https://api.github.com/users/zuriby/events{/privacy}",
"followers_url": "https://api.github.com/users/zuriby/followers",
"following_url": "https://api.github.com/users/zuriby/following{/other_user}",
"gists_url": "https://api.github.com/users/zuriby/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zuriby",
"id": 7790,
"login": "zuriby",
"node_id": "MDQ6VXNlcjc3OTA=",
"organizations_url": "https://api.github.com/users/zuriby/orgs",
"received_events_url": "https://api.github.com/users/zuriby/received_events",
"repos_url": "https://api.github.com/users/zuriby/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zuriby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zuriby/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zuriby",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-05-23T12:29:01Z
|
2021-09-09T08:00:41Z
|
2012-05-29T23:53:31Z
|
CONTRIBUTOR
|
resolved
|
I am using requests to perform security tests against my site (in this case, a simple sql-injection vector) and getting
error (dumped below) which points to `unquote_unreserved` function.
see below
snippets of my code:
```
# tuple structure:
# (path, data, headers, cookies, files)
(r"""/default.asp?id=1+AND+1=(SELECT+TOP+1+1+FROM+information_schema.tables+WHERE+TABLE_SCHEMA="blind_sqli"+and+table_name+NOT+IN+(+SELECT+TOP+1+table_name+FROM+information_schema.tables)+and+table_name+LIKE+'[a-z]%'+)""", {}, {}, {}, {})
...
requests.get(options.host + path, data=data, headers=headers, cookies=cookies, files=files)...
```
The exception dumps
```2012-05-23 15:10:15,330 - ERROR - invalid literal for int() with base 16: "'+"
Traceback (most recent call last):
File "sqli.py", line 460, in run_case
return fetch[method](options.host + path, data=data, headers=headers, cookies=cookies, files=files).status_code
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 52, in get
return request('get', url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 40, in request
return s.request(method=method, url=url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 229, in request
r.send(prefetch=prefetch)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 468, in send
url = self.full_url
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 411, in full_url
url = requote_uri(url)
File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 448, in requote_uri
return quote(unquote_unreserved(uri), safe="!#$%&'()*+,/:;=?@[]~")
File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 429, in unquote_unreserved
c = chr(int(h, 16))
ValueError: invalid literal for int() with base 16: "'+"
```
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/630/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/630/timeline
| null |
completed
| null | null | false |
[
"btw, this is my quick hack\n\n```\n\ndef unquote_unreserved(uri):\n try:\n \"\"\"Un-escape any percent-escape sequences in a URI that are unreserved\n characters.\n This leaves all reserved, illegal and non-ASCII bytes encoded.\n \"\"\"\n parts = uri.split('%')\n for i in range(1, len(parts)):\n h = parts[i][0:2]\n if len(h) == 2:\n c = chr(int(h, 16))\n if c in UNRESERVED_SET:\n parts[i] = c + parts[i][2:]\n else:\n parts[i] = '%' + parts[i]\n else:\n parts[i] = '%' + parts[i]\n return ''.join(parts)\n except:\n return uri\n```\n",
"@tzuryby so make a pullrequest !\n"
] |
https://api.github.com/repos/psf/requests/issues/629
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/629/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/629/comments
|
https://api.github.com/repos/psf/requests/issues/629/events
|
https://github.com/psf/requests/pull/629
| 4,710,222 |
MDExOlB1bGxSZXF1ZXN0MTQxMDU0Ng==
| 629 |
Add openSUSE certificate support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/115275?v=4",
"events_url": "https://api.github.com/users/saschpe/events{/privacy}",
"followers_url": "https://api.github.com/users/saschpe/followers",
"following_url": "https://api.github.com/users/saschpe/following{/other_user}",
"gists_url": "https://api.github.com/users/saschpe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saschpe",
"id": 115275,
"login": "saschpe",
"node_id": "MDQ6VXNlcjExNTI3NQ==",
"organizations_url": "https://api.github.com/users/saschpe/orgs",
"received_events_url": "https://api.github.com/users/saschpe/received_events",
"repos_url": "https://api.github.com/users/saschpe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saschpe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saschpe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saschpe",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 21 |
2012-05-23T12:25:40Z
|
2021-09-08T23:01:14Z
|
2012-06-29T00:26:30Z
|
CONTRIBUTOR
|
resolved
|
openSUSE ships Mozilla CA certificates in a directory (/etc/ssl/certs) and for compatibility as a bundled pem (/etc/ssl/ca-bundle.pem), the first is preferred though. This patch adds support for both, i.e. if a path is found in POSSIBLE_CA_BUNDLE_PATHS, it checks whether the ssl module supports it. Otherwise, the pem file is used (listed after '/etc/ssl/certs' in POSSIBLE_CA_BUNDLE_PATHS).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/629/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/629/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/629.diff",
"html_url": "https://github.com/psf/requests/pull/629",
"merged_at": "2012-06-29T00:26:30Z",
"patch_url": "https://github.com/psf/requests/pull/629.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/629"
}
| true |
[
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1410438) (merged b22088fd into de1637c3).\n",
"Looks good to me. Cool!\n",
"Actually is it possible to do this using the public `ssl` API, e.g., `ssl.wrap_socket` instead of `_ssl.sslwrap`?\n",
"ssl.wrap_socket expects 'keyfile' and 'certfile', you can't pass a directory. AFAICS, the situation will improve with Python-3.3, where the ssl module will pick OS defaults by itself: http://bugs.python.org/issue14780\n",
"Sounds good to me.\n",
"Actually, wait, I think this is not going to work, because `urllib3` uses `ssl.wrap_socket`, not `_ssl.sslwrap`. So if `wrap_socket` does not understand directories, then our code will not either.\n\nSee `VerifiedHTTPSConnection` in this file: `requests/packages/urllib3/connectionpool.py`.\n",
"So be it, then the fallback file is used\n",
"Well, it seems like there are two possibilities:\n1. `ssl.wrap_socket` supports (without documentation) passing a directory instead of a file as its `ca_certs` parameter. In that case, this patch is correct, except that it should use `ssl.wrap_socket` instead of `_ssl.sslwrap` (since that is a more accurate test of whether Requests will work with CA certificate directories).\n2. `ssl.wrap_socket` does not support this, despite the backing function `_ssl.sslwrap` supporting it. In that case, there is no hope of Requests ever being able to use a certificate directory, and this patch should just be the one-line addition of `/etc/ssl/ca-bundle.pem` as a possible CA certificate bundle file.\n\nHave you observed Requests to work correctly with `/etc/ssl/certs` on your system?\n\nThanks for your patience by the way :-)\n",
"Hi, sorry for the delay, I did the following to test it:\n\n``` python\n>>> import ssl,socket,pprint\n>>> ssl_sock = ssl.wrap_socket(s,cert_reqs=ssl.CERT_REQUIRED,ca_certs='/etc/ssl/certs')\n>>> ssl_sock.connect(('www.verisign.com', 443))\n>>> print repr(ssl_sock.getpeername())\n('69.58.181.89', 443)\n>>> print ssl_sock.cipher()\n('DHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)\n>>> print pprint.pformat(ssl_sock.getpeercert())\n{'notAfter': 'May 17 23:59:59 2014 GMT',\n 'subject': ((('1.3.6.1.4.1.311.60.2.1.3', u'US'),),\n (('1.3.6.1.4.1.311.60.2.1.2', u'Delaware'),),\n (('businessCategory', u'Private Organization'),),\n (('serialNumber', u'2158113'),),\n (('countryName', u'US'),),\n (('postalCode', u'94043'),),\n (('stateOrProvinceName', u'California'),),\n (('localityName', u'Mountain View'),),\n (('streetAddress', u'350 Ellis Street'),),\n (('organizationName', u'Symantec Corporation'),),\n (('organizationalUnitName', u'Infrastructure Operations'),),\n (('commonName', u'www.verisign.com'),)),\n 'subjectAltName': (('DNS', 'verisign.com'),\n ('DNS', 'www.verisign.net'),\n ('DNS', 'verisign.net'),\n ('DNS', 'www.verisign.mobi'),\n ('DNS', 'verisign.mobi'),\n ('DNS', 'www.verisign.eu'),\n ('DNS', 'verisign.eu'),\n ('DNS', 'www.verisign.com'))}\n>>> ssl_sock.write(\"\"\"GET / HTTP/1.0\\rHOST: www.verisign.com\\r\\n\\r\\n\"\"\")\n41\n>>> data = ssl_sock.read()\n>>> data\n'HTTP/1.1 301 Moved Permanently\\r\\nDate: Wed, 06 Jun 2012 14:51:17 GMT\\r\\nServer: Apache\\r\\nLocation: https://www.verisign.com/\\r\\nCac\nhe-Control: max-age=2592000\\r\\nExpires: Fri, 06 Jul 2012 14:51:17 GMT\\r\\nVary: Accept-Encoding\\r\\nContent-Length: 233\\r\\nConnection: c\nlose\\r\\nContent-Type: text/html; charset=iso-8859-1\\r\\n\\r\\n'\n>>> ssl_sock.ca_certs\n'/etc/ssl/certs'\n>>> ssl_sock.close()\n```\n\nSo, I assume \"1.\"\n\nChanging the check to ssl.wrap_socket won't change much, ssl.SSLSocket (returned by ssl.wrap_socket) uses _ssl.sslwrap internally (have a look at /usr/lib64/python2.7/ssl.py). \n\nFinally, requests.models.Request has \"conn.ca_certs = cert_loc = DEFAULT_CA_BUNDLE_PATH\", thus passing a path works for me ;-)\n",
"Excellent, I believe that 1 is in fact the case.\n\nI would greatly prefer it if the patch could use `ssl.wrap_socket` instead of `_ssl.sslwrap`, though, for the following reasons:\n1. The behavior that Requests will actually take advantage of is the ability of `ssl.wrap_socket` to use a directory as its `ca_certs`, so it is a more direct test of the required functionality\n2. Since `_ssl.sslwrap` is not part of the public API, it's possible (although unlikely) that it might be renamed or moved in future. It seems much better to use undocumented behavior of the public API than to use an (also undocumented) private API.\n\nThe intended meaning of `DEFAULT_CA_BUNDLE_PATH` was \"fully qualified path\", not \"a directory as opposed to a file\" :-)\n\nThanks again! Sorry about the delay, I think I missed the GitHub notification.\n",
"I agree that using ssl.wrap_socket would be much better. However, ssl.wrap_socket does not complain about invalid parameters (by throwing an SSLError exception like _ssl.sslwrap), only ssl.SSLSocket.connect() does. So, doing the check with ssl.wrap_socket would actually include a real request, e.g. like this:\n\n``` diff\n--- a/requests/utils.py\n+++ b/requests/utils.py\n@@ -15,7 +15,6 @@ import os\n import re\n import socket\n import ssl\n-import _ssl\n import zlib\n from netrc import netrc, NetrcParseError\n\n@@ -57,7 +56,9 @@ def get_os_ca_bundle_path():\n if os.path.isdir(path):\n try:\n # Current candidate is a directory, check if SSL module supports that\n- _ssl.sslwrap(socket.socket()._sock, False, None, None, ssl.CERT_REQUIRED, ssl.PROTOCOL_SSLv23, path, None)\n+ ssl.wrap_socket(socket.socket(),cert_reqs=ssl.CERT_REQUIRED,ca_certs=path)\n+ ssl_sock.connect(('www.verisign.com', 443))\n+\n return path\n except:\n pass # No support, let's check the next candidate\n```\n\nI don't think this is really desired but I don't see any other way to it ATM. What do you think? \n",
"I'm sorry I'm such a pedant, but the use of `_ssl` still makes me uncomfortable. If you're continuing to ship `/etc/ssl/ca-bundle.pem` for compatibility, could we just use that?\n",
"Yes, that would be an options for the time being and in order to get this solved, I'll provide a stripped down patch, deal? But this may become an issue again, as /etc/ssl/ca-bundle.pem is long time deprecated ;-)\n",
"Deal.\n",
"There you go, I updated the commit\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1626932) (merged 14e22d14 into 08ac9897).\n",
"This pull request [fails](http://travis-ci.org/kennethreitz/requests/builds/1627258) (merged 66ef8886 into 08ac9897).\n",
"travisbot is crap\n",
"Travisbot is wonderful, my tests are broken :)\n",
"This pull request [passes](http://travis-ci.org/kennethreitz/requests/builds/1734043) (merged 66ef8886 into 08ac9897).\n",
"Thanks!\n"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.