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/3529 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3529/labels{/name} | https://api.github.com/repos/psf/requests/issues/3529/comments | https://api.github.com/repos/psf/requests/issues/3529/events | https://github.com/psf/requests/issues/3529 | 172,528,973 | MDU6SXNzdWUxNzI1Mjg5NzM= | 3,529 | Timeout After 301 Redirect Works Strangely | {
"avatar_url": "https://avatars.githubusercontent.com/u/1082756?v=4",
"events_url": "https://api.github.com/users/haydenth/events{/privacy}",
"followers_url": "https://api.github.com/users/haydenth/followers",
"following_url": "https://api.github.com/users/haydenth/following{/other_user}",
"gists_url": "https://api.github.com/users/haydenth/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haydenth",
"id": 1082756,
"login": "haydenth",
"node_id": "MDQ6VXNlcjEwODI3NTY=",
"organizations_url": "https://api.github.com/users/haydenth/orgs",
"received_events_url": "https://api.github.com/users/haydenth/received_events",
"repos_url": "https://api.github.com/users/haydenth/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haydenth/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haydenth/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haydenth",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-22T19:03:29Z | 2021-09-08T16:00:27Z | 2016-08-22T22:15:47Z | NONE | resolved | Hello friends! Having a small issue with timeouts from URLs after they throw us an HTTP 301 to a bad address. Here's an example script and what happens when I run it (hopefully the offending URL remains offending for you to test, I do not own the domain)
```
import requests
import logging
logging.basicConfig(level=logging.INFO)
url = 'https://blog.uplabs.com/feed'
req = requests.get(url, timeout=1)
```
Then I run this:
```
Thomass-MacBook-Air ~/bug $ time python test.py
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): blog.uplabs.com
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): blog.uplabs.com
Traceback (most recent call last):
File "test.py", line 7, in <module>
req = requests.get(url, timeout=1)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 617, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 177, in resolve_redirects
**adapter_kwargs
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 479, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='blog.uplabs.com', port=3001): Max retries exceeded with url: /feed/ (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10bcb43d0>, 'Connection to blog.uplabs.com timed out. (connect timeout=1)'))
real 0m13.104s
user 0m0.149s
sys 0m0.098s
```
My question - it does appear to be timing out, but shouldn't it be timing out much quicker? I'm giving a timeout of 1 but it appears to be taking 13 seconds for the entire script to run. It appears the original host is 301ing me to a weird port number but I think the timeout behavior should continue to apply.
If I increase timeout to 2 seconds, it takes 24 seconds:
```
real 0m24.626s
user 0m0.155s
sys 0m0.099s
```
and 3 second timeout takes 36 seconds. So it appears to be compounding?
```
real 0m37.152s
user 0m0.156s
sys 0m0.108s
```
Is there an additional setting I am missing or case I should deal with? Using requests 2.11
```
>>> import requests
>>> requests.__version__
'2.11.1'
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3529/reactions"
} | https://api.github.com/repos/psf/requests/issues/3529/timeline | null | completed | null | null | false | [
"I should add, when I change log level to debug, you can see the 301\n\n```\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): blog.uplabs.com\nDEBUG:requests.packages.urllib3.connectionpool:\"GET /feed HTTP/1.1\" 301 178\nINFO:requests.packages.urllib3.connectionpool:Starting new HTT... |
https://api.github.com/repos/psf/requests/issues/3528 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3528/labels{/name} | https://api.github.com/repos/psf/requests/issues/3528/comments | https://api.github.com/repos/psf/requests/issues/3528/events | https://github.com/psf/requests/issues/3528 | 172,512,777 | MDU6SXNzdWUxNzI1MTI3Nzc= | 3,528 | Stuck on request when changing proxy while inside a session | {
"avatar_url": "https://avatars.githubusercontent.com/u/14364371?v=4",
"events_url": "https://api.github.com/users/Metasploitable/events{/privacy}",
"followers_url": "https://api.github.com/users/Metasploitable/followers",
"following_url": "https://api.github.com/users/Metasploitable/following{/other_user}",
"gists_url": "https://api.github.com/users/Metasploitable/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Metasploitable",
"id": 14364371,
"login": "Metasploitable",
"node_id": "MDQ6VXNlcjE0MzY0Mzcx",
"organizations_url": "https://api.github.com/users/Metasploitable/orgs",
"received_events_url": "https://api.github.com/users/Metasploitable/received_events",
"repos_url": "https://api.github.com/users/Metasploitable/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Metasploitable/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Metasploitable/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Metasploitable",
"user_view_type": "public"
} | [
{
"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"
},
{
"color": "fef2c0",
"default": false,
"description": ... | closed | true | null | [] | null | 7 | 2016-08-22T17:47:40Z | 2021-09-08T08:00:29Z | 2017-07-30T00:15:08Z | NONE | resolved | Hi,
I've been tinkering with the following issue for the last couple of days and boy it was frustrating.. The issue is not being able to sent requests after you've changed your external IP adress while inside a sesison. It took me a while to figure this out.
Like I said the problem only excist if you're inside a session for some reason the requests are just stuck, for ever. I tested the same thing without a session and that works just fine.
| {
"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/3528/reactions"
} | https://api.github.com/repos/psf/requests/issues/3528/timeline | null | completed | null | null | false | [
"When you say \"changed your external IP address\", what exactly do you mean?\n",
"Hi,\n\nI've written a script which I use on my Raspberry Pi plugged with 3G modem. So I use the 3G modem to connect and make requests. I've also written a script that changes the external IP adress of the modem. It's like a proxy s... |
https://api.github.com/repos/psf/requests/issues/3527 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3527/labels{/name} | https://api.github.com/repos/psf/requests/issues/3527/comments | https://api.github.com/repos/psf/requests/issues/3527/events | https://github.com/psf/requests/pull/3527 | 172,341,964 | MDExOlB1bGxSZXF1ZXN0ODIxMTc0NTc= | 3,527 | 3518 Bug Fix and Response Header to Python equivalents | {
"avatar_url": "https://avatars.githubusercontent.com/u/12104977?v=4",
"events_url": "https://api.github.com/users/michelsch/events{/privacy}",
"followers_url": "https://api.github.com/users/michelsch/followers",
"following_url": "https://api.github.com/users/michelsch/following{/other_user}",
"gists_url": "https://api.github.com/users/michelsch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michelsch",
"id": 12104977,
"login": "michelsch",
"node_id": "MDQ6VXNlcjEyMTA0OTc3",
"organizations_url": "https://api.github.com/users/michelsch/orgs",
"received_events_url": "https://api.github.com/users/michelsch/received_events",
"repos_url": "https://api.github.com/users/michelsch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michelsch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michelsch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michelsch",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-21T21:16:57Z | 2021-09-08T03:00:46Z | 2016-08-21T22:21:13Z | NONE | resolved | I'm fairly new to open source contributions, so any feedback is appreciated. This PR
1) Addresses issue #3518 by iterating over ALL_PROXY last.
2) Elaborates some of the most commonly used response headers into their corresponding Python equivalents for convenience, namely r.date() and r.last_modified() return datetime objects and r.content_length() and r.age() return ints when possible, None otherwise
3) Added corresponding tests for the above
| {
"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/3527/reactions"
} | https://api.github.com/repos/psf/requests/issues/3527/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3527.diff",
"html_url": "https://github.com/psf/requests/pull/3527",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3527.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3527"
} | true | [
"Thanks for this @michelsch92!\n\nSome notes. Firstly, I'm afraid to say that #3518 was already resolved by #3527. I'm sorry about that, the timing was just a bit unlucky.\n\nSecondly, the response helpers, I think we don't want to put them into the core requests library itself. Generally speaking we try to keep th... |
https://api.github.com/repos/psf/requests/issues/3526 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3526/labels{/name} | https://api.github.com/repos/psf/requests/issues/3526/comments | https://api.github.com/repos/psf/requests/issues/3526/events | https://github.com/psf/requests/pull/3526 | 172,329,895 | MDExOlB1bGxSZXF1ZXN0ODIxMTA1NzA= | 3,526 | Fixed bug to give scheme proxy priority over "all" | {
"avatar_url": "https://avatars.githubusercontent.com/u/1097666?v=4",
"events_url": "https://api.github.com/users/sentientcucumber/events{/privacy}",
"followers_url": "https://api.github.com/users/sentientcucumber/followers",
"following_url": "https://api.github.com/users/sentientcucumber/following{/other_user}",
"gists_url": "https://api.github.com/users/sentientcucumber/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sentientcucumber",
"id": 1097666,
"login": "sentientcucumber",
"node_id": "MDQ6VXNlcjEwOTc2NjY=",
"organizations_url": "https://api.github.com/users/sentientcucumber/orgs",
"received_events_url": "https://api.github.com/users/sentientcucumber/received_events",
"repos_url": "https://api.github.com/users/sentientcucumber/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sentientcucumber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sentientcucumber/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sentientcucumber",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-08-21T16:59:04Z | 2021-09-08T03:00:46Z | 2016-08-21T22:17:31Z | NONE | resolved | Addresses bug called out in issue #3518.
| {
"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/3526/reactions"
} | https://api.github.com/repos/psf/requests/issues/3526/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3526.diff",
"html_url": "https://github.com/psf/requests/pull/3526",
"merged_at": "2016-08-21T22:17:31Z",
"patch_url": "https://github.com/psf/requests/pull/3526.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3526"
} | true | [
"This seems reasonable to me. @Lukasa thoughts?\n",
"This looks really good to me, I'm totally happy with it! Thanks so much @shellhead! :sparkles: :cake: :sparkles:\n",
"Shouldn't this line also be swapped to close out this issue? https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L229\n... |
https://api.github.com/repos/psf/requests/issues/3525 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3525/labels{/name} | https://api.github.com/repos/psf/requests/issues/3525/comments | https://api.github.com/repos/psf/requests/issues/3525/events | https://github.com/psf/requests/issues/3525 | 172,265,800 | MDU6SXNzdWUxNzIyNjU4MDA= | 3,525 | Can I change the default headers? | {
"avatar_url": "https://avatars.githubusercontent.com/u/553215?v=4",
"events_url": "https://api.github.com/users/KiritoStudio/events{/privacy}",
"followers_url": "https://api.github.com/users/KiritoStudio/followers",
"following_url": "https://api.github.com/users/KiritoStudio/following{/other_user}",
"gists_url": "https://api.github.com/users/KiritoStudio/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KiritoStudio",
"id": 553215,
"login": "KiritoStudio",
"node_id": "MDQ6VXNlcjU1MzIxNQ==",
"organizations_url": "https://api.github.com/users/KiritoStudio/orgs",
"received_events_url": "https://api.github.com/users/KiritoStudio/received_events",
"repos_url": "https://api.github.com/users/KiritoStudio/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KiritoStudio/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KiritoStudio/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KiritoStudio",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-20T10:58:33Z | 2021-09-08T16:00:27Z | 2016-08-20T11:07:33Z | NONE | resolved | I want to remove the user-agent from my request, but I can't find a way after I check the requests source code. Need help!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/553215?v=4",
"events_url": "https://api.github.com/users/KiritoStudio/events{/privacy}",
"followers_url": "https://api.github.com/users/KiritoStudio/followers",
"following_url": "https://api.github.com/users/KiritoStudio/following{/other_user}",
"gists_url": "https://api.github.com/users/KiritoStudio/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KiritoStudio",
"id": 553215,
"login": "KiritoStudio",
"node_id": "MDQ6VXNlcjU1MzIxNQ==",
"organizations_url": "https://api.github.com/users/KiritoStudio/orgs",
"received_events_url": "https://api.github.com/users/KiritoStudio/received_events",
"repos_url": "https://api.github.com/users/KiritoStudio/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KiritoStudio/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KiritoStudio/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KiritoStudio",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3525/reactions"
} | https://api.github.com/repos/psf/requests/issues/3525/timeline | null | completed | null | null | false | [
"```\ns = Session()\ns.headers.pop('User-Agent')\n```\n\nAbove code would help.\n"
] |
https://api.github.com/repos/psf/requests/issues/3524 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3524/labels{/name} | https://api.github.com/repos/psf/requests/issues/3524/comments | https://api.github.com/repos/psf/requests/issues/3524/events | https://github.com/psf/requests/issues/3524 | 171,966,791 | MDU6SXNzdWUxNzE5NjY3OTE= | 3,524 | 2.11.1: Using OrderedDict to order headers on session doesn't allow new headers to be added during later request:s | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-18T18:19:46Z | 2021-09-08T16:00:24Z | 2016-08-27T11:40:52Z | NONE | resolved | For kicks I decided to order my headers. According to the directions http://docs.python-requests.org/en/master/user/advanced/ here I just constructed a OrderedDict and set the session.headers value to it. Now when I use the session for requests e.g. session.get("site", headers={"Referer": "test"}) and try to add a new header is doesn't take. Only if the header value already exists can it be overriden. According to the documentation it should be merged.
| {
"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/3524/reactions"
} | https://api.github.com/repos/psf/requests/issues/3524/timeline | null | completed | null | null | false | [
"I can't reproduce this. Can you please provide some sample code? Here is mine:\n\n``` python\n>>> import requests\n>>> requests.__version__\n'2.11.0'\n>>> import collections\n>>> s = requests.Session()\n>>> s.headers = collections.OrderedDict()\n>>> s.headers['X-Custom-Whatever'] = 'val'\n>>> r = s.get('http://htt... |
https://api.github.com/repos/psf/requests/issues/3523 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3523/labels{/name} | https://api.github.com/repos/psf/requests/issues/3523/comments | https://api.github.com/repos/psf/requests/issues/3523/events | https://github.com/psf/requests/issues/3523 | 171,936,407 | MDU6SXNzdWUxNzE5MzY0MDc= | 3,523 | 2.11.0: ValueError: Unable to determine SOCKS version | {
"avatar_url": "https://avatars.githubusercontent.com/u/6601563?v=4",
"events_url": "https://api.github.com/users/ryanym/events{/privacy}",
"followers_url": "https://api.github.com/users/ryanym/followers",
"following_url": "https://api.github.com/users/ryanym/following{/other_user}",
"gists_url": "https://api.github.com/users/ryanym/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ryanym",
"id": 6601563,
"login": "ryanym",
"node_id": "MDQ6VXNlcjY2MDE1NjM=",
"organizations_url": "https://api.github.com/users/ryanym/orgs",
"received_events_url": "https://api.github.com/users/ryanym/received_events",
"repos_url": "https://api.github.com/users/ryanym/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ryanym/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ryanym/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ryanym",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 24 | 2016-08-18T15:54:47Z | 2018-02-10T13:07:08Z | 2016-11-18T19:12:34Z | NONE | resolved | Hi,
I recently upgrade requests to 2.11.0 on centos 7 and keep getting this error when using it in a script:
```
File "/usr/local/lib/python2.7/dist-packages/github3/session.py", line 81, in request
response = super(GitHubSession, self).request(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 390, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 290, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 184, in proxy_manager_for
**proxy_kwargs
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/socks.py", line 154, in __init__
"Unable to determine SOCKS version from %s" % proxy_url
ValueError: Unable to determine SOCKS version from socks://http://username:password@someproxy.com:8080/
```
I tried to change my system socks proxy setting to this format, but still getting the same error with the updated proxy setting...
```
username:password@someproxy.com:8080/
```
So I downgraded requests to 2.10.0 and everything starts to working again. I repeated the this process on ubuntu 16 and got the same result. Can someone look into this please?
Thanks,
Ryan
| {
"avatar_url": "https://avatars.githubusercontent.com/u/6601563?v=4",
"events_url": "https://api.github.com/users/ryanym/events{/privacy}",
"followers_url": "https://api.github.com/users/ryanym/followers",
"following_url": "https://api.github.com/users/ryanym/following{/other_user}",
"gists_url": "https://api.github.com/users/ryanym/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ryanym",
"id": 6601563,
"login": "ryanym",
"node_id": "MDQ6VXNlcjY2MDE1NjM=",
"organizations_url": "https://api.github.com/users/ryanym/orgs",
"received_events_url": "https://api.github.com/users/ryanym/received_events",
"repos_url": "https://api.github.com/users/ryanym/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ryanym/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ryanym/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ryanym",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3523/reactions"
} | https://api.github.com/repos/psf/requests/issues/3523/timeline | null | completed | null | null | false | [
"Ryan,\n\nDo you have the ALL_PROXY environment variable set? If so, to what?\n",
"@Lukasa ~~No i dont, i will try and let you know~~\nlooks like its been auto set to this:\n\n```\nset | grep -i all_proxy\nall_proxy=socks://http://user:password@someproxy.com:8080/\nALL_PROXY=socks://http://user:password@someproxy... |
https://api.github.com/repos/psf/requests/issues/3522 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3522/labels{/name} | https://api.github.com/repos/psf/requests/issues/3522/comments | https://api.github.com/repos/psf/requests/issues/3522/events | https://github.com/psf/requests/issues/3522 | 171,899,402 | MDU6SXNzdWUxNzE4OTk0MDI= | 3,522 | connection: keep-alive not working with requests used in pyArango | {
"avatar_url": "https://avatars.githubusercontent.com/u/5013077?v=4",
"events_url": "https://api.github.com/users/dothebart/events{/privacy}",
"followers_url": "https://api.github.com/users/dothebart/followers",
"following_url": "https://api.github.com/users/dothebart/following{/other_user}",
"gists_url": "https://api.github.com/users/dothebart/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dothebart",
"id": 5013077,
"login": "dothebart",
"node_id": "MDQ6VXNlcjUwMTMwNzc=",
"organizations_url": "https://api.github.com/users/dothebart/orgs",
"received_events_url": "https://api.github.com/users/dothebart/received_events",
"repos_url": "https://api.github.com/users/dothebart/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dothebart/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dothebart/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dothebart",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-08-18T13:21:53Z | 2021-09-08T16:00:27Z | 2016-08-22T10:46:16Z | NONE | resolved | Hi,
requests is used in the connection object of pyArango:
https://github.com/tariqdaouda/pyArango/blob/master/pyArango/connection.py
Though I only see one instance of the connection object being created and used through out the life of https://github.com/tariqdaouda/pyArango/blob/master/examples/debiangraph.py (I've added printfs in these cases) the http connection isn't re-used.
I've followed the connection between pyArango and ArangoDB with Wireshark, to find both of them sending `connection: Keep-Alive` thus the client instantly disconnecting the tcp connection after the HTTP-Requests is done.
I'm a bit out of Ideas howto better debug this, is there a smart way?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5013077?v=4",
"events_url": "https://api.github.com/users/dothebart/events{/privacy}",
"followers_url": "https://api.github.com/users/dothebart/followers",
"following_url": "https://api.github.com/users/dothebart/following{/other_user}",
"gists_url": "https://api.github.com/users/dothebart/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dothebart",
"id": 5013077,
"login": "dothebart",
"node_id": "MDQ6VXNlcjUwMTMwNzc=",
"organizations_url": "https://api.github.com/users/dothebart/orgs",
"received_events_url": "https://api.github.com/users/dothebart/received_events",
"repos_url": "https://api.github.com/users/dothebart/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dothebart/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dothebart/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dothebart",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3522/reactions"
} | https://api.github.com/repos/psf/requests/issues/3522/timeline | null | completed | null | null | false | [
"You're saying that wire shark shows the requests-based client sending `Connection: keep-alive`, is that right? If so, what is the server sending?\n",
"yes, its sending that. The server does send that too. Then the client closes the connection, just to open a new one in subsequent requests.\n",
"@dothebart It's... |
https://api.github.com/repos/psf/requests/issues/3521 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3521/labels{/name} | https://api.github.com/repos/psf/requests/issues/3521/comments | https://api.github.com/repos/psf/requests/issues/3521/events | https://github.com/psf/requests/issues/3521 | 171,836,089 | MDU6SXNzdWUxNzE4MzYwODk= | 3,521 | adding cookies with newlines breaks header | {
"avatar_url": "https://avatars.githubusercontent.com/u/12135640?v=4",
"events_url": "https://api.github.com/users/KatieLucas-Grapeshot/events{/privacy}",
"followers_url": "https://api.github.com/users/KatieLucas-Grapeshot/followers",
"following_url": "https://api.github.com/users/KatieLucas-Grapeshot/following{/other_user}",
"gists_url": "https://api.github.com/users/KatieLucas-Grapeshot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KatieLucas-Grapeshot",
"id": 12135640,
"login": "KatieLucas-Grapeshot",
"node_id": "MDQ6VXNlcjEyMTM1NjQw",
"organizations_url": "https://api.github.com/users/KatieLucas-Grapeshot/orgs",
"received_events_url": "https://api.github.com/users/KatieLucas-Grapeshot/received_events",
"repos_url": "https://api.github.com/users/KatieLucas-Grapeshot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KatieLucas-Grapeshot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KatieLucas-Grapeshot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KatieLucas-Grapeshot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2016-08-18T07:34:46Z | 2021-09-08T15:00:58Z | 2016-08-29T16:09:17Z | NONE | resolved | Adding a cookie with a newline on it seems to break the header/body separation. I found this out after reading a cookie stored in a file and passing it in... The symptom I see is the body starts with header fields and then the content-length truncates the actual body before the end.
A strip('\n') on the end of my string after reading fixes it for me but it might be sensible to scan input cookie strings as they're added to the internal request structure and either throw or silently strip them to prevent anyone else finding this the hard way.
| {
"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/3521/reactions"
} | https://api.github.com/repos/psf/requests/issues/3521/timeline | null | completed | null | null | false | [
"What Requests version are you using? The most recent Requests should reject this header.\n",
"Ah... it's inside a _container_. It's the latest package version for an\nelderly centos version.. all the way down at 2.6.0\n\nDo you know roughly how high a version I'd need to get to test it?\n\nOn 18 August 2016 at 0... |
https://api.github.com/repos/psf/requests/issues/3520 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3520/labels{/name} | https://api.github.com/repos/psf/requests/issues/3520/comments | https://api.github.com/repos/psf/requests/issues/3520/events | https://github.com/psf/requests/pull/3520 | 171,728,707 | MDExOlB1bGxSZXF1ZXN0ODE2OTMyNTk= | 3,520 | Adding notes about Requests' timeout behavior | {
"avatar_url": "https://avatars.githubusercontent.com/u/13948653?v=4",
"events_url": "https://api.github.com/users/Brausepaul/events{/privacy}",
"followers_url": "https://api.github.com/users/Brausepaul/followers",
"following_url": "https://api.github.com/users/Brausepaul/following{/other_user}",
"gists_url": "https://api.github.com/users/Brausepaul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Brausepaul",
"id": 13948653,
"login": "Brausepaul",
"node_id": "MDQ6VXNlcjEzOTQ4NjUz",
"organizations_url": "https://api.github.com/users/Brausepaul/orgs",
"received_events_url": "https://api.github.com/users/Brausepaul/received_events",
"repos_url": "https://api.github.com/users/Brausepaul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Brausepaul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Brausepaul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Brausepaul",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-17T18:33:32Z | 2021-09-08T03:00:46Z | 2016-08-17T21:30:27Z | CONTRIBUTOR | resolved | As discussed in #2228, I added a short note to the quick start and the advanced section about Requests' standard usage of timeouts as this can be 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/3520/reactions"
} | https://api.github.com/repos/psf/requests/issues/3520/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3520.diff",
"html_url": "https://github.com/psf/requests/pull/3520",
"merged_at": "2016-08-17T21:30:27Z",
"patch_url": "https://github.com/psf/requests/pull/3520.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3520"
} | true | [
"This change seems to add three names to the AUTHORS file. Why is that?\n",
"I made changes according to your comments. My fault about the names, that was me mishandling Git.\n",
"✨🍰✨\n"
] |
https://api.github.com/repos/psf/requests/issues/3519 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3519/labels{/name} | https://api.github.com/repos/psf/requests/issues/3519/comments | https://api.github.com/repos/psf/requests/issues/3519/events | https://github.com/psf/requests/issues/3519 | 171,690,191 | MDU6SXNzdWUxNzE2OTAxOTE= | 3,519 | Setting session cookies from cookiejar | {
"avatar_url": "https://avatars.githubusercontent.com/u/19844560?v=4",
"events_url": "https://api.github.com/users/JamesTheHacker/events{/privacy}",
"followers_url": "https://api.github.com/users/JamesTheHacker/followers",
"following_url": "https://api.github.com/users/JamesTheHacker/following{/other_user}",
"gists_url": "https://api.github.com/users/JamesTheHacker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JamesTheHacker",
"id": 19844560,
"login": "JamesTheHacker",
"node_id": "MDQ6VXNlcjE5ODQ0NTYw",
"organizations_url": "https://api.github.com/users/JamesTheHacker/orgs",
"received_events_url": "https://api.github.com/users/JamesTheHacker/received_events",
"repos_url": "https://api.github.com/users/JamesTheHacker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JamesTheHacker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JamesTheHacker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JamesTheHacker",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-17T15:38:15Z | 2021-09-08T16:00:29Z | 2016-08-17T16:35:29Z | NONE | resolved | I'm trying to set the session cookies from a cookiejar, but having no joy. Here is my current code, cookies, and the error.
Surely there has to be a way to set the session cookies from a cookiejar?
```
def cookieLogin(cookies):
with open(cookies) as f:
cookies = requests.utils.cookiejar_from_dict(json.load(f)[0] )
session = requests.session()
session.cookies = cookies
r = session.get('https://example.com')
```
Cookie example:
```
[
{
"domain": ".example.com",
"hostOnly": false,
"httpOnly": false,
"name": "act",
"path": "/",
"sameSite": "no_restriction",
"secure": false,
"session": true,
"storeId": "0",
"value": "875",
"id": 1
},
{
"domain": ".example.com",
"expirationDate": 1479135421.720188,
"hostOnly": false,
"httpOnly": false,
"name": "c_user",
"path": "/",
"sameSite": "no_restriction",
"secure": true,
"session": false,
"storeId": "0",
"value": "109",
"id": 2
},
...
```
Error:
```
Traceback (most recent call last):
File "./cookieInviter.py", line 37, in <module>
session = cookieLogin(args.cookies)
File "/Users/jj/Projects/Jim/login.py", line 78, in cookieLogin
r = session.get('https://example.com')
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 487, in get
return self.request('GET', url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 461, in request
prep = self.prepare_request(req)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 394, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/Library/Python/2.7/site-packages/requests/models.py", line 297, in prepare
self.prepare_cookies(cookies)
File "/Library/Python/2.7/site-packages/requests/models.py", line 518, in prepare_cookies
cookie_header = get_cookie_header(self._cookies, self)
File "/Library/Python/2.7/site-packages/requests/cookies.py", line 136, in get_cookie_header
jar.add_cookie_header(r)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1342, in add_cookie
_header
attrs = self._cookie_attrs(cookies)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1301, in _cookie_at
trs
self.non_word_re.search(cookie.value) and version > 0):
TypeError: expected string or buffer
```
CookieJar:
```
<RequestsCookieJar[<Cookie domain=.example.com for />, <Cookie hostOnly=False for />, <Cookie httpOnly=False for />,
<Cookie id=1 for />, <Cookie name=act for />, <Cookie path=/ for />, <Cookie sameSite=no_restriction for />, <Cookie s
ecure=False for />, <Cookie session=True for />, <Cookie storeId=0 for />, <Cookie value=... for />]>
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/19844560?v=4",
"events_url": "https://api.github.com/users/JamesTheHacker/events{/privacy}",
"followers_url": "https://api.github.com/users/JamesTheHacker/followers",
"following_url": "https://api.github.com/users/JamesTheHacker/following{/other_user}",
"gists_url": "https://api.github.com/users/JamesTheHacker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JamesTheHacker",
"id": 19844560,
"login": "JamesTheHacker",
"node_id": "MDQ6VXNlcjE5ODQ0NTYw",
"organizations_url": "https://api.github.com/users/JamesTheHacker/orgs",
"received_events_url": "https://api.github.com/users/JamesTheHacker/received_events",
"repos_url": "https://api.github.com/users/JamesTheHacker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JamesTheHacker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JamesTheHacker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JamesTheHacker",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3519/reactions"
} | https://api.github.com/repos/psf/requests/issues/3519/timeline | null | completed | null | null | false | [
"No worries, solved it:\n\n```\ndef cookieLogin(cookies):\n\n with open(cookies) as f:\n j = json.load(f)\n\n session = requests.Session()\n for cookie in j: session.cookies.set(cookie['name'], cookie['value'])\n\n r = session.get('https://example.com')\n```\n"
] |
https://api.github.com/repos/psf/requests/issues/3518 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3518/labels{/name} | https://api.github.com/repos/psf/requests/issues/3518/comments | https://api.github.com/repos/psf/requests/issues/3518/events | https://github.com/psf/requests/issues/3518 | 171,640,949 | MDU6SXNzdWUxNzE2NDA5NDk= | 3,518 | ALL_PROXY is incorrectly preferred to HTTP(S)_PROXY | {
"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"
} | [
{
"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,
"... | closed | true | null | [] | null | 2 | 2016-08-17T12:04:32Z | 2021-09-08T16:00:25Z | 2016-08-25T12:45:16Z | MEMBER | resolved | Related to #3516.
We should aim to use HTTP(S)_PROXY in priority to ALL_PROXY. Generally speaking, more specific proxy settings should be preferred to less-specific ones.
| {
"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/3518/reactions"
} | https://api.github.com/repos/psf/requests/issues/3518/timeline | null | completed | null | null | false | [
"BTW, to any experienced contributor reading this: please can you leave this on the pile? This is a fairly easy change, so it'd be great to let someone who hasn't had the opportunity to get started in OSS take a swing at this if we possibly can.\n",
"Resolved.\n"
] |
https://api.github.com/repos/psf/requests/issues/3517 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3517/labels{/name} | https://api.github.com/repos/psf/requests/issues/3517/comments | https://api.github.com/repos/psf/requests/issues/3517/events | https://github.com/psf/requests/issues/3517 | 171,570,129 | MDU6SXNzdWUxNzE1NzAxMjk= | 3,517 | It seems that I cannot hide my IP using the proxy? | {
"avatar_url": "https://avatars.githubusercontent.com/u/8926535?v=4",
"events_url": "https://api.github.com/users/eduOS/events{/privacy}",
"followers_url": "https://api.github.com/users/eduOS/followers",
"following_url": "https://api.github.com/users/eduOS/following{/other_user}",
"gists_url": "https://api.github.com/users/eduOS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eduOS",
"id": 8926535,
"login": "eduOS",
"node_id": "MDQ6VXNlcjg5MjY1MzU=",
"organizations_url": "https://api.github.com/users/eduOS/orgs",
"received_events_url": "https://api.github.com/users/eduOS/received_events",
"repos_url": "https://api.github.com/users/eduOS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eduOS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eduOS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eduOS",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-17T04:06:28Z | 2021-09-08T16:00:28Z | 2016-08-17T07:50:00Z | NONE | resolved | I want to hide my own IP address but it seems unstable as follows.
```
import requests
url = "http://httpbin.org/get"
proxy0 = {"http":"http://118.179.220.186:8080"} # just an example, it may have expired
proxy1 = {"http":"http://41.79.60.202:8080"}
r0 = requests.get(url, proxies=proxy0, timeout=5)
r1 = requests.get(url, proxies=proxy1, timeout=5)
r0.json()["origin"]
r1.json()["origin"]
```
When I tested it, the origin in r0 contained only one IP while that of r1 contained two IPs including the source IP.
The same problem was posted on StackOverflow, please refer to [here](http://stackoverflow.com/q/27824055/3552975).
| {
"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/3517/reactions"
} | https://api.github.com/repos/psf/requests/issues/3517/timeline | null | completed | null | null | false | [
"@eduOS In this instance, it's possible that the proxy is setting X-Forwarded-For header, which will contain the IP address of your source. Alternatively, it's possible that you're getting forwarded to a HTTPS address. Either way, it's likely that the connection is still using the proxy: so longa s the scheme of th... |
https://api.github.com/repos/psf/requests/issues/3516 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3516/labels{/name} | https://api.github.com/repos/psf/requests/issues/3516/comments | https://api.github.com/repos/psf/requests/issues/3516/events | https://github.com/psf/requests/issues/3516 | 171,566,453 | MDU6SXNzdWUxNzE1NjY0NTM= | 3,516 | requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1618599?v=4",
"events_url": "https://api.github.com/users/alochym01/events{/privacy}",
"followers_url": "https://api.github.com/users/alochym01/followers",
"following_url": "https://api.github.com/users/alochym01/following{/other_user}",
"gists_url": "https://api.github.com/users/alochym01/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alochym01",
"id": 1618599,
"login": "alochym01",
"node_id": "MDQ6VXNlcjE2MTg1OTk=",
"organizations_url": "https://api.github.com/users/alochym01/orgs",
"received_events_url": "https://api.github.com/users/alochym01/received_events",
"repos_url": "https://api.github.com/users/alochym01/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alochym01/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alochym01/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alochym01",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-08-17T03:28:33Z | 2021-09-08T01:21:07Z | 2016-08-17T03:49:17Z | NONE | resolved | Hi list
i got problem Missing dependencies for SOCKS support. with requests module version 2.11,
but with requests module version 2.10 the requests module works fine
my enviroment :
declare -x VIRTUAL_ENV="/home/hadn/python3"
declare -x VTE_VERSION="3803"
declare -x WINDOWID="33554439"
declare -x WINDOWPATH="1"
declare -x XAUTHORITY="/run/gdm/auth-for-hadn-0O4FTR/database"
declare -x XDG_CURRENT_DESKTOP="GNOME-Classic:GNOME"
declare -x XDG_MENU_PREFIX="gnome-"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SEAT="seat0"
declare -x XDG_SESSION_DESKTOP="gnome-classic"
declare -x XDG_SESSION_ID="2"
declare -x XDG_VTNR="1"
declare -x XMODIFIERS="@im=ibus"
declare -x _system_arch="x86_64"
declare -x _system_name="CentOS"
declare -x _system_type="Linux"
declare -x _system_version="7"
declare -x all_proxy="socks://proxy.hcm.fpt.vn:80/"
declare -x ftp_proxy="http://proxy.hcm.fpt.vn:80/"
declare -x http_proxy="http://proxy.hcm.fpt.vn:80/"
declare -x https_proxy="http://proxy.hcm.fpt.vn:80/"
(python3)[hadn@rad-hadn4 ~]$ /home/hadn/Laravel/learning_bootstrap_v4/film/film_le.sh
Traceback (most recent call last):
File "/home/hadn/Laravel/learning_bootstrap_v4/film/film_le_crawler_page_1.py", line 24, in <module>
html_content = session.get(url)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/sessions.py", line 483, in get
return self.request('GET', url, *_kwargs)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/sessions.py", line 471, in request
resp = self.send(prep, *_send_kwargs)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/sessions.py", line 581, in send
r = adapter.send(request, *_kwargs)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/adapters.py", line 384, in send
conn = self.get_connection(request.url, proxies)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/adapters.py", line 287, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/home/hadn/python3/lib/python3.4/site-packages/requests/adapters.py", line 183, in proxy_manager_for
*_proxy_kwargs
File "/home/hadn/python3/lib/python3.4/site-packages/requests/adapters.py", line 43, in SOCKSProxyManager
raise InvalidSchema("Missing dependencies for SOCKS support.")
requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3516/reactions"
} | https://api.github.com/repos/psf/requests/issues/3516/timeline | null | completed | null | null | false | [
"`$ pip install requests[socks]`\n",
"The specific problem here is that in 2.11 we started supporting `all_proxy`, which you have set up as a SOCKS proxy. That means we'd attempt to use the SOCKS proxy and fail.\n",
"@Lukasa @kennethreitz can i have option to disable the SOCKS proxy???\n",
"@alochym01 If you ... |
https://api.github.com/repos/psf/requests/issues/3515 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3515/labels{/name} | https://api.github.com/repos/psf/requests/issues/3515/comments | https://api.github.com/repos/psf/requests/issues/3515/events | https://github.com/psf/requests/issues/3515 | 171,560,264 | MDU6SXNzdWUxNzE1NjAyNjQ= | 3,515 | Not raise ProxyError when I use proxy `https://...:8080` | {
"avatar_url": "https://avatars.githubusercontent.com/u/3938751?v=4",
"events_url": "https://api.github.com/users/eromoe/events{/privacy}",
"followers_url": "https://api.github.com/users/eromoe/followers",
"following_url": "https://api.github.com/users/eromoe/following{/other_user}",
"gists_url": "https://api.github.com/users/eromoe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eromoe",
"id": 3938751,
"login": "eromoe",
"node_id": "MDQ6VXNlcjM5Mzg3NTE=",
"organizations_url": "https://api.github.com/users/eromoe/orgs",
"received_events_url": "https://api.github.com/users/eromoe/received_events",
"repos_url": "https://api.github.com/users/eromoe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eromoe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eromoe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eromoe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-17T02:25:30Z | 2021-09-08T16:00:29Z | 2016-08-17T07:44:21Z | NONE | resolved | Code:
```
proxies = {'https': u'https://...:8080'} # or {'HTTP':'http://:80' }
r = requests.head(u'http://example.com', proxies=proxies, timeout=10)
r.status_code
>>> 200
```
The proxy is broken, seems requests do not use this proxy and make request directly,
it should raise `ProxyError('Cannot connect to proxy.'` here.
| {
"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/3515/reactions"
} | https://api.github.com/repos/psf/requests/issues/3515/timeline | null | completed | null | null | false | [
"That proxy is not broken. We are using the configuration you set. If you set the scheme `{'https': u'https://...:8080'}`, and make a request to a URL beginning with `http://`, you have not set any proxy for us to use: as a result, we don't use it.\n\nThe mere presence of a proxy dictionary does not indicate that t... |
https://api.github.com/repos/psf/requests/issues/3514 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3514/labels{/name} | https://api.github.com/repos/psf/requests/issues/3514/comments | https://api.github.com/repos/psf/requests/issues/3514/events | https://github.com/psf/requests/pull/3514 | 171,134,081 | MDExOlB1bGxSZXF1ZXN0ODEyODY5NTQ= | 3,514 | Prepare for 2.11.1 bugfix release. | {
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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}... | null | 5 | 2016-08-15T09:08:00Z | 2021-09-08T03:00:47Z | 2016-08-17T20:01:58Z | MEMBER | resolved | @kennethreitz, this is all we need from a boring administrative perspective. If you merge this PR, you only need to do three things to release:
1. Update the version number to 2.11.1.
2. Put the date you do this in the changelog instead of the XX.
3. Push the release.
It'd be good to get this release out this week: it should put the nastiest bugs of 2.11 behind us and get people back to working again. =)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3514/reactions"
} | https://api.github.com/repos/psf/requests/issues/3514/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3514.diff",
"html_url": "https://github.com/psf/requests/pull/3514",
"merged_at": "2016-08-17T20:01:58Z",
"patch_url": "https://github.com/psf/requests/pull/3514.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3514"
} | true | [
"@kennethreitz let's :shipit:\n",
"Awesome! My main machine is down at the moment. I should be able to do this today, though — once I find my laptop (which I was using just a few days ago).\n",
"@kennethreitz I think @Lukasa and I can still do it for you if you want us to. Just let us know. We'd both be happy t... |
https://api.github.com/repos/psf/requests/issues/3513 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3513/labels{/name} | https://api.github.com/repos/psf/requests/issues/3513/comments | https://api.github.com/repos/psf/requests/issues/3513/events | https://github.com/psf/requests/pull/3513 | 171,076,106 | MDExOlB1bGxSZXF1ZXN0ODEyNTMwODE= | 3,513 | doc updates | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-08-14T20:08:58Z | 2021-09-08T03:00:48Z | 2016-08-15T17:52:56Z | MEMBER | resolved | Various doc updates for clarity. Some of these may not match @kennethreitz's aesthetic sensibilities, which may require an inversion of the proposed change. I was mainly trying to make things consistent, input on preferences would be greatly appreciated.
Some notes:
- I think at least the faq.rst changes _need_ to be merged because there is still live documentation stating that Requests supports 3.1 and 3.2. I can open a separate PR if we want those changes quicker.
- What was ScraperWiki, is now found at quickcode.io and appears to either be a paid or account-walled service. Wayback Machine is showing the site as a free service when the documentation was created, so I'm not sure if Kenneth still wants this included. At the very least, the URL should be updated.
- ~~Does Requests support pypy 2.2 officially? faq.rst says yes, but it's other versions were wrong.~~
- While I realize it's common to use `class.method` as a pattern when describing code, I felt like `r.json` is ambiguous when referenced next to `r.text`. Calling exactly `r.json` won't function as described in the provided `ValueError` example. Explicitly defining the call as `r.json()` reduces the chance of misinterpretation.
- api.rst has a pared down set of Exceptions and classes. I assume this is to keep extraneous information from bloating the page to a point of being unhelpful. I do think it may be worth including `BaseAdapter` for easy reference since anyone looking into a custom _non-HTTP_ Transport Adapter will likely need to start there.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3513/reactions"
} | https://api.github.com/repos/psf/requests/issues/3513/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3513.diff",
"html_url": "https://github.com/psf/requests/pull/3513",
"merged_at": "2016-08-15T17:52:56Z",
"patch_url": "https://github.com/psf/requests/pull/3513.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3513"
} | true | [
"@nateprewitt is this related to #2228?\n",
"@sigmavirus24 It wasn't originally, I found a few minor hiccups making the `.json` change and then did a pass through the docs from there. I realize this is kind of a mess of unrelated doc changes so I can break it up into different commits or PRs if needed.\n\nIt look... |
https://api.github.com/repos/psf/requests/issues/3512 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3512/labels{/name} | https://api.github.com/repos/psf/requests/issues/3512/comments | https://api.github.com/repos/psf/requests/issues/3512/events | https://github.com/psf/requests/issues/3512 | 171,037,471 | MDU6SXNzdWUxNzEwMzc0NzE= | 3,512 | Requests 2.11 regression - Site ID needs to be String | {
"avatar_url": "https://avatars.githubusercontent.com/u/19509188?v=4",
"events_url": "https://api.github.com/users/listingmirror/events{/privacy}",
"followers_url": "https://api.github.com/users/listingmirror/followers",
"following_url": "https://api.github.com/users/listingmirror/following{/other_user}",
"gists_url": "https://api.github.com/users/listingmirror/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/listingmirror",
"id": 19509188,
"login": "listingmirror",
"node_id": "MDQ6VXNlcjE5NTA5MTg4",
"organizations_url": "https://api.github.com/users/listingmirror/orgs",
"received_events_url": "https://api.github.com/users/listingmirror/received_events",
"repos_url": "https://api.github.com/users/listingmirror/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/listingmirror/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/listingmirror/subscriptions",
"type": "User",
"url": "https://api.github.com/users/listingmirror",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-14T01:54:31Z | 2021-09-08T16:00:29Z | 2016-08-14T02:59:28Z | NONE | resolved | Using https://github.com/timotheus/ebaysdk-python v 2.1.3 (latest)
Which transitively uses requests...
Requests 2.10 was good, with Requests 2.11 I get:
```
<Truncated>
File "/webapps/listing_mirror/lib/python3.5/site-packages/ebaysdk/connection.py", line 119, in execute
self.build_request(verb, data, verb_attrs, files)
File "/webapps/listing_mirror/lib/python3.5/site-packages/ebaysdk/connection.py", line 159, in build_request
self.request = request.prepare()
File "/webapps/listing_mirror/lib/python3.5/site-packages/requests/models.py", line 251, in prepare
hooks=self.hooks,
File "/webapps/listing_mirror/lib/python3.5/site-packages/requests/models.py", line 295, in prepare
self.prepare_headers(headers)
File "/webapps/listing_mirror/lib/python3.5/site-packages/requests/models.py", line 409, in prepare_headers
check_header_validity(header)
File "/webapps/listing_mirror/lib/python3.5/site-packages/requests/utils.py", line 756, in check_header_validity
"not %s" % (value, type(value)))
requests.exceptions.InvalidHeader: Header value 961 must be of type str or bytes, not <class 'int'>
```
Can't say for sure yet where the bug is (requests vs ebaysdk)... but at least something changed in a breaking manner.
Trying to investigate more...
| {
"avatar_url": "https://avatars.githubusercontent.com/u/19509188?v=4",
"events_url": "https://api.github.com/users/listingmirror/events{/privacy}",
"followers_url": "https://api.github.com/users/listingmirror/followers",
"following_url": "https://api.github.com/users/listingmirror/following{/other_user}",
"gists_url": "https://api.github.com/users/listingmirror/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/listingmirror",
"id": 19509188,
"login": "listingmirror",
"node_id": "MDQ6VXNlcjE5NTA5MTg4",
"organizations_url": "https://api.github.com/users/listingmirror/orgs",
"received_events_url": "https://api.github.com/users/listingmirror/received_events",
"repos_url": "https://api.github.com/users/listingmirror/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/listingmirror/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/listingmirror/subscriptions",
"type": "User",
"url": "https://api.github.com/users/listingmirror",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3512/reactions"
} | https://api.github.com/repos/psf/requests/issues/3512/timeline | null | completed | null | null | false | [
"Hey @listingmirror, you can find more information on this in #3477. 2.11.0 brought in more rigid header validation, requiring values to be passed as either strings or bytes. I'm betting ebaysdk is passing the Content-Length header as an int. This will need to be converted to a string for use with 2.11.0+.\n",
"@... |
https://api.github.com/repos/psf/requests/issues/3511 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3511/labels{/name} | https://api.github.com/repos/psf/requests/issues/3511/comments | https://api.github.com/repos/psf/requests/issues/3511/events | https://github.com/psf/requests/pull/3511 | 170,989,114 | MDExOlB1bGxSZXF1ZXN0ODEyMDQ5MTE= | 3,511 | fix grammer mistakes in Quickstart | {
"avatar_url": "https://avatars.githubusercontent.com/u/7857126?v=4",
"events_url": "https://api.github.com/users/forrestchang/events{/privacy}",
"followers_url": "https://api.github.com/users/forrestchang/followers",
"following_url": "https://api.github.com/users/forrestchang/following{/other_user}",
"gists_url": "https://api.github.com/users/forrestchang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/forrestchang",
"id": 7857126,
"login": "forrestchang",
"node_id": "MDQ6VXNlcjc4NTcxMjY=",
"organizations_url": "https://api.github.com/users/forrestchang/orgs",
"received_events_url": "https://api.github.com/users/forrestchang/received_events",
"repos_url": "https://api.github.com/users/forrestchang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/forrestchang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/forrestchang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/forrestchang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-13T02:43:30Z | 2021-09-08T03:00:48Z | 2016-08-13T08:42:25Z | CONTRIBUTOR | resolved | {
"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/3511/reactions"
} | https://api.github.com/repos/psf/requests/issues/3511/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3511.diff",
"html_url": "https://github.com/psf/requests/pull/3511",
"merged_at": "2016-08-13T08:42:25Z",
"patch_url": "https://github.com/psf/requests/pull/3511.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3511"
} | true | [
"Thanks @forrestchang! :sparkles: :cake: :sparkles:\n",
"p.s. 'grammar' is spelled with an 'a', and these changes are not grammar related :)\n"
] | |
https://api.github.com/repos/psf/requests/issues/3510 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3510/labels{/name} | https://api.github.com/repos/psf/requests/issues/3510/comments | https://api.github.com/repos/psf/requests/issues/3510/events | https://github.com/psf/requests/pull/3510 | 170,900,192 | MDExOlB1bGxSZXF1ZXN0ODExMzk5NjI= | 3,510 | adding passthrough in close() for non-urllib3-like Responses | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-08-12T15:42:08Z | 2021-09-08T02:10:15Z | 2016-08-18T08:28:20Z | MEMBER | resolved | This is minor, but when testing `resolve_redirects` I encountered an `AttributeError` when passing a non-urllib3 Response. This is because the method unconditionally calls [`close`](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L864) on the Response which in turn calls `release_conn` on the `Response.raw` attribute.
If the desire for requests is to maintain support for non-urllib3 objects in custom adapters, I think this would be a simple and useful addition. If urllib3 is going to be a de facto pattern for Responses though, this is probably just unnecessary code bloat.
| {
"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/3510/reactions"
} | https://api.github.com/repos/psf/requests/issues/3510/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3510.diff",
"html_url": "https://github.com/psf/requests/pull/3510",
"merged_at": "2016-08-18T08:28:20Z",
"patch_url": "https://github.com/psf/requests/pull/3510.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3510"
} | true | [
"Ok, I have put some small notes in. I don't want to merge this until after 2.11.1 gets out the door though.\n",
"Test updated and lambda logic changed to a conditional. No rush on this, just wanted to get it on the record before I forgot.\n",
"Just reminding ourselves not to merge this until after 2.11.1 is re... |
https://api.github.com/repos/psf/requests/issues/3509 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3509/labels{/name} | https://api.github.com/repos/psf/requests/issues/3509/comments | https://api.github.com/repos/psf/requests/issues/3509/events | https://github.com/psf/requests/issues/3509 | 170,850,033 | MDU6SXNzdWUxNzA4NTAwMzM= | 3,509 | session() got an unexpected keyword argument 'headers' | {
"avatar_url": "https://avatars.githubusercontent.com/u/1391224?v=4",
"events_url": "https://api.github.com/users/breize/events{/privacy}",
"followers_url": "https://api.github.com/users/breize/followers",
"following_url": "https://api.github.com/users/breize/following{/other_user}",
"gists_url": "https://api.github.com/users/breize/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/breize",
"id": 1391224,
"login": "breize",
"node_id": "MDQ6VXNlcjEzOTEyMjQ=",
"organizations_url": "https://api.github.com/users/breize/orgs",
"received_events_url": "https://api.github.com/users/breize/received_events",
"repos_url": "https://api.github.com/users/breize/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/breize/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/breize/subscriptions",
"type": "User",
"url": "https://api.github.com/users/breize",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-12T11:14:56Z | 2018-10-03T00:33:25Z | 2016-08-12T11:16:05Z | NONE | null | When trying the second example of [http://docs.python-requests.org/en/v0.10.6/user/advanced/#session-objects](http://docs.python-requests.org/en/v0.10.6/user/advanced/#session-objects) i get the following error:
`TypeError: session() got an unexpected keyword argument 'auth'`
Did something change there and the documentation didn't get updated?
| {
"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/3509/reactions"
} | https://api.github.com/repos/psf/requests/issues/3509/timeline | null | completed | null | null | false | [
"@breize You're linking to an ancient version of the documentation. Try this: http://docs.python-requests.org/en/latest/user/advanced/\n",
"@Lukasa this is still in the latest docs version: `http://docs.python-requests.org/en/latest/api/#requests.Session.auth`. I have the same with `headers=`. Are the docs out of... |
https://api.github.com/repos/psf/requests/issues/3508 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3508/labels{/name} | https://api.github.com/repos/psf/requests/issues/3508/comments | https://api.github.com/repos/psf/requests/issues/3508/events | https://github.com/psf/requests/issues/3508 | 170,787,922 | MDU6SXNzdWUxNzA3ODc5MjI= | 3,508 | Grammar error in document: Quickstart | {
"avatar_url": "https://avatars.githubusercontent.com/u/7857126?v=4",
"events_url": "https://api.github.com/users/forrestchang/events{/privacy}",
"followers_url": "https://api.github.com/users/forrestchang/followers",
"following_url": "https://api.github.com/users/forrestchang/following{/other_user}",
"gists_url": "https://api.github.com/users/forrestchang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/forrestchang",
"id": 7857126,
"login": "forrestchang",
"node_id": "MDQ6VXNlcjc4NTcxMjY=",
"organizations_url": "https://api.github.com/users/forrestchang/orgs",
"received_events_url": "https://api.github.com/users/forrestchang/received_events",
"repos_url": "https://api.github.com/users/forrestchang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/forrestchang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/forrestchang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/forrestchang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-08-12T02:33:18Z | 2021-09-08T16:00:30Z | 2016-08-13T10:43:51Z | CONTRIBUTOR | resolved | In section [Binary Response Content](http://docs.python-requests.org/en/master/user/quickstart/#binary-response-content), `r.content` returns an instance of `bytes` while `StringIO` is an in-memory stream for text only. It should use `BytesIO` instead.
``` python
from PIL import Image
from io import BytesIO
i = Image.open(BytesIO(r.content))
```
Use original code will raise `TypeError: initial_value must be str or None, not bytes.`
| {
"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": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/3508/reactions"
} | https://api.github.com/repos/psf/requests/issues/3508/timeline | null | completed | null | null | false | [
"@forrestchang Thanks, would you like to open a PR to change it?\n",
"@Lukasa Yes, I would like to. I have modified the mistake in `.rst` file. Should I generate it to the HTML file? \n",
"Hey @forrestchang, there's no need to run the docs build. If you open a PR with the rst changes, read the docs will generat... |
https://api.github.com/repos/psf/requests/issues/3507 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3507/labels{/name} | https://api.github.com/repos/psf/requests/issues/3507/comments | https://api.github.com/repos/psf/requests/issues/3507/events | https://github.com/psf/requests/issues/3507 | 170,768,634 | MDU6SXNzdWUxNzA3Njg2MzQ= | 3,507 | Requests 2.11.0 and Python 3.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/726553?v=4",
"events_url": "https://api.github.com/users/ppolewicz/events{/privacy}",
"followers_url": "https://api.github.com/users/ppolewicz/followers",
"following_url": "https://api.github.com/users/ppolewicz/following{/other_user}",
"gists_url": "https://api.github.com/users/ppolewicz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ppolewicz",
"id": 726553,
"login": "ppolewicz",
"node_id": "MDQ6VXNlcjcyNjU1Mw==",
"organizations_url": "https://api.github.com/users/ppolewicz/orgs",
"received_events_url": "https://api.github.com/users/ppolewicz/received_events",
"repos_url": "https://api.github.com/users/ppolewicz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ppolewicz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ppolewicz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ppolewicz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-08-11T23:15:17Z | 2021-09-08T16:00:30Z | 2016-08-12T07:55:32Z | NONE | resolved | requests 2.11.0 is incompatible with python 3.2, but is installable:
```
# pip install requests
Collecting requests
Downloading requests-2.11.0-py2.py3-none-any.whl (514kB)
100% |████████████████████████████████| 516kB 1.4MB/s
Installing collected packages: requests
Successfully installed requests-2.11.0
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
# python --version
Python 3.2.6
```
This breaks dependencies for our clients. Could you please make it so 2.11.0 either works properly with python 3.2, or alternatively, make it so it is not installable in Python 3.2?
| {
"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/3507/reactions"
} | https://api.github.com/repos/psf/requests/issues/3507/timeline | null | completed | null | null | false | [
"Hey @ppolewicz, I believe you can find answers addressing this in #3479, primarily @Lukasa's comment [here](https://github.com/kennethreitz/requests/issues/3479#issuecomment-238633044).\n\npip is currently unable to filter out libraries based on python version, but it was also [noted](https://github.com/kennethrei... |
https://api.github.com/repos/psf/requests/issues/3506 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3506/labels{/name} | https://api.github.com/repos/psf/requests/issues/3506/comments | https://api.github.com/repos/psf/requests/issues/3506/events | https://github.com/psf/requests/pull/3506 | 170,749,846 | MDExOlB1bGxSZXF1ZXN0ODEwMzMwNDQ= | 3,506 | Prevent environment variables from overridding Session settings | {
"avatar_url": "https://avatars.githubusercontent.com/u/728526?v=4",
"events_url": "https://api.github.com/users/pfista/events{/privacy}",
"followers_url": "https://api.github.com/users/pfista/followers",
"following_url": "https://api.github.com/users/pfista/following{/other_user}",
"gists_url": "https://api.github.com/users/pfista/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pfista",
"id": 728526,
"login": "pfista",
"node_id": "MDQ6VXNlcjcyODUyNg==",
"organizations_url": "https://api.github.com/users/pfista/orgs",
"received_events_url": "https://api.github.com/users/pfista/received_events",
"repos_url": "https://api.github.com/users/pfista/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pfista/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pfista/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pfista",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-11T21:19:55Z | 2021-09-08T03:00:49Z | 2016-08-11T21:28:03Z | NONE | resolved | In some cases, `Session` settings are overridden by environment settings. Session should inherit from its own settings before trying to pull in environment settings.
For example, say environment variable `REQUESTS_CA_BUNDLE` is set to a certificate bundle, a session object is created and `session.verify = False`, and then that session is mounted to an adapter. If subsequent requests made do not explicitly pass in `verify=False`, certificate verification will be enabled despite having set `session.verify = False`. This is due to `merge_setting` defaulting to use the `request_setting` when merging verify, which is currently incorrectly set to the environment variables certificate file before checking `session.verify`.
This will ensure that `Request` object settings take precedence, then `Session` settings, then global environment settings.
| {
"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/3506/reactions"
} | https://api.github.com/repos/psf/requests/issues/3506/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3506.diff",
"html_url": "https://github.com/psf/requests/pull/3506",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3506.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3506"
} | true | [
"Thanks! This is a known issue (see #2018), but fixing it is a breaking change that needs to go into 3.0.0. Can you please open a new pull request targeting the proposed/3.0.0 branch?\n",
"It looks like this has already been fixed in proposed/3.0.0!\n",
"It may be worth noting that it's PR #2839 that fixes this... |
https://api.github.com/repos/psf/requests/issues/3495 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3495/labels{/name} | https://api.github.com/repos/psf/requests/issues/3495/comments | https://api.github.com/repos/psf/requests/issues/3495/events | https://github.com/psf/requests/issues/3495 | 170,644,688 | MDU6SXNzdWUxNzA2NDQ2ODg= | 3,495 | Any way to set verify=False on session object? | {
"avatar_url": "https://avatars.githubusercontent.com/u/19844560?v=4",
"events_url": "https://api.github.com/users/JamesTheHacker/events{/privacy}",
"followers_url": "https://api.github.com/users/JamesTheHacker/followers",
"following_url": "https://api.github.com/users/JamesTheHacker/following{/other_user}",
"gists_url": "https://api.github.com/users/JamesTheHacker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JamesTheHacker",
"id": 19844560,
"login": "JamesTheHacker",
"node_id": "MDQ6VXNlcjE5ODQ0NTYw",
"organizations_url": "https://api.github.com/users/JamesTheHacker/orgs",
"received_events_url": "https://api.github.com/users/JamesTheHacker/received_events",
"repos_url": "https://api.github.com/users/JamesTheHacker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JamesTheHacker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JamesTheHacker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JamesTheHacker",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-11T13:23:48Z | 2021-09-08T16:00:31Z | 2016-08-11T13:25:26Z | NONE | resolved | Is there any way to set `verify=False` on a session object rather than having to use it on every HTTP request made by the session?
| {
"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/3495/reactions"
} | https://api.github.com/repos/psf/requests/issues/3495/timeline | null | completed | null | null | false | [
"No. =) If you're going to make yourself unsafe, we'd like you to do it every time. Think of us as like your better angel, sitting on your shoulder saying \"are you _sure_ you want to turn off your security?\".\n",
"Ah ok. I was debugging HTTP requests with Burp Suite. It's the only time I will be setting `verify... |
https://api.github.com/repos/psf/requests/issues/3494 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3494/labels{/name} | https://api.github.com/repos/psf/requests/issues/3494/comments | https://api.github.com/repos/psf/requests/issues/3494/events | https://github.com/psf/requests/issues/3494 | 170,599,170 | MDU6SXNzdWUxNzA1OTkxNzA= | 3,494 | 2.11.0 causing issues with missing attribute 'reason' in raise_for_status() | {
"avatar_url": "https://avatars.githubusercontent.com/u/3816327?v=4",
"events_url": "https://api.github.com/users/robcresswell/events{/privacy}",
"followers_url": "https://api.github.com/users/robcresswell/followers",
"following_url": "https://api.github.com/users/robcresswell/following{/other_user}",
"gists_url": "https://api.github.com/users/robcresswell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/robcresswell",
"id": 3816327,
"login": "robcresswell",
"node_id": "MDQ6VXNlcjM4MTYzMjc=",
"organizations_url": "https://api.github.com/users/robcresswell/orgs",
"received_events_url": "https://api.github.com/users/robcresswell/received_events",
"repos_url": "https://api.github.com/users/robcresswell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/robcresswell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robcresswell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/robcresswell",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-11T09:00:09Z | 2021-09-08T16:00:31Z | 2016-08-11T09:27:41Z | NONE | resolved | Apologies for the vague header, I'm still narrowing this down. It appears that this commit (https://github.com/kennethreitz/requests/commit/7700ecae14930fd078e28e35425661d46778bfa9) is using self.reason, and in our implementation, its throwing errors for a missing attribute 'reason'.
The lib in question is django_openstack_auth; all our tests began failing when 2.11.0 released. 2.10.0 still works fine. I'm unsure whether this is an issue with a clumsy test implementation on our side or a false assumption on the requests side. Will keep digging.
| {
"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/3494/reactions"
} | https://api.github.com/repos/psf/requests/issues/3494/timeline | null | completed | null | null | false | [
"I suspect the issue is a bit of both. The higher level requests code expects a reason phrase, but they're not always common, especially in test implementations. That said, I recommend all test implementations _set_ a reason: the code here always expected one, it's just that now it's always checked for, rather than... |
https://api.github.com/repos/psf/requests/issues/3493 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3493/labels{/name} | https://api.github.com/repos/psf/requests/issues/3493/comments | https://api.github.com/repos/psf/requests/issues/3493/events | https://github.com/psf/requests/pull/3493 | 170,451,884 | MDExOlB1bGxSZXF1ZXN0ODA4MTkxNDE= | 3,493 | #3490 removing Content-Type and Transfer-Encoding headers on redirect | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2016-08-10T15:50:44Z | 2021-09-08T02:10:17Z | 2016-08-12T11:24:36Z | MEMBER | resolved | This will remove additional headers (`Content-Type` and `Transfer-Encoding`) from non-temporary/non-permanent redirects in `resolve_redirects` to address #3490.
This functionality isn't currently being tested but I'm happy to add a test or two for it if desired.
| {
"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/3493/reactions"
} | https://api.github.com/repos/psf/requests/issues/3493/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3493.diff",
"html_url": "https://github.com/psf/requests/pull/3493",
"merged_at": "2016-08-12T11:24:36Z",
"patch_url": "https://github.com/psf/requests/pull/3493.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3493"
} | true | [
"I would like to see tests for this please! :sparkles:\n",
"I was on it too. Did not find a way to properly add tests though since httpbin does not seem to be able to post to an endpoint and respond with a 301/302. Am I wrong on this one?\n\nAnyway since @nateprewitt is on it I will not open my PR ;)\n",
"On my... |
https://api.github.com/repos/psf/requests/issues/3492 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3492/labels{/name} | https://api.github.com/repos/psf/requests/issues/3492/comments | https://api.github.com/repos/psf/requests/issues/3492/events | https://github.com/psf/requests/pull/3492 | 170,272,361 | MDExOlB1bGxSZXF1ZXN0ODA2OTU3ODA= | 3,492 | updating HISTORY | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-08-09T21:13:22Z | 2021-09-08T03:00:52Z | 2016-08-09T21:16:37Z | MEMBER | resolved | Clarifies that ALL non-string values are not permitted in headers.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3492/reactions"
} | https://api.github.com/repos/psf/requests/issues/3492/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3492.diff",
"html_url": "https://github.com/psf/requests/pull/3492",
"merged_at": "2016-08-09T21:16:37Z",
"patch_url": "https://github.com/psf/requests/pull/3492.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3492"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/3491 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3491/labels{/name} | https://api.github.com/repos/psf/requests/issues/3491/comments | https://api.github.com/repos/psf/requests/issues/3491/events | https://github.com/psf/requests/issues/3491 | 170,268,083 | MDU6SXNzdWUxNzAyNjgwODM= | 3,491 | Requests is no longer converting Boolean values in headers to strings | {
"avatar_url": "https://avatars.githubusercontent.com/u/1134139?v=4",
"events_url": "https://api.github.com/users/jidar/events{/privacy}",
"followers_url": "https://api.github.com/users/jidar/followers",
"following_url": "https://api.github.com/users/jidar/following{/other_user}",
"gists_url": "https://api.github.com/users/jidar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jidar",
"id": 1134139,
"login": "jidar",
"node_id": "MDQ6VXNlcjExMzQxMzk=",
"organizations_url": "https://api.github.com/users/jidar/orgs",
"received_events_url": "https://api.github.com/users/jidar/received_events",
"repos_url": "https://api.github.com/users/jidar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jidar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jidar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jidar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2016-08-09T20:53:57Z | 2021-09-08T16:00:32Z | 2016-08-09T21:03:01Z | NONE | resolved | This results in an InvalidHeader error.
For requests 2.10.0:
In [1]: import requests
In [2]: r = requests.get('http://www.google.com', headers={'fake-header':True})
In [3]: r.request.headers
Out[3]: {'fake-header': True, 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate', 'Accept': '_/_', 'User-Agent': 'python-requests/2.10.0'}
For requests 2.11.0:
In [1]: import requests
In [2]: r = requests.get('http://www.google.com', headers={'fake-header':True})
<Traceback snip>
InvalidHeader: Header value True must be of type str or bytes, not <type 'bool'>
| {
"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/3491/reactions"
} | https://api.github.com/repos/psf/requests/issues/3491/timeline | null | completed | null | null | false | [
"Please see #3477.\n",
"See also #3477, #865. Requests has always documented that headers _must_ be strings. We just didn't enforce it very well. It's also entirely unclear how to appropriately represent True on Python.\n",
"@Lukasa @sigmavirus24 It looks like the [HISTORY.rst change](https://github.com/kenneth... |
https://api.github.com/repos/psf/requests/issues/3490 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3490/labels{/name} | https://api.github.com/repos/psf/requests/issues/3490/comments | https://api.github.com/repos/psf/requests/issues/3490/events | https://github.com/psf/requests/issues/3490 | 170,236,238 | MDU6SXNzdWUxNzAyMzYyMzg= | 3,490 | Remove header in middle of redirection | {
"avatar_url": "https://avatars.githubusercontent.com/u/1615426?v=4",
"events_url": "https://api.github.com/users/saveman71/events{/privacy}",
"followers_url": "https://api.github.com/users/saveman71/followers",
"following_url": "https://api.github.com/users/saveman71/following{/other_user}",
"gists_url": "https://api.github.com/users/saveman71/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saveman71",
"id": 1615426,
"login": "saveman71",
"node_id": "MDQ6VXNlcjE2MTU0MjY=",
"organizations_url": "https://api.github.com/users/saveman71/orgs",
"received_events_url": "https://api.github.com/users/saveman71/received_events",
"repos_url": "https://api.github.com/users/saveman71/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saveman71/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saveman71/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saveman71",
"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,
"... | closed | true | null | [] | null | 8 | 2016-08-09T18:24:05Z | 2021-09-08T16:00:30Z | 2016-08-12T19:57:40Z | NONE | resolved | Hey there,
I'm having a pretty specific issue while trying to reproduce the login sequence of a heavy professional website (lots of redirect / cookies involved).
The login sequence was tested working on Chrome.
I spent some time debugging and finally tracked down the issue, that is that the server will not accept the `Content-Type` header that was required on the first request on the first redirect, thus making the second request crash with a `500`.
First request shown in Chrome's dev inspector:

Second request (first redirect) show in Chrome's dev inspector:

Notice of how on the second request, no `Content-Type` header. The presence of a `Content-Type` header would make the request fail.
The code (URLs are mangled):
``` python
#!/usr/bin/env python
import requests
import urllib.parse
headers = {
'Origin': 'https://www.example.com',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.8,fr-FR;q=0.6,fr;q=0.4',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Cache-Control': 'max-age=0',
'Referer': 'https://www.example.com/',
'Connection': 'keep-alive',
}
data = 'some_data'
s = requests.Session()
r = s.post('https://www.exampleonanotherdomain.com/openam/UI/Login?realm=front_office&service=EEService&goto=https://www.exampleonanotherdomain.com/ice/rest/aiguillagemp/redirect?dest=',
headers=headers, data=data)
```
I worked it around by removing the `Content-Type` header at runtime on the 3rd send (first is the first request header, 2nd is the first request data) to confirm that it was the issue (it was!)
Patch code added before the request.
``` python
import http.client as http_client
def patch():
old_send = http_client.HTTPConnection.send
def new_send( self, data ):
print(data.decode('utf-8'))
if new_send.i == 2:
data = '\n'.join([l for l in data.decode('utf-8').split('\n') if not l.startswith('Content-Type:')]).encode('utf-8')
print(data.decode('utf-8'))
new_send.i += 1
return old_send(self, data)
new_send.i = 0
http_client.HTTPConnection.send = new_send
old_read = http_client.HTTPResponse.read
def new_read( self , amt):
data = old_read(self, amt)
print(data)
return data
http_client.HTTPResponse.read = new_read
patch()
```
Any idea of how to solve this one?
Note: I have no control at all of the remote server.
Note: I intend to make a lot of requests while being logged in, so the I would like to stay with a session.
| {
"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/3490/reactions"
} | https://api.github.com/repos/psf/requests/issues/3490/timeline | null | completed | null | null | false | [
"Can you run the code with a normal, unchanged Requests, and then once the request is complete run this:\n\n``` python\nfor h in r.history:\n print(h.headers)\nprint(r.headers)\n```\n\nAnd then show us the output?\n",
"Oh, sorry.\n\nJust stop setting the header yourself! You should avoid setting the Content-Ty... |
https://api.github.com/repos/psf/requests/issues/3489 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3489/labels{/name} | https://api.github.com/repos/psf/requests/issues/3489/comments | https://api.github.com/repos/psf/requests/issues/3489/events | https://github.com/psf/requests/pull/3489 | 170,234,762 | MDExOlB1bGxSZXF1ZXN0ODA2Njg2ODE= | 3,489 | adding in pickling tests for PreparedRequest | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-09T18:17:19Z | 2021-09-08T02:10:12Z | 2016-11-10T17:26:47Z | MEMBER | resolved | This is a continuation of @keyan's work in #2757 and addresses issue #1558 regarding pickling Request objects (specifically `PreparedRequest` objects in this PR).
These tests ensure that a standard `PreparedRequest`, a `PreparedRequest` with a file object as the body, and a `PreparedRequest` with hooks defined outside of the `locals` scope will all pickle properly.
This also works for data passed to the `json` parameter and I can add my test for that as well if it's deemed helpful.
Hooks defined inside of a method (such as in the [original test](https://github.com/kennethreitz/requests/pull/2757/files#diff-56c2d754173a4a158ce8f445834c8fe8R843) by @keyan) will fail because you can't pickle local objects. Is this a use case that needs to be handled? | {
"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/3489/reactions"
} | https://api.github.com/repos/psf/requests/issues/3489/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3489.diff",
"html_url": "https://github.com/psf/requests/pull/3489",
"merged_at": "2016-11-10T17:26:47Z",
"patch_url": "https://github.com/psf/requests/pull/3489.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3489"
} | true | [
"@Lukasa any thoughts here? We still have edge cases where if the `data` param is a generator or file-like object, it can't be pickled. Is there any utility in adding this subset of tests, or should #1558 be closed as can't fix?\n",
"I have no particular problems with merging this PR, though I'd like to confirm w... |
https://api.github.com/repos/psf/requests/issues/3488 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3488/labels{/name} | https://api.github.com/repos/psf/requests/issues/3488/comments | https://api.github.com/repos/psf/requests/issues/3488/events | https://github.com/psf/requests/issues/3488 | 170,207,886 | MDU6SXNzdWUxNzAyMDc4ODY= | 3,488 | requests 2.11.0 raises when header contains leading space | {
"avatar_url": "https://avatars.githubusercontent.com/u/11064524?v=4",
"events_url": "https://api.github.com/users/brantlk/events{/privacy}",
"followers_url": "https://api.github.com/users/brantlk/followers",
"following_url": "https://api.github.com/users/brantlk/following{/other_user}",
"gists_url": "https://api.github.com/users/brantlk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brantlk",
"id": 11064524,
"login": "brantlk",
"node_id": "MDQ6VXNlcjExMDY0NTI0",
"organizations_url": "https://api.github.com/users/brantlk/orgs",
"received_events_url": "https://api.github.com/users/brantlk/received_events",
"repos_url": "https://api.github.com/users/brantlk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brantlk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brantlk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brantlk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-09T16:11:39Z | 2021-09-08T16:00:28Z | 2016-08-09T16:16:50Z | NONE | resolved | With the release of requests 2.11.0 we're seeing errors where things were working with requests 2.10.0. The exception that's raised is "Invalid return character or leading space in header".
We can work around the problem and make sure we set headers without leading spaces, just making sure that this was the intention to have things that were working with 2.10 stop working with 2.11.
| {
"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/3488/reactions"
} | https://api.github.com/repos/psf/requests/issues/3488/timeline | null | completed | null | null | false | [
"Thanks for this!\n\nThis is deliberate. Headers with leading spaces in them are frequently mis-handled by intermediaries and servers. This can lead to attacks or misbehaviour, where any or all of a server, client, and all involved proxies disagree on what headers are actually present. This is called a smuggling at... |
https://api.github.com/repos/psf/requests/issues/3487 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3487/labels{/name} | https://api.github.com/repos/psf/requests/issues/3487/comments | https://api.github.com/repos/psf/requests/issues/3487/events | https://github.com/psf/requests/pull/3487 | 170,192,948 | MDExOlB1bGxSZXF1ZXN0ODA2Mzk0MjM= | 3,487 | Update README.rst | {
"avatar_url": "https://avatars.githubusercontent.com/u/6855663?v=4",
"events_url": "https://api.github.com/users/drpoggi/events{/privacy}",
"followers_url": "https://api.github.com/users/drpoggi/followers",
"following_url": "https://api.github.com/users/drpoggi/following{/other_user}",
"gists_url": "https://api.github.com/users/drpoggi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/drpoggi",
"id": 6855663,
"login": "drpoggi",
"node_id": "MDQ6VXNlcjY4NTU2NjM=",
"organizations_url": "https://api.github.com/users/drpoggi/orgs",
"received_events_url": "https://api.github.com/users/drpoggi/received_events",
"repos_url": "https://api.github.com/users/drpoggi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/drpoggi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/drpoggi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/drpoggi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-09T15:15:22Z | 2021-09-08T03:00:47Z | 2016-08-09T15:40:20Z | CONTRIBUTOR | resolved | To match #3480
| {
"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/3487/reactions"
} | https://api.github.com/repos/psf/requests/issues/3487/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3487.diff",
"html_url": "https://github.com/psf/requests/pull/3487",
"merged_at": "2016-08-09T15:40:20Z",
"patch_url": "https://github.com/psf/requests/pull/3487.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3487"
} | true | [
"Thanks @drpoggi!\n"
] |
https://api.github.com/repos/psf/requests/issues/3486 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3486/labels{/name} | https://api.github.com/repos/psf/requests/issues/3486/comments | https://api.github.com/repos/psf/requests/issues/3486/events | https://github.com/psf/requests/pull/3486 | 170,168,427 | MDExOlB1bGxSZXF1ZXN0ODA2MjE3MDc= | 3,486 | reverting 3362 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-09T13:39:28Z | 2021-09-08T02:10:17Z | 2016-08-09T13:52:22Z | MEMBER | resolved | This addresses #3481 and will revert #3362 back to its prior state. We'll likely want to reopen #3359 since this will reintroduce the bytes/text issue.
| {
"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/3486/reactions"
} | https://api.github.com/repos/psf/requests/issues/3486/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3486.diff",
"html_url": "https://github.com/psf/requests/pull/3486",
"merged_at": "2016-08-09T13:52:22Z",
"patch_url": "https://github.com/psf/requests/pull/3486.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3486"
} | true | [
"I'm good with this. How about you @Lukasa? (To be honest, I would have rathered let GitHub generate the revert than have it done artisanally.)\n",
"I'm fine with this too.\n",
"@sigmavirus24 sorry, I tried the revert button and got an error so did it by hand.\n"
] |
https://api.github.com/repos/psf/requests/issues/3485 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3485/labels{/name} | https://api.github.com/repos/psf/requests/issues/3485/comments | https://api.github.com/repos/psf/requests/issues/3485/events | https://github.com/psf/requests/issues/3485 | 170,139,497 | MDU6SXNzdWUxNzAxMzk0OTc= | 3,485 | ConnectionResetError on some urls | {
"avatar_url": "https://avatars.githubusercontent.com/u/4659834?v=4",
"events_url": "https://api.github.com/users/Alexander3/events{/privacy}",
"followers_url": "https://api.github.com/users/Alexander3/followers",
"following_url": "https://api.github.com/users/Alexander3/following{/other_user}",
"gists_url": "https://api.github.com/users/Alexander3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Alexander3",
"id": 4659834,
"login": "Alexander3",
"node_id": "MDQ6VXNlcjQ2NTk4MzQ=",
"organizations_url": "https://api.github.com/users/Alexander3/orgs",
"received_events_url": "https://api.github.com/users/Alexander3/received_events",
"repos_url": "https://api.github.com/users/Alexander3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Alexander3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Alexander3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Alexander3",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-08-09T11:05:25Z | 2021-09-08T16:00:31Z | 2016-08-10T09:20:22Z | NONE | resolved | I'm building Django app for translating english words to polish. I'm trying to make a request to dictionary website. When requesting for url: 'http://pl.bab.la/slownik/angielski-polski/' after few minutes it throws ConnectionResetError, but Wireshark sees 200 OK response less than second after request.
The strange thing is that when url is 'http://pl.bab.la/slownik/' it works.
```
url = 'http://pl.bab.la/slownik/angielski-polski/'
response = requests.get(url)
```
Using urllib everything works fine.
```
import urllib.request
req = urllib.request.Request(url)
response = urllib.request.urlopen(req)
```
[See full traceback](https://gist.github.com/Alexander3/6b2fe33fd1b98c31a2008fa98ad6d896)
I'm using Python 3.5.1 on Windows 10 64 bit
| {
"avatar_url": "https://avatars.githubusercontent.com/u/4659834?v=4",
"events_url": "https://api.github.com/users/Alexander3/events{/privacy}",
"followers_url": "https://api.github.com/users/Alexander3/followers",
"following_url": "https://api.github.com/users/Alexander3/following{/other_user}",
"gists_url": "https://api.github.com/users/Alexander3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Alexander3",
"id": 4659834,
"login": "Alexander3",
"node_id": "MDQ6VXNlcjQ2NTk4MzQ=",
"organizations_url": "https://api.github.com/users/Alexander3/orgs",
"received_events_url": "https://api.github.com/users/Alexander3/received_events",
"repos_url": "https://api.github.com/users/Alexander3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Alexander3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Alexander3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Alexander3",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3485/reactions"
} | https://api.github.com/repos/psf/requests/issues/3485/timeline | null | completed | null | null | false | [
"Interestingly, this seems to be a Python 3 bug: I can reproduce this repeatably on Python 3.5.1, but am unable to reproduce it on Python 2.7. Not a Windows bug though: I can reproduce on macOS.\n",
"Got it. Revealed, as always, by using `stream=True`. The problem is the headers. The server is sending a _gigantic... |
https://api.github.com/repos/psf/requests/issues/3484 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3484/labels{/name} | https://api.github.com/repos/psf/requests/issues/3484/comments | https://api.github.com/repos/psf/requests/issues/3484/events | https://github.com/psf/requests/pull/3484 | 170,135,222 | MDExOlB1bGxSZXF1ZXN0ODA1OTgxMjY= | 3,484 | Document bunch of return types | {
"avatar_url": "https://avatars.githubusercontent.com/u/109152?v=4",
"events_url": "https://api.github.com/users/scop/events{/privacy}",
"followers_url": "https://api.github.com/users/scop/followers",
"following_url": "https://api.github.com/users/scop/following{/other_user}",
"gists_url": "https://api.github.com/users/scop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/scop",
"id": 109152,
"login": "scop",
"node_id": "MDQ6VXNlcjEwOTE1Mg==",
"organizations_url": "https://api.github.com/users/scop/orgs",
"received_events_url": "https://api.github.com/users/scop/received_events",
"repos_url": "https://api.github.com/users/scop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/scop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/scop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/scop",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-09T10:40:19Z | 2021-09-08T03:00:52Z | 2016-08-09T10:42:45Z | CONTRIBUTOR | resolved | {
"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/3484/reactions"
} | https://api.github.com/repos/psf/requests/issues/3484/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3484.diff",
"html_url": "https://github.com/psf/requests/pull/3484",
"merged_at": "2016-08-09T10:42:45Z",
"patch_url": "https://github.com/psf/requests/pull/3484.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3484"
} | true | [
"LGTM, thanks! :sparkles: :cake: :sparkles:\n"
] | |
https://api.github.com/repos/psf/requests/issues/3483 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3483/labels{/name} | https://api.github.com/repos/psf/requests/issues/3483/comments | https://api.github.com/repos/psf/requests/issues/3483/events | https://github.com/psf/requests/issues/3483 | 170,118,364 | MDU6SXNzdWUxNzAxMTgzNjQ= | 3,483 | Commit 386382b18caab6a3a8a111fa8e24875dca27b0aa is kicking my ass on Python 3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/6974884?v=4",
"events_url": "https://api.github.com/users/alexntt/events{/privacy}",
"followers_url": "https://api.github.com/users/alexntt/followers",
"following_url": "https://api.github.com/users/alexntt/following{/other_user}",
"gists_url": "https://api.github.com/users/alexntt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexntt",
"id": 6974884,
"login": "alexntt",
"node_id": "MDQ6VXNlcjY5NzQ4ODQ=",
"organizations_url": "https://api.github.com/users/alexntt/orgs",
"received_events_url": "https://api.github.com/users/alexntt/received_events",
"repos_url": "https://api.github.com/users/alexntt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexntt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexntt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexntt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-09T09:14:29Z | 2021-09-08T16:00:32Z | 2016-08-10T08:15:30Z | NONE | resolved | Hi,
Today our automated builds started failing because 2.11.0 was pulled and 386382b18caab6a3a8a111fa8e24875dca27b0aa causes a request's body to be a bytes object in Python 3 but a str in Python 2.7, which is breaking both my code and https://github.com/seanbrant/requests-wsgi-adapter:
https://gist.github.com/alexntt/b181b562852c6850a83269b7401d3bef
Can this be made a bit more "backwards-compatible"?
Cheers,
Álex
| {
"avatar_url": "https://avatars.githubusercontent.com/u/6974884?v=4",
"events_url": "https://api.github.com/users/alexntt/events{/privacy}",
"followers_url": "https://api.github.com/users/alexntt/followers",
"following_url": "https://api.github.com/users/alexntt/following{/other_user}",
"gists_url": "https://api.github.com/users/alexntt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexntt",
"id": 6974884,
"login": "alexntt",
"node_id": "MDQ6VXNlcjY5NzQ4ODQ=",
"organizations_url": "https://api.github.com/users/alexntt/orgs",
"received_events_url": "https://api.github.com/users/alexntt/received_events",
"repos_url": "https://api.github.com/users/alexntt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexntt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexntt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexntt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3483/reactions"
} | https://api.github.com/repos/psf/requests/issues/3483/timeline | null | completed | null | null | false | [
"Bytes and str are the same type. In fact, bytes aliases to str on Python 2.6. For that reason, it would seem like the code to work around this problem is simple: `if not isinstance(bytes, request.body): request.body.encode('utf-8')`\n\nIndeed, I'd like to point out that this has worked around a bug in requests-wsg... |
https://api.github.com/repos/psf/requests/issues/3482 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3482/labels{/name} | https://api.github.com/repos/psf/requests/issues/3482/comments | https://api.github.com/repos/psf/requests/issues/3482/events | https://github.com/psf/requests/issues/3482 | 170,116,898 | MDU6SXNzdWUxNzAxMTY4OTg= | 3,482 | Can't connect to HTTPS URL because the SSL module is not available. | {
"avatar_url": "https://avatars.githubusercontent.com/u/12977724?v=4",
"events_url": "https://api.github.com/users/rohitkhatri/events{/privacy}",
"followers_url": "https://api.github.com/users/rohitkhatri/followers",
"following_url": "https://api.github.com/users/rohitkhatri/following{/other_user}",
"gists_url": "https://api.github.com/users/rohitkhatri/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rohitkhatri",
"id": 12977724,
"login": "rohitkhatri",
"node_id": "MDQ6VXNlcjEyOTc3NzI0",
"organizations_url": "https://api.github.com/users/rohitkhatri/orgs",
"received_events_url": "https://api.github.com/users/rohitkhatri/received_events",
"repos_url": "https://api.github.com/users/rohitkhatri/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rohitkhatri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rohitkhatri/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rohitkhatri",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2016-08-09T09:07:21Z | 2017-03-23T21:30:38Z | 2016-08-09T09:13:42Z | NONE | null | If I try to fetch any https url, It throws an error on the server, but when I try it on the local machine, It works.
Code:
```
def test():
data = requests.get('https://newsroom.co',verify=False)
return data;
```
| {
"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/3482/reactions"
} | https://api.github.com/repos/psf/requests/issues/3482/timeline | null | completed | null | null | false | [
"@rohitkhatri This is almost certainly a problem with the OpenSSL shipped on your server. You'll likely need to elaborate for us to help you: for example, _what_ error do you see?\n",
"@Lukasa You can check this out here http://52.40.67.18/testing\n",
"Oh that's easy: the Python on your server was compiled with... |
https://api.github.com/repos/psf/requests/issues/3481 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3481/labels{/name} | https://api.github.com/repos/psf/requests/issues/3481/comments | https://api.github.com/repos/psf/requests/issues/3481/events | https://github.com/psf/requests/issues/3481 | 170,104,204 | MDU6SXNzdWUxNzAxMDQyMDQ= | 3,481 | Error with decode_unicode=True on streamed response | {
"avatar_url": "https://avatars.githubusercontent.com/u/7469?v=4",
"events_url": "https://api.github.com/users/jone/events{/privacy}",
"followers_url": "https://api.github.com/users/jone/followers",
"following_url": "https://api.github.com/users/jone/following{/other_user}",
"gists_url": "https://api.github.com/users/jone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jone",
"id": 7469,
"login": "jone",
"node_id": "MDQ6VXNlcjc0Njk=",
"organizations_url": "https://api.github.com/users/jone/orgs",
"received_events_url": "https://api.github.com/users/jone/received_events",
"repos_url": "https://api.github.com/users/jone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jone",
"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 | 9 | 2016-08-09T07:58:53Z | 2021-09-08T15:00:51Z | 2016-09-11T09:11:16Z | NONE | resolved | With `requests==2.11.0` I get `AttributeError: 'NoneType' object has no attribute 'readline'` when trying to use `iter_lines` with `decode_unicode=True` on a streamed response.
``` sh
$ ./bin/pip freeze
requests==2.11.0
wsgiref==0.1.2
```
``` python
from contextlib import closing
import requests
with closing(requests.get('http://httpbin.org/stream/20', stream=True)) as response:
for line in response.iter_lines(chunk_size=30, decode_unicode=True):
print line
```
``` python
$ ./bin/python case.py
Traceback (most recent call last):
File "case.py", line 6, in <module>
for line in response.iter_lines(chunk_size=30, decode_unicode=True):
File "/Users/jone/temp/requests-stream/lib/python2.7/site-packages/requests/models.py", line 720, in iter_lines
for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):
File "/Users/jone/temp/requests-stream/lib/python2.7/site-packages/requests/utils.py", line 374, in stream_decode_response_unicode
for chunk in iterator:
File "/Users/jone/temp/requests-stream/lib/python2.7/site-packages/requests/models.py", line 676, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/Users/jone/temp/requests-stream/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 353, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/Users/jone/temp/requests-stream/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 521, in read_chunked
line = self._fp.fp.readline()
AttributeError: 'NoneType' object has no attribute 'readline'
```
When removing either `stream=True` or `decode_unicode=True` the script works well.
This issue may be related to #3174.
| {
"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/3481/reactions"
} | https://api.github.com/repos/psf/requests/issues/3481/timeline | null | completed | null | null | false | [
"Well this is weird: it's not immediately apparent to me how `decode_unicode` leads to this behaviour.\n",
"Aha, got it.\n\n`decode_unicode=True` was enhanced in the last release to perform the same auto-detection of encoding as `text` does for Requests. Unfortunately, that may involve a call to `apparent_encodin... |
https://api.github.com/repos/psf/requests/issues/3480 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3480/labels{/name} | https://api.github.com/repos/psf/requests/issues/3480/comments | https://api.github.com/repos/psf/requests/issues/3480/events | https://github.com/psf/requests/pull/3480 | 170,070,364 | MDExOlB1bGxSZXF1ZXN0ODA1NTM4OTk= | 3,480 | Clarify Python versions supported by requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/6855663?v=4",
"events_url": "https://api.github.com/users/drpoggi/events{/privacy}",
"followers_url": "https://api.github.com/users/drpoggi/followers",
"following_url": "https://api.github.com/users/drpoggi/following{/other_user}",
"gists_url": "https://api.github.com/users/drpoggi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/drpoggi",
"id": 6855663,
"login": "drpoggi",
"node_id": "MDQ6VXNlcjY4NTU2NjM=",
"organizations_url": "https://api.github.com/users/drpoggi/orgs",
"received_events_url": "https://api.github.com/users/drpoggi/received_events",
"repos_url": "https://api.github.com/users/drpoggi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/drpoggi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/drpoggi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/drpoggi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-08-09T02:51:05Z | 2021-09-08T03:00:53Z | 2016-08-09T03:00:55Z | CONTRIBUTOR | resolved | Remove some confusion in the Python versions supported by 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/3480/reactions"
} | https://api.github.com/repos/psf/requests/issues/3480/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3480.diff",
"html_url": "https://github.com/psf/requests/pull/3480",
"merged_at": "2016-08-09T03:00:55Z",
"patch_url": "https://github.com/psf/requests/pull/3480.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3480"
} | true | [
"endashes (–) are appropriate for ranges, not hyphens. \n\nLet's also add \"Requests officially supports\".\n",
"en dash, not em dash :)\n\nIt's cool, I'll fix it. \n",
"✨🍰✨\n",
"@kennethreitz thanks, tried copy pasting your en dash from above. Apparently GitHub's UI wasn't a fan of my methods.\n"
] |
https://api.github.com/repos/psf/requests/issues/3479 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3479/labels{/name} | https://api.github.com/repos/psf/requests/issues/3479/comments | https://api.github.com/repos/psf/requests/issues/3479/events | https://github.com/psf/requests/issues/3479 | 170,039,774 | MDU6SXNzdWUxNzAwMzk3NzQ= | 3,479 | requests v2.11 has a syntax error in python3.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/344587?v=4",
"events_url": "https://api.github.com/users/huseyinyilmaz/events{/privacy}",
"followers_url": "https://api.github.com/users/huseyinyilmaz/followers",
"following_url": "https://api.github.com/users/huseyinyilmaz/following{/other_user}",
"gists_url": "https://api.github.com/users/huseyinyilmaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huseyinyilmaz",
"id": 344587,
"login": "huseyinyilmaz",
"node_id": "MDQ6VXNlcjM0NDU4Nw==",
"organizations_url": "https://api.github.com/users/huseyinyilmaz/orgs",
"received_events_url": "https://api.github.com/users/huseyinyilmaz/received_events",
"repos_url": "https://api.github.com/users/huseyinyilmaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huseyinyilmaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huseyinyilmaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huseyinyilmaz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-08-08T22:21:40Z | 2021-09-08T16:00:32Z | 2016-08-08T22:51:05Z | NONE | resolved | First of all thanks for the awesome library. I am really enjoying using requests. This is my favorite library.
In the last version of requests, I started to get an error on my own library and it turned out it was because of my requests dependency.
In python3.2, requests v2.11 gives following error:
```
File "/home/travis/build/huseyinyilmaz/placebo/requests/__init__.py", line 64, in <module>
from .models import Request, Response, PreparedRequest
File "/home/travis/build/huseyinyilmaz/placebo/requests/models.py", line 856
http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
^
SyntaxError: invalid syntax
```
Here is the fix
https://github.com/kennethreitz/requests/pull/3478
Again sorry about the crappy way of testing. I could not install python3.2 on my local machine so I could not test it with requests tests.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/344587?v=4",
"events_url": "https://api.github.com/users/huseyinyilmaz/events{/privacy}",
"followers_url": "https://api.github.com/users/huseyinyilmaz/followers",
"following_url": "https://api.github.com/users/huseyinyilmaz/following{/other_user}",
"gists_url": "https://api.github.com/users/huseyinyilmaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huseyinyilmaz",
"id": 344587,
"login": "huseyinyilmaz",
"node_id": "MDQ6VXNlcjM0NDU4Nw==",
"organizations_url": "https://api.github.com/users/huseyinyilmaz/orgs",
"received_events_url": "https://api.github.com/users/huseyinyilmaz/received_events",
"repos_url": "https://api.github.com/users/huseyinyilmaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huseyinyilmaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huseyinyilmaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huseyinyilmaz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3479/reactions"
} | https://api.github.com/repos/psf/requests/issues/3479/timeline | null | completed | null | null | false | [
"Hey @huseyinyilmaz, I think this may have been discussed in #3385 (particularly [here](https://github.com/kennethreitz/requests/pull/3385#discussion_r69560890)). Removing the `u` designation on the string would revert the unicode support added in #3385.\n",
"Ah, I see @nateprewitt already chimed in over here.\n"... |
https://api.github.com/repos/psf/requests/issues/3478 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3478/labels{/name} | https://api.github.com/repos/psf/requests/issues/3478/comments | https://api.github.com/repos/psf/requests/issues/3478/events | https://github.com/psf/requests/pull/3478 | 170,038,849 | MDExOlB1bGxSZXF1ZXN0ODA1MzE2MjM= | 3,478 | Fix python3.2 unicode literral error. | {
"avatar_url": "https://avatars.githubusercontent.com/u/344587?v=4",
"events_url": "https://api.github.com/users/huseyinyilmaz/events{/privacy}",
"followers_url": "https://api.github.com/users/huseyinyilmaz/followers",
"following_url": "https://api.github.com/users/huseyinyilmaz/following{/other_user}",
"gists_url": "https://api.github.com/users/huseyinyilmaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huseyinyilmaz",
"id": 344587,
"login": "huseyinyilmaz",
"node_id": "MDQ6VXNlcjM0NDU4Nw==",
"organizations_url": "https://api.github.com/users/huseyinyilmaz/orgs",
"received_events_url": "https://api.github.com/users/huseyinyilmaz/received_events",
"repos_url": "https://api.github.com/users/huseyinyilmaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huseyinyilmaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huseyinyilmaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huseyinyilmaz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-08-08T22:16:27Z | 2021-09-08T03:00:53Z | 2016-08-08T22:52:49Z | NONE | resolved | This is a specific fix for python3.2.
When I install requests version v2.11.0, I get an invalid syntax error.
It turns out the reason for that error is because "u" prefix for unicode strings are not allowed in python3.2. So I removed the "u" prefix to fix the issue.
To test it ,I moved the request library into my codebase and get syntax error:
https://travis-ci.org/huseyinyilmaz/placebo/builds/150770392
Than I fixed the issue and ran my tests again:
https://travis-ci.org/huseyinyilmaz/placebo/builds/150770803
I realized that this is not a right way to test this. But I could not install python3.2 on my mac. So I decided to use travis-ci's python version.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/344587?v=4",
"events_url": "https://api.github.com/users/huseyinyilmaz/events{/privacy}",
"followers_url": "https://api.github.com/users/huseyinyilmaz/followers",
"following_url": "https://api.github.com/users/huseyinyilmaz/following{/other_user}",
"gists_url": "https://api.github.com/users/huseyinyilmaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huseyinyilmaz",
"id": 344587,
"login": "huseyinyilmaz",
"node_id": "MDQ6VXNlcjM0NDU4Nw==",
"organizations_url": "https://api.github.com/users/huseyinyilmaz/orgs",
"received_events_url": "https://api.github.com/users/huseyinyilmaz/received_events",
"repos_url": "https://api.github.com/users/huseyinyilmaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huseyinyilmaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huseyinyilmaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huseyinyilmaz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3478/reactions"
} | https://api.github.com/repos/psf/requests/issues/3478/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3478.diff",
"html_url": "https://github.com/psf/requests/pull/3478",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3478.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3478"
} | true | [
"We have not supported Python 3.2 for ... over a year? I don't think we'll accept this. @kennethreitz, thoughts?\n",
"@sigmavirus24 . I did not realize that pyhon3.2 is not supported. Thanks for the explanation. I will close the pr.\n",
"I'm running into the same issue, where this totally worked before, and sto... |
https://api.github.com/repos/psf/requests/issues/3477 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3477/labels{/name} | https://api.github.com/repos/psf/requests/issues/3477/comments | https://api.github.com/repos/psf/requests/issues/3477/events | https://github.com/psf/requests/issues/3477 | 170,028,151 | MDU6SXNzdWUxNzAwMjgxNTE= | 3,477 | Requests 2.11: check_header_validity failed on header with integer value | {
"avatar_url": "https://avatars.githubusercontent.com/u/1050156?v=4",
"events_url": "https://api.github.com/users/lmazuel/events{/privacy}",
"followers_url": "https://api.github.com/users/lmazuel/followers",
"following_url": "https://api.github.com/users/lmazuel/following{/other_user}",
"gists_url": "https://api.github.com/users/lmazuel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmazuel",
"id": 1050156,
"login": "lmazuel",
"node_id": "MDQ6VXNlcjEwNTAxNTY=",
"organizations_url": "https://api.github.com/users/lmazuel/orgs",
"received_events_url": "https://api.github.com/users/lmazuel/received_events",
"repos_url": "https://api.github.com/users/lmazuel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmazuel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmazuel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmazuel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 23 | 2016-08-08T21:19:07Z | 2021-09-08T15:00:44Z | 2016-08-08T23:40:55Z | NONE | resolved | Hi,
Since requests 2.11, all my calls using requests for my app are broken. After debugging, it seems that this version does not accept header with integer value, like it was before.
2.10:
``` python
In [1]: import requests
In [2]: requests.get('http://bing.com', headers={'Content-Length': 42})
Out[2]: <Response [200]>
```
2.11
```
In [1]: import requests
In [2]: requests.get('http://bing.com', headers={'Content-Length': 42})
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\utils.py in check_header_validity(header)
751 try:
--> 752 if not pat.match(value):
753 raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
InvalidHeader Traceback (most recent call last)
<ipython-input-2-ae7ec2933e34> in <module>()
----> 1 requests.get('http://bing.com', headers={'Content-Length': 42})
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\api.py in get(url, params, **kwargs)
68
69 kwargs.setdefault('allow_redirects', True)
---> 70 return request('get', url, params=params, **kwargs)
71
72
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\api.py in request(method, url, **kwargs)
54 # cases, and look like a memory leak in others.
55 with sessions.Session() as session:
---> 56 return session.request(method=method, url=url, **kwargs)
57
58
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
455 hooks = hooks,
456 )
--> 457 prep = self.prepare_request(req)
458
459 proxies = proxies or {}
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\sessions.py in prepare_request(self, request)
388 auth=merge_setting(auth, self.auth),
389 cookies=merged_cookies,
--> 390 hooks=merge_hooks(request.hooks, self.hooks),
391 )
392 return p
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\models.py in prepare(self, method, url, headers, files, data, params, auth, cookies, hooks, json)
293 self.prepare_method(method)
294 self.prepare_url(url, params)
--> 295 self.prepare_headers(headers)
296 self.prepare_cookies(cookies)
297 self.prepare_body(data, files, json)
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\models.py in prepare_headers(self, headers)
407 for header in headers.items():
408 # Raise exception on invalid header value.
--> 409 check_header_validity(header)
410 name, value = header
411 self.headers[to_native_string(name)] = value
D:\VSProjects\azure-sdk-for-python\env3.5\Lib\site-packages\requests\utils.py in check_header_validity(header)
754 except TypeError:
755 raise InvalidHeader("Header value %s must be of type str or bytes, "
--> 756 "not %s" % (value, type(value)))
757
758
InvalidHeader: Header value 42 must be of type str or bytes, not <class 'int'>
```
We define 'Content-Length' in each request. Anyway, using an integer for an header which is semantically an integer makes sense no?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1050156?v=4",
"events_url": "https://api.github.com/users/lmazuel/events{/privacy}",
"followers_url": "https://api.github.com/users/lmazuel/followers",
"following_url": "https://api.github.com/users/lmazuel/following{/other_user}",
"gists_url": "https://api.github.com/users/lmazuel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmazuel",
"id": 1050156,
"login": "lmazuel",
"node_id": "MDQ6VXNlcjEwNTAxNTY=",
"organizations_url": "https://api.github.com/users/lmazuel/orgs",
"received_events_url": "https://api.github.com/users/lmazuel/received_events",
"repos_url": "https://api.github.com/users/lmazuel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmazuel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmazuel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmazuel",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3477/reactions"
} | https://api.github.com/repos/psf/requests/issues/3477/timeline | null | completed | null | null | false | [
"Non-strings for header values was never an accepted way to use Requests, sadly, and while it was allowed in prior versions we have since made changes that disallow it. This is primarily because headers are _really_ string-string mappings, but also because the general approach of calling `str` on things that are pa... |
https://api.github.com/repos/psf/requests/issues/3476 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3476/labels{/name} | https://api.github.com/repos/psf/requests/issues/3476/comments | https://api.github.com/repos/psf/requests/issues/3476/events | https://github.com/psf/requests/issues/3476 | 169,951,323 | MDU6SXNzdWUxNjk5NTEzMjM= | 3,476 | Can't POST UTF-8 encoded data | {
"avatar_url": "https://avatars.githubusercontent.com/u/732595?v=4",
"events_url": "https://api.github.com/users/rasgo-cc/events{/privacy}",
"followers_url": "https://api.github.com/users/rasgo-cc/followers",
"following_url": "https://api.github.com/users/rasgo-cc/following{/other_user}",
"gists_url": "https://api.github.com/users/rasgo-cc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rasgo-cc",
"id": 732595,
"login": "rasgo-cc",
"node_id": "MDQ6VXNlcjczMjU5NQ==",
"organizations_url": "https://api.github.com/users/rasgo-cc/orgs",
"received_events_url": "https://api.github.com/users/rasgo-cc/received_events",
"repos_url": "https://api.github.com/users/rasgo-cc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rasgo-cc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rasgo-cc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rasgo-cc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-08T15:28:04Z | 2021-09-08T16:00:33Z | 2016-08-08T15:46:31Z | NONE | resolved | Hi,
I'm using Requests to send data to a Firebase database. Data contained in the JSON file is UTF-8 encoded. I'm sending that data as follows:
```
data_to_send = json.dumps(data).encode("utf-8")
request_object = self.requests.put(request_ref, headers=headers, data=data_to_send)
```
But this is sent as "latin-1" text no matter what, because the underlying HTTP client library always sends the body's text with that encoding.
```
if isinstance(body, str):
# RFC 2616 Section 3.7.1 says that text default has a
# default charset of iso-8859-1.
body = _encode(body, 'body')
```
This results on weird characters displayed on my website.
If instead of:
`data_to_send = json.dumps(data).encode("utf-8")`
or
`data_to_send = json.dumps(data, ensure_ascii=False).encode("utf-8")`
I do this:
`data_to_send = json.dumps(data, ensure_ascii=False)`
Then, HTTP client library throws this error:
```
"client.py", line 1150, in _send_request
body = _encode(body, 'body')
File "C:\Users\mribeiro\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 161, in _encode
(name.title(), data[err.start:err.end], name)) from None
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2030' in position 164: Body ('▒') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
```
So, how am I supposed to POST UTF-8 encoded data using Requests?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/732595?v=4",
"events_url": "https://api.github.com/users/rasgo-cc/events{/privacy}",
"followers_url": "https://api.github.com/users/rasgo-cc/followers",
"following_url": "https://api.github.com/users/rasgo-cc/following{/other_user}",
"gists_url": "https://api.github.com/users/rasgo-cc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rasgo-cc",
"id": 732595,
"login": "rasgo-cc",
"node_id": "MDQ6VXNlcjczMjU5NQ==",
"organizations_url": "https://api.github.com/users/rasgo-cc/orgs",
"received_events_url": "https://api.github.com/users/rasgo-cc/received_events",
"repos_url": "https://api.github.com/users/rasgo-cc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rasgo-cc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rasgo-cc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rasgo-cc",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3476/reactions"
} | https://api.github.com/repos/psf/requests/issues/3476/timeline | null | completed | null | null | false | [
"@cidadao You'll need to more explicitly state what your actual problem is. Let me address why.\n\nFirstly, you say you want to POST your JSON as UTF-8 encoded data. Why is this needed? By default, the Python JSON library will automatically escape all non-ASCII unicode code points. For example:\n\n``` python\nPytho... |
https://api.github.com/repos/psf/requests/issues/3475 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3475/labels{/name} | https://api.github.com/repos/psf/requests/issues/3475/comments | https://api.github.com/repos/psf/requests/issues/3475/events | https://github.com/psf/requests/pull/3475 | 169,913,065 | MDExOlB1bGxSZXF1ZXN0ODA0NDM4OTM= | 3,475 | Prepare for 2.11 release. | {
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/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}... | null | 2 | 2016-08-08T12:39:59Z | 2021-09-08T03:00:54Z | 2016-08-08T15:05:02Z | MEMBER | resolved | @kennethreitz, this is all we need from a boring administrative perspective. If you merge this PR, you only need to do three things to release:
1. Update the version number to 2.11.
2. Put the date you do this in the changelog instead of the XX.
3. Push the release.
@sigmavirus24 I'm inclined to want to let all currently open PRs remain open rather than try to rush merge any: they can always wait for a 2.11.1 or 2.12 without any risk.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3475/reactions"
} | https://api.github.com/repos/psf/requests/issues/3475/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3475.diff",
"html_url": "https://github.com/psf/requests/pull/3475",
"merged_at": "2016-08-08T15:05:02Z",
"patch_url": "https://github.com/psf/requests/pull/3475.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3475"
} | true | [
"> I'm inclined to want to let all currently open PRs remain open rather than try to rush merge any: they can always wait for a 2.11.1 or 2.12 without any risk.\n\nMy opinion has been (for a while now) that release numbers are cheap. I'm on board with this. 👍 :shipit: \n",
"Released! ✨🍰✨\n"
] |
https://api.github.com/repos/psf/requests/issues/3474 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3474/labels{/name} | https://api.github.com/repos/psf/requests/issues/3474/comments | https://api.github.com/repos/psf/requests/issues/3474/events | https://github.com/psf/requests/issues/3474 | 169,568,513 | MDU6SXNzdWUxNjk1Njg1MTM= | 3,474 | Is requests.get() will release GIL when it is waiting for response from website? | {
"avatar_url": "https://avatars.githubusercontent.com/u/14327519?v=4",
"events_url": "https://api.github.com/users/DonaldDai/events{/privacy}",
"followers_url": "https://api.github.com/users/DonaldDai/followers",
"following_url": "https://api.github.com/users/DonaldDai/following{/other_user}",
"gists_url": "https://api.github.com/users/DonaldDai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DonaldDai",
"id": 14327519,
"login": "DonaldDai",
"node_id": "MDQ6VXNlcjE0MzI3NTE5",
"organizations_url": "https://api.github.com/users/DonaldDai/orgs",
"received_events_url": "https://api.github.com/users/DonaldDai/received_events",
"repos_url": "https://api.github.com/users/DonaldDai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DonaldDai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DonaldDai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DonaldDai",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-05T09:33:15Z | 2021-09-08T16:00:34Z | 2016-08-05T09:33:50Z | NONE | resolved | {
"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": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3474/reactions"
} | https://api.github.com/repos/psf/requests/issues/3474/timeline | null | completed | null | null | false | [
"Yes. Anything that uses sockets in Python will do that.\n",
"Thanks\n"
] | |
https://api.github.com/repos/psf/requests/issues/3473 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3473/labels{/name} | https://api.github.com/repos/psf/requests/issues/3473/comments | https://api.github.com/repos/psf/requests/issues/3473/events | https://github.com/psf/requests/issues/3473 | 169,520,086 | MDU6SXNzdWUxNjk1MjAwODY= | 3,473 | process is terminated while starting new https protocol | {
"avatar_url": "https://avatars.githubusercontent.com/u/710057?v=4",
"events_url": "https://api.github.com/users/truyet/events{/privacy}",
"followers_url": "https://api.github.com/users/truyet/followers",
"following_url": "https://api.github.com/users/truyet/following{/other_user}",
"gists_url": "https://api.github.com/users/truyet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/truyet",
"id": 710057,
"login": "truyet",
"node_id": "MDQ6VXNlcjcxMDA1Nw==",
"organizations_url": "https://api.github.com/users/truyet/orgs",
"received_events_url": "https://api.github.com/users/truyet/received_events",
"repos_url": "https://api.github.com/users/truyet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/truyet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/truyet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/truyet",
"user_view_type": "public"
} | [
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] | closed | true | null | [] | null | 2 | 2016-08-05T03:13:17Z | 2021-09-08T16:00:34Z | 2016-08-05T18:38:49Z | NONE | resolved | I use requests pacakge to call nexmo api with post method: requests.post(url)
It has worked well for a month, but after my service is terminated and I check logging throw lastest row:
requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): rest.nexmo.com
I catched exception but no errors are written to logging.
| {
"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/3473/reactions"
} | https://api.github.com/repos/psf/requests/issues/3473/timeline | null | completed | null | null | false | [
"That information is nowhere near detailed enough to tell us what happened. You'll need to provide a traceback or something similar.\n",
"We can reopen this if and when we get more information.\n"
] |
https://api.github.com/repos/psf/requests/issues/3472 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3472/labels{/name} | https://api.github.com/repos/psf/requests/issues/3472/comments | https://api.github.com/repos/psf/requests/issues/3472/events | https://github.com/psf/requests/issues/3472 | 169,431,276 | MDU6SXNzdWUxNjk0MzEyNzY= | 3,472 | post with unicode data and the post body will be truncated!!! | {
"avatar_url": "https://avatars.githubusercontent.com/u/1853121?v=4",
"events_url": "https://api.github.com/users/ifooth/events{/privacy}",
"followers_url": "https://api.github.com/users/ifooth/followers",
"following_url": "https://api.github.com/users/ifooth/following{/other_user}",
"gists_url": "https://api.github.com/users/ifooth/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ifooth",
"id": 1853121,
"login": "ifooth",
"node_id": "MDQ6VXNlcjE4NTMxMjE=",
"organizations_url": "https://api.github.com/users/ifooth/orgs",
"received_events_url": "https://api.github.com/users/ifooth/received_events",
"repos_url": "https://api.github.com/users/ifooth/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ifooth/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ifooth/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ifooth",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-08-04T17:37:34Z | 2021-09-08T16:00:38Z | 2016-08-05T07:44:26Z | NONE | resolved | when i use requests post data with unicode, and the content-length will be wrong, and the post data will be truncated, test with requests 2.10.0
test code
---
```
# -*- coding: utf-8 -*
import json
import requests
# use utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
data = json.dumps({'test': u"测试"}, ensure_ascii=False)
print data
resp = requests.post('https://github.com/kennethreitz/requests/issues', data=data, verify=False)
```
fiddler snapshot
---

reason
---
```
data = json.dumps({'test': u"测试"}, ensure_ascii=False)
the unicode length: len(data) = 14
the utf-8 chars length len(data.encode('utf-8')) = 18
encode with utf-8 but the content-length not change, so, the post body is truncated data
data.encode('utf-8')[:len(data)] = {"test": "测
```
is it a bug? need help
| {
"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/3472/reactions"
} | https://api.github.com/repos/psf/requests/issues/3472/timeline | null | completed | null | null | false | [
"Why are you passing `ensure_ascii=False`?\n",
"Anyway, that's kind of neither here nor there. There are several solutions to your problem:\n1. Don't use `ensure_ascii=False`. There's no requirement to do it: JSON allows unicode escape characters.\n2. Alternatively, don't pass Requests a unicode string in `data`.... |
https://api.github.com/repos/psf/requests/issues/3471 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3471/labels{/name} | https://api.github.com/repos/psf/requests/issues/3471/comments | https://api.github.com/repos/psf/requests/issues/3471/events | https://github.com/psf/requests/issues/3471 | 169,337,922 | MDU6SXNzdWUxNjkzMzc5MjI= | 3,471 | OverflowError: requested number of bytes is more than a Python string can hold | {
"avatar_url": "https://avatars.githubusercontent.com/u/985461?v=4",
"events_url": "https://api.github.com/users/mopuru-murali/events{/privacy}",
"followers_url": "https://api.github.com/users/mopuru-murali/followers",
"following_url": "https://api.github.com/users/mopuru-murali/following{/other_user}",
"gists_url": "https://api.github.com/users/mopuru-murali/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mopuru-murali",
"id": 985461,
"login": "mopuru-murali",
"node_id": "MDQ6VXNlcjk4NTQ2MQ==",
"organizations_url": "https://api.github.com/users/mopuru-murali/orgs",
"received_events_url": "https://api.github.com/users/mopuru-murali/received_events",
"repos_url": "https://api.github.com/users/mopuru-murali/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mopuru-murali/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mopuru-murali/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mopuru-murali",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-08-04T10:02:49Z | 2021-09-08T16:00:39Z | 2016-08-04T10:07:20Z | NONE | resolved | I'm facing some weird problem.
I'm not able to post ~3GB (more than 2GB) file using requests > 0.7.4 module because of getting following err.
File "/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/api.py", line 83, in post
return request('post', url, data=data, *_kwargs)
File "/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/api.py", line 38, in request
return s.request(method=method, url=url, *_kwargs)
File "/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/sessions.py", line 200, in request
r.send(prefetch=prefetch)
File "/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/models.py", line 387, in send
fields.update({k: (fn, fp.read())})
OverflowError: requested number of bytes is more than a Python string can hold
But, with requests<=0.7.4 its working fine. No problem of OverflowError.
So, I was wondering why it started throwing OverflowError in latest version of requests module (or from requests > 0.7.4)?
I tested this with python2.6 and python2.7.
PS: I know that instead of posting huge file at once, we can post same file via file chunks. But, I do not want chucks way.
| {
"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/3471/reactions"
} | https://api.github.com/repos/psf/requests/issues/3471/timeline | null | completed | null | null | false | [
"The problem here is that you're sending the file using a multipart file upload. For requests, this causes us to read in the entire file in order to build the body.\n\nYou can resolve this by either not using multipart file uploads (if that's possible), or else by using the [streaming multipart data encoder](https:... |
https://api.github.com/repos/psf/requests/issues/3470 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3470/labels{/name} | https://api.github.com/repos/psf/requests/issues/3470/comments | https://api.github.com/repos/psf/requests/issues/3470/events | https://github.com/psf/requests/issues/3470 | 169,295,932 | MDU6SXNzdWUxNjkyOTU5MzI= | 3,470 | Add option to specify custom DNS resolver | {
"avatar_url": "https://avatars.githubusercontent.com/u/943001?v=4",
"events_url": "https://api.github.com/users/yeukhon/events{/privacy}",
"followers_url": "https://api.github.com/users/yeukhon/followers",
"following_url": "https://api.github.com/users/yeukhon/following{/other_user}",
"gists_url": "https://api.github.com/users/yeukhon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yeukhon",
"id": 943001,
"login": "yeukhon",
"node_id": "MDQ6VXNlcjk0MzAwMQ==",
"organizations_url": "https://api.github.com/users/yeukhon/orgs",
"received_events_url": "https://api.github.com/users/yeukhon/received_events",
"repos_url": "https://api.github.com/users/yeukhon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yeukhon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yeukhon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yeukhon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-04T05:45:25Z | 2021-09-08T16:00:39Z | 2016-08-04T07:07:08Z | NONE | resolved | My services are running on AWS with some of the applications being external. We would run Nagios check to make sure web applications are still accessible (internally and externally). One challenge I have is to run the check as an external user because our Nagios server is in the VPC so the check is performed over the internal VPC network.
There are many ways to solve my problem, for example recompile libcurl to support resolver option, or run my nagios in another VPC without any knowledge of my external applications, or adopt a proxy server.
However, I found http://stackoverflow.com/questions/22609385/python-requests-library-define-specific-dns. As a Python programmer I like to stick with Python if requests could offer this out of the box.
Is anyone interested and willing to accept an option in requests to specify custom DNS resolver?
| {
"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/3470/reactions"
} | https://api.github.com/repos/psf/requests/issues/3470/timeline | null | completed | null | null | false | [
"Thanks for this request!\n\nRequests is certainly not going to take a patch use use a custom DNS resolver, partly because we don't want to add flags and options for such low-level functionality, and partly because that functionality is owned entirely by the urllib3 library, which we don't carry patches for.\n\nHow... |
https://api.github.com/repos/psf/requests/issues/3469 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3469/labels{/name} | https://api.github.com/repos/psf/requests/issues/3469/comments | https://api.github.com/repos/psf/requests/issues/3469/events | https://github.com/psf/requests/pull/3469 | 169,220,944 | MDExOlB1bGxSZXF1ZXN0Nzk5NjkzOTU= | 3,469 | Add a bit about RequestsCookieJar to Cookies section | {
"avatar_url": "https://avatars.githubusercontent.com/u/16552531?v=4",
"events_url": "https://api.github.com/users/roselma/events{/privacy}",
"followers_url": "https://api.github.com/users/roselma/followers",
"following_url": "https://api.github.com/users/roselma/following{/other_user}",
"gists_url": "https://api.github.com/users/roselma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/roselma",
"id": 16552531,
"login": "roselma",
"node_id": "MDQ6VXNlcjE2NTUyNTMx",
"organizations_url": "https://api.github.com/users/roselma/orgs",
"received_events_url": "https://api.github.com/users/roselma/received_events",
"repos_url": "https://api.github.com/users/roselma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/roselma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/roselma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/roselma",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-03T20:03:50Z | 2021-09-08T03:00:55Z | 2016-08-03T20:04:58Z | NONE | resolved | {
"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/3469/reactions"
} | https://api.github.com/repos/psf/requests/issues/3469/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3469.diff",
"html_url": "https://github.com/psf/requests/pull/3469",
"merged_at": "2016-08-03T20:04:58Z",
"patch_url": "https://github.com/psf/requests/pull/3469.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3469"
} | true | [
"Woop, woop, thanks @roselma! :sparkles: :cake: :sparkles:\n"
] | |
https://api.github.com/repos/psf/requests/issues/3468 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3468/labels{/name} | https://api.github.com/repos/psf/requests/issues/3468/comments | https://api.github.com/repos/psf/requests/issues/3468/events | https://github.com/psf/requests/issues/3468 | 169,011,590 | MDU6SXNzdWUxNjkwMTE1OTA= | 3,468 | Secure proxies are not supported | {
"avatar_url": "https://avatars.githubusercontent.com/u/7513068?v=4",
"events_url": "https://api.github.com/users/dessant/events{/privacy}",
"followers_url": "https://api.github.com/users/dessant/followers",
"following_url": "https://api.github.com/users/dessant/following{/other_user}",
"gists_url": "https://api.github.com/users/dessant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dessant",
"id": 7513068,
"login": "dessant",
"node_id": "MDQ6VXNlcjc1MTMwNjg=",
"organizations_url": "https://api.github.com/users/dessant/orgs",
"received_events_url": "https://api.github.com/users/dessant/received_events",
"repos_url": "https://api.github.com/users/dessant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dessant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dessant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dessant",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-02T23:19:21Z | 2021-09-08T16:00:33Z | 2016-08-05T07:44:33Z | NONE | resolved | Requests using [secure web proxies](https://www.chromium.org/developers/design-documents/secure-web-proxy) are failing. You can fetch a new proxy and credentials with [oprah-proxy](https://github.com/spaze/oprah-proxy) for testing.
``` python
import requests
proxy = ''
port = 8000
user = ''
passw = ''
proxies = {
'https': 'https://{}:{}@{}:{}/'.format(user, passw, proxy, port),
}
requests.get('https://httpbin.org/get', proxies=proxies)
```
``` python
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 572, in urlopen
self._prepare_proxy(conn)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 780, in _prepare_proxy
conn.connect()
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 267, in connect
self._tunnel()
File "C:\Python34\lib\http\client.py", line 852, in _tunnel
(version, code, message) = response._read_status()
File "C:\Python34\lib\http\client.py", line 368, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\requests\adapters.py", line 403, in send
timeout=timeout
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 623, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\retry.py", line 255, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise
raise value.with_traceback(tb)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 572, in urlopen
self._prepare_proxy(conn)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 780, in _prepare_proxy
conn.connect()
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 267, in connect
self._tunnel()
File "C:\Python34\lib\http\client.py", line 852, in _tunnel
(version, code, message) = response._read_status()
File "C:\Python34\lib\http\client.py", line 368, in _read_status
raise BadStatusLine(line)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\x16',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\test.py", line 13, in <module>
requests.get('https://httpbin.org/get', proxies=proxies)
File "C:\Python34\lib\site-packages\requests\api.py", line 71, in get
return request('get', url, params=params, **kwargs)
File "C:\Python34\lib\site-packages\requests\api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "C:\Python34\lib\site-packages\requests\adapters.py", line 453, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\x16',))
```
| {
"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/3468/reactions"
} | https://api.github.com/repos/psf/requests/issues/3468/timeline | null | completed | null | null | false | [
"Requests does not support secure web proxies at this time, I'm afraid, and there is no plan to do so in the immediate future.\n"
] |
https://api.github.com/repos/psf/requests/issues/3467 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3467/labels{/name} | https://api.github.com/repos/psf/requests/issues/3467/comments | https://api.github.com/repos/psf/requests/issues/3467/events | https://github.com/psf/requests/issues/3467 | 168,891,951 | MDU6SXNzdWUxNjg4OTE5NTE= | 3,467 | cannot pass realm parameter to HTTPDigestAuth | {
"avatar_url": "https://avatars.githubusercontent.com/u/19496917?v=4",
"events_url": "https://api.github.com/users/alex-movila/events{/privacy}",
"followers_url": "https://api.github.com/users/alex-movila/followers",
"following_url": "https://api.github.com/users/alex-movila/following{/other_user}",
"gists_url": "https://api.github.com/users/alex-movila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex-movila",
"id": 19496917,
"login": "alex-movila",
"node_id": "MDQ6VXNlcjE5NDk2OTE3",
"organizations_url": "https://api.github.com/users/alex-movila/orgs",
"received_events_url": "https://api.github.com/users/alex-movila/received_events",
"repos_url": "https://api.github.com/users/alex-movila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex-movila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex-movila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex-movila",
"user_view_type": "public"
} | [
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] | closed | true | null | [] | null | 14 | 2016-08-02T13:57:49Z | 2021-09-08T15:00:55Z | 2016-09-05T23:59:48Z | NONE | resolved | I need to specify a custom realm parameter for HTTPDigestAuth.
It does not seems to be supported.
| {
"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/3467/reactions"
} | https://api.github.com/repos/psf/requests/issues/3467/timeline | null | completed | null | null | false | [
"When you say you \"need to specify a custom realm parameter\", what do you believe that parameter will do? The realm is provided by the remote host in the auth challenge.\n",
"I get auth failed if I do not specify it. Besides urllib2 allows to pass this parameter.\n",
"urllib2 allows you to pass it because it ... |
https://api.github.com/repos/psf/requests/issues/3466 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3466/labels{/name} | https://api.github.com/repos/psf/requests/issues/3466/comments | https://api.github.com/repos/psf/requests/issues/3466/events | https://github.com/psf/requests/issues/3466 | 168,647,336 | MDU6SXNzdWUxNjg2NDczMzY= | 3,466 | Replacing HTTP Content-Length header | {
"avatar_url": "https://avatars.githubusercontent.com/u/10746711?v=4",
"events_url": "https://api.github.com/users/noadmin/events{/privacy}",
"followers_url": "https://api.github.com/users/noadmin/followers",
"following_url": "https://api.github.com/users/noadmin/following{/other_user}",
"gists_url": "https://api.github.com/users/noadmin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/noadmin",
"id": 10746711,
"login": "noadmin",
"node_id": "MDQ6VXNlcjEwNzQ2NzEx",
"organizations_url": "https://api.github.com/users/noadmin/orgs",
"received_events_url": "https://api.github.com/users/noadmin/received_events",
"repos_url": "https://api.github.com/users/noadmin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/noadmin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/noadmin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/noadmin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-08-01T13:36:03Z | 2021-09-08T16:00:41Z | 2016-08-01T13:37:43Z | NONE | resolved | Good day,
We use your lib for testing S3 protocol, and found minor issue with HTTP headers:
some of header parameters, such as Content-Length, were override by sessions.prepare_request()
is it possible to add logic not to do this (smth like if request.headers['Content-Length']: p.headers['Content-Length'] = request.headers['Content-Length']) if header value is provided.
Thank You
| {
"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/3466/reactions"
} | https://api.github.com/repos/psf/requests/issues/3466/timeline | null | completed | null | null | false | [
"You can change these values by using the [`PreparedRequest` flow](http://docs.python-requests.org/en/master/user/advanced/#prepared-requests), which allow you to either skip the Session preparation step or to change the request after it has been prepared by the Session.\n\n_However_, I strongly recommend that you ... |
https://api.github.com/repos/psf/requests/issues/3465 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3465/labels{/name} | https://api.github.com/repos/psf/requests/issues/3465/comments | https://api.github.com/repos/psf/requests/issues/3465/events | https://github.com/psf/requests/issues/3465 | 168,631,950 | MDU6SXNzdWUxNjg2MzE5NTA= | 3,465 | Recieving 400 Bad Request on GET-request | {
"avatar_url": "https://avatars.githubusercontent.com/u/17240507?v=4",
"events_url": "https://api.github.com/users/abriginets/events{/privacy}",
"followers_url": "https://api.github.com/users/abriginets/followers",
"following_url": "https://api.github.com/users/abriginets/following{/other_user}",
"gists_url": "https://api.github.com/users/abriginets/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abriginets",
"id": 17240507,
"login": "abriginets",
"node_id": "MDQ6VXNlcjE3MjQwNTA3",
"organizations_url": "https://api.github.com/users/abriginets/orgs",
"received_events_url": "https://api.github.com/users/abriginets/received_events",
"repos_url": "https://api.github.com/users/abriginets/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abriginets/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abriginets/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abriginets",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-08-01T12:14:42Z | 2021-09-08T16:00:41Z | 2016-08-01T12:35:24Z | NONE | resolved | Hi. I've wrote a code, but i'm getting an error **400 Bad Request**, when sending a GET-request. What i did wrong?
`{'Host': 'http://keddr.com', 'Keep-Alive': 112, 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100223 Firefox/3.5.8 Lunascape/6.1.0.20940 ( .NET CLR 3.5.30729)', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Connection': 'keep-alive', 'Referer': 'http://grandsultansaloon.com/plugins/system/plugin_googlemap2_proxy.php?url=EQZMME', 'Cache-Control': 'no-cache'}
<Response [400]>
`
Here goes my Python code:
``` python
def httprequest():
url = sys.argv[1]
payload = {buildblock(random.randint(50,100)): buildblock(random.randint(50,100))}
headers = {'User-Agent': random.choice(ua),
'Cache-Control': 'no-cache',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Referer': random.choice(ref)+buildblock(random.randint(3,10)),
'Keep-Alive': random.randint(110,120),
'Connection': 'keep-alive',
'Host': url}
r = requests.get(url, params=payload, headers=headers)
print(headers)
print(r)
```
| {
"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/3465/reactions"
} | https://api.github.com/repos/psf/requests/issues/3465/timeline | null | completed | null | null | false | [
"Well, as a first point your Host header is wrong. Please remove both Host, Header, and Keep-Alive from your header dictionary: Requests will manage those appropriately by itself and will simply ignore anything you set.\n",
"Thanks, it helped. And if i'm sending my request, for example, to _example.org_, then in ... |
https://api.github.com/repos/psf/requests/issues/3464 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3464/labels{/name} | https://api.github.com/repos/psf/requests/issues/3464/comments | https://api.github.com/repos/psf/requests/issues/3464/events | https://github.com/psf/requests/issues/3464 | 168,564,523 | MDU6SXNzdWUxNjg1NjQ1MjM= | 3,464 | python -m requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/716529?v=4",
"events_url": "https://api.github.com/users/glyph/events{/privacy}",
"followers_url": "https://api.github.com/users/glyph/followers",
"following_url": "https://api.github.com/users/glyph/following{/other_user}",
"gists_url": "https://api.github.com/users/glyph/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/glyph",
"id": 716529,
"login": "glyph",
"node_id": "MDQ6VXNlcjcxNjUyOQ==",
"organizations_url": "https://api.github.com/users/glyph/orgs",
"received_events_url": "https://api.github.com/users/glyph/received_events",
"repos_url": "https://api.github.com/users/glyph/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/glyph/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/glyph/subscriptions",
"type": "User",
"url": "https://api.github.com/users/glyph",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-08-01T04:33:30Z | 2021-09-08T16:00:41Z | 2016-08-01T04:35:36Z | NONE | resolved | Often when I'm debugging some HTTP thing, I poke at with `curl`. But of course in many cases when I interact with it for real, I am going to be talking to it with `requests`. Sometimes - especially in the case of weird SSL debugging - `curl` and `requests` will behave differently. It would be really handy if `requests` had at least partial emulation of the `curl` command-line options to enable me to just `python -m requests https://example.com/` and see what it's doing independent of my code.
A really cool bonus feature here would be to print out the relevant Python code for making that same request, but I can see how that might be getting a little far out of scope.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/716529?v=4",
"events_url": "https://api.github.com/users/glyph/events{/privacy}",
"followers_url": "https://api.github.com/users/glyph/followers",
"following_url": "https://api.github.com/users/glyph/following{/other_user}",
"gists_url": "https://api.github.com/users/glyph/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/glyph",
"id": 716529,
"login": "glyph",
"node_id": "MDQ6VXNlcjcxNjUyOQ==",
"organizations_url": "https://api.github.com/users/glyph/orgs",
"received_events_url": "https://api.github.com/users/glyph/received_events",
"repos_url": "https://api.github.com/users/glyph/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/glyph/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/glyph/subscriptions",
"type": "User",
"url": "https://api.github.com/users/glyph",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3464/reactions"
} | https://api.github.com/repos/psf/requests/issues/3464/timeline | null | completed | null | null | false | [
"Sorry if this is a dup - I could swear I've seen it before but after 15 minutes of searching I couldn't find it.\n",
"I have considered this in the past, but opted against it. Might as well use http://httpie.org, which uses Requests. \n",
"@kennethreitz Oh - in my defense I did try searching closed issues as w... |
https://api.github.com/repos/psf/requests/issues/3463 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3463/labels{/name} | https://api.github.com/repos/psf/requests/issues/3463/comments | https://api.github.com/repos/psf/requests/issues/3463/events | https://github.com/psf/requests/pull/3463 | 168,486,327 | MDExOlB1bGxSZXF1ZXN0Nzk0Njc1NjY= | 3,463 | #3416 persisting cookie policy. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [
{
"color": "d4c5f9",
"default": false,
"description": null,
"id": 536793543,
"name": "needs rebase",
"node_id": "MDU6TGFiZWw1MzY3OTM1NDM=",
"url": "https://api.github.com/repos/psf/requests/labels/needs%20rebase"
}
] | closed | true | null | [] | null | 5 | 2016-07-30T20:51:17Z | 2021-09-06T00:06:58Z | 2017-02-10T21:51:13Z | MEMBER | resolved | This will add in the option to persist cookie policies on requests when the session and request cookie jars are merged. Currently any custom cookie policies on the session are not sent as noted in #3416.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3463/reactions"
} | https://api.github.com/repos/psf/requests/issues/3463/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3463.diff",
"html_url": "https://github.com/psf/requests/pull/3463",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3463.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3463"
} | true | [
"So I'm generally ok with this, but I'd like @sigmavirus24 and @kennethreitz to have a look.\n",
"Needs a rebase. ",
"I'm actually going to propose we close this one unless there's consensus it's needed. There seems to be a lot of unresolved discussion on the state of Session cookies.",
"thanks @nateprewitt "... |
https://api.github.com/repos/psf/requests/issues/3462 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3462/labels{/name} | https://api.github.com/repos/psf/requests/issues/3462/comments | https://api.github.com/repos/psf/requests/issues/3462/events | https://github.com/psf/requests/pull/3462 | 168,464,797 | MDExOlB1bGxSZXF1ZXN0Nzk0NTYwNjQ= | 3,462 | Close and then release the connection | {
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 1 | 2016-07-30T12:18:14Z | 2021-09-08T03:00:55Z | 2016-07-30T17:18:14Z | CONTRIBUTOR | resolved | urllib3 closes the underlying connection when we call
urllib3.Response.close but does not release it back to the connection
pool. This can cause issues when users have a blocking connection pool
configured and connections are not readily returned to the pool.
Since the underlying connection is closed, we should be able to safely
return the connection to the connection pool, so to fix this issue we
merely need to not return after closing the response.
Closes gh-3461
| {
"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/3462/reactions"
} | https://api.github.com/repos/psf/requests/issues/3462/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3462.diff",
"html_url": "https://github.com/psf/requests/pull/3462",
"merged_at": "2016-07-30T17:18:14Z",
"patch_url": "https://github.com/psf/requests/pull/3462.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3462"
} | true | [
"Took a second to understand this patch, but when I saw it I felt pretty silly. This is an obvious win! Thanks! :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3461 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3461/labels{/name} | https://api.github.com/repos/psf/requests/issues/3461/comments | https://api.github.com/repos/psf/requests/issues/3461/events | https://github.com/psf/requests/issues/3461 | 168,455,190 | MDU6SXNzdWUxNjg0NTUxOTA= | 3,461 | Closing streams before complete read leaks connections | {
"avatar_url": "https://avatars.githubusercontent.com/u/2386612?v=4",
"events_url": "https://api.github.com/users/ml31415/events{/privacy}",
"followers_url": "https://api.github.com/users/ml31415/followers",
"following_url": "https://api.github.com/users/ml31415/following{/other_user}",
"gists_url": "https://api.github.com/users/ml31415/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ml31415",
"id": 2386612,
"login": "ml31415",
"node_id": "MDQ6VXNlcjIzODY2MTI=",
"organizations_url": "https://api.github.com/users/ml31415/orgs",
"received_events_url": "https://api.github.com/users/ml31415/received_events",
"repos_url": "https://api.github.com/users/ml31415/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ml31415/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ml31415/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ml31415",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-30T07:40:12Z | 2021-09-08T17:05:19Z | 2016-07-30T17:18:14Z | NONE | resolved | ``` python
import requests
s = requests.Session()
adp = requests.adapters.HTTPAdapter(pool_maxsize=3,
pool_connections=3,
pool_block=True)
s.mount('http://', adp)
for _ in range(5):
resp = s.get('http://google.com', stream=True)
# resp.content
# resp.raw.release_conn()
resp.close()
print "closed"
```
This hangs after the 3rd close, as the connection pool is depleted. `resp.close()` just closes the connection, when the data is not read completely, but no connection is returned to the pool:
https://github.com/kennethreitz/requests/blob/master/requests/models.py#L871
| {
"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/3461/reactions"
} | https://api.github.com/repos/psf/requests/issues/3461/timeline | null | completed | null | null | false | [
"Thanks guys!\n"
] |
https://api.github.com/repos/psf/requests/issues/3460 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3460/labels{/name} | https://api.github.com/repos/psf/requests/issues/3460/comments | https://api.github.com/repos/psf/requests/issues/3460/events | https://github.com/psf/requests/issues/3460 | 168,355,962 | MDU6SXNzdWUxNjgzNTU5NjI= | 3,460 | Documentation makes no mention of CookieJar | {
"avatar_url": "https://avatars.githubusercontent.com/u/16552531?v=4",
"events_url": "https://api.github.com/users/roselma/events{/privacy}",
"followers_url": "https://api.github.com/users/roselma/followers",
"following_url": "https://api.github.com/users/roselma/following{/other_user}",
"gists_url": "https://api.github.com/users/roselma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/roselma",
"id": 16552531,
"login": "roselma",
"node_id": "MDQ6VXNlcjE2NTUyNTMx",
"organizations_url": "https://api.github.com/users/roselma/orgs",
"received_events_url": "https://api.github.com/users/roselma/received_events",
"repos_url": "https://api.github.com/users/roselma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/roselma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/roselma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/roselma",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-07-29T15:52:00Z | 2021-09-08T16:00:40Z | 2016-08-03T20:06:52Z | NONE | resolved | There are only dict-based examples in the documentation of the cookies parameter to the get method. Making some mention of the use of CookieJar might save some poor sod from re-implementing half of CookieJar and then finally discovering its existence by printing the cookies property in the response.
| {
"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/3460/reactions"
} | https://api.github.com/repos/psf/requests/issues/3460/timeline | null | completed | null | null | false | [
"Yup, sounds good to me. Would you like to write something? =)\n",
"It looks like the [`RequestsCookieJar` class](http://docs.python-requests.org/en/master/api/#requests.cookies.RequestsCookieJar) is available on the main page of links in the documentation, under the [Developer Interface docs](http://docs.python-... |
https://api.github.com/repos/psf/requests/issues/3459 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3459/labels{/name} | https://api.github.com/repos/psf/requests/issues/3459/comments | https://api.github.com/repos/psf/requests/issues/3459/events | https://github.com/psf/requests/issues/3459 | 168,189,284 | MDU6SXNzdWUxNjgxODkyODQ= | 3,459 | How to handle incompleteRead()? | {
"avatar_url": "https://avatars.githubusercontent.com/u/18126805?v=4",
"events_url": "https://api.github.com/users/haoramirez/events{/privacy}",
"followers_url": "https://api.github.com/users/haoramirez/followers",
"following_url": "https://api.github.com/users/haoramirez/following{/other_user}",
"gists_url": "https://api.github.com/users/haoramirez/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haoramirez",
"id": 18126805,
"login": "haoramirez",
"node_id": "MDQ6VXNlcjE4MTI2ODA1",
"organizations_url": "https://api.github.com/users/haoramirez/orgs",
"received_events_url": "https://api.github.com/users/haoramirez/received_events",
"repos_url": "https://api.github.com/users/haoramirez/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haoramirez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haoramirez/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haoramirez",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-28T20:30:58Z | 2021-09-08T17:05:20Z | 2016-07-28T20:55:02Z | NONE | resolved | Hi there,
How am I supposed to handle an incompleteRead?
I don't get it, because TCP is supposed to inherently prevent this right? And getting this error means that Requests, or Urllib3, somehow doesn't do checksumming properly?
I'm just way in over my head thinking about how I'm supposed to even catch 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/3459/reactions"
} | https://api.github.com/repos/psf/requests/issues/3459/timeline | null | completed | null | null | false | [
"Thanks for your question!\n\nTCP is not supposed to prevent `IncompleteRead`. If you consider certain possible failure cases you'll see that it's impossible for TCP to prevent such a case. For example, if the server that is serving your web page is destroyed by a meteor midway through serving your web page, there ... |
https://api.github.com/repos/psf/requests/issues/3458 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3458/labels{/name} | https://api.github.com/repos/psf/requests/issues/3458/comments | https://api.github.com/repos/psf/requests/issues/3458/events | https://github.com/psf/requests/issues/3458 | 168,078,925 | MDU6SXNzdWUxNjgwNzg5MjU= | 3,458 | Closed keep-alive connections not handled correctly | {
"avatar_url": "https://avatars.githubusercontent.com/u/650612?v=4",
"events_url": "https://api.github.com/users/santtu/events{/privacy}",
"followers_url": "https://api.github.com/users/santtu/followers",
"following_url": "https://api.github.com/users/santtu/following{/other_user}",
"gists_url": "https://api.github.com/users/santtu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/santtu",
"id": 650612,
"login": "santtu",
"node_id": "MDQ6VXNlcjY1MDYxMg==",
"organizations_url": "https://api.github.com/users/santtu/orgs",
"received_events_url": "https://api.github.com/users/santtu/received_events",
"repos_url": "https://api.github.com/users/santtu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/santtu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/santtu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/santtu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-07-28T12:00:12Z | 2021-09-08T17:05:21Z | 2016-07-28T19:00:37Z | NONE | resolved | I have run into a case where a session-based GET request fails:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 376, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 378, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 609, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/util/retry.py", line 245, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/packages/six.py", line 309, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 378, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 11, in <module>
r = s.get(url, allow_redirects=False)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/adapters.py", line 412, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
```
I finally narrowed the case to a situation where
1. a request is made where the connection is kept open (`Session`) e.g. keep-alive is enabled
2. the connection is to a host that is reverse-proxied by nginx
3. nginx configuration is reloaded
4. a new request is made using the session
I believe this is because nginx will close the idle connection (at step 3) and when the next request is generated (step 4) it tries to write to the closed socket which in turn will generate connection abort exception.
**As far as I understand Keep-Alive nginx is doing everything correctly.** From RFC2616:
> A client, server, or proxy MAY close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.
>
> This means that clients, servers, and proxies MUST be able to recover from asynchronous close events. Client software SHOULD reopen the transport connection and retransmit the aborted sequence of requests without user interaction so long as the request sequence is idempotent (see section 9.1.2). Non-idempotent methods or sequences MUST NOT be automatically retried, although user agents MAY offer a human operator the choice of retrying the request(s). Confirmation by user-agent software with semantic understanding of the application MAY substitute for user confirmation. The automatic retry SHOULD NOT be repeated if the second sequence of requests fails.
What nginx does on configuration reload is to iterate over connections and close any that it considers idle. (It will allow pending requests to finish, but will close them after completion, too.) So for the client it appears as if the remote end has just hung up. Since the socket state is checked only when a new request is being sent it appears at that point.
I created a pair of test programs (https://gist.github.com/santtu/a38bb50c44623a162df72cb6d0a45f0a), a simple socket server which fakes a keep-alive HTTP/1.1 server but will terminate the connection after a short delay, and another program that will do busyloop GETs on an URL using a persistent session.
Here are the results. First is the server (`test2.py`) and then the client (`test.py`):
```
$ python3 test2.py
127.0.0.1 wrote:
b'GET / HTTP/1.1\r\nHost: localhost:8080\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: python-requests/2.8.1\r\nConnection: keep-alive'
```
```
$ python3 test.py http://localhost:8080/
200 OK
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 376, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 378, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 609, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/util/retry.py", line 245, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/packages/six.py", line 309, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/packages/urllib3/connectionpool.py", line 378, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 11, in <module>
r = s.get(url, allow_redirects=False)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests-2.8.1-py3.5.egg/requests/adapters.py", line 412, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
```
The first `200 OK` comes from the faked response after which the client ends up blocking on the socket, finally getting connection abort when it is a few seconds later closed by the server side.
Any thoughts on this?
| {
"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/3458/reactions"
} | https://api.github.com/repos/psf/requests/issues/3458/timeline | null | completed | null | null | false | [
"If you pass `stream=True`, can you show me the headers of the response?\n",
"To be clear, if the connection is closed _after_ we've written our request down it, there is very little we can do to handle this. Exceptions are the only sensible thing we can raise: we wrote a request _successfully_, with no TCP error... |
https://api.github.com/repos/psf/requests/issues/3447 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3447/labels{/name} | https://api.github.com/repos/psf/requests/issues/3447/comments | https://api.github.com/repos/psf/requests/issues/3447/events | https://github.com/psf/requests/issues/3447 | 168,009,183 | MDU6SXNzdWUxNjgwMDkxODM= | 3,447 | has bug when using post parameter with list including embed dict? | {
"avatar_url": "https://avatars.githubusercontent.com/u/6281968?v=4",
"events_url": "https://api.github.com/users/gsw945/events{/privacy}",
"followers_url": "https://api.github.com/users/gsw945/followers",
"following_url": "https://api.github.com/users/gsw945/following{/other_user}",
"gists_url": "https://api.github.com/users/gsw945/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gsw945",
"id": 6281968,
"login": "gsw945",
"node_id": "MDQ6VXNlcjYyODE5Njg=",
"organizations_url": "https://api.github.com/users/gsw945/orgs",
"received_events_url": "https://api.github.com/users/gsw945/received_events",
"repos_url": "https://api.github.com/users/gsw945/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gsw945/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gsw945/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gsw945",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-28T03:58:57Z | 2021-09-08T17:05:21Z | 2016-07-28T07:45:20Z | NONE | resolved | My Code is:
``` python
import requests
try:
import json
except ImportError:
import simplejson as json
ids = [
{
'user_id_value': 1,
'user_id_name': 'lms_user_id'
},
{
'user_id_value': 2,
'user_id_name': 'lms_user_id'
}
]
params = {
'ids': ids,
'secret_key': 'c02def69e05614es1c3d14fdfd56ca786e96e215'
}
r = requests.post('http://httpbin.org/post', data=params)
d = r.json()
j = json.dumps(d, indent=4)
print(j)
```
and the output is:
``` json
{
"data": "",
"json": null,
"headers": {
"Accept": "*/*",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"Accept-Encoding": "gzip, deflate",
"User-Agent": "python-requests/2.10.0",
"Content-Length": "121"
},
"args": {},
"files": {},
"url": "http://httpbin.org/post",
"form": {
"ids": [
"user_id_value",
"user_id_name",
"user_id_value",
"user_id_name"
],
"secret_key": "c02def69e05614es1c3d14fdfd56ca786e96e215"
},
"origin": "125.84.178.184"
}
```
I hope the part of 'form.ids' in result as below:
``` json
[
{
"user_id_value": 1,
"user_id_name": "lms_user_id"
},
{
"user_id_value": 2,
"user_id_name": "lms_user_id"
}
]
```
| {
"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/3447/reactions"
} | https://api.github.com/repos/psf/requests/issues/3447/timeline | null | completed | null | null | false | [
"You're presumably trying to send JSON-encoded data. To do that, change your `post` line to this:\n\n```\nr = requests.post('http://httpbin.org/post', json=params)\n```\n",
"@Lukasa Thank you very much, it's working!\n"
] |
https://api.github.com/repos/psf/requests/issues/3446 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3446/labels{/name} | https://api.github.com/repos/psf/requests/issues/3446/comments | https://api.github.com/repos/psf/requests/issues/3446/events | https://github.com/psf/requests/issues/3446 | 167,840,304 | MDU6SXNzdWUxNjc4NDAzMDQ= | 3,446 | Posting a mutlipart-encoded file with non-ASCII characters in filename doesn't work | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2016-07-27T12:21:19Z | 2021-09-06T00:06:34Z | 2016-07-27T12:56:24Z | NONE | resolved | The following code doesn't actually upload any data to the server:
``` python
r = requests.post('https://gs.smuglo.li/api/statusnet/media/upload',
auth=('testbot', 'testbot'),
files={'media': open('/tmp/Снимок экрана_2016-07-27_05-15-38.png', 'rb')})
```
| {
"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/3446/reactions"
} | https://api.github.com/repos/psf/requests/issues/3446/timeline | null | completed | null | null | false | [
"What makes you think that doesn't upload data to the server?\n",
"Put another way: what is `r.request.body`?\n",
"@lukasa \n\n> What makes you think that doesn't upload data to the server?\n\nThe fact that the server returns an XML with following content:\n\n``` xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\... |
https://api.github.com/repos/psf/requests/issues/3445 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3445/labels{/name} | https://api.github.com/repos/psf/requests/issues/3445/comments | https://api.github.com/repos/psf/requests/issues/3445/events | https://github.com/psf/requests/issues/3445 | 167,803,894 | MDU6SXNzdWUxNjc4MDM4OTQ= | 3,445 | Connection pooling is tied to sessions | {
"avatar_url": "https://avatars.githubusercontent.com/u/1581590?v=4",
"events_url": "https://api.github.com/users/Changaco/events{/privacy}",
"followers_url": "https://api.github.com/users/Changaco/followers",
"following_url": "https://api.github.com/users/Changaco/following{/other_user}",
"gists_url": "https://api.github.com/users/Changaco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Changaco",
"id": 1581590,
"login": "Changaco",
"node_id": "MDQ6VXNlcjE1ODE1OTA=",
"organizations_url": "https://api.github.com/users/Changaco/orgs",
"received_events_url": "https://api.github.com/users/Changaco/received_events",
"repos_url": "https://api.github.com/users/Changaco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Changaco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Changaco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Changaco",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-07-27T08:55:42Z | 2021-09-08T14:00:23Z | 2016-07-27T09:00:26Z | NONE | resolved | This leads to confusion, as demonstrated by #3201 (ping @thanatos), but it's not a documentation issue, it's a design issue. Connections and sessions are unrelated: a connection can be used by multiple sessions, and a session can span multiple connections; thus the library shouldn't tie them together.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3445/reactions"
} | https://api.github.com/repos/psf/requests/issues/3445/timeline | null | completed | null | null | false | [
"Thanks for the feedback. It is appreciated and will be considered momentarily (then ignored) :)\n",
"Gentle +1 on this one.\r\n\r\nThe existing documentation isn't very clear (as another user mentioned in #3201, I find it quite contradictory, despite the assertion to the contrary). After reading these various Gi... |
https://api.github.com/repos/psf/requests/issues/3444 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3444/labels{/name} | https://api.github.com/repos/psf/requests/issues/3444/comments | https://api.github.com/repos/psf/requests/issues/3444/events | https://github.com/psf/requests/pull/3444 | 167,765,919 | MDExOlB1bGxSZXF1ZXN0Nzg5NjI1NjQ= | 3,444 | Adding better logging for requests/responses | {
"avatar_url": "https://avatars.githubusercontent.com/u/1700823?v=4",
"events_url": "https://api.github.com/users/seemethere/events{/privacy}",
"followers_url": "https://api.github.com/users/seemethere/followers",
"following_url": "https://api.github.com/users/seemethere/following{/other_user}",
"gists_url": "https://api.github.com/users/seemethere/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/seemethere",
"id": 1700823,
"login": "seemethere",
"node_id": "MDQ6VXNlcjE3MDA4MjM=",
"organizations_url": "https://api.github.com/users/seemethere/orgs",
"received_events_url": "https://api.github.com/users/seemethere/received_events",
"repos_url": "https://api.github.com/users/seemethere/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/seemethere/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/seemethere/subscriptions",
"type": "User",
"url": "https://api.github.com/users/seemethere",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-27T04:06:28Z | 2021-09-02T00:07:37Z | 2016-07-27T13:47:42Z | NONE | resolved | # Description
A logging mechanism to display important information regarding all requests and responses sent through the `requests` api.
# Why is this necessary?
At the company I work for we've been using this [logging mechanism](https://github.com/openstack/opencafe/blob/master/cafe/plugins/http/cafe/engine/http/client.py#L29) for a very long time and have had great success with it for testing numerous APIs. The level of logging provides the user with information they would normally have to dig for, and also provides a ready made log from which to draw relevant information. This is especially important for testing as it provides testers with sufficient logs to assess what is wrong, if a request should fail.
This information is even valuable for API developers as they can get immediate, easy to see, feedback on what their API is doing and returning.
# Try it for yourself!:
## Code:
``` python
import logging;root=logging.getLogger();root.addHandler(logging.StreamHandler());root.setLevel(0);
import requests
requests.post('https://jsonplaceholder.typicode.com/posts', data="""{"id": 101, "title": "foo", "body": "bar", "userId": 1}""", headers={'content-type': 'application/json'})
```
## Logging output:
```
(<requests.sessions.Session object at 0x111000a90>,) {'data': '{"id": 101, "title": "foo", "body": "bar", "userId": 1}', 'url': 'https://jsonplaceholder.typicode.com/posts', 'method': 'post', 'headers': {'content-type': 'application/json'}, 'json': None}
Starting new HTTPS connection (1): jsonplaceholder.typicode.com
"POST /posts HTTP/1.1" 201 65
------------
REQUEST SENT
------------
request method..: POST
request url.....: https://jsonplaceholder.typicode.com/posts
request params..:
request headers.: {'Content-Length': '55', 'Connection': 'keep-alive', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'python-requests/2.10.0', 'content-type': 'application/json'}
request body....: {"id": 101, "title": "foo", "body": "bar", "userId": 1}
-----------------
RESPONSE RECEIVED
-----------------
response status..: <Response [201]>
response time....: 0.7399938106536865
response headers.: {'CF-RAY': '2c8d2175a6d20108-DFW', 'X-Content-Type-Options': 'nosniff', 'Etag': 'W/"41-1twMC34dpcMvmO2NLu+Kkg"', 'Pragma': 'no-cache', 'Server': 'cloudflare-nginx', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '65', 'Set-Cookie': '__cfduid=dadf01d51aae9ede807ecf3e77439a3d51469591463; expires=Thu, 27-Jul-17 03:51:03 GMT; path=/; domain=.typicode.com; HttpOnly', 'X-Powered-By': 'Express', 'Via': '1.1 vegur', 'Vary': 'Origin, X-HTTP-Method-Override, Accept-Encoding', 'Date': 'Wed, 27 Jul 2016 03:51:03 GMT', 'Access-Control-Allow-Credentials': 'true', 'Expires': '-1', 'Connection': 'keep-alive'}
response body....: b'{\n "id": 101,\n "title": "foo",\n "body": "bar",\n "userId": 1\n}'
-------------------------------------------------------------------------------
```
| {
"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/3444/reactions"
} | https://api.github.com/repos/psf/requests/issues/3444/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3444.diff",
"html_url": "https://github.com/psf/requests/pull/3444",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3444.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3444"
} | true | [
"Thanks for this! \n\nIt's my view that this is overkill: generally speaking, users that require this function can implement it themselves, and the majority of users don't need it. But I'll leave that decision up to @kennethreitz.\n",
"@Lukasa further, in v1.0 didn't @kennethreitz completely tear out what logging... |
https://api.github.com/repos/psf/requests/issues/3443 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3443/labels{/name} | https://api.github.com/repos/psf/requests/issues/3443/comments | https://api.github.com/repos/psf/requests/issues/3443/events | https://github.com/psf/requests/pull/3443 | 167,756,237 | MDExOlB1bGxSZXF1ZXN0Nzg5NTY3OTg= | 3,443 | Fix quantity of blank lines after code objects. | {
"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 | 1 | 2016-07-27T02:37:41Z | 2016-07-27T02:40:10Z | 2016-07-27T02:40:10Z | NONE | null | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3443/reactions"
} | https://api.github.com/repos/psf/requests/issues/3443/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3443.diff",
"html_url": "https://github.com/psf/requests/pull/3443",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3443.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3443"
} | true | [
"I don't think these particular changes are helpful. Thank you though!\n"
] | |
https://api.github.com/repos/psf/requests/issues/3442 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3442/labels{/name} | https://api.github.com/repos/psf/requests/issues/3442/comments | https://api.github.com/repos/psf/requests/issues/3442/events | https://github.com/psf/requests/pull/3442 | 167,667,723 | MDExOlB1bGxSZXF1ZXN0Nzg4OTQwNzc= | 3,442 | removing incorrect param from resolve_redirects call | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-07-26T17:40:58Z | 2021-09-08T03:00:56Z | 2016-07-26T20:16:38Z | MEMBER | resolved | This fixes the failing test I brought up [here](https://github.com/kennethreitz/requests/pull/3417#issuecomment-233136908). 4dfe7a4 removed the `req` param from `resolve_redirects` in favor of calling `response.request` in the method. The test wasn't updated though, so the request param is being assigned to `stream` which should be a boolean. This is causing the `test_requests_are_updated_each_time` test to fail.
Edit: Sorry, I overlooked that this was addressed in 4dfe7a4 but accidentally reverted in 18b26d2.
| {
"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/3442/reactions"
} | https://api.github.com/repos/psf/requests/issues/3442/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3442.diff",
"html_url": "https://github.com/psf/requests/pull/3442",
"merged_at": "2016-07-26T20:16:38Z",
"patch_url": "https://github.com/psf/requests/pull/3442.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3442"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/3441 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3441/labels{/name} | https://api.github.com/repos/psf/requests/issues/3441/comments | https://api.github.com/repos/psf/requests/issues/3441/events | https://github.com/psf/requests/pull/3441 | 167,594,441 | MDExOlB1bGxSZXF1ZXN0Nzg4NDIxNjc= | 3,441 | Spelling fixes | {
"avatar_url": "https://avatars.githubusercontent.com/u/109152?v=4",
"events_url": "https://api.github.com/users/scop/events{/privacy}",
"followers_url": "https://api.github.com/users/scop/followers",
"following_url": "https://api.github.com/users/scop/following{/other_user}",
"gists_url": "https://api.github.com/users/scop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/scop",
"id": 109152,
"login": "scop",
"node_id": "MDQ6VXNlcjEwOTE1Mg==",
"organizations_url": "https://api.github.com/users/scop/orgs",
"received_events_url": "https://api.github.com/users/scop/received_events",
"repos_url": "https://api.github.com/users/scop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/scop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/scop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/scop",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-26T12:24:57Z | 2021-09-08T03:00:56Z | 2016-07-26T12:26:18Z | CONTRIBUTOR | resolved | {
"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/3441/reactions"
} | https://api.github.com/repos/psf/requests/issues/3441/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3441.diff",
"html_url": "https://github.com/psf/requests/pull/3441",
"merged_at": "2016-07-26T12:26:18Z",
"patch_url": "https://github.com/psf/requests/pull/3441.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3441"
} | true | [
"Thanks @scop!\n"
] | |
https://api.github.com/repos/psf/requests/issues/3440 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3440/labels{/name} | https://api.github.com/repos/psf/requests/issues/3440/comments | https://api.github.com/repos/psf/requests/issues/3440/events | https://github.com/psf/requests/issues/3440 | 167,507,984 | MDU6SXNzdWUxNjc1MDc5ODQ= | 3,440 | typo in the documentation(requests.codes.ok) | {
"avatar_url": "https://avatars.githubusercontent.com/u/11005974?v=4",
"events_url": "https://api.github.com/users/walkerlala/events{/privacy}",
"followers_url": "https://api.github.com/users/walkerlala/followers",
"following_url": "https://api.github.com/users/walkerlala/following{/other_user}",
"gists_url": "https://api.github.com/users/walkerlala/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/walkerlala",
"id": 11005974,
"login": "walkerlala",
"node_id": "MDQ6VXNlcjExMDA1OTc0",
"organizations_url": "https://api.github.com/users/walkerlala/orgs",
"received_events_url": "https://api.github.com/users/walkerlala/received_events",
"repos_url": "https://api.github.com/users/walkerlala/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/walkerlala/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/walkerlala/subscriptions",
"type": "User",
"url": "https://api.github.com/users/walkerlala",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-26T02:29:46Z | 2021-09-08T17:05:22Z | 2016-07-26T04:50:04Z | NONE | resolved | In Requests document, I [find a typo](http://docs.python-requests.org/en/master/user/quickstart/#response-status-codes)
```
>>> r.status_code = requests.codes.ok
>>> True
```
It should be:
```
>>> r.status_code = requests.status_code.codes.ok
```
It's minor, but you may want to fix it :)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3440/reactions"
} | https://api.github.com/repos/psf/requests/issues/3440/timeline | null | completed | null | null | false | [
"`requests.codes.ok` will actually work in this case because it is [imported in requests' `__init__.py`](https://github.com/kennethreitz/requests/blob/master/requests/__init__.py#L67). That way you won't need to reference the module in order to access the `codes` LookupDict.\n",
"@nateprewitt is correct. Thanks f... |
https://api.github.com/repos/psf/requests/issues/3439 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3439/labels{/name} | https://api.github.com/repos/psf/requests/issues/3439/comments | https://api.github.com/repos/psf/requests/issues/3439/events | https://github.com/psf/requests/pull/3439 | 167,144,377 | MDExOlB1bGxSZXF1ZXN0Nzg1NDg4OTY= | 3,439 | Put the failing URL into the default RequestException string (issue 3430) | {
"avatar_url": "https://avatars.githubusercontent.com/u/7074165?v=4",
"events_url": "https://api.github.com/users/dhduvall/events{/privacy}",
"followers_url": "https://api.github.com/users/dhduvall/followers",
"following_url": "https://api.github.com/users/dhduvall/following{/other_user}",
"gists_url": "https://api.github.com/users/dhduvall/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dhduvall",
"id": 7074165,
"login": "dhduvall",
"node_id": "MDQ6VXNlcjcwNzQxNjU=",
"organizations_url": "https://api.github.com/users/dhduvall/orgs",
"received_events_url": "https://api.github.com/users/dhduvall/received_events",
"repos_url": "https://api.github.com/users/dhduvall/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dhduvall/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dhduvall/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dhduvall",
"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}... | null | 6 | 2016-07-22T22:27:38Z | 2021-09-08T03:00:54Z | 2016-08-04T17:21:49Z | NONE | resolved | {
"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/3439/reactions"
} | https://api.github.com/repos/psf/requests/issues/3439/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3439.diff",
"html_url": "https://github.com/psf/requests/pull/3439",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3439.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3439"
} | true | [
"I'm happy enough with this: :+1:\n",
"To be clear, I assigned @kennethreitz to this because I think this is something he's going to care about and have opinions about. I'm fine with this but I'll leave it to him to merge.\n",
"#3430\n",
"An example of what this would actually look like in practice would be n... | |
https://api.github.com/repos/psf/requests/issues/3431 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3431/labels{/name} | https://api.github.com/repos/psf/requests/issues/3431/comments | https://api.github.com/repos/psf/requests/issues/3431/events | https://github.com/psf/requests/issues/3431 | 166,975,655 | MDU6SXNzdWUxNjY5NzU2NTU= | 3,431 | SSLError: EOF occurred in violation of protocol (_ssl.c:590) | {
"avatar_url": "https://avatars.githubusercontent.com/u/20591671?v=4",
"events_url": "https://api.github.com/users/JonahCun/events{/privacy}",
"followers_url": "https://api.github.com/users/JonahCun/followers",
"following_url": "https://api.github.com/users/JonahCun/following{/other_user}",
"gists_url": "https://api.github.com/users/JonahCun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JonahCun",
"id": 20591671,
"login": "JonahCun",
"node_id": "MDQ6VXNlcjIwNTkxNjcx",
"organizations_url": "https://api.github.com/users/JonahCun/orgs",
"received_events_url": "https://api.github.com/users/JonahCun/received_events",
"repos_url": "https://api.github.com/users/JonahCun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JonahCun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JonahCun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JonahCun",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-07-22T06:00:11Z | 2021-09-08T15:00:46Z | 2016-07-22T06:03:54Z | NONE | resolved | Hi Guys,
I was using the maps absolutely fine last night.
anyway this morning when I wake up I get this error?
The problems start when the debugger pin code is shown..
any ideas how to get around this?
Thanks
Jonah
- Debugger pin code: 315-030-935
Exception in thread search_thread:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, *_self.__kwargs)
File "example.py", line 581, in main
api_endpoint, access_token, profile_response = login(args)
File "example.py", line 92, in memoizer
cache[key] = obj(_args, *_kwargs)
File "example.py", line 514, in login
access_token = get_token(args.auth_service, args.username, global_password)
File "example.py", line 429, in get_token
global_token = login_ptc(username, password)
File "example.py", line 331, in login_ptc
r = SESSION.get(LOGIN_URL, headers=head)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 487, in get
return self.request('GET', url, *_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, *_send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 477, in send
raise SSLError(e, request=request)
SSLError: EOF occurred in violation of protocol (_ssl.c:590)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/20591671?v=4",
"events_url": "https://api.github.com/users/JonahCun/events{/privacy}",
"followers_url": "https://api.github.com/users/JonahCun/followers",
"following_url": "https://api.github.com/users/JonahCun/following{/other_user}",
"gists_url": "https://api.github.com/users/JonahCun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JonahCun",
"id": 20591671,
"login": "JonahCun",
"node_id": "MDQ6VXNlcjIwNTkxNjcx",
"organizations_url": "https://api.github.com/users/JonahCun/orgs",
"received_events_url": "https://api.github.com/users/JonahCun/received_events",
"repos_url": "https://api.github.com/users/JonahCun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JonahCun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JonahCun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JonahCun",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3431/reactions"
} | https://api.github.com/repos/psf/requests/issues/3431/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/3430 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3430/labels{/name} | https://api.github.com/repos/psf/requests/issues/3430/comments | https://api.github.com/repos/psf/requests/issues/3430/events | https://github.com/psf/requests/issues/3430 | 166,946,805 | MDU6SXNzdWUxNjY5NDY4MDU= | 3,430 | better default exception strings | {
"avatar_url": "https://avatars.githubusercontent.com/u/7074165?v=4",
"events_url": "https://api.github.com/users/dhduvall/events{/privacy}",
"followers_url": "https://api.github.com/users/dhduvall/followers",
"following_url": "https://api.github.com/users/dhduvall/following{/other_user}",
"gists_url": "https://api.github.com/users/dhduvall/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dhduvall",
"id": 7074165,
"login": "dhduvall",
"node_id": "MDQ6VXNlcjcwNzQxNjU=",
"organizations_url": "https://api.github.com/users/dhduvall/orgs",
"received_events_url": "https://api.github.com/users/dhduvall/received_events",
"repos_url": "https://api.github.com/users/dhduvall/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dhduvall/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dhduvall/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dhduvall",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-07-22T00:27:17Z | 2021-09-08T16:00:38Z | 2016-08-05T07:44:42Z | NONE | resolved | I'm getting a bunch of stack traces from an app (various OpenStack componentry) which end with the following message
```
ConnectionError: ('Connection aborted.', error(146, 'ECONNREFUSED'))
```
or something similar. In all cases, the underlying problem is bad administrative configuration -- that is, not strictly a bug in either the app or in requests -- but the message is so vague that it's a huge pain in the ass to try to track down what it was trying to connect to when it failed. Sometimes by looking at the stack trace I can figure out what it was trying to do, but not always.
I could go and patch the apps to catch exceptions from requests and have it print out the URL, but that's potentially a lot of places. I was wondering if it would make sense to have a `__str__()` method for `RequestException` that would spit out the URL in addition to the basic junk from `IOError`. I tried
```
def __str__(self):
s = super(RequestException, self).__str__()
return "%s: %s" % (self.request.url, s)
```
and it did what I expected, at least for the one test case of connecting to an unlistened-on port.
I'm not looking for end-user-appropriate strings like in issue #2876, but just something to help out a reasonably savvy administrator unscared of things like stack traces and other gobbledygook, but short on time and patience to go figure out what the software should be telling her anyway.
Obviously more information might be necessary to diagnose certain problems, since the problem might be related to the request data, or other possibly large data, which you almost certainly would never want to show by default, but usually the requested URL is a useful point of information.
Thoughts?
| {
"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/3430/reactions"
} | https://api.github.com/repos/psf/requests/issues/3430/timeline | null | completed | null | null | false | [
"So, as a person who contributes to OpenStack, I'll say this:\n\nThe fact that you're seeing an exception from Requests is a serious problem. Whatever service you're using, might be logging these but should also be logging (with it) an explanation of what happened. Granted, it's OpenStack, so I really shouldn't exp... |
https://api.github.com/repos/psf/requests/issues/3429 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3429/labels{/name} | https://api.github.com/repos/psf/requests/issues/3429/comments | https://api.github.com/repos/psf/requests/issues/3429/events | https://github.com/psf/requests/pull/3429 | 166,628,804 | MDExOlB1bGxSZXF1ZXN0NzgxODEwNjI= | 3,429 | Docstring cleanup | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"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}... | null | 4 | 2016-07-20T16:48:01Z | 2021-09-08T03:00:50Z | 2016-07-20T22:38:39Z | MEMBER | resolved | This is adding in mostly cosmetic fixes to docstrings, including some sphinx additions. I think these will help catch docstring style choices that are determined by looking at the function above or below where you're adding your new one.
This is part two of two for #3427.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3429/reactions"
} | https://api.github.com/repos/psf/requests/issues/3429/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3429.diff",
"html_url": "https://github.com/psf/requests/pull/3429",
"merged_at": "2016-07-20T22:38:39Z",
"patch_url": "https://github.com/psf/requests/pull/3429.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3429"
} | true | [
"Left a note. \n",
"Commit removing whitespace between docstrings and code is removed. I did have another question regarding the acceptability of an extra blank line before the closing `\"\"\"` of a docstring.\n\n[e.g.](https://github.com/kennethreitz/requests/pull/3429/files#diff-375a14e45cf81919afe573d3a1364c09... |
https://api.github.com/repos/psf/requests/issues/3428 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3428/labels{/name} | https://api.github.com/repos/psf/requests/issues/3428/comments | https://api.github.com/repos/psf/requests/issues/3428/events | https://github.com/psf/requests/pull/3428 | 166,628,079 | MDExOlB1bGxSZXF1ZXN0NzgxODA1NjI= | 3,428 | adding in pep8 fixes | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-07-20T16:44:21Z | 2021-09-08T03:00:50Z | 2016-07-20T16:47:00Z | MEMBER | resolved | Cleaning up some of the pep8 issues in the code. This isn't exhaustive, but the ones that I felt were either obvious (whitespaces, blank lines) or made the code more compliant with [Kenneth Reitz's Code Style™](http://docs.python-requests.org/en/latest/dev/contributing/#kenneth-reitz-s-code-style).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3428/reactions"
} | https://api.github.com/repos/psf/requests/issues/3428/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3428.diff",
"html_url": "https://github.com/psf/requests/pull/3428",
"merged_at": "2016-07-20T16:47:00Z",
"patch_url": "https://github.com/psf/requests/pull/3428.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3428"
} | true | [
"This is part one of two in #3427.\n",
"These are all great. \n",
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3427 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3427/labels{/name} | https://api.github.com/repos/psf/requests/issues/3427/comments | https://api.github.com/repos/psf/requests/issues/3427/events | https://github.com/psf/requests/issues/3427 | 166,627,168 | MDU6SXNzdWUxNjY2MjcxNjg= | 3,427 | Code Consistency Work | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-07-20T16:39:57Z | 2021-09-08T17:05:23Z | 2016-07-20T22:45:47Z | MEMBER | resolved | This is a combination of two passes over the code to help cleanup some of the coding style differences that have creeped in over time. It's mostly cosmetic but I think it'll help reduce inconsistencies going forward by having the code be an example for future contributors. Per @Lukasa's request, I'm going to break this up into two pull requests. One involving docstrings and the other involving pep8 fixes. I don't know that these changes are necessarily "correct", I simply chose what appeared to be the most common occurrence in the code. I'm sure @kennethreitz will have opinions on which choices are best.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3427/reactions"
} | https://api.github.com/repos/psf/requests/issues/3427/timeline | null | completed | null | null | false | [
"Is this supposed to be a pull request?\n",
"@kennethreitz, I kinda want you to take the lead on code review for this: just flag changes you don't like and I'm sure @nateprewitt will undo it.\n",
"Nah, it's an umbrella issue that'll cover two PRs.\n",
"👍 \n"
] |
https://api.github.com/repos/psf/requests/issues/3426 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3426/labels{/name} | https://api.github.com/repos/psf/requests/issues/3426/comments | https://api.github.com/repos/psf/requests/issues/3426/events | https://github.com/psf/requests/pull/3426 | 166,620,325 | MDExOlB1bGxSZXF1ZXN0NzgxNzUwMTA= | 3,426 | converting hasattr usages to getattr | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2016-07-20T16:08:10Z | 2021-09-05T00:07:17Z | 2016-07-20T17:33:12Z | MEMBER | resolved | This spawned off of [an article](https://hynek.me/articles/hasattr/) @Lukasa brought up in another PR. These changes should fix the pitfalls with using `hasattr` by converting their logic to use `getattr` instead.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3426/reactions"
} | https://api.github.com/repos/psf/requests/issues/3426/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3426.diff",
"html_url": "https://github.com/psf/requests/pull/3426",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3426.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3426"
} | true | [
"Ok, changes have been implemented.\n",
"What is the point of this? Because of the way properties are actually namespaced in Python 2?\n",
"@kennethreitz Same reason: https://hynek.me/articles/hasattr/\n",
"Yeah, I read the article. I still don't see why we're making these changes. \n",
"The short answer is... |
https://api.github.com/repos/psf/requests/issues/3425 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3425/labels{/name} | https://api.github.com/repos/psf/requests/issues/3425/comments | https://api.github.com/repos/psf/requests/issues/3425/events | https://github.com/psf/requests/pull/3425 | 166,615,309 | MDExOlB1bGxSZXF1ZXN0NzgxNzE0OTQ= | 3,425 | Proposed/3.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/16962997?v=4",
"events_url": "https://api.github.com/users/Ricke21/events{/privacy}",
"followers_url": "https://api.github.com/users/Ricke21/followers",
"following_url": "https://api.github.com/users/Ricke21/following{/other_user}",
"gists_url": "https://api.github.com/users/Ricke21/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Ricke21",
"id": 16962997,
"login": "Ricke21",
"node_id": "MDQ6VXNlcjE2OTYyOTk3",
"organizations_url": "https://api.github.com/users/Ricke21/orgs",
"received_events_url": "https://api.github.com/users/Ricke21/received_events",
"repos_url": "https://api.github.com/users/Ricke21/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Ricke21/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ricke21/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Ricke21",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-07-20T15:47:43Z | 2021-09-08T03:00:57Z | 2016-07-20T15:48:31Z | NONE | resolved | Change exception and variable names so that tests will run.
| {
"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/3425/reactions"
} | https://api.github.com/repos/psf/requests/issues/3425/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3425.diff",
"html_url": "https://github.com/psf/requests/pull/3425",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3425.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3425"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/3424 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3424/labels{/name} | https://api.github.com/repos/psf/requests/issues/3424/comments | https://api.github.com/repos/psf/requests/issues/3424/events | https://github.com/psf/requests/issues/3424 | 166,246,860 | MDU6SXNzdWUxNjYyNDY4NjA= | 3,424 | When using Session.send on a prepared request, session hooks aren't dispatched | {
"avatar_url": "https://avatars.githubusercontent.com/u/10525230?v=4",
"events_url": "https://api.github.com/users/13steinj/events{/privacy}",
"followers_url": "https://api.github.com/users/13steinj/followers",
"following_url": "https://api.github.com/users/13steinj/following{/other_user}",
"gists_url": "https://api.github.com/users/13steinj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/13steinj",
"id": 10525230,
"login": "13steinj",
"node_id": "MDQ6VXNlcjEwNTI1MjMw",
"organizations_url": "https://api.github.com/users/13steinj/orgs",
"received_events_url": "https://api.github.com/users/13steinj/received_events",
"repos_url": "https://api.github.com/users/13steinj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/13steinj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/13steinj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/13steinj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-19T04:44:10Z | 2021-09-08T17:05:24Z | 2016-07-19T10:26:15Z | CONTRIBUTOR | resolved | https://github.com/kennethreitz/requests/blob/bca205e9bf60adbf578ef15958c872bfedcbdc60/requests/sessions.py#L568
I'm unsure if this is intentional or not, just had a problem given a session level hook didn't run. Hooks are merged when [preparing the request](https://github.com/kennethreitz/requests/blob/bca205e9bf60adbf578ef15958c872bfedcbdc60/requests/sessions.py#L396), but any requests prepared by the user manually and then sent via Session.send don't run session level hooks.
| {
"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/3424/reactions"
} | https://api.github.com/repos/psf/requests/issues/3424/timeline | null | completed | null | null | false | [
"This is intentional. [Per the documentation](http://docs.python-requests.org/en/master/user/advanced/#prepared-requests), if you want the advantages of a Session you need to use the `Session.prepare_request` method.\n"
] |
https://api.github.com/repos/psf/requests/issues/3423 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3423/labels{/name} | https://api.github.com/repos/psf/requests/issues/3423/comments | https://api.github.com/repos/psf/requests/issues/3423/events | https://github.com/psf/requests/issues/3423 | 166,159,788 | MDU6SXNzdWUxNjYxNTk3ODg= | 3,423 | iter_content() not actually reading/raising exception | {
"avatar_url": "https://avatars.githubusercontent.com/u/6320683?v=4",
"events_url": "https://api.github.com/users/dvasseur/events{/privacy}",
"followers_url": "https://api.github.com/users/dvasseur/followers",
"following_url": "https://api.github.com/users/dvasseur/following{/other_user}",
"gists_url": "https://api.github.com/users/dvasseur/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dvasseur",
"id": 6320683,
"login": "dvasseur",
"node_id": "MDQ6VXNlcjYzMjA2ODM=",
"organizations_url": "https://api.github.com/users/dvasseur/orgs",
"received_events_url": "https://api.github.com/users/dvasseur/received_events",
"repos_url": "https://api.github.com/users/dvasseur/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dvasseur/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dvasseur/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dvasseur",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-07-18T18:25:36Z | 2021-09-08T17:05:25Z | 2016-07-18T18:51:19Z | NONE | resolved | I've the following code ('stream' set to True):
``` python
try:
for chunk in r.iter_content(chunk_size=512 * 1024):
if chunk: # filter out keep-alive new chunks
f_temp.write(chunk)
```
In case of network issue, I was expecting an exception at the 'iter_content' line, but got the following stack trace:
``` python
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/urllib3/response.py", line 232, in _error_catcher
yield
File "/usr/lib/python3.5/site-packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/usr/lib/python3.5/http/client.py", line 448, in read
n = self.readinto(b)
File "/usr/lib/python3.5/http/client.py", line 488, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/requests/models.py", line 664, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/lib/python3.5/site-packages/urllib3/response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python3.5/site-packages/urllib3/response.py", line 324, in read
flush_decoder = True
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.5/site-packages/urllib3/response.py", line 237, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='vpn.media.shagma.net', port=8888): Read timed out.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<my file>", line 434, in <my function>
f_temp.write(chunk)
File "/usr/lib/python3.5/site-packages/requests/models.py", line 671, in generate
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='<my proxy address>', port=8888): Read timed out.
```
=> exception is raised during .write() command, not iter_content() ? Took me a while to figure out... Is it a bug ?
(python 3.5.2, requests 2.10, archlinux)
side note: I just read the doc and chunk_size=None may be a better option, but should not be related to my issue, I think... :)
| {
"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/3423/reactions"
} | https://api.github.com/repos/psf/requests/issues/3423/timeline | null | completed | null | null | false | [
"Without knowing what `f_temp` is or being able to see how you're using requests, I don't think we can definitely say this is a bug. That said, it is very strange that you're seeing that in your call to `write`. The chunk should just be a bytes object, nothing fancy.\n",
"The exception is not coming in the call t... |
https://api.github.com/repos/psf/requests/issues/3422 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3422/labels{/name} | https://api.github.com/repos/psf/requests/issues/3422/comments | https://api.github.com/repos/psf/requests/issues/3422/events | https://github.com/psf/requests/issues/3422 | 166,143,200 | MDU6SXNzdWUxNjYxNDMyMDA= | 3,422 | HTTPoxy migitation | {
"avatar_url": "https://avatars.githubusercontent.com/u/426784?v=4",
"events_url": "https://api.github.com/users/remram44/events{/privacy}",
"followers_url": "https://api.github.com/users/remram44/followers",
"following_url": "https://api.github.com/users/remram44/following{/other_user}",
"gists_url": "https://api.github.com/users/remram44/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/remram44",
"id": 426784,
"login": "remram44",
"node_id": "MDQ6VXNlcjQyNjc4NA==",
"organizations_url": "https://api.github.com/users/remram44/orgs",
"received_events_url": "https://api.github.com/users/remram44/received_events",
"repos_url": "https://api.github.com/users/remram44/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/remram44/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remram44/subscriptions",
"type": "User",
"url": "https://api.github.com/users/remram44",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-07-18T17:04:46Z | 2021-09-08T17:05:25Z | 2016-07-18T18:53:15Z | CONTRIBUTOR | resolved | https://httpoxy.org/
It is possible to set the `HTTP_PROXY` in CGI scripts by passing the `Proxy` header. If the script uses requests to download files, requests will happily use the attacker-supplied proxy to make requests.
This should be mitigated like it is in Perl (since 2001), Ruby, and libraries like curl.
I confirmed that `HTTP_PROXY` (in uppercase) is accepted as well as the conventional, lowercase `http_proxy` (requests 2.7.0)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/426784?v=4",
"events_url": "https://api.github.com/users/remram44/events{/privacy}",
"followers_url": "https://api.github.com/users/remram44/followers",
"following_url": "https://api.github.com/users/remram44/following{/other_user}",
"gists_url": "https://api.github.com/users/remram44/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/remram44",
"id": 426784,
"login": "remram44",
"node_id": "MDQ6VXNlcjQyNjc4NA==",
"organizations_url": "https://api.github.com/users/remram44/orgs",
"received_events_url": "https://api.github.com/users/remram44/received_events",
"repos_url": "https://api.github.com/users/remram44/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/remram44/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remram44/subscriptions",
"type": "User",
"url": "https://api.github.com/users/remram44",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3422/reactions"
} | https://api.github.com/repos/psf/requests/issues/3422/timeline | null | completed | null | null | false | [
"We've been discussing this at length in IRC. We have a complex set of opinions here, but here they are:\n1. In general, if you are running your Requests script in a location where your application allows writes to the environment, you should disable Requests' search of the environment. We have a flag for this: `Se... |
https://api.github.com/repos/psf/requests/issues/3421 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3421/labels{/name} | https://api.github.com/repos/psf/requests/issues/3421/comments | https://api.github.com/repos/psf/requests/issues/3421/events | https://github.com/psf/requests/issues/3421 | 165,979,808 | MDU6SXNzdWUxNjU5Nzk4MDg= | 3,421 | iter_content with chunk_size=None hangs when used with requests.Session on Python 3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/9883897?v=4",
"events_url": "https://api.github.com/users/tobinus/events{/privacy}",
"followers_url": "https://api.github.com/users/tobinus/followers",
"following_url": "https://api.github.com/users/tobinus/following{/other_user}",
"gists_url": "https://api.github.com/users/tobinus/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tobinus",
"id": 9883897,
"login": "tobinus",
"node_id": "MDQ6VXNlcjk4ODM4OTc=",
"organizations_url": "https://api.github.com/users/tobinus/orgs",
"received_events_url": "https://api.github.com/users/tobinus/received_events",
"repos_url": "https://api.github.com/users/tobinus/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tobinus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tobinus/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tobinus",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2016-07-17T14:48:02Z | 2021-09-08T17:05:26Z | 2016-07-17T17:04:18Z | NONE | resolved | Under some specific circumstances, a loop using `iter_content` ends up hanging after all the content has been iterated over. Specifically, all the following conditions must be met for this to occur:
- You must be using Python 3 (I've tested using 2.7.11 (under which this works) and 3.3.6, 3.4.11 and 3.5.1 (under which this bug occurs).
- Use `requests.Session()`, not `requests`.
- Set `chunk_size=None` in `iter_content`.
Here, have an example:
``` python
# requests_bug.py
import requests
def iterate_through_streamed_content(requests_module_or_session, chunk_size):
r = requests_module_or_session.get('http://example.org', stream=True)
r.raise_for_status()
for chunk in r.iter_content(chunk_size=chunk_size):
print(len(chunk))
iterate_through_streamed_content(requests, 1024)
print('requests, 1024 works')
iterate_through_streamed_content(requests, None)
print('requests, None works')
iterate_through_streamed_content(requests.Session(), 1024)
print('requests.Session(), 1024 works')
iterate_through_streamed_content(requests.Session(), None)
print('requests.Session(), None works')
print("That's all.")
```
Output 1 (bug does not occur in Python2.7):
```
$ python --version
Python 2.7.11
$ pip install -U requests
Requirement already up-to-date: requests in /home/...
$ python requests_bug.py
1270
requests, 1024 works
1270
requests, None works
1270
requests.Session(), 1024 works
1270
requests.Session(), None works
That's all.
```
Output 2 (bug occurs in Python3.5):
```
$ python --version
Python 3.5.1
$ pip install -U requests
Requirement already up-to-date: requests in /home/...
$ python requests_bug.py
1270
requests, 1024 works
1270
requests, None works
1270
requests.Session(), 1024 works
1270
```
...after which the script hangs until you do Ctrl+C.
This is all done on Ubuntu 16.04, using pyenv and its virtualenv feature for testing using different Python versions. (Thank you all for requests, btw! Keep on rocking :+1: )
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3421/reactions"
} | https://api.github.com/repos/psf/requests/issues/3421/timeline | null | completed | null | null | false | [
"So I can reproduce this on OSX, and it appears to be an issue in urllib3. [Here](https://github.com/shazow/urllib3/blob/master/urllib3/response.py#L361) to be more specific. The file object isn't marking itself as closed for some reason and the while loop never exits. This happens on both https://httpbin.org and h... |
https://api.github.com/repos/psf/requests/issues/3420 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3420/labels{/name} | https://api.github.com/repos/psf/requests/issues/3420/comments | https://api.github.com/repos/psf/requests/issues/3420/events | https://github.com/psf/requests/pull/3420 | 165,775,037 | MDExOlB1bGxSZXF1ZXN0Nzc2MDY5ODU= | 3,420 | Update connectionpool.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/5911982?v=4",
"events_url": "https://api.github.com/users/springjools/events{/privacy}",
"followers_url": "https://api.github.com/users/springjools/followers",
"following_url": "https://api.github.com/users/springjools/following{/other_user}",
"gists_url": "https://api.github.com/users/springjools/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/springjools",
"id": 5911982,
"login": "springjools",
"node_id": "MDQ6VXNlcjU5MTE5ODI=",
"organizations_url": "https://api.github.com/users/springjools/orgs",
"received_events_url": "https://api.github.com/users/springjools/received_events",
"repos_url": "https://api.github.com/users/springjools/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/springjools/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/springjools/subscriptions",
"type": "User",
"url": "https://api.github.com/users/springjools",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-15T12:20:10Z | 2021-09-08T03:00:57Z | 2016-07-15T12:21:20Z | NONE | resolved | Change some spammy DEBUG logs to the proper log level.
| {
"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/3420/reactions"
} | https://api.github.com/repos/psf/requests/issues/3420/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3420.diff",
"html_url": "https://github.com/psf/requests/pull/3420",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3420.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3420"
} | true | [
"As mentioned in #3419, these logs come from the urllib3 project. Requests does not carry patches to that project: you'll need to submit this fix upstream.\n"
] |
https://api.github.com/repos/psf/requests/issues/3419 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3419/labels{/name} | https://api.github.com/repos/psf/requests/issues/3419/comments | https://api.github.com/repos/psf/requests/issues/3419/events | https://github.com/psf/requests/issues/3419 | 165,773,971 | MDU6SXNzdWUxNjU3NzM5NzE= | 3,419 | Requests connectionpool.py is spammy | {
"avatar_url": "https://avatars.githubusercontent.com/u/5911982?v=4",
"events_url": "https://api.github.com/users/springjools/events{/privacy}",
"followers_url": "https://api.github.com/users/springjools/followers",
"following_url": "https://api.github.com/users/springjools/following{/other_user}",
"gists_url": "https://api.github.com/users/springjools/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/springjools",
"id": 5911982,
"login": "springjools",
"node_id": "MDQ6VXNlcjU5MTE5ODI=",
"organizations_url": "https://api.github.com/users/springjools/orgs",
"received_events_url": "https://api.github.com/users/springjools/received_events",
"repos_url": "https://api.github.com/users/springjools/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/springjools/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/springjools/subscriptions",
"type": "User",
"url": "https://api.github.com/users/springjools",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-15T12:13:41Z | 2021-09-08T17:05:27Z | 2016-07-15T12:14:23Z | NONE | resolved | Connectionpool spams always when starting connection. It should be DEBUG log level and not INFO. Thank you.
| {
"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/3419/reactions"
} | https://api.github.com/repos/psf/requests/issues/3419/timeline | null | completed | null | null | false | [
"This is a log coming from the urllib3 module, not from requests. Please open this bug report there. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/3418 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3418/labels{/name} | https://api.github.com/repos/psf/requests/issues/3418/comments | https://api.github.com/repos/psf/requests/issues/3418/events | https://github.com/psf/requests/issues/3418 | 165,754,976 | MDU6SXNzdWUxNjU3NTQ5NzY= | 3,418 | send a lot of http request at same time? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1804755?v=4",
"events_url": "https://api.github.com/users/1c7/events{/privacy}",
"followers_url": "https://api.github.com/users/1c7/followers",
"following_url": "https://api.github.com/users/1c7/following{/other_user}",
"gists_url": "https://api.github.com/users/1c7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1c7",
"id": 1804755,
"login": "1c7",
"node_id": "MDQ6VXNlcjE4MDQ3NTU=",
"organizations_url": "https://api.github.com/users/1c7/orgs",
"received_events_url": "https://api.github.com/users/1c7/received_events",
"repos_url": "https://api.github.com/users/1c7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1c7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1c7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1c7",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-15T10:17:50Z | 2021-09-08T17:05:28Z | 2016-07-15T10:21:51Z | NONE | resolved | ### What I have tried
I already search on Google,
and tried “grequest”, but grequests document is not enough, I don't know how to use it correctly.
### What I am trying to do
what I am trying to do is send about 1000 http GET request,
and then use "beautifulsoup"(python module) get content I want.
### Why I need send multi request once
send them one by one is just too slow
I want send as much as possible, maybe 30 requests in a batch?
I am crawling a website, so there are really no way to cut down request number..
### Lastly
Thanks for you time on reading this post :dancer:
oh, I just found out requests and grequest is same author, awesome.
| {
"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/3418/reactions"
} | https://api.github.com/repos/psf/requests/issues/3418/timeline | null | completed | null | null | false | [
"@1c7 I'm taking this example [straight from the grequests README](https://github.com/kennethreitz/grequests):\n\n``` python\nimport grequests\n\nurls = [\n# Put all the URLs you need to get here.\n]\n\n# Create a whole series of unsent requests.\nrequests = (grequests.get(u) for u in urls)\n\n# Send them\nresponse... |
https://api.github.com/repos/psf/requests/issues/3417 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3417/labels{/name} | https://api.github.com/repos/psf/requests/issues/3417/comments | https://api.github.com/repos/psf/requests/issues/3417/events | https://github.com/psf/requests/pull/3417 | 165,715,784 | MDExOlB1bGxSZXF1ZXN0Nzc1NjYyMjc= | 3,417 | raise InvalidHeader on multiple Location values | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 18 | 2016-07-15T05:42:45Z | 2021-09-08T02:10:20Z | 2016-08-22T16:49:36Z | MEMBER | resolved | Addresses issue raised in #2939 with a fix for multiple Location headers in response. This currently breaks on `test_requests_are_updated_each_time` because the [`RedirectSession`](https://github.com/kennethreitz/requests/blob/proposed/3.0.0/tests/test_requests.py#L1564) populates it's `raw` attribute with `StringIO` rather than a urllib3 `HTTPResponse`. I can convert the `_build_raw` method to fix the test, if this looks like a workable solution.
| {
"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/3417/reactions"
} | https://api.github.com/repos/psf/requests/issues/3417/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3417.diff",
"html_url": "https://github.com/psf/requests/pull/3417",
"merged_at": "2016-08-22T16:49:36Z",
"patch_url": "https://github.com/psf/requests/pull/3417.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3417"
} | true | [
"@nateprewitt Thanks for starting this!\n\nUnfortunately, quite a lot of people use non-urllib3 file-like objects to back requests, and I'd like to avoid breaking that if we can. Can you rearrange this to support urllib3 if possible but otherwise fallback to some other behaviour, [per my comment](https://github.com... |
https://api.github.com/repos/psf/requests/issues/3416 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3416/labels{/name} | https://api.github.com/repos/psf/requests/issues/3416/comments | https://api.github.com/repos/psf/requests/issues/3416/events | https://github.com/psf/requests/issues/3416 | 165,713,289 | MDU6SXNzdWUxNjU3MTMyODk= | 3,416 | Unable to override cookie policy in Session.prepare_request | {
"avatar_url": "https://avatars.githubusercontent.com/u/5336190?v=4",
"events_url": "https://api.github.com/users/bdusell/events{/privacy}",
"followers_url": "https://api.github.com/users/bdusell/followers",
"following_url": "https://api.github.com/users/bdusell/following{/other_user}",
"gists_url": "https://api.github.com/users/bdusell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bdusell",
"id": 5336190,
"login": "bdusell",
"node_id": "MDQ6VXNlcjUzMzYxOTA=",
"organizations_url": "https://api.github.com/users/bdusell/orgs",
"received_events_url": "https://api.github.com/users/bdusell/received_events",
"repos_url": "https://api.github.com/users/bdusell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bdusell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bdusell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bdusell",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-07-15T05:20:27Z | 2021-09-08T10:00:43Z | 2017-05-23T14:51:01Z | NONE | resolved | I would like to be able to override the [cookie policy](https://docs.python.org/2.7/library/cookielib.html#cookielib.CookiePolicy) used by a `Session` when making a request or when using a `Session` to prepare a request. However, overriding the cookie policy on the cookie jar of the `Session` or of the `Request` object has had no effect. This line of code explains why:
https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L377
The cookie jars of both the session and the request are merged into a newly constructed `RequestsCookieJar`, discarding the policies of both. I believe there should be a way to inject a non-default cookie policy at this point.
What I expected to be able to do, and what isn't working currently, is something like the following:
``` python
import requests
s = requests.Session()
s.cookies = requests.cookies.RequestsCookieJar(policy=MyCustomCookiePolicy())
s.get('http://httpbin.org/cookies/set?k2=v2&k1=v1') # Put some cookies in the jar
r = requests.Request('GET', 'http://httpbin.org/cookies')
pr = s.prepare_request(r) # Include certain cookies in the jar based on arbitrary rules
# Print the request data for debugging
s.send(pr)
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3416/reactions"
} | https://api.github.com/repos/psf/requests/issues/3416/timeline | null | completed | null | null | false | [
"I think it would make sense to at least preserve the cookie policy in `merge_cookies`. This could be pretty quickly accomplished adding a line [here](https://github.com/kennethreitz/requests/blob/master/requests/cookies.py#L488) with something like:\n\n`cookiejar.set_policy(cookies._policy)`\n",
"AFAIK there is ... |
https://api.github.com/repos/psf/requests/issues/3415 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3415/labels{/name} | https://api.github.com/repos/psf/requests/issues/3415/comments | https://api.github.com/repos/psf/requests/issues/3415/events | https://github.com/psf/requests/pull/3415 | 165,706,712 | MDExOlB1bGxSZXF1ZXN0Nzc1NjAzMjc= | 3,415 | removing redundant test | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-15T03:57:01Z | 2021-09-08T03:00:50Z | 2016-07-15T07:07:44Z | MEMBER | resolved | I was writing up a new test and found this comment block. Looks like it was commented out as part of a cleanup effort, but never removed. Test functionality is fulfilled by [this test](https://github.com/kennethreitz/requests/blob/master/tests/test_requests.py#L196).
| {
"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/3415/reactions"
} | https://api.github.com/repos/psf/requests/issues/3415/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3415.diff",
"html_url": "https://github.com/psf/requests/pull/3415",
"merged_at": "2016-07-15T07:07:44Z",
"patch_url": "https://github.com/psf/requests/pull/3415.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3415"
} | true | [
"Thanks @nateprewitt! :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3414 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3414/labels{/name} | https://api.github.com/repos/psf/requests/issues/3414/comments | https://api.github.com/repos/psf/requests/issues/3414/events | https://github.com/psf/requests/issues/3414 | 165,698,556 | MDU6SXNzdWUxNjU2OTg1NTY= | 3,414 | Max retries exceeded with url | {
"avatar_url": "https://avatars.githubusercontent.com/u/20178234?v=4",
"events_url": "https://api.github.com/users/seu1tyz/events{/privacy}",
"followers_url": "https://api.github.com/users/seu1tyz/followers",
"following_url": "https://api.github.com/users/seu1tyz/following{/other_user}",
"gists_url": "https://api.github.com/users/seu1tyz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/seu1tyz",
"id": 20178234,
"login": "seu1tyz",
"node_id": "MDQ6VXNlcjIwMTc4MjM0",
"organizations_url": "https://api.github.com/users/seu1tyz/orgs",
"received_events_url": "https://api.github.com/users/seu1tyz/received_events",
"repos_url": "https://api.github.com/users/seu1tyz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/seu1tyz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/seu1tyz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/seu1tyz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-15T02:26:13Z | 2021-09-08T17:05:28Z | 2016-07-15T12:05:58Z | NONE | resolved | when I intend to grab PAge It raise the error.
| {
"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/3414/reactions"
} | https://api.github.com/repos/psf/requests/issues/3414/timeline | null | completed | null | null | false | [
"@seu1tyz You need to provide substantially more information than this for us to be able to help you. Please read [this document](https://github.com/kennethreitz/requests/blob/master/CONTRIBUTING.md) and answer the questions it asks.\n"
] |
https://api.github.com/repos/psf/requests/issues/3403 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3403/labels{/name} | https://api.github.com/repos/psf/requests/issues/3403/comments | https://api.github.com/repos/psf/requests/issues/3403/events | https://github.com/psf/requests/issues/3403 | 165,611,128 | MDU6SXNzdWUxNjU2MTExMjg= | 3,403 | "hostname doesn't match" error while requesting IP address directly and setting host header (HTTPS) | {
"avatar_url": "https://avatars.githubusercontent.com/u/20462409?v=4",
"events_url": "https://api.github.com/users/huoneefi/events{/privacy}",
"followers_url": "https://api.github.com/users/huoneefi/followers",
"following_url": "https://api.github.com/users/huoneefi/following{/other_user}",
"gists_url": "https://api.github.com/users/huoneefi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huoneefi",
"id": 20462409,
"login": "huoneefi",
"node_id": "MDQ6VXNlcjIwNDYyNDA5",
"organizations_url": "https://api.github.com/users/huoneefi/orgs",
"received_events_url": "https://api.github.com/users/huoneefi/received_events",
"repos_url": "https://api.github.com/users/huoneefi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huoneefi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huoneefi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huoneefi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-07-14T17:05:44Z | 2021-09-08T17:05:27Z | 2016-07-17T12:05:54Z | NONE | resolved | In an application, I can't use DNS resolving. So I request the IP address directly while setting the host header (vhosts). In this case, SSL certificate validation (/SNI) doesn't work properly because it doesn't respect the explicitly set host header:
Python 2.7.11:
``` python
>>> import requests
>>> requests.__version__
'2.10.0'
>>> requests.get(url="http://example.org")
<Response [200]>
>>> requests.get(url="https://example.org")
<Response [200]>
>>> requests.get(url="http://93.184.216.34", headers={"Host": "example.org"})
<Response [200]>
>>> requests.get(url="https://93.184.216.34", headers={"Host": "example.org"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[...]/requests/api.py", line 71, in get
return request('get', url, params=params, **kwargs)
File "[...]/requests/api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "[...]/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "[...]/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "[...]/requests/adapters.py", line 477, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: hostname '93.184.216.34' doesn't match either of 'www.example.org', 'example.com', 'example.edu', 'example.net', 'example.org', 'www.example.com', 'www.example.edu', 'www.example.net'
```
| {
"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/3403/reactions"
} | https://api.github.com/repos/psf/requests/issues/3403/timeline | null | completed | null | null | false | [
"This is intended and expected behavior, at the moment. \n\nThe host header is simply a semantic of HTTP, not of the connection you are making, and has no effect on the underlying TLS mechanisms. \n\nRequests could build additional supplemental functionality around this, to support this rare use-case, but has opted... |
https://api.github.com/repos/psf/requests/issues/3402 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3402/labels{/name} | https://api.github.com/repos/psf/requests/issues/3402/comments | https://api.github.com/repos/psf/requests/issues/3402/events | https://github.com/psf/requests/pull/3402 | 165,594,640 | MDExOlB1bGxSZXF1ZXN0Nzc0Nzk1MzY= | 3,402 | Remove duplicate import warnings | {
"avatar_url": "https://avatars.githubusercontent.com/u/1638561?v=4",
"events_url": "https://api.github.com/users/HarrisonJackson/events{/privacy}",
"followers_url": "https://api.github.com/users/HarrisonJackson/followers",
"following_url": "https://api.github.com/users/HarrisonJackson/following{/other_user}",
"gists_url": "https://api.github.com/users/HarrisonJackson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HarrisonJackson",
"id": 1638561,
"login": "HarrisonJackson",
"node_id": "MDQ6VXNlcjE2Mzg1NjE=",
"organizations_url": "https://api.github.com/users/HarrisonJackson/orgs",
"received_events_url": "https://api.github.com/users/HarrisonJackson/received_events",
"repos_url": "https://api.github.com/users/HarrisonJackson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HarrisonJackson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HarrisonJackson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HarrisonJackson",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-14T15:49:18Z | 2021-09-08T03:00:58Z | 2016-07-14T16:59:51Z | CONTRIBUTOR | resolved | Just reading through the source and found this dupe import - is it intentional? After running the tests locally before and after nothing fails... but there is some extra output as the test runs.
Before:
```
make test
# This runs all of the tests. To run an individual test, run py.test with
# the -k flag, like "py.test -k test_path_is_not_double_encoded"
py.test tests
======================================= test session starts =======================================
platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /Users/harrisonjackson/Zapier/requests, inifile:
plugins: cov-2.2.1, httpbin-0.2.0, mock-0.11.0
collected 357 items
tests/test_hooks.py ...
tests/test_lowlevel.py .........
tests/test_requests.py ................................................................................................................................X.........127.0.0.1 - - [14/Jul/2016 09:42:31] "GET /stream/4 HTTP/1.1" 200 1080
X...................................................
tests/test_structures.py ....................
tests/test_testserver.py ...........
tests/test_utils.py ............................................................................................................................
============================= 355 passed, 2 xpassed in 42.56 seconds ==============================
```
After:
```
make test
# This runs all of the tests. To run an individual test, run py.test with
# the -k flag, like "py.test -k test_path_is_not_double_encoded"
py.test tests
======================================= test session starts =======================================
platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /Users/harrisonjackson/Zapier/requests, inifile:
plugins: cov-2.2.1, httpbin-0.2.0, mock-0.11.0
collected 357 items
tests/test_hooks.py ...
tests/test_lowlevel.py .........
tests/test_requests.py ...................127.0.0.1 - - [14/Jul/2016 09:44:19] "GET /get HTTP/1.1" 200 197
................................................127.0.0.1 - - [14/Jul/2016 09:44:21] "GET /gzip HTTP/1.1" 200 205
...127.0.0.1 - - [14/Jul/2016 09:44:21] "GET /get?f%C3%B8%C3%B8=f%C3%B8%C3%B8 HTTP/1.1" 200 370
..........................................................X.........127.0.0.1 - - [14/Jul/2016 09:44:21] "GET /stream/4 HTTP/1.1" 200 1080
X...................................................
tests/test_structures.py ....................
tests/test_testserver.py ...........
tests/test_utils.py ............................................................................................................................
============================= 355 passed, 2 xpassed in 41.34 seconds ==============================
```
| {
"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/3402/reactions"
} | https://api.github.com/repos/psf/requests/issues/3402/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3402.diff",
"html_url": "https://github.com/psf/requests/pull/3402",
"merged_at": "2016-07-14T16:59:51Z",
"patch_url": "https://github.com/psf/requests/pull/3402.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3402"
} | true | [
"Nope, that duplicate import looks like a mistake. Thanks! :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3401 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3401/labels{/name} | https://api.github.com/repos/psf/requests/issues/3401/comments | https://api.github.com/repos/psf/requests/issues/3401/events | https://github.com/psf/requests/pull/3401 | 165,463,895 | MDExOlB1bGxSZXF1ZXN0NzczOTIwODQ= | 3,401 | in python3.x not have StringIO | {
"avatar_url": "https://avatars.githubusercontent.com/u/20295772?v=4",
"events_url": "https://api.github.com/users/CarGod/events{/privacy}",
"followers_url": "https://api.github.com/users/CarGod/followers",
"following_url": "https://api.github.com/users/CarGod/following{/other_user}",
"gists_url": "https://api.github.com/users/CarGod/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CarGod",
"id": 20295772,
"login": "CarGod",
"node_id": "MDQ6VXNlcjIwMjk1Nzcy",
"organizations_url": "https://api.github.com/users/CarGod/orgs",
"received_events_url": "https://api.github.com/users/CarGod/received_events",
"repos_url": "https://api.github.com/users/CarGod/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CarGod/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CarGod/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CarGod",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-07-14T02:40:39Z | 2021-09-08T03:00:58Z | 2016-07-14T07:57:49Z | CONTRIBUTOR | resolved | I think, should such an amendment.
| {
"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/3401/reactions"
} | https://api.github.com/repos/psf/requests/issues/3401/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3401.diff",
"html_url": "https://github.com/psf/requests/pull/3401",
"merged_at": "2016-07-14T07:57:49Z",
"patch_url": "https://github.com/psf/requests/pull/3401.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3401"
} | true | [
"Thanks! :sparkles:\n",
"AFAIK (I haven't checked), all of our documentation is written with 2.x in mind. If this holds true, I believe this is a slightly user-hostile change, as the majority of user userbase is not using Python 3.\n\nIf we want to be subtly suggestive that they should be using 3, we need to make... |
https://api.github.com/repos/psf/requests/issues/3400 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3400/labels{/name} | https://api.github.com/repos/psf/requests/issues/3400/comments | https://api.github.com/repos/psf/requests/issues/3400/events | https://github.com/psf/requests/issues/3400 | 165,386,356 | MDU6SXNzdWUxNjUzODYzNTY= | 3,400 | requests throws an exception when using future strings on Py2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/4231472?v=4",
"events_url": "https://api.github.com/users/st-pasha/events{/privacy}",
"followers_url": "https://api.github.com/users/st-pasha/followers",
"following_url": "https://api.github.com/users/st-pasha/following{/other_user}",
"gists_url": "https://api.github.com/users/st-pasha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/st-pasha",
"id": 4231472,
"login": "st-pasha",
"node_id": "MDQ6VXNlcjQyMzE0NzI=",
"organizations_url": "https://api.github.com/users/st-pasha/orgs",
"received_events_url": "https://api.github.com/users/st-pasha/received_events",
"repos_url": "https://api.github.com/users/st-pasha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/st-pasha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/st-pasha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/st-pasha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-13T18:14:42Z | 2021-09-08T17:05:29Z | 2016-07-13T19:07:45Z | NONE | resolved | We are using `future` module in our project ([http://python-future.org/](http://python-future.org/)), and it appears that `requests` has trouble processing futurized strings in Python 2.7.12.
Test case:
```
from future.types import newstr as str
from requests import get
get("http://google.com/search", params={"q": str("/foo/bar")})
```
This throws an exception "KeyError: 47".
| {
"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/3400/reactions"
} | https://api.github.com/repos/psf/requests/issues/3400/timeline | null | completed | null | null | false | [
"- I have never heard of python-future before.\n- It has incomplete API documentation, specifically none around `newstr`.\n",
"I made a virtual environment to reproduce this and it's absolutley reproducible... except that the exception comes from _the standard library_.\n\nAll that's necessary to reproduce this i... |
https://api.github.com/repos/psf/requests/issues/3399 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3399/labels{/name} | https://api.github.com/repos/psf/requests/issues/3399/comments | https://api.github.com/repos/psf/requests/issues/3399/events | https://github.com/psf/requests/issues/3399 | 165,329,986 | MDU6SXNzdWUxNjUzMjk5ODY= | 3,399 | Content-Length incorrect? | {
"avatar_url": "https://avatars.githubusercontent.com/u/114803?v=4",
"events_url": "https://api.github.com/users/furlongm/events{/privacy}",
"followers_url": "https://api.github.com/users/furlongm/followers",
"following_url": "https://api.github.com/users/furlongm/following{/other_user}",
"gists_url": "https://api.github.com/users/furlongm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/furlongm",
"id": 114803,
"login": "furlongm",
"node_id": "MDQ6VXNlcjExNDgwMw==",
"organizations_url": "https://api.github.com/users/furlongm/orgs",
"received_events_url": "https://api.github.com/users/furlongm/received_events",
"repos_url": "https://api.github.com/users/furlongm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/furlongm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/furlongm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/furlongm",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-13T14:07:53Z | 2021-09-08T17:05:29Z | 2016-07-13T14:11:23Z | NONE | resolved | I seem to consistently get a different Content-Length when I use httplib (8494757) and when I use requests (625290), for the same file. Is this normal or is this a bug?
```
>>> conn = httplib.HTTPSConnection('raw.githubusercontent.com')
>>> conn.request('HEAD','/stevemeier/cefs/master/errata.latest.xml')
>>> conn.getresponse().getheaders()
[('content-length', '8494757'), ('via', '1.1 varnish'), ('vary', 'Authorization,Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"d8000ebc3721f00f130736072186146d50df2781"'), ('x-cache-hits', '3'), ('cache-control', 'max-age=300'), ('source-age', '105'), ('x-served-by', 'cache-mel6523-MEL'), ('x-cache', 'HIT'), ('x-github-request-id', '2BF94A17:13B4D:46ADE7:578648AD'), ('accept-ranges', 'bytes'), ('expires', 'Wed, 13 Jul 2016 14:03:47 GMT'), ('x-fastly-request-id', '363b36bb9fb7c18106f7e1182450c91bed7e60f7'), ('x-geo-block-list', ''), ('date', 'Wed, 13 Jul 2016 13:58:47 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'; style-src 'unsafe-inline'"), ('strict-transport-security', 'max-age=31536000'), ('connection', 'keep-alive'), ('x-frame-options', 'deny'), ('content-type', 'text/plain; charset=utf-8')]
```
vs
```
>>> res = requests.head('https://raw.githubusercontent.com/stevemeier/cefs/master/errata.latest.xml')
>>> res.headers
{'Content-Length': '625290', 'X-XSS-Protection': '1; mode=block', 'Content-Security-Policy': "default-src 'none'; style-src 'unsafe-inline'", 'X-Cache-Hits': '1', 'X-Frame-Options': 'deny', 'Access-Control-Allow-Origin': '*', 'X-Served-By': 'cache-mel6521-MEL', 'X-GitHub-Request-Id': '2BF94A14:37EB:8B44EC:57864851', 'Expires': 'Wed, 13 Jul 2016 14:03:55 GMT', 'X-Fastly-Request-ID': 'd1f56c5b421ddc141601df05fd3cc5dc0167f3e1', 'Date': 'Wed, 13 Jul 2016 13:58:55 GMT', 'Source-Age': '205', 'X-Cache': 'HIT', 'Accept-Ranges': 'bytes', 'Strict-Transport-Security': 'max-age=31536000', 'Connection': 'keep-alive', 'X-Geo-Block-List': '', 'Via': '1.1 varnish', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip', 'Vary': 'Authorization,Accept-Encoding', 'ETag': '"d8000ebc3721f00f130736072186146d50df2781"', 'Cache-Control': 'max-age=300', 'Content-Type': 'text/plain; charset=utf-8'}
```
| {
"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/3399/reactions"
} | https://api.github.com/repos/psf/requests/issues/3399/timeline | null | completed | null | null | false | [
"This is entirely normal. The key difference is in the headers. Specifically, requests has an extra one: `Content-Encoding: gzip`. This is because requests transparently supports compressed response bodies and then decompresses them for you on the fly. This is why the content-length is smaller in requests: the body... |
https://api.github.com/repos/psf/requests/issues/3398 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3398/labels{/name} | https://api.github.com/repos/psf/requests/issues/3398/comments | https://api.github.com/repos/psf/requests/issues/3398/events | https://github.com/psf/requests/issues/3398 | 165,313,440 | MDU6SXNzdWUxNjUzMTM0NDA= | 3,398 | option to not urlencode parameters ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/84749?v=4",
"events_url": "https://api.github.com/users/pcompassion/events{/privacy}",
"followers_url": "https://api.github.com/users/pcompassion/followers",
"following_url": "https://api.github.com/users/pcompassion/following{/other_user}",
"gists_url": "https://api.github.com/users/pcompassion/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pcompassion",
"id": 84749,
"login": "pcompassion",
"node_id": "MDQ6VXNlcjg0NzQ5",
"organizations_url": "https://api.github.com/users/pcompassion/orgs",
"received_events_url": "https://api.github.com/users/pcompassion/received_events",
"repos_url": "https://api.github.com/users/pcompassion/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pcompassion/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pcompassion/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pcompassion",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-13T12:56:05Z | 2021-09-08T17:05:30Z | 2016-07-13T13:12:46Z | NONE | resolved | The api end point I'm working with won't work correctly when parameters are urlencoded.
There seems to be other servers who don't work well with urlencoded urls...
(http://stackoverflow.com/a/23497912/433570)
How can I make requests not urlencode ? :(
| {
"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/3398/reactions"
} | https://api.github.com/repos/psf/requests/issues/3398/timeline | null | completed | null | null | false | [
"The best way to do it is to build your URL yourself, and then use the [PreparedRequest flow](http://docs.python-requests.org/en/master/user/advanced/#prepared-requests) to manually change `PreparedRequest.url` to the complete URL you'd like to use.\n"
] |
https://api.github.com/repos/psf/requests/issues/3397 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3397/labels{/name} | https://api.github.com/repos/psf/requests/issues/3397/comments | https://api.github.com/repos/psf/requests/issues/3397/events | https://github.com/psf/requests/issues/3397 | 165,265,401 | MDU6SXNzdWUxNjUyNjU0MDE= | 3,397 | proxy scheme is case-sensitive? | {
"avatar_url": "https://avatars.githubusercontent.com/u/3216484?v=4",
"events_url": "https://api.github.com/users/ryanwy/events{/privacy}",
"followers_url": "https://api.github.com/users/ryanwy/followers",
"following_url": "https://api.github.com/users/ryanwy/following{/other_user}",
"gists_url": "https://api.github.com/users/ryanwy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ryanwy",
"id": 3216484,
"login": "ryanwy",
"node_id": "MDQ6VXNlcjMyMTY0ODQ=",
"organizations_url": "https://api.github.com/users/ryanwy/orgs",
"received_events_url": "https://api.github.com/users/ryanwy/received_events",
"repos_url": "https://api.github.com/users/ryanwy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ryanwy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ryanwy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ryanwy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-13T08:30:18Z | 2021-09-08T17:05:30Z | 2016-07-13T09:03:53Z | NONE | resolved | I'm not sure if this is a bug? please take a look. Thanks.
I use proxy below and it doesn't work, when I change scheme to lower 'http', it's fine.
**proxy = {'HTTP': '218.26.237.18:3128'}
url = http://httpbin.org/ip**
I track the source code and don't find anywhere to handle scheme case conversion.
-> requests.get
-> request
-> settings = self.merge_environment_settings(
prep.url, proxies, stream, verify, cert
)
**from function self.merge_environment_settings, get orderdict object proxies:**
**OrderedDict([('HTTP', '118.144.187.254:3128')])**
-> resp = self.send(prep, *_send_kwargs)
-> r = adapter.send(request, *_kwargs)
-> conn = self.get_connection(request.url, proxies)
-> proxy = select_proxy(url, proxies)
def select_proxy(url, proxies):
proxies = proxies or {}
urlparts = urlparse(url)
if urlparts.hostname is None:
return proxies.get('all', proxies.get(urlparts.scheme))
......
**in function select_proxy, urlparts.scheme = 'http' and proxies.scheme is 'HTTP', so it returns None and the setting proxy is invalid '**
| {
"avatar_url": "https://avatars.githubusercontent.com/u/3216484?v=4",
"events_url": "https://api.github.com/users/ryanwy/events{/privacy}",
"followers_url": "https://api.github.com/users/ryanwy/followers",
"following_url": "https://api.github.com/users/ryanwy/following{/other_user}",
"gists_url": "https://api.github.com/users/ryanwy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ryanwy",
"id": 3216484,
"login": "ryanwy",
"node_id": "MDQ6VXNlcjMyMTY0ODQ=",
"organizations_url": "https://api.github.com/users/ryanwy/orgs",
"received_events_url": "https://api.github.com/users/ryanwy/received_events",
"repos_url": "https://api.github.com/users/ryanwy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ryanwy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ryanwy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ryanwy",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3397/reactions"
} | https://api.github.com/repos/psf/requests/issues/3397/timeline | null | completed | null | null | false | [
"Yeah, you need to lowercase the scheme in the proxy dictionary. While we could deal with this problem ourselves, it's somewhat problematic to do it because we need to avoid mutating the dictionary that is passed to us. I'll accept a pull request that adds some appropriate lowercasing in the `select_proxy` method (... |
https://api.github.com/repos/psf/requests/issues/3396 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3396/labels{/name} | https://api.github.com/repos/psf/requests/issues/3396/comments | https://api.github.com/repos/psf/requests/issues/3396/events | https://github.com/psf/requests/issues/3396 | 165,096,806 | MDU6SXNzdWUxNjUwOTY4MDY= | 3,396 | JSON decode failed | {
"avatar_url": "https://avatars.githubusercontent.com/u/12646348?v=4",
"events_url": "https://api.github.com/users/cchenship/events{/privacy}",
"followers_url": "https://api.github.com/users/cchenship/followers",
"following_url": "https://api.github.com/users/cchenship/following{/other_user}",
"gists_url": "https://api.github.com/users/cchenship/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cchenship",
"id": 12646348,
"login": "cchenship",
"node_id": "MDQ6VXNlcjEyNjQ2MzQ4",
"organizations_url": "https://api.github.com/users/cchenship/orgs",
"received_events_url": "https://api.github.com/users/cchenship/received_events",
"repos_url": "https://api.github.com/users/cchenship/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cchenship/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cchenship/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cchenship",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-07-12T14:38:03Z | 2021-09-08T17:05:31Z | 2016-07-12T14:40:43Z | NONE | resolved | I want to do the following curl call in python with requests
**curl:**
`curl -b cookies -c cookies -X POST -d @auth 'https://api.a_website.com/auth'`
The above curl commanded worked.
So, I started migrating it into python 3.5.2.
**python**
```
base_url = 'https://api.a_website.com/auth'
result = requests.post(url=base_url, data={'auth': open('auth', 'rb')}, cookies=cookies)
result.content
```
However, I got the following error:
> b'{"response":{"error_id":"SYNTAX","error":"JSON decode failed","error_description":null,"service":null,"method":null,"error_code":null,"dbg_info":{"instance":"65.bm-hbapi.prod.nym2","slave_hit":false,"db":"master","awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"c941819d5c860f9a","warnings":[],"time":39.22700881958,"start_microtime":1468334115.9092,"version":"1.16.707","slave_lag":0,"output_term":"not_found"}}}\n'
here is the auth file
`$ cat auth`
> {
> "auth": {
> "username" : "a_username",
> "password" : "a_password"
> }
> }
| {
"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/3396/reactions"
} | https://api.github.com/repos/psf/requests/issues/3396/timeline | null | completed | null | null | false | [
"You are not sending JSON to the website in either request.\n\nFor assistance with using this library, please ask your question on [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests). We do not provide a Q&A forum in the bug tracker.\n",
"Please note as well that, whatever you think that c... |
https://api.github.com/repos/psf/requests/issues/3395 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3395/labels{/name} | https://api.github.com/repos/psf/requests/issues/3395/comments | https://api.github.com/repos/psf/requests/issues/3395/events | https://github.com/psf/requests/issues/3395 | 165,032,315 | MDU6SXNzdWUxNjUwMzIzMTU= | 3,395 | 4-byte UTF-8 character in package description can break repositories | {
"avatar_url": "https://avatars.githubusercontent.com/u/199657?v=4",
"events_url": "https://api.github.com/users/wichert/events{/privacy}",
"followers_url": "https://api.github.com/users/wichert/followers",
"following_url": "https://api.github.com/users/wichert/following{/other_user}",
"gists_url": "https://api.github.com/users/wichert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wichert",
"id": 199657,
"login": "wichert",
"node_id": "MDQ6VXNlcjE5OTY1Nw==",
"organizations_url": "https://api.github.com/users/wichert/orgs",
"received_events_url": "https://api.github.com/users/wichert/received_events",
"repos_url": "https://api.github.com/users/wichert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wichert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wichert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wichert",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-12T09:25:26Z | 2021-09-08T16:00:38Z | 2016-08-05T07:45:32Z | NONE | resolved | I'm afraid this is a bit of a 'WTF' thing. I was trying to use a hosted package repository, and discovered that trying to upload a wheel for requests failed. Some back and forth revealed an interesting reason: they store package description in MySQL, and MySQL can't normally store 4-byte UTF-8 sequences. And it so happens the cake symbol you are using for the `pip install` example is a 4-byte UTF-8 character.
Considering this is not a bug in requests and the limitation is completely silly I hate to ask this, but still: could you consider using another replacing that cake symbol with something else so we won't hit that limitation?
| {
"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/3395/reactions"
} | https://api.github.com/repos/psf/requests/issues/3395/timeline | null | completed | null | null | false | [
"Uh...I mean, we could. But it seems like that's just deferring the problem until later in the day. At some point the hosted package repository is going to need to deal with the full breadth of UTF-8. I feel like it'd be for the good of the world to hold Requests hostage behind dealing with this issue!\n\nSeriously... |
https://api.github.com/repos/psf/requests/issues/3394 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3394/labels{/name} | https://api.github.com/repos/psf/requests/issues/3394/comments | https://api.github.com/repos/psf/requests/issues/3394/events | https://github.com/psf/requests/issues/3394 | 165,011,480 | MDU6SXNzdWUxNjUwMTE0ODA= | 3,394 | How to correctly change the Content of a Response in hook function | {
"avatar_url": "https://avatars.githubusercontent.com/u/16007157?v=4",
"events_url": "https://api.github.com/users/pceBuildMaster/events{/privacy}",
"followers_url": "https://api.github.com/users/pceBuildMaster/followers",
"following_url": "https://api.github.com/users/pceBuildMaster/following{/other_user}",
"gists_url": "https://api.github.com/users/pceBuildMaster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pceBuildMaster",
"id": 16007157,
"login": "pceBuildMaster",
"node_id": "MDQ6VXNlcjE2MDA3MTU3",
"organizations_url": "https://api.github.com/users/pceBuildMaster/orgs",
"received_events_url": "https://api.github.com/users/pceBuildMaster/received_events",
"repos_url": "https://api.github.com/users/pceBuildMaster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pceBuildMaster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pceBuildMaster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pceBuildMaster",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-07-12T07:27:51Z | 2021-09-08T17:05:31Z | 2016-07-12T07:30:04Z | NONE | resolved | I have registered a `'response'` hook with the Request in the `__call__` method of my subclass of `AuthBase` as I need to check for API errors from my product and massage the output it returns for upstream consumption.
The hook logic is working fine but I have concerns about my approach:
Reading the `Requests API` section and playing around I found setting the Response `_content` with new data works. But I strongly suspect this is the wrong approach and it will come back to bite me. The `Requests API` lists `content` but in the hook logic I get the error: `AttributeError: can't set attribute` when I use that one.
Is there a correct way to change the Response content?
| {
"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/3394/reactions"
} | https://api.github.com/repos/psf/requests/issues/3394/timeline | null | completed | null | null | false | [
"Setting `_content` is fine. That's where we store buffered content. Note that you can't unconditionally read from `_content` to massage in the first place, you do need to use `content`. The reason you can't override `content` is because it's a property that executes a function that does things like lazy loading.\n... |
https://api.github.com/repos/psf/requests/issues/3393 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3393/labels{/name} | https://api.github.com/repos/psf/requests/issues/3393/comments | https://api.github.com/repos/psf/requests/issues/3393/events | https://github.com/psf/requests/issues/3393 | 164,737,992 | MDU6SXNzdWUxNjQ3Mzc5OTI= | 3,393 | Obtaining Request and Session info in the AuthBase subclassed __call__ method | {
"avatar_url": "https://avatars.githubusercontent.com/u/16007157?v=4",
"events_url": "https://api.github.com/users/pceBuildMaster/events{/privacy}",
"followers_url": "https://api.github.com/users/pceBuildMaster/followers",
"following_url": "https://api.github.com/users/pceBuildMaster/following{/other_user}",
"gists_url": "https://api.github.com/users/pceBuildMaster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pceBuildMaster",
"id": 16007157,
"login": "pceBuildMaster",
"node_id": "MDQ6VXNlcjE2MDA3MTU3",
"organizations_url": "https://api.github.com/users/pceBuildMaster/orgs",
"received_events_url": "https://api.github.com/users/pceBuildMaster/received_events",
"repos_url": "https://api.github.com/users/pceBuildMaster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pceBuildMaster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pceBuildMaster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pceBuildMaster",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-07-10T22:42:31Z | 2021-09-08T17:05:32Z | 2016-07-12T04:39:05Z | NONE | resolved | tl:dr
How to get data avail at request time to the **AuthBase** `__call__` method to make needed changes to the request HTTP Post data
Details:
For our product's HTTP API I needed to create a new authentication method and modify the Request Post data based on the new authentication and what was passed to the Request HTTP verb call; Post in this instance.
When Request.Session create was called I had the `__init__` method of my AuthBase class make a Requests call to login with provide credentials. The returning auth token was stored in the session obj.
Then when the `__call__` method of my AuthBase call was called it would change the Request Post data with the auth token.
The ugly part is the call to make the Request Post could also get a 'cmd' param which needs to be in the HTTP data sent to the server. JSON format of Post data:
```
{
"token" : "access token"
"cmd" : "get"/"set"/"special"
"data" : { ... }
}
```
Since at time of `__call__` running only the **PreparedRequest** is available I see three methods of making the needed data and cmd info available:
1. save in session and add session object to request obj before Post is called
2. save cmd in headers before Post is called
3. add info to HTTP Post data and in **call** method extract and format as needed.
I looked at the hook system but that seems to now only hook into the Response event so it is too late for my needs.
I choose method 1 because it was late and I could just add all the info into session. It was just a proof-of-concept at this time. Either of the other methods would work but all seem ugly.
In the morning I tore it out and added a type attribute to the Requests.Session obj at creation time. Then at Post time if session is this type I make the changes before Post.
I am integrating this into the [RobotFramework Requests wrapper library.](https://github.com/bulkan/robotframework-requests/) So creating my own session type and using a subclassed `AuthBase` seemed it would provide a way to not have to change the HTTP verb calls like post_request with my session specific logic. But in the end it seems it might be the cleanest solution for my product's auth/cmd API methods.
Am I missing something that would allow the `AuthBase` methods to have access to the Session obj besides the methods outlined above?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/16007157?v=4",
"events_url": "https://api.github.com/users/pceBuildMaster/events{/privacy}",
"followers_url": "https://api.github.com/users/pceBuildMaster/followers",
"following_url": "https://api.github.com/users/pceBuildMaster/following{/other_user}",
"gists_url": "https://api.github.com/users/pceBuildMaster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pceBuildMaster",
"id": 16007157,
"login": "pceBuildMaster",
"node_id": "MDQ6VXNlcjE2MDA3MTU3",
"organizations_url": "https://api.github.com/users/pceBuildMaster/orgs",
"received_events_url": "https://api.github.com/users/pceBuildMaster/received_events",
"repos_url": "https://api.github.com/users/pceBuildMaster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pceBuildMaster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pceBuildMaster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pceBuildMaster",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3393/reactions"
} | https://api.github.com/repos/psf/requests/issues/3393/timeline | null | completed | null | null | false | [
"Generally speaking, the `Auth` handlers do not have access to the `Session` object unless you give it to them. That's not hard:\n\n``` python\ns = requests.Session()\ns.auth = MyCustomAuthClass(s)\n```\n\nHowever, a session-scoped auth class is automatically applied to all requests, so in fact it only needs to sto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.