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/3182 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3182/labels{/name} | https://api.github.com/repos/psf/requests/issues/3182/comments | https://api.github.com/repos/psf/requests/issues/3182/events | https://github.com/psf/requests/issues/3182 | 153,781,683 | MDU6SXNzdWUxNTM3ODE2ODM= | 3,182 | Sending too much personal information in User-Anget. Risky | {
"avatar_url": "https://avatars.githubusercontent.com/u/6367897?v=4",
"events_url": "https://api.github.com/users/Zerokami/events{/privacy}",
"followers_url": "https://api.github.com/users/Zerokami/followers",
"following_url": "https://api.github.com/users/Zerokami/following{/other_user}",
"gists_url": "https://api.github.com/users/Zerokami/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Zerokami",
"id": 6367897,
"login": "Zerokami",
"node_id": "MDQ6VXNlcjYzNjc4OTc=",
"organizations_url": "https://api.github.com/users/Zerokami/orgs",
"received_events_url": "https://api.github.com/users/Zerokami/received_events",
"repos_url": "https://api.github.com/users/Zerokami/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Zerokami/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Zerokami/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Zerokami",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-05-09T13:54:41Z | 2021-09-08T18:00:46Z | 2016-05-09T13:56:25Z | NONE | resolved | ```
>>> r.request.headers["User-Agent"]
'python-requests/2.x.x CPython/x.x.x Linux/3.xx.xx-generic'
```
I think requests is sending too much info.
The bot name `"python-requests" would be okay.
But my **Python version which may be vulnerable** ?
My Linux **kernel version which may be vulnerable**?
I consider this a big problem. Many people using requests may not be aware of this and inadvertently sending this info.
Please just change the the `User-Agent` to something like
`"python-requests"` or `"Requests"`
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3182/reactions"
} | https://api.github.com/repos/psf/requests/issues/3182/timeline | null | completed | null | null | false | [
"@Logmytech We did. Note our [changelog](http://docs.python-requests.org/en/master/community/updates/#id6), which says that we updated in 2.8.0, released 7 months ago. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/3181 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3181/labels{/name} | https://api.github.com/repos/psf/requests/issues/3181/comments | https://api.github.com/repos/psf/requests/issues/3181/events | https://github.com/psf/requests/pull/3181 | 153,544,539 | MDExOlB1bGxSZXF1ZXN0NjkyMTUwMDA= | 3,181 | Potential fix for #3066 (Transfer-Encoding and Content-Length headers both being set) | {
"avatar_url": "https://avatars.githubusercontent.com/u/3794108?v=4",
"events_url": "https://api.github.com/users/davidsoncasey/events{/privacy}",
"followers_url": "https://api.github.com/users/davidsoncasey/followers",
"following_url": "https://api.github.com/users/davidsoncasey/following{/other_user}",
"gists_url": "https://api.github.com/users/davidsoncasey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidsoncasey",
"id": 3794108,
"login": "davidsoncasey",
"node_id": "MDQ6VXNlcjM3OTQxMDg=",
"organizations_url": "https://api.github.com/users/davidsoncasey/orgs",
"received_events_url": "https://api.github.com/users/davidsoncasey/received_events",
"repos_url": "https://api.github.com/users/davidsoncasey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidsoncasey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidsoncasey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidsoncasey",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-05-06T21:46:07Z | 2021-09-08T04:00:58Z | 2016-05-24T01:42:27Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/3794108?v=4",
"events_url": "https://api.github.com/users/davidsoncasey/events{/privacy}",
"followers_url": "https://api.github.com/users/davidsoncasey/followers",
"following_url": "https://api.github.com/users/davidsoncasey/following{/other_user}",
"gists_url": "https://api.github.com/users/davidsoncasey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidsoncasey",
"id": 3794108,
"login": "davidsoncasey",
"node_id": "MDQ6VXNlcjM3OTQxMDg=",
"organizations_url": "https://api.github.com/users/davidsoncasey/orgs",
"received_events_url": "https://api.github.com/users/davidsoncasey/received_events",
"repos_url": "https://api.github.com/users/davidsoncasey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidsoncasey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidsoncasey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidsoncasey",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3181/reactions"
} | https://api.github.com/repos/psf/requests/issues/3181/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3181.diff",
"html_url": "https://github.com/psf/requests/pull/3181",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3181.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3181"
} | true | [
"This looks good @davidsoncasey, thanks so much! Do you want to open a parallel pull request with your idea about refactoring `prepare_body`? I'd love to see both side-by-side.\n",
"@Lukasa sounds good. I'll work on getting something put together in the next couple of days.\n",
"I'm going close this PR out sinc... | |
https://api.github.com/repos/psf/requests/issues/3180 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3180/labels{/name} | https://api.github.com/repos/psf/requests/issues/3180/comments | https://api.github.com/repos/psf/requests/issues/3180/events | https://github.com/psf/requests/issues/3180 | 153,225,463 | MDU6SXNzdWUxNTMyMjU0NjM= | 3,180 | OSError: [Errno 22] in self.sock.sendall(data) | {
"avatar_url": "https://avatars.githubusercontent.com/u/1974558?v=4",
"events_url": "https://api.github.com/users/AstinCHOI/events{/privacy}",
"followers_url": "https://api.github.com/users/AstinCHOI/followers",
"following_url": "https://api.github.com/users/AstinCHOI/following{/other_user}",
"gists_url": "https://api.github.com/users/AstinCHOI/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AstinCHOI",
"id": 1974558,
"login": "AstinCHOI",
"node_id": "MDQ6VXNlcjE5NzQ1NTg=",
"organizations_url": "https://api.github.com/users/AstinCHOI/orgs",
"received_events_url": "https://api.github.com/users/AstinCHOI/received_events",
"repos_url": "https://api.github.com/users/AstinCHOI/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AstinCHOI/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AstinCHOI/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AstinCHOI",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-05-05T12:50:56Z | 2016-05-05T17:11:37Z | 2016-05-05T13:09:58Z | NONE | null | env: Mac OS X El Capitan / python 3.5.1 / requests 2.10.0
I want to upload file which is about 3GB size.
``` py
def read_in_chunks(file_object, chunk_size=4096):
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
with open('3GB.mov', 'br') as f:
data = b''.join([chunk for chunk in read_in_chunks(f)])
requests.put(url, headers=headers, data=data)
```
```
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1240, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1083, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1128, in _send_request
self.endheaders(body)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1079, in endheaders
self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 913, in _send_output
self.send(message_body)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 885, in send
self.sock.sendall(data)
OSError: [Errno 22] Invalid argument
```
Could you give me some advice?
| {
"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/3180/reactions"
} | https://api.github.com/repos/psf/requests/issues/3180/timeline | null | completed | null | null | false | [
"Hi @AstinCHOI,\n\nThis is a defect tracker, not a question and answer portion of the requests project. If you're looking for help (which it appears you are) please pose questions on [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests). When posting there, please be prepared to answer questio... |
https://api.github.com/repos/psf/requests/issues/3179 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3179/labels{/name} | https://api.github.com/repos/psf/requests/issues/3179/comments | https://api.github.com/repos/psf/requests/issues/3179/events | https://github.com/psf/requests/pull/3179 | 153,160,783 | MDExOlB1bGxSZXF1ZXN0Njg5NjIwMDk= | 3,179 | Fix TypeError when get json-encoded content of a response | {
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"events_url": "https://api.github.com/users/messense/events{/privacy}",
"followers_url": "https://api.github.com/users/messense/followers",
"following_url": "https://api.github.com/users/messense/following{/other_user}",
"gists_url": "https://api.github.com/users/messense/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/messense",
"id": 1556054,
"login": "messense",
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"organizations_url": "https://api.github.com/users/messense/orgs",
"received_events_url": "https://api.github.com/users/messense/received_events",
"repos_url": "https://api.github.com/users/messense/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/messense/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/messense/subscriptions",
"type": "User",
"url": "https://api.github.com/users/messense",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-05-05T03:17:47Z | 2021-09-08T04:01:01Z | 2016-05-06T12:59:01Z | CONTRIBUTOR | resolved | [`self.content`](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L728) could be `None`, so `len(self.content)` may raise `TypeError: object of type 'NoneType' has no len()`
| {
"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/3179/reactions"
} | https://api.github.com/repos/psf/requests/issues/3179/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3179.diff",
"html_url": "https://github.com/psf/requests/pull/3179",
"merged_at": "2016-05-06T12:59:01Z",
"patch_url": "https://github.com/psf/requests/pull/3179.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3179"
} | true | [
"Huh. I feel like maybe we should just change `Response.content` to never be `None`. It's certainly surprising to me that it can be. @kennethreitz @sigmavirus24?\n",
"@Lukasa so we set it to `None` in [the descriptor](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L728) in (2) [error](htt... |
https://api.github.com/repos/psf/requests/issues/3178 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3178/labels{/name} | https://api.github.com/repos/psf/requests/issues/3178/comments | https://api.github.com/repos/psf/requests/issues/3178/events | https://github.com/psf/requests/pull/3178 | 153,145,372 | MDExOlB1bGxSZXF1ZXN0Njg5NTI4MjM= | 3,178 | Encoding JSON requests to bytes for urllib3 to handle | {
"avatar_url": "https://avatars.githubusercontent.com/u/7773758?v=4",
"events_url": "https://api.github.com/users/haikuginger/events{/privacy}",
"followers_url": "https://api.github.com/users/haikuginger/followers",
"following_url": "https://api.github.com/users/haikuginger/following{/other_user}",
"gists_url": "https://api.github.com/users/haikuginger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haikuginger",
"id": 7773758,
"login": "haikuginger",
"node_id": "MDQ6VXNlcjc3NzM3NTg=",
"organizations_url": "https://api.github.com/users/haikuginger/orgs",
"received_events_url": "https://api.github.com/users/haikuginger/received_events",
"repos_url": "https://api.github.com/users/haikuginger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haikuginger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haikuginger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haikuginger",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-05-05T00:26:23Z | 2021-09-08T03:01:04Z | 2016-05-22T16:02:09Z | CONTRIBUTOR | resolved | Implements #3177.
| {
"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/3178/reactions"
} | https://api.github.com/repos/psf/requests/issues/3178/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3178.diff",
"html_url": "https://github.com/psf/requests/pull/3178",
"merged_at": "2016-05-22T16:02:09Z",
"patch_url": "https://github.com/psf/requests/pull/3178.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3178"
} | true | [
"@haikuginger Thanks for this! I've left some notes inline.\n",
"Bump! 🙂\n",
"Sorry @haikuginger! GitHub doesn't ping me when you push new changes. :(\n",
"I'm :+1: on this if @Lukasa is =D\n",
"Let's do it! Thanks @haikuginger, you're doing awesome work! :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3177 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3177/labels{/name} | https://api.github.com/repos/psf/requests/issues/3177/comments | https://api.github.com/repos/psf/requests/issues/3177/events | https://github.com/psf/requests/issues/3177 | 153,145,294 | MDU6SXNzdWUxNTMxNDUyOTQ= | 3,177 | Encode JSON to bytes per urllib3 expectations | {
"avatar_url": "https://avatars.githubusercontent.com/u/7773758?v=4",
"events_url": "https://api.github.com/users/haikuginger/events{/privacy}",
"followers_url": "https://api.github.com/users/haikuginger/followers",
"following_url": "https://api.github.com/users/haikuginger/following{/other_user}",
"gists_url": "https://api.github.com/users/haikuginger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haikuginger",
"id": 7773758,
"login": "haikuginger",
"node_id": "MDQ6VXNlcjc3NzM3NTg=",
"organizations_url": "https://api.github.com/users/haikuginger/orgs",
"received_events_url": "https://api.github.com/users/haikuginger/received_events",
"repos_url": "https://api.github.com/users/haikuginger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haikuginger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haikuginger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haikuginger",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-05-05T00:25:43Z | 2021-09-08T18:00:43Z | 2016-05-22T16:45:20Z | CONTRIBUTOR | resolved | urllib3 expects to receive request bodies as bytes-like objects. While sending Unicode strings may work, it's suboptimal and can result in unexpected behavior (see shazow/urllib3#855). While we shouldn't encode user-supplied request bodies, we should encode requests-produced JSON strings.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/7773758?v=4",
"events_url": "https://api.github.com/users/haikuginger/events{/privacy}",
"followers_url": "https://api.github.com/users/haikuginger/followers",
"following_url": "https://api.github.com/users/haikuginger/following{/other_user}",
"gists_url": "https://api.github.com/users/haikuginger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haikuginger",
"id": 7773758,
"login": "haikuginger",
"node_id": "MDQ6VXNlcjc3NzM3NTg=",
"organizations_url": "https://api.github.com/users/haikuginger/orgs",
"received_events_url": "https://api.github.com/users/haikuginger/received_events",
"repos_url": "https://api.github.com/users/haikuginger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haikuginger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haikuginger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haikuginger",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3177/reactions"
} | https://api.github.com/repos/psf/requests/issues/3177/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/3176 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3176/labels{/name} | https://api.github.com/repos/psf/requests/issues/3176/comments | https://api.github.com/repos/psf/requests/issues/3176/events | https://github.com/psf/requests/pull/3176 | 153,064,975 | MDExOlB1bGxSZXF1ZXN0Njg4OTY3Njc= | 3,176 | add ability to control the headers that will be deleted in case of redirect | {
"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 | 7 | 2016-05-04T17:01:34Z | 2021-09-08T01:21:44Z | 2016-11-15T09:47:36Z | NONE | resolved | In some cases the redirect is done to a different host.
when the {"Host": "www.example.com"} is set in the headers and the request is redirected to another host, let's say www.another-example.com, the next request will be sent to a new URLwith a wrong Host header.
| {
"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/3176/reactions"
} | https://api.github.com/repos/psf/requests/issues/3176/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3176.diff",
"html_url": "https://github.com/psf/requests/pull/3176",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3176.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3176"
} | true | [
"This is up to @kennethreitz, but I'm disinclined to want to add this: I think I'd rather factor out the logic in `SessionRedirectMixin` as we've done with a few other bits to allow easier subclassing, rather than add further keyword arguments.\n",
"I agree with @Lukasa. I don't think we need this as an extra par... |
https://api.github.com/repos/psf/requests/issues/3175 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3175/labels{/name} | https://api.github.com/repos/psf/requests/issues/3175/comments | https://api.github.com/repos/psf/requests/issues/3175/events | https://github.com/psf/requests/issues/3175 | 152,846,729 | MDU6SXNzdWUxNTI4NDY3Mjk= | 3,175 | Gzipping requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/1063219?v=4",
"events_url": "https://api.github.com/users/kuraga/events{/privacy}",
"followers_url": "https://api.github.com/users/kuraga/followers",
"following_url": "https://api.github.com/users/kuraga/following{/other_user}",
"gists_url": "https://api.github.com/users/kuraga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kuraga",
"id": 1063219,
"login": "kuraga",
"node_id": "MDQ6VXNlcjEwNjMyMTk=",
"organizations_url": "https://api.github.com/users/kuraga/orgs",
"received_events_url": "https://api.github.com/users/kuraga/received_events",
"repos_url": "https://api.github.com/users/kuraga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kuraga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kuraga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kuraga",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-05-03T18:47:33Z | 2021-09-08T18:00:48Z | 2016-05-04T11:04:11Z | NONE | resolved | Good day!
Does `requests` functionality of encoding POST requests with `gzip`?
If no, will you accept a pull request? Some notes, maybe?
Thanks!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1063219?v=4",
"events_url": "https://api.github.com/users/kuraga/events{/privacy}",
"followers_url": "https://api.github.com/users/kuraga/followers",
"following_url": "https://api.github.com/users/kuraga/following{/other_user}",
"gists_url": "https://api.github.com/users/kuraga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kuraga",
"id": 1063219,
"login": "kuraga",
"node_id": "MDQ6VXNlcjEwNjMyMTk=",
"organizations_url": "https://api.github.com/users/kuraga/orgs",
"received_events_url": "https://api.github.com/users/kuraga/received_events",
"repos_url": "https://api.github.com/users/kuraga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kuraga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kuraga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kuraga",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3175/reactions"
} | https://api.github.com/repos/psf/requests/issues/3175/timeline | null | completed | null | null | false | [
"@kuraga Requests does not currently support doing this automatically. =) However, doing so is fairly simple. I don't think we'd accept a pull request adding this functionality (it's not likely to be generally useful), but we'd certainly be happy to add an example to our documentation.\n",
"Ok, thanks!\n\nP.S.\n\... |
https://api.github.com/repos/psf/requests/issues/3174 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3174/labels{/name} | https://api.github.com/repos/psf/requests/issues/3174/comments | https://api.github.com/repos/psf/requests/issues/3174/events | https://github.com/psf/requests/issues/3174 | 152,765,686 | MDU6SXNzdWUxNTI3NjU2ODY= | 3,174 | Recent update of urllib3 broke stream requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/104093?v=4",
"events_url": "https://api.github.com/users/ducu/events{/privacy}",
"followers_url": "https://api.github.com/users/ducu/followers",
"following_url": "https://api.github.com/users/ducu/following{/other_user}",
"gists_url": "https://api.github.com/users/ducu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ducu",
"id": 104093,
"login": "ducu",
"node_id": "MDQ6VXNlcjEwNDA5Mw==",
"organizations_url": "https://api.github.com/users/ducu/orgs",
"received_events_url": "https://api.github.com/users/ducu/received_events",
"repos_url": "https://api.github.com/users/ducu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ducu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ducu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ducu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 16 | 2016-05-03T12:51:49Z | 2021-09-08T09:00:35Z | 2017-06-09T19:14:02Z | NONE | resolved | I suppose you can reproduce this easily, take this url for example: http://bit.ly/1rQJ1CL
```
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/summary/__init__.py", line 280, in extract
body = self._get_tag(response, tag_name="body", encoding=encoding)
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/summary/__init__.py", line 203, in _get_tag
for chunk in response.iter_content(config.CHUNK_SIZE): # , decode_unicode=True
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/requests/models.py", line 664, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 349, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 501, in read_chunked
chunk = self._handle_chunk(amt)
File "/home/ducu/summarizer/env/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 461, in _handle_chunk
value = self._fp._safe_read(amt)
File "/home/ducu/.pyenv/versions/2.7.8/lib/python2.7/httplib.py", line 658, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
AttributeError: 'NoneType' object has no attribute 'read'
```
| {
"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/3174/reactions"
} | https://api.github.com/repos/psf/requests/issues/3174/timeline | null | completed | null | null | false | [
"I'm sorry, I actually _can't_ reproduce this. Can you show me slightly more about how you invoked requests?\n",
"Just a sec, not that easy to reproduce indeed..\nI get it via https://github.com/svven/summary with `requests` 2.10.0. No problem with 2.9.2 but I couldn't reproduce it directly with `requests`, still... |
https://api.github.com/repos/psf/requests/issues/3173 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3173/labels{/name} | https://api.github.com/repos/psf/requests/issues/3173/comments | https://api.github.com/repos/psf/requests/issues/3173/events | https://github.com/psf/requests/pull/3173 | 152,713,061 | MDExOlB1bGxSZXF1ZXN0Njg2NjU1NzU= | 3,173 | Add section on SOCKS proxies. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-05-03T07:08:00Z | 2021-09-08T04:01:02Z | 2016-05-05T17:18:28Z | MEMBER | resolved | Resolves #3172.
| {
"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/3173/reactions"
} | https://api.github.com/repos/psf/requests/issues/3173/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3173.diff",
"html_url": "https://github.com/psf/requests/pull/3173",
"merged_at": "2016-05-05T17:18:28Z",
"patch_url": "https://github.com/psf/requests/pull/3173.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3173"
} | true | [
":tada: \n",
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3172 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3172/labels{/name} | https://api.github.com/repos/psf/requests/issues/3172/comments | https://api.github.com/repos/psf/requests/issues/3172/events | https://github.com/psf/requests/issues/3172 | 152,709,636 | MDU6SXNzdWUxNTI3MDk2MzY= | 3,172 | how to use socks proxy ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/13533742?v=4",
"events_url": "https://api.github.com/users/iliul/events{/privacy}",
"followers_url": "https://api.github.com/users/iliul/followers",
"following_url": "https://api.github.com/users/iliul/following{/other_user}",
"gists_url": "https://api.github.com/users/iliul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/iliul",
"id": 13533742,
"login": "iliul",
"node_id": "MDQ6VXNlcjEzNTMzNzQy",
"organizations_url": "https://api.github.com/users/iliul/orgs",
"received_events_url": "https://api.github.com/users/iliul/received_events",
"repos_url": "https://api.github.com/users/iliul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/iliul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/iliul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/iliul",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-05-03T06:37:48Z | 2021-09-08T15:00:48Z | 2016-05-03T07:08:18Z | NONE | resolved | The new feature socks proxy is supported,but how to use it ?
no example In [http://www.python-requests.org/en/master/user/advanced/#proxies](http://www.python-requests.org/en/master/user/advanced/#proxies) .
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3172/reactions"
} | https://api.github.com/repos/psf/requests/issues/3172/timeline | null | completed | null | null | false | [
"Yup, that's a good spot.\n\nTo do it, you need to `pip install requests[socks]`, and then you can set the proxy as normal: `proxies={'http': 'socks5://host:port', 'https': 'socks5://host:port'}`.\n",
"Thanks and I got it @Lukasa \n",
"The pull request #3173 should add the needed section. Thanks for the report... |
https://api.github.com/repos/psf/requests/issues/3171 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3171/labels{/name} | https://api.github.com/repos/psf/requests/issues/3171/comments | https://api.github.com/repos/psf/requests/issues/3171/events | https://github.com/psf/requests/pull/3171 | 152,645,964 | MDExOlB1bGxSZXF1ZXN0Njg2MjE3OTY= | 3,171 | docs: Add a note about SSL c_rehash | {
"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-05-02T21:08:34Z | 2016-05-03T07:44:43Z | 2016-05-03T07:44:42Z | NONE | null | Just adding a quick note to inform users that it's not enough to point to a directory with the certificates but the directory needs to be "indexed". It took me some time to figure this out ... this simple note might save time to others in the future :).
| {
"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/3171/reactions"
} | https://api.github.com/repos/psf/requests/issues/3171/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3171.diff",
"html_url": "https://github.com/psf/requests/pull/3171",
"merged_at": "2016-05-03T07:44:42Z",
"patch_url": "https://github.com/psf/requests/pull/3171.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3171"
} | true | [
"Thanks for this @luv! :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3170 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3170/labels{/name} | https://api.github.com/repos/psf/requests/issues/3170/comments | https://api.github.com/repos/psf/requests/issues/3170/events | https://github.com/psf/requests/issues/3170 | 152,544,034 | MDU6SXNzdWUxNTI1NDQwMzQ= | 3,170 | Unexpected redirect behavior | {
"avatar_url": "https://avatars.githubusercontent.com/u/7309679?v=4",
"events_url": "https://api.github.com/users/coursera-ds/events{/privacy}",
"followers_url": "https://api.github.com/users/coursera-ds/followers",
"following_url": "https://api.github.com/users/coursera-ds/following{/other_user}",
"gists_url": "https://api.github.com/users/coursera-ds/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/coursera-ds",
"id": 7309679,
"login": "coursera-ds",
"node_id": "MDQ6VXNlcjczMDk2Nzk=",
"organizations_url": "https://api.github.com/users/coursera-ds/orgs",
"received_events_url": "https://api.github.com/users/coursera-ds/received_events",
"repos_url": "https://api.github.com/users/coursera-ds/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/coursera-ds/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/coursera-ds/subscriptions",
"type": "User",
"url": "https://api.github.com/users/coursera-ds",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-05-02T12:31:47Z | 2021-09-08T18:00:48Z | 2016-05-02T12:39:07Z | NONE | resolved | requests is getting (incorrectly) stuck in a redirect loop for an image.
If I turn off redirects and manually step through the requests, each time pointing the new url to the value in the Location header, it works as expected (below is the response.headers + the response.status_code):
```
{'Content-Length': '178', 'Server': 'nginx', 'Connection': 'keep-alive', 'Location': 'https://wiki.wildberries.ru/img/2016/03/dffgfgdf-150x150.jpg', 'Date': 'Sun, 01 May 2016 01:27:25 GMT', 'Content-Type': 'text/html'} 301
{'Content-Length': '178', 'Set-Cookie': '__utmp=1', 'Server': 'nginx', 'Connection': 'close', 'Location': 'http://abenz.ru/wt', 'Date': 'Sun, 01 May 2016 01:27:26 GMT', 'Content-Type': 'text/html'} 301
{'Content-Length': '0', 'Expires': 'Thu, 21 Jul 1977 07:30:00 GMT', 'Keep-Alive': 'timeout=5, max=100', 'Server': 'Apache/2.4.10 (Debian)', 'Last-Modified': 'Sun, 01 May 2016 01:27:26 GMT', 'Connection': 'Keep-Alive', 'LOCATION': 'https://wiki.wildberries.ru/img/2016/03/dffgfgdf-150x150.jpg', 'Pragma': 'no-cache', 'Cache-Control': 'max-age=0', 'Date': 'Sun, 01 May 2016 01:27:26 GMT', 'Content-Type': 'text/html; charset=utf-8'} 302
{'Test-Head': '1', 'Accept-Ranges': 'bytes', 'Content-Length': '9753', 'Server': 'nginx', 'Last-Modified': 'Thu, 17 Mar 2016 15:14:49 GMT', 'Connection': 'close', 'ETag': '"56eac9e9-2619"', 'Date': 'Sun, 01 May 2016 01:27:27 GMT', 'Content-Type': 'image/jpeg'} 200
```
If I turn on logging while redirects is enabled, I see this. Notice that once it hits the abenz[.]ru domain, the location is never updated.
```
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): wiki.wildberries.ru
send: 'GET /img/2016/03/dffgfgdf-150x150.jpg HTTP/1.1\r\nHost: wiki.wildberries.ru\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nuser-agent: Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Server: nginx
header: Date: Sun, 01 May 2016 01:50:21 GMT
header: Content-Type: text/html
header: Content-Length: 178
header: Connection: keep-alive
header: Location: https://wiki.wildberries.ru/img/2016/03/dffgfgdf-150x150.jpg
DEBUG:requests.packages.urllib3.connectionpool:"GET /img/2016/03/dffgfgdf-150x150.jpg HTTP/1.1" 301 178
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): wiki.wildberries.ru
send: 'GET /img/2016/03/dffgfgdf-150x150.jpg HTTP/1.1\r\nHost: wiki.wildberries.ru\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nuser-agent: Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Server: nginx
header: Date: Sun, 01 May 2016 01:50:22 GMT
header: Content-Type: text/html
header: Content-Length: 178
header: Connection: close
header: Location: http://abenz.ru/wt
header: Set-Cookie: __utmp=1
DEBUG:requests.packages.urllib3.connectionpool:"GET /img/2016/03/dffgfgdf-150x150.jpg HTTP/1.1" 301 178
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): abenz.ru
send: 'GET /wt HTTP/1.1\r\nHost: abenz.ru\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nuser-agent: Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Date: Sun, 01 May 2016 01:50:23 GMT
header: Server: Apache/2.4.10 (Debian)
header: Expires: Thu, 21 Jul 1977 07:30:00 GMT
header: Last-Modified: Sun, 01 May 2016 01:50:23 GMT
header: Cache-Control: max-age=0
header: Pragma: no-cache
header: LOCATION: https://wiki.wildberries.ru/img/2016/03/dffgfgdf-150x150.jpg
header: Content-Length: 0
header: Keep-Alive: timeout=5, max=100
header: Connection: Keep-Alive
header: Content-Type: text/html; charset=utf-8
DEBUG:requests.packages.urllib3.connectionpool:"GET /wt HTTP/1.1" 302 0
send: 'GET /wt HTTP/1.1\r\nHost: abenz.ru\r\nConnection: keep-alive\r\nCookie: __utmp=1\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nuser-agent: Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Date: Sun, 01 May 2016 01:50:24 GMT
header: Server: Apache/2.4.10 (Debian)
header: Expires: Thu, 21 Jul 1977 07:30:00 GMT
header: Last-Modified: Sun, 01 May 2016 01:50:24 GMT
header: Cache-Control: max-age=0
header: Pragma: no-cache
header: LOCATION: https://wiki.wildberries.ru/img/2016/03/dffgfgdf-150x150.jpg
header: Content-Length: 0
header: Keep-Alive: timeout=5, max=99
header: Connection: Keep-Alive
header: Content-Type: text/html; charset=utf-8
DEBUG:requests.packages.urllib3.connectionpool:"GET /wt HTTP/1.1" 302 0
send: 'GET /wt HTTP/1.1\r\nHost: abenz.ru\r\nConnection: keep-alive\r\nCookie: __utmp=1\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nuser-agent: Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)\r\n\r\n'
...
```
The calls above are done via:
```
h = {'user-agent': 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0)'}
with requests.Session() as s:
r = s.get(url, headers = h, timeout = HTTP_TIMEOUT_SECONDS) #, allow_redirects = False)
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/7309679?v=4",
"events_url": "https://api.github.com/users/coursera-ds/events{/privacy}",
"followers_url": "https://api.github.com/users/coursera-ds/followers",
"following_url": "https://api.github.com/users/coursera-ds/following{/other_user}",
"gists_url": "https://api.github.com/users/coursera-ds/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/coursera-ds",
"id": 7309679,
"login": "coursera-ds",
"node_id": "MDQ6VXNlcjczMDk2Nzk=",
"organizations_url": "https://api.github.com/users/coursera-ds/orgs",
"received_events_url": "https://api.github.com/users/coursera-ds/received_events",
"repos_url": "https://api.github.com/users/coursera-ds/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/coursera-ds/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/coursera-ds/subscriptions",
"type": "User",
"url": "https://api.github.com/users/coursera-ds",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3170/reactions"
} | https://api.github.com/repos/psf/requests/issues/3170/timeline | null | completed | null | null | false | [
"Was running older versions of urllib3 and requests. Upgrading fixed it.\n",
"I am still getting the following error: _ssl.c:2580 or _ssl.c:2825\n\nbut when I am trying to post through SOAP UI on the same URL with basic Auth and SSL certificate , connection is going through and getting response.\n\nNeed your exp... |
https://api.github.com/repos/psf/requests/issues/3139 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3139/labels{/name} | https://api.github.com/repos/psf/requests/issues/3139/comments | https://api.github.com/repos/psf/requests/issues/3139/events | https://github.com/psf/requests/pull/3139 | 151,901,856 | MDExOlB1bGxSZXF1ZXN0NjgzOTI4MTk= | 3,139 | Initialize hash_utf8 to None, preventing NameError. Fixes #3138. | {
"avatar_url": "https://avatars.githubusercontent.com/u/9448417?v=4",
"events_url": "https://api.github.com/users/markshannon/events{/privacy}",
"followers_url": "https://api.github.com/users/markshannon/followers",
"following_url": "https://api.github.com/users/markshannon/following{/other_user}",
"gists_url": "https://api.github.com/users/markshannon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/markshannon",
"id": 9448417,
"login": "markshannon",
"node_id": "MDQ6VXNlcjk0NDg0MTc=",
"organizations_url": "https://api.github.com/users/markshannon/orgs",
"received_events_url": "https://api.github.com/users/markshannon/received_events",
"repos_url": "https://api.github.com/users/markshannon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/markshannon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markshannon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/markshannon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-29T15:50:39Z | 2021-09-08T04:01:03Z | 2016-04-29T16:05:20Z | NONE | 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/3139/reactions"
} | https://api.github.com/repos/psf/requests/issues/3139/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3139.diff",
"html_url": "https://github.com/psf/requests/pull/3139",
"merged_at": "2016-04-29T16:05:20Z",
"patch_url": "https://github.com/psf/requests/pull/3139.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3139"
} | true | [
"Thanks @markshannon! :tada: \n"
] | |
https://api.github.com/repos/psf/requests/issues/3138 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3138/labels{/name} | https://api.github.com/repos/psf/requests/issues/3138/comments | https://api.github.com/repos/psf/requests/issues/3138/events | https://github.com/psf/requests/issues/3138 | 151,835,971 | MDU6SXNzdWUxNTE4MzU5NzE= | 3,138 | Possible NameError if unexpected encryption algorithm encountered. | {
"avatar_url": "https://avatars.githubusercontent.com/u/9448417?v=4",
"events_url": "https://api.github.com/users/markshannon/events{/privacy}",
"followers_url": "https://api.github.com/users/markshannon/followers",
"following_url": "https://api.github.com/users/markshannon/following{/other_user}",
"gists_url": "https://api.github.com/users/markshannon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/markshannon",
"id": 9448417,
"login": "markshannon",
"node_id": "MDQ6VXNlcjk0NDg0MTc=",
"organizations_url": "https://api.github.com/users/markshannon/orgs",
"received_events_url": "https://api.github.com/users/markshannon/received_events",
"repos_url": "https://api.github.com/users/markshannon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/markshannon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markshannon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/markshannon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-04-29T10:22:12Z | 2021-09-08T18:00:49Z | 2016-04-29T16:05:22Z | NONE | resolved | `HTTPDigestAuth.build_digest_header` may fail with a NameError if encryption algorithm is not one of
'MD5', 'MD5-SESS' or 'SHA.
https://github.com/kennethreitz/requests/blob/master/requests/auth.py#L117
| {
"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/3138/reactions"
} | https://api.github.com/repos/psf/requests/issues/3138/timeline | null | completed | null | null | false | [
"Yup, that looks wrong. Looks like that name needs to be initialised to `None`. Want to provide a patch?\n",
"I thought I'd leave that to those of you who know the code base, in case there was something more subtle going on. I'm happy to make a PR if you want.\n",
"PRs always appreciated!\n"
] |
https://api.github.com/repos/psf/requests/issues/3137 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3137/labels{/name} | https://api.github.com/repos/psf/requests/issues/3137/comments | https://api.github.com/repos/psf/requests/issues/3137/events | https://github.com/psf/requests/issues/3137 | 151,807,285 | MDU6SXNzdWUxNTE4MDcyODU= | 3,137 | Python ssl certificate connectivity issue from mac, ssl.c:2825 | {
"avatar_url": "https://avatars.githubusercontent.com/u/12782102?v=4",
"events_url": "https://api.github.com/users/nahonnyate/events{/privacy}",
"followers_url": "https://api.github.com/users/nahonnyate/followers",
"following_url": "https://api.github.com/users/nahonnyate/following{/other_user}",
"gists_url": "https://api.github.com/users/nahonnyate/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nahonnyate",
"id": 12782102,
"login": "nahonnyate",
"node_id": "MDQ6VXNlcjEyNzgyMTAy",
"organizations_url": "https://api.github.com/users/nahonnyate/orgs",
"received_events_url": "https://api.github.com/users/nahonnyate/received_events",
"repos_url": "https://api.github.com/users/nahonnyate/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nahonnyate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nahonnyate/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nahonnyate",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 16 | 2016-04-29T07:19:30Z | 2018-06-25T11:53:47Z | 2016-05-04T19:26:39Z | NONE | resolved | Hi,
I am trying to post the following from my mac device, also I installed the .pfx file in my keychain and trying to post the same.
``` py
r = requests.post("https://url", verify='/Users/my_user/Desktop/cert.pfx', data={}, auth=('user', 'password'))
```
it is throwing the following error 👍
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/my_user/anaconda/lib/python2.7/site-packages/requests/api.py", line 88, in post
return request('post', url, data=data, **kwargs)
File "/Users/my_user/anaconda/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/my_user/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/Users/my_user/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/Users/my_user/anaconda/lib/python2.7/site-packages/requests/adapters.py", line 382, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: unknown error (_ssl.c:2825
```
| {
"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/3137/reactions"
} | https://api.github.com/repos/psf/requests/issues/3137/timeline | null | completed | null | null | false | [
"What's the format of `cert.pfx`?\n",
"I am not sure but maybe a look at this may help (from source code)\n\n :param verify: (optional) whether the SSL cert will be verified. A CA_BUNDLE path can also be provided. Defaults to `True`.\n :param stream: (optional) if `False`, the response content will be immedi... |
https://api.github.com/repos/psf/requests/issues/3136 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3136/labels{/name} | https://api.github.com/repos/psf/requests/issues/3136/comments | https://api.github.com/repos/psf/requests/issues/3136/events | https://github.com/psf/requests/pull/3136 | 151,605,950 | MDExOlB1bGxSZXF1ZXN0NjgxOTkwNzY= | 3,136 | Update readthedocs links. | {
"avatar_url": "https://avatars.githubusercontent.com/u/229453?v=4",
"events_url": "https://api.github.com/users/Natim/events{/privacy}",
"followers_url": "https://api.github.com/users/Natim/followers",
"following_url": "https://api.github.com/users/Natim/following{/other_user}",
"gists_url": "https://api.github.com/users/Natim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Natim",
"id": 229453,
"login": "Natim",
"node_id": "MDQ6VXNlcjIyOTQ1Mw==",
"organizations_url": "https://api.github.com/users/Natim/orgs",
"received_events_url": "https://api.github.com/users/Natim/received_events",
"repos_url": "https://api.github.com/users/Natim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Natim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Natim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Natim",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-28T10:39:52Z | 2021-09-08T04:01:03Z | 2016-04-28T10:43:14Z | 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/3136/reactions"
} | https://api.github.com/repos/psf/requests/issues/3136/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3136.diff",
"html_url": "https://github.com/psf/requests/pull/3136",
"merged_at": "2016-04-28T10:43:14Z",
"patch_url": "https://github.com/psf/requests/pull/3136.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3136"
} | true | [
"Thanks so much @Natim!\n"
] | |
https://api.github.com/repos/psf/requests/issues/3135 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3135/labels{/name} | https://api.github.com/repos/psf/requests/issues/3135/comments | https://api.github.com/repos/psf/requests/issues/3135/events | https://github.com/psf/requests/issues/3135 | 151,215,181 | MDU6SXNzdWUxNTEyMTUxODE= | 3,135 | requests.cookies hardcodes a root path attribute | {
"avatar_url": "https://avatars.githubusercontent.com/u/110020?v=4",
"events_url": "https://api.github.com/users/evnm/events{/privacy}",
"followers_url": "https://api.github.com/users/evnm/followers",
"following_url": "https://api.github.com/users/evnm/following{/other_user}",
"gists_url": "https://api.github.com/users/evnm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/evnm",
"id": 110020,
"login": "evnm",
"node_id": "MDQ6VXNlcjExMDAyMA==",
"organizations_url": "https://api.github.com/users/evnm/orgs",
"received_events_url": "https://api.github.com/users/evnm/received_events",
"repos_url": "https://api.github.com/users/evnm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/evnm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/evnm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/evnm",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-04-26T19:09:17Z | 2021-09-08T18:00:49Z | 2016-04-26T19:24:33Z | NONE | resolved | While trying to figure out how to set specific [path attributes](https://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Path) in cookies when using requests, I noticed that `RequestsCookieJar` [hardcodes the root path](https://github.com/kennethreitz/requests/blob/bbeb0001cdc657ac8c7fef98e154229bc392db0e/requests/cookies.py#L400) when cookies are created and doesn't seem to allow this default to be overridden.
Is there a reason for this? If not, would the maintainers be open to a PR modifying `create_cookie` to heed a `path` specified in `kwargs`?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/110020?v=4",
"events_url": "https://api.github.com/users/evnm/events{/privacy}",
"followers_url": "https://api.github.com/users/evnm/followers",
"following_url": "https://api.github.com/users/evnm/following{/other_user}",
"gists_url": "https://api.github.com/users/evnm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/evnm",
"id": 110020,
"login": "evnm",
"node_id": "MDQ6VXNlcjExMDAyMA==",
"organizations_url": "https://api.github.com/users/evnm/orgs",
"received_events_url": "https://api.github.com/users/evnm/received_events",
"repos_url": "https://api.github.com/users/evnm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/evnm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/evnm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/evnm",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3135/reactions"
} | https://api.github.com/repos/psf/requests/issues/3135/timeline | null | completed | null | null | false | [
"@evnm That reading of the code is not right. =)\n\nYou'll notice [here](https://github.com/kennethreitz/requests/blob/bbeb0001cdc657ac8c7fef98e154229bc392db0e/requests/cookies.py#L414) that we call `update` with the kwargs. That will override the path if you provide it. Try it: `create_cookie('key', 'value', path=... |
https://api.github.com/repos/psf/requests/issues/3134 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3134/labels{/name} | https://api.github.com/repos/psf/requests/issues/3134/comments | https://api.github.com/repos/psf/requests/issues/3134/events | https://github.com/psf/requests/issues/3134 | 151,214,794 | MDU6SXNzdWUxNTEyMTQ3OTQ= | 3,134 | Extensions Guide | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}... | null | 5 | 2016-04-26T19:07:15Z | 2021-09-08T07:00:41Z | 2017-07-30T00:16:45Z | CONTRIBUTOR | resolved | We currently have a list of _recommended_ (e.g. softly endorsed) extensions in the documentation (this needs some love).
In addition, we should have a document that lists all community extensions, grouped by category.
---
Prompted by https://github.com/kennethreitz/requests/issues/3131
| {
"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": 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/3134/reactions"
} | https://api.github.com/repos/psf/requests/issues/3134/timeline | null | completed | null | null | false | [
"Feel free to paste extensions you're aware of here.\n",
"PyPI catalogs these for us see:\n- [searching for requests on PyPI](https://pypi.python.org/pypi?:action=search&term=requests&submit=search)\n- [searching for requests on Warehouse](https://pypi.io/search/?q=requests)\n\nJudging by the number of these pack... |
https://api.github.com/repos/psf/requests/issues/3133 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3133/labels{/name} | https://api.github.com/repos/psf/requests/issues/3133/comments | https://api.github.com/repos/psf/requests/issues/3133/events | https://github.com/psf/requests/issues/3133 | 151,192,406 | MDU6SXNzdWUxNTExOTI0MDY= | 3,133 | requests cannot fetch this website (only in Python 3) | {
"avatar_url": "https://avatars.githubusercontent.com/u/350846?v=4",
"events_url": "https://api.github.com/users/jribbens/events{/privacy}",
"followers_url": "https://api.github.com/users/jribbens/followers",
"following_url": "https://api.github.com/users/jribbens/following{/other_user}",
"gists_url": "https://api.github.com/users/jribbens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jribbens",
"id": 350846,
"login": "jribbens",
"node_id": "MDQ6VXNlcjM1MDg0Ng==",
"organizations_url": "https://api.github.com/users/jribbens/orgs",
"received_events_url": "https://api.github.com/users/jribbens/received_events",
"repos_url": "https://api.github.com/users/jribbens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jribbens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jribbens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jribbens",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-04-26T17:27:15Z | 2021-09-08T18:00:49Z | 2016-04-26T17:52:49Z | NONE | resolved | `requests.get("https://www.northwarks.gov.uk/")` hangs.
`urllib.request.urlopen("https://www.northwarks.gov.uk/").read()` works fine.
I am using Python 3.4 and requests 2.9.1.
If I use Python 2.7.10 and requests 2.9.1 then it works fine.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/350846?v=4",
"events_url": "https://api.github.com/users/jribbens/events{/privacy}",
"followers_url": "https://api.github.com/users/jribbens/followers",
"following_url": "https://api.github.com/users/jribbens/following{/other_user}",
"gists_url": "https://api.github.com/users/jribbens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jribbens",
"id": 350846,
"login": "jribbens",
"node_id": "MDQ6VXNlcjM1MDg0Ng==",
"organizations_url": "https://api.github.com/users/jribbens/orgs",
"received_events_url": "https://api.github.com/users/jribbens/received_events",
"repos_url": "https://api.github.com/users/jribbens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jribbens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jribbens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jribbens",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3133/reactions"
} | https://api.github.com/repos/psf/requests/issues/3133/timeline | null | completed | null | null | false | [
"So, first things first. If we set `allow_redirects=False` and `stream=True`, then the first request works. With anything else set, it hangs. The headers the server sends sends seem to be the problem here. Here's the header block curl is seeing:\n\n```\nHTTP/1.1 302 Moved Temporarily\nContent-Type: text/html; chars... |
https://api.github.com/repos/psf/requests/issues/3132 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3132/labels{/name} | https://api.github.com/repos/psf/requests/issues/3132/comments | https://api.github.com/repos/psf/requests/issues/3132/events | https://github.com/psf/requests/pull/3132 | 151,097,486 | MDExOlB1bGxSZXF1ZXN0Njc4NjEyMTc= | 3,132 | utils: let select_proxy not raise an exception when url has no hostname | {
"avatar_url": "https://avatars.githubusercontent.com/u/1543430?v=4",
"events_url": "https://api.github.com/users/chipaca/events{/privacy}",
"followers_url": "https://api.github.com/users/chipaca/followers",
"following_url": "https://api.github.com/users/chipaca/following{/other_user}",
"gists_url": "https://api.github.com/users/chipaca/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chipaca",
"id": 1543430,
"login": "chipaca",
"node_id": "MDQ6VXNlcjE1NDM0MzA=",
"organizations_url": "https://api.github.com/users/chipaca/orgs",
"received_events_url": "https://api.github.com/users/chipaca/received_events",
"repos_url": "https://api.github.com/users/chipaca/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chipaca/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chipaca/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chipaca",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-04-26T10:24:54Z | 2021-09-08T04:01:04Z | 2016-04-26T10:35:23Z | CONTRIBUTOR | resolved | Fixes #3131.
| {
"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/3132/reactions"
} | https://api.github.com/repos/psf/requests/issues/3132/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3132.diff",
"html_url": "https://github.com/psf/requests/pull/3132",
"merged_at": "2016-04-26T10:35:23Z",
"patch_url": "https://github.com/psf/requests/pull/3132.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3132"
} | true | [
"While we're here, we should probably also handle the possibility that there's no scheme in the URL as well.\n",
"scheme defaults to `''`, though. Well, more or less:\n\n> The scheme argument gives the default addressing scheme, to be used only if the URL does not specify one. It should be the same type (text or ... |
https://api.github.com/repos/psf/requests/issues/3131 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3131/labels{/name} | https://api.github.com/repos/psf/requests/issues/3131/comments | https://api.github.com/repos/psf/requests/issues/3131/events | https://github.com/psf/requests/issues/3131 | 151,097,407 | MDU6SXNzdWUxNTEwOTc0MDc= | 3,131 | utils.select_proxy raises an exception when URL has no hostname | {
"avatar_url": "https://avatars.githubusercontent.com/u/1543430?v=4",
"events_url": "https://api.github.com/users/chipaca/events{/privacy}",
"followers_url": "https://api.github.com/users/chipaca/followers",
"following_url": "https://api.github.com/users/chipaca/following{/other_user}",
"gists_url": "https://api.github.com/users/chipaca/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chipaca",
"id": 1543430,
"login": "chipaca",
"node_id": "MDQ6VXNlcjE1NDM0MzA=",
"organizations_url": "https://api.github.com/users/chipaca/orgs",
"received_events_url": "https://api.github.com/users/chipaca/received_events",
"repos_url": "https://api.github.com/users/chipaca/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chipaca/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chipaca/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chipaca",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-04-26T10:24:27Z | 2021-09-08T16:00:40Z | 2016-04-26T10:35:23Z | CONTRIBUTOR | resolved | URLs sometimes have no hostname (e.g. file URLs, or unix socket URLs). The parsed URL `hostname` attribute returns `None` in this case, making `utils.select_proxy` complain about concat'ing a `str` with `None`.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3131/reactions"
} | https://api.github.com/repos/psf/requests/issues/3131/timeline | null | completed | null | null | false | [
"@chipaca keep in mind that whatever adapter you're using will have to deal with older versions of requests and if it's not meant to touch the network should not be inheriting from the HTTPAdapter.\n",
"@sigmavirus24 I'm using https://github.com/msabramo/requests-unixsocket/ which does inherit from `HTTPAdapter`.... |
https://api.github.com/repos/psf/requests/issues/3109 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3109/labels{/name} | https://api.github.com/repos/psf/requests/issues/3109/comments | https://api.github.com/repos/psf/requests/issues/3109/events | https://github.com/psf/requests/pull/3109 | 150,186,966 | MDExOlB1bGxSZXF1ZXN0Njc0MTk3NTY= | 3,109 | HTTPAdapter now updates its PoolManager connection_pool_kw | {
"avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4",
"events_url": "https://api.github.com/users/jeremycline/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremycline/followers",
"following_url": "https://api.github.com/users/jeremycline/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremycline",
"id": 1977525,
"login": "jeremycline",
"node_id": "MDQ6VXNlcjE5Nzc1MjU=",
"organizations_url": "https://api.github.com/users/jeremycline/orgs",
"received_events_url": "https://api.github.com/users/jeremycline/received_events",
"repos_url": "https://api.github.com/users/jeremycline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremycline",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2013-11-17T11:29:34Z",
"creator": {
"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"
},
"description": null,
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/20",
"id": 487518,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/20/labels",
"node_id": "MDk6TWlsZXN0b25lNDg3NTE4",
"number": 20,
"open_issues": 12,
"state": "open",
"title": "3.0.0",
"updated_at": "2024-05-19T18:43:00Z",
"url": "https://api.github.com/repos/psf/requests/milestones/20"
} | 13 | 2016-04-21T20:47:49Z | 2021-09-08T02:10:28Z | 2016-09-29T20:30:31Z | CONTRIBUTOR | resolved | This is not particularly polished yet, and depends on the as-yet unreleased
urllib3 version 1.16. Still, I'd greatly appreciate some early feedback on how
(in)sane this approach is.
With the addition of https://github.com/shazow/urllib3/pull/830 requests
should update the connection_pool_kw on the PoolManager so that new
ConnectionPools get created when TLS/SSL settings change. This ensures
that users can update the CA certificates used to verify servers as well
as the client certificate and key it uses to authenticate with servers.
This fixes issue #2863
---
Closes #2863
| {
"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/3109/reactions"
} | https://api.github.com/repos/psf/requests/issues/3109/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3109.diff",
"html_url": "https://github.com/psf/requests/pull/3109",
"merged_at": "2016-09-29T20:30:31Z",
"patch_url": "https://github.com/psf/requests/pull/3109.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3109"
} | true | [
"Thanks for this @jeremycline!\n\nIn principle this is fine. However, it changes the interface of the HTTPAdapter which is IMO part of our public interface, so I'd want to sit on this until 3.0.0. Happily, 3.0.0 shouldn't be too far away now so we can progress with this work. =)\n",
"I'm confused why we would rem... |
https://api.github.com/repos/psf/requests/issues/3108 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3108/labels{/name} | https://api.github.com/repos/psf/requests/issues/3108/comments | https://api.github.com/repos/psf/requests/issues/3108/events | https://github.com/psf/requests/pull/3108 | 150,106,470 | MDExOlB1bGxSZXF1ZXN0NjczNzI4OTI= | 3,108 | Flip conditional in session.send() | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-04-21T15:21:26Z | 2021-09-08T04:01:04Z | 2016-04-21T15:30:22Z | CONTRIBUTOR | resolved | Previously we checked that the `request` being sent was an instance of a
PreparedRequest. If a user somehow created a PreparedRequest using a different
Requests library instance, this check makes the request un-sendable.
(This happened recently - unbeknownst to me, my server was running an outdated
version of pip, vulnerable to this issue - pypa/pip#1489, which creates
multiple subdirectories (src/requests, src/requests/requests) when you rerun
pip install --target. So the PreparedRequest was being created in one version
of the library and compared against the other version of the library, and
throwing this exception, even though they were both PreparedRequest instances!)
It would probably be preferable to check the object's behavior (instead of
its type), but a PreparedRequest has a lot of behavior, and it wouldn't be
really feasible or allow us to provide a helpful error message to check all
of it here. Instead flip the conditional to guard against the user sending an
unprepared Request, which should still give us most of the benefits of the
better error message.
Fixes #3102
| {
"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/3108/reactions"
} | https://api.github.com/repos/psf/requests/issues/3108/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3108.diff",
"html_url": "https://github.com/psf/requests/pull/3108",
"merged_at": "2016-04-21T15:30:22Z",
"patch_url": "https://github.com/psf/requests/pull/3108.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3108"
} | true | [
"I'm happy with this! Go for it @kennethreitz, merge if you'd like to. =D\n",
"Not if I merge it first ;)\n"
] |
https://api.github.com/repos/psf/requests/issues/3107 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3107/labels{/name} | https://api.github.com/repos/psf/requests/issues/3107/comments | https://api.github.com/repos/psf/requests/issues/3107/events | https://github.com/psf/requests/issues/3107 | 149,621,611 | MDU6SXNzdWUxNDk2MjE2MTE= | 3,107 | Redirected request.post turns into a GET | {
"avatar_url": "https://avatars.githubusercontent.com/u/2030556?v=4",
"events_url": "https://api.github.com/users/wontonst/events{/privacy}",
"followers_url": "https://api.github.com/users/wontonst/followers",
"following_url": "https://api.github.com/users/wontonst/following{/other_user}",
"gists_url": "https://api.github.com/users/wontonst/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wontonst",
"id": 2030556,
"login": "wontonst",
"node_id": "MDQ6VXNlcjIwMzA1NTY=",
"organizations_url": "https://api.github.com/users/wontonst/orgs",
"received_events_url": "https://api.github.com/users/wontonst/received_events",
"repos_url": "https://api.github.com/users/wontonst/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wontonst/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wontonst/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wontonst",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-20T00:48:15Z | 2021-09-08T18:00:50Z | 2016-04-20T07:22:32Z | NONE | resolved | ```
SITE = 'HTTP@{}'.format(API_ENDPOINT)
w_, krb_context = kerberos.authGSSClientInit(SITE)
kerberos.authGSSClientStep(krb_context, '')
AUTH = HTTPKerberosAuth(mutual_authentication=requests_kerberos.DISABLED)
r = requests.post(url, json = {'key':'value'}, auth=AUTH)
print 'MY REQUEST'
pprint.pprint(vars(r.request))
r = requests.post('http://httpbin.org/post', json = {'key':'value'})
print 'THEIR REQUEST'
pprint.pprint(vars(r.request))
```
```
MY REQUEST
{'_cookies': <RequestsCookieJar[Cookie(version=0, name='xxx', value='xx', port=None, port_specified=False, domain='xxx', d\
omain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=True, expires=1461145561, discard=False, comment=None, comment_url=None, rest={'HttpOnly\
': None}, rfc2109=False), Cookie(version=0, name='xxx', value='xxxx', port=None,\
port_specified=False, domain='xxx', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=True, expires=146114\
5561, discard=False, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False)]>,
'body': None,
'headers': {'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'User-Agent': 'python-requests/2.9.1', 'Connection': 'keep-alive', 'Cookie': 'xxx', 'Content-Type': 'application/json'},
'hooks': {'response': [<bound method HTTPKerberosAuth.handle_response of <requests_kerberos.kerberos_.HTTPKerberosAuth object at 0x10c0a6310>>]},
'method': 'GET',
'url': 'xxx'}
THEIR REQUEST
{'_cookies': <RequestsCookieJar[]>,
'body': '{"key": "value"}',
'headers': {'Content-Length': '16', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'User-Agent': 'python-requests/2.9.1', 'Connection': 'keep-alive', 'Content-Type': 'a\
pplication/json'},
'hooks': {'response': []},
'method': 'POST',
'url': 'http://httpbin.org/post'}
```
As you can see, body becomes empty and the method is POST.
Looking at the response history shows that it gets redirected from the authenticator, then the request becomes a GET.
Shouldn't the POST request propagate all the way to the end?
| {
"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/3107/reactions"
} | https://api.github.com/repos/psf/requests/issues/3107/timeline | null | completed | null | null | false | [
"Nope. =) Not all redirects preserve the verb: if the website in question wants to preserve the verb, they should use 307 or 308 instead.\n\nRequests behaves like a browser when redirected. That means that it does the following:\n- on 303, changes everything except HEAD/GET to GET, as specified in RFC 7231 Section ... |
https://api.github.com/repos/psf/requests/issues/3106 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3106/labels{/name} | https://api.github.com/repos/psf/requests/issues/3106/comments | https://api.github.com/repos/psf/requests/issues/3106/events | https://github.com/psf/requests/issues/3106 | 149,542,630 | MDU6SXNzdWUxNDk1NDI2MzA= | 3,106 | Congrats on worst naming standards for Python modules 2015+ | {
"avatar_url": "https://avatars.githubusercontent.com/u/2856049?v=4",
"events_url": "https://api.github.com/users/mossarelli/events{/privacy}",
"followers_url": "https://api.github.com/users/mossarelli/followers",
"following_url": "https://api.github.com/users/mossarelli/following{/other_user}",
"gists_url": "https://api.github.com/users/mossarelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mossarelli",
"id": 2856049,
"login": "mossarelli",
"node_id": "MDQ6VXNlcjI4NTYwNDk=",
"organizations_url": "https://api.github.com/users/mossarelli/orgs",
"received_events_url": "https://api.github.com/users/mossarelli/received_events",
"repos_url": "https://api.github.com/users/mossarelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mossarelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mossarelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mossarelli",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2016-04-19T18:24:26Z | 2016-04-19T18:44:34Z | 2016-04-19T18:24:42Z | NONE | null | `
pkg_resources.VersionConflict: (requests 2.2.1 (/usr/lib/python2.7/dist-packages), Requirement.parse('requests>=2.3.0'))
`
> Reasons for using a naming convention (as opposed to allowing programmers to choose any character sequence) include the following:
> - to reduce the effort needed to read and understand source code;
> - to enable code reviews to focus on more important issues than arguing over syntax and naming standards.
> - to enable code quality review tools to focus their reporting mainly on significant issues other than syntax and style preferences.
> - to enhance source code appearance (for example, by disallowing overlong names or unclear abbreviations).
> [https://en.wikipedia.org/wiki/Naming_convention_%28programming%29#cite_ref-1](https://en.wikipedia.org/wiki/Naming_convention_%28programming%29)
Without prior knowledge into Python syntax, Bash syntax and the name of the module, error fixing took several extra hours to solve. Another nail in the coffin.
Thank you for a great module regardless of name. It provides one of the strongest features I need in a bot that checks URLs. Too bad I have to be a wizard to swish and flick my wand to fix the errors.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/2856049?v=4",
"events_url": "https://api.github.com/users/mossarelli/events{/privacy}",
"followers_url": "https://api.github.com/users/mossarelli/followers",
"following_url": "https://api.github.com/users/mossarelli/following{/other_user}",
"gists_url": "https://api.github.com/users/mossarelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mossarelli",
"id": 2856049,
"login": "mossarelli",
"node_id": "MDQ6VXNlcjI4NTYwNDk=",
"organizations_url": "https://api.github.com/users/mossarelli/orgs",
"received_events_url": "https://api.github.com/users/mossarelli/received_events",
"repos_url": "https://api.github.com/users/mossarelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mossarelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mossarelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mossarelli",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3106/reactions"
} | https://api.github.com/repos/psf/requests/issues/3106/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/3105 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3105/labels{/name} | https://api.github.com/repos/psf/requests/issues/3105/comments | https://api.github.com/repos/psf/requests/issues/3105/events | https://github.com/psf/requests/issues/3105 | 149,336,538 | MDU6SXNzdWUxNDkzMzY1Mzg= | 3,105 | Sticker Design [Kenneth] | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}... | null | 7 | 2016-04-19T03:17:38Z | 2021-09-08T17:05:34Z | 2016-07-01T18:39:31Z | CONTRIBUTOR | resolved | Using this as a place to throw things i find that I like.
Going to use StickerMule, not StickerRobot. Undecided on size or design, yet.
I like the idea of using 99designs to come up with the sticker. Would be far more expensive than doing it myself, but I'd rather be handing out _amazing_ stickers at a conference than mediocre ones (for an amazing project).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3105/reactions"
} | https://api.github.com/repos/psf/requests/issues/3105/timeline | null | completed | null | null | false | [
"http://99designs.com\n",
"Turtles (evolutions of Rezzy the sea turtle, possibly):\n- http://graphicriver.net/item/turtle/10194964?s_rank=6 (cute, but not a sea turtle)\n- http://graphicriver.net/item/cartoon-turtle/12865148?s_rank=38 (running, meh)\n- http://graphicriver.net/item/cartoon-turtle/9991241?s_rank=49... |
https://api.github.com/repos/psf/requests/issues/3104 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3104/labels{/name} | https://api.github.com/repos/psf/requests/issues/3104/comments | https://api.github.com/repos/psf/requests/issues/3104/events | https://github.com/psf/requests/issues/3104 | 149,209,398 | MDU6SXNzdWUxNDkyMDkzOTg= | 3,104 | SSLError exception leak while reading content stream | {
"avatar_url": "https://avatars.githubusercontent.com/u/880064?v=4",
"events_url": "https://api.github.com/users/fredthomsen/events{/privacy}",
"followers_url": "https://api.github.com/users/fredthomsen/followers",
"following_url": "https://api.github.com/users/fredthomsen/following{/other_user}",
"gists_url": "https://api.github.com/users/fredthomsen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fredthomsen",
"id": 880064,
"login": "fredthomsen",
"node_id": "MDQ6VXNlcjg4MDA2NA==",
"organizations_url": "https://api.github.com/users/fredthomsen/orgs",
"received_events_url": "https://api.github.com/users/fredthomsen/received_events",
"repos_url": "https://api.github.com/users/fredthomsen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fredthomsen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fredthomsen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fredthomsen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2016-04-18T16:55:07Z | 2021-09-08T15:00:48Z | 2016-04-19T06:19:23Z | NONE | resolved | This system is on requests 2.7.0. Traceback below:
```
.....File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 508, in post return self.request(\'POST\', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 465, in request resp = self.send(prep, **send_kwargs),
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 605, in send r.content,
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/models.py", line 750, in content self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes(),
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/models.py", line 673, in generate for chunk in self.raw.stream(chunk_size, decode_content=True):,
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/response.py", line 303, in stream for line in self.read_chunked(amt, decode_content=decode_content):,
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/response.py", line 450, in read_chunked chunk = self._handle_chunk(amt),
File "/usr/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/response.py", line 420, in _handle_chunk returned_chunk = self._fp._safe_read(self.chunk_left),
File "/usr/local/lib/python2.7/httplib.py", line 647, in _safe_read chunk = self.fp.read(min(amt, MAXAMOUNT)),
File "/usr/local/lib/python2.7/socket.py", line 380, in read data = self._sock.recv(left),
File "/usr/local/lib/python2.7/ssl.py", line 241, in recv return self.read(buflen),
File "/usr/local/lib/python2.7/ssl.py", line 160, in read return self._sslobj.read(len)
SSLError: The read operation timed out
```
Seems similar to #1826
| {
"avatar_url": "https://avatars.githubusercontent.com/u/880064?v=4",
"events_url": "https://api.github.com/users/fredthomsen/events{/privacy}",
"followers_url": "https://api.github.com/users/fredthomsen/followers",
"following_url": "https://api.github.com/users/fredthomsen/following{/other_user}",
"gists_url": "https://api.github.com/users/fredthomsen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fredthomsen",
"id": 880064,
"login": "fredthomsen",
"node_id": "MDQ6VXNlcjg4MDA2NA==",
"organizations_url": "https://api.github.com/users/fredthomsen/orgs",
"received_events_url": "https://api.github.com/users/fredthomsen/received_events",
"repos_url": "https://api.github.com/users/fredthomsen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fredthomsen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fredthomsen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fredthomsen",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3104/reactions"
} | https://api.github.com/repos/psf/requests/issues/3104/timeline | null | completed | null | null | false | [
"@fredthomsen Can you please check with 2.9.0? I believe we fixed this already.\n",
"On the system I am able to reproduce this on, it's only occurring occasionally, but has almost always been happening daily. I put 2.9.0 on there, and I'll let it run overnight.\n",
"Determined a better way of reproducing the i... |
https://api.github.com/repos/psf/requests/issues/3103 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3103/labels{/name} | https://api.github.com/repos/psf/requests/issues/3103/comments | https://api.github.com/repos/psf/requests/issues/3103/events | https://github.com/psf/requests/pull/3103 | 149,092,070 | MDExOlB1bGxSZXF1ZXN0NjY4MjAyOTk= | 3,103 | Implement #2149 | {
"avatar_url": "https://avatars.githubusercontent.com/u/31764?v=4",
"events_url": "https://api.github.com/users/weiwei/events{/privacy}",
"followers_url": "https://api.github.com/users/weiwei/followers",
"following_url": "https://api.github.com/users/weiwei/following{/other_user}",
"gists_url": "https://api.github.com/users/weiwei/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/weiwei",
"id": 31764,
"login": "weiwei",
"node_id": "MDQ6VXNlcjMxNzY0",
"organizations_url": "https://api.github.com/users/weiwei/orgs",
"received_events_url": "https://api.github.com/users/weiwei/received_events",
"repos_url": "https://api.github.com/users/weiwei/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/weiwei/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/weiwei/subscriptions",
"type": "User",
"url": "https://api.github.com/users/weiwei",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-04-18T09:10:17Z | 2021-09-08T04:01:05Z | 2016-04-18T13:42:50Z | NONE | resolved | Though #2149 is marked as closed, I had to do this because 1) I can't just give up requests and 2) I can't change the non-standard URLs I'm using. So I did a little hack. Now it goes like this:
```
>>> from urllib.parse import quote
>>> requests.models.DEFAULT_QUOTE_VIA = quote
>>> requests.models.DEFAULT_SAFE = '/?$=%'
>>> r = requests.get('http://reddit.com/', params={'$foo': 'bar baz'})
>>> r.url
'https://www.reddit.com/?$foo=bar%20baz'
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/31764?v=4",
"events_url": "https://api.github.com/users/weiwei/events{/privacy}",
"followers_url": "https://api.github.com/users/weiwei/followers",
"following_url": "https://api.github.com/users/weiwei/following{/other_user}",
"gists_url": "https://api.github.com/users/weiwei/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/weiwei",
"id": 31764,
"login": "weiwei",
"node_id": "MDQ6VXNlcjMxNzY0",
"organizations_url": "https://api.github.com/users/weiwei/orgs",
"received_events_url": "https://api.github.com/users/weiwei/received_events",
"repos_url": "https://api.github.com/users/weiwei/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/weiwei/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/weiwei/subscriptions",
"type": "User",
"url": "https://api.github.com/users/weiwei",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3103/reactions"
} | https://api.github.com/repos/psf/requests/issues/3103/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3103.diff",
"html_url": "https://github.com/psf/requests/pull/3103",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3103.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3103"
} | true | [
"I'm -1 on this: we have an appropriate hook to do this already (the PreparedRequest), and I'm disinclined to want to add configurability here, _particularly_ in the form of global singleton state: this is a recipe for really tricky to debug issues down the road. \n",
"@Lukasa Thanks for pointing to the right dir... |
https://api.github.com/repos/psf/requests/issues/3102 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3102/labels{/name} | https://api.github.com/repos/psf/requests/issues/3102/comments | https://api.github.com/repos/psf/requests/issues/3102/events | https://github.com/psf/requests/issues/3102 | 149,045,770 | MDU6SXNzdWUxNDkwNDU3NzA= | 3,102 | PreparedRequest check: use duck typing? | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-04-18T05:25:57Z | 2021-09-08T18:00:50Z | 2016-04-21T15:30:22Z | CONTRIBUTOR | resolved | Okay, this is admittedly an edge case.
I was attempting to deploy to AWS from a CI server, and `boto3` was returning this stack trace:
```
Traceback (most recent call last):
File "deploy.py", line 43, in <module>
main(args.realm)
File "deploy.py", line 29, in main
results = [client.update_function_code(FunctionName=arn, ZipFile=data) for arn in arns]
File "/home/ubuntu/webhooks/src/botocore/botocore/client.py", line 236, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/ubuntu/webhooks/src/botocore/botocore/client.py", line 489, in _make_api_call
operation_model, request_dict)
File "/home/ubuntu/webhooks/src/botocore/endpoint.py", line 117, in make_request
return self._send_request(request_dict, operation_model)
File "/home/ubuntu/webhooks/src/botocore/endpoint.py", line 146, in _send_request
success_response, exception):
File "/home/ubuntu/webhooks/src/botocore/endpoint.py", line 219, in _needs_retry
caught_exception=caught_exception)
File "/home/ubuntu/webhooks/src/botocore/botocore/hooks.py", line 226, in emit
return self._emit(event_name, kwargs)
File "/home/ubuntu/webhooks/src/botocore/botocore/hooks.py", line 209, in _emit
response = handler(**kwargs)
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 183, in __call__
if self._checker(attempts, response, caught_exception):
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 250, in __call__
caught_exception)
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 265, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 313, in __call__
caught_exception)
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 222, in __call__
return self._check_caught_exception(attempt_number, caught_exception)
File "/home/ubuntu/webhooks/src/botocore/botocore/retryhandler.py", line 355, in _check_caught_exception
raise caught_exception
ValueError: You can only send PreparedRequests.
```
The related code in Requests is here:
``` python
# It's possible that users might accidentally send a Request object.
# Guard against that specific failure case.
if not isinstance(request, PreparedRequest):
raise ValueError('You can only send PreparedRequests.')
```
This was failing because unbeknownst to me, the server was running an outdated version of `pip`, vulnerable to this issue, which creates multiple subdirectories (`src/requests`, `src/requests/requests`) when you rerun `pip install --target`: https://github.com/pypa/pip/issues/1489. So the PreparedRequest was being created in one version of the library and compared against the other version of the library, and throwing this exception, even though they were both PreparedRequest instances!
I'm not sure of the best reference here, but as I understand it, it's preferable to check an object's behavior rather than its type, see for example [Alex Martelli's message here](https://groups.google.com/forum/?hl=en#!msg/comp.lang.python/CCs2oJdyuzc/NYjla5HKMOIJ):
> In other words, don't check whether it IS-a duck: check
> whether it QUACKS-like-a duck, WALKS-like-a duck,
> etc, etc, depending on exactly what subset of duck-like
> behaviour you need to play your language-games with.
I may be the only human in the history of existence to hit this exact edge case, but it seems like Requests could still perform the request. Is there a better way to check for the necessary behaviour?
| {
"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/3102/reactions"
} | https://api.github.com/repos/psf/requests/issues/3102/timeline | null | completed | null | null | false | [
"That's a good question.\n\nGenerally speaking it seems like a bad idea to pass objects from one form of a library to another form (it's not even really possible to do in Python unless the namespacing has gone all to hell. One way we could resolve this problem is to flip the check to catch the specific error case w... |
https://api.github.com/repos/psf/requests/issues/3101 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3101/labels{/name} | https://api.github.com/repos/psf/requests/issues/3101/comments | https://api.github.com/repos/psf/requests/issues/3101/events | https://github.com/psf/requests/issues/3101 | 149,024,007 | MDU6SXNzdWUxNDkwMjQwMDc= | 3,101 | How to find what proxies Requests is using? | {
"avatar_url": "https://avatars.githubusercontent.com/u/8064242?v=4",
"events_url": "https://api.github.com/users/thuzhf/events{/privacy}",
"followers_url": "https://api.github.com/users/thuzhf/followers",
"following_url": "https://api.github.com/users/thuzhf/following{/other_user}",
"gists_url": "https://api.github.com/users/thuzhf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thuzhf",
"id": 8064242,
"login": "thuzhf",
"node_id": "MDQ6VXNlcjgwNjQyNDI=",
"organizations_url": "https://api.github.com/users/thuzhf/orgs",
"received_events_url": "https://api.github.com/users/thuzhf/received_events",
"repos_url": "https://api.github.com/users/thuzhf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thuzhf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thuzhf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thuzhf",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-18T02:36:12Z | 2021-09-08T18:00:52Z | 2016-04-18T05:38:28Z | NONE | resolved | I set no proxies in environment variables, but I set proxies in system configuration on my MacOS. And I find that Requests use it automatically (by checking what responses I get), but it seems this feature is not pointed out in your documentation. So is there any way to see what proxies are Requests is using? Will it automatically use what urllib.request.getproxies() return?
| {
"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/3101/reactions"
} | https://api.github.com/repos/psf/requests/issues/3101/timeline | null | completed | null | null | false | [
"You can call `requests.utils.get_environ_proxies(url)`, where the URL is the URL you're accessing. That will show you what proxies we found. \n"
] |
https://api.github.com/repos/psf/requests/issues/3100 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3100/labels{/name} | https://api.github.com/repos/psf/requests/issues/3100/comments | https://api.github.com/repos/psf/requests/issues/3100/events | https://github.com/psf/requests/pull/3100 | 148,838,782 | MDExOlB1bGxSZXF1ZXN0NjY3MzM3NjY= | 3,100 | Remove stale sentence in philosophy.rst | {
"avatar_url": "https://avatars.githubusercontent.com/u/15012549?v=4",
"events_url": "https://api.github.com/users/hitstergtd/events{/privacy}",
"followers_url": "https://api.github.com/users/hitstergtd/followers",
"following_url": "https://api.github.com/users/hitstergtd/following{/other_user}",
"gists_url": "https://api.github.com/users/hitstergtd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hitstergtd",
"id": 15012549,
"login": "hitstergtd",
"node_id": "MDQ6VXNlcjE1MDEyNTQ5",
"organizations_url": "https://api.github.com/users/hitstergtd/orgs",
"received_events_url": "https://api.github.com/users/hitstergtd/received_events",
"repos_url": "https://api.github.com/users/hitstergtd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hitstergtd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hitstergtd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hitstergtd",
"user_view_type": "public"
} | [
{
"color": "fbca04",
"default": false,
"description": null,
"id": 44501249,
"name": "Needs BDFL Input",
"node_id": "MDU6TGFiZWw0NDUwMTI0OQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20BDFL%20Input"
}
] | 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-04-16T09:59:53Z | 2021-09-08T04:01:05Z | 2016-04-17T17:26:25Z | CONTRIBUTOR | resolved | Sentence contains reference to version 1.0.0.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3100/reactions"
} | https://api.github.com/repos/psf/requests/issues/3100/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3100.diff",
"html_url": "https://github.com/psf/requests/pull/3100",
"merged_at": "2016-04-17T17:26:25Z",
"patch_url": "https://github.com/psf/requests/pull/3100.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3100"
} | true | [
"Agreed. I saw this a few weeks ago and was thinking the same thing. \n",
"@kennethreitz, @sigmavirus24 Thanks! 👍 \n"
] |
https://api.github.com/repos/psf/requests/issues/3099 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3099/labels{/name} | https://api.github.com/repos/psf/requests/issues/3099/comments | https://api.github.com/repos/psf/requests/issues/3099/events | https://github.com/psf/requests/issues/3099 | 148,779,712 | MDU6SXNzdWUxNDg3Nzk3MTI= | 3,099 | overall timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/5225146?v=4",
"events_url": "https://api.github.com/users/emgerner-msft/events{/privacy}",
"followers_url": "https://api.github.com/users/emgerner-msft/followers",
"following_url": "https://api.github.com/users/emgerner-msft/following{/other_user}",
"gists_url": "https://api.github.com/users/emgerner-msft/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/emgerner-msft",
"id": 5225146,
"login": "emgerner-msft",
"node_id": "MDQ6VXNlcjUyMjUxNDY=",
"organizations_url": "https://api.github.com/users/emgerner-msft/orgs",
"received_events_url": "https://api.github.com/users/emgerner-msft/received_events",
"repos_url": "https://api.github.com/users/emgerner-msft/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/emgerner-msft/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/emgerner-msft/subscriptions",
"type": "User",
"url": "https://api.github.com/users/emgerner-msft",
"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"
}
] | closed | true | null | [] | null | 38 | 2016-04-15T22:00:39Z | 2021-09-08T18:00:47Z | 2016-04-26T17:09:54Z | NONE | resolved | We already make great use of the timeout parameter which allows setting per TCP transaction timeouts. This is very helpful! However, we also need to support an overall timeout across the connection. Reading the [docs on timeouts](http://docs.python-requests.org/en/master/user/quickstart/#timeouts) I see this isn't currently supported, and searching through the issues at least a bit back I didn't see another request for this feature -- excuse me if there is.
I realize we can set timers in our library to accomplish this, but I'm concerned about the additional overhead (one per thread, and we may have many) as well as any adverse effects to connection pooling if we end up needing to abort a request. Is there a good way to abort a request in the first place? I didn't see anything obvious in the docs.
So: Long term, it would be great if we could add overall timeout to the requests library. Short term, is there a recommended way of implementing this on my end?
| {
"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/3099/reactions"
} | https://api.github.com/repos/psf/requests/issues/3099/timeline | null | completed | null | null | false | [
"Hi @emgerner-msft,\n\nFor reference, the following are all variations on this theme if not this exact feature request:\n- https://github.com/kennethreitz/requests/issues/2327\n- https://github.com/kennethreitz/requests/issues/2685\n- https://github.com/kennethreitz/requests/issues/1928\n- (and I'm sure there are m... |
https://api.github.com/repos/psf/requests/issues/3098 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3098/labels{/name} | https://api.github.com/repos/psf/requests/issues/3098/comments | https://api.github.com/repos/psf/requests/issues/3098/events | https://github.com/psf/requests/issues/3098 | 148,578,221 | MDU6SXNzdWUxNDg1NzgyMjE= | 3,098 | HeaderParsingError: Failed to parse headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/6367792?v=4",
"events_url": "https://api.github.com/users/guyskk/events{/privacy}",
"followers_url": "https://api.github.com/users/guyskk/followers",
"following_url": "https://api.github.com/users/guyskk/following{/other_user}",
"gists_url": "https://api.github.com/users/guyskk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/guyskk",
"id": 6367792,
"login": "guyskk",
"node_id": "MDQ6VXNlcjYzNjc3OTI=",
"organizations_url": "https://api.github.com/users/guyskk/orgs",
"received_events_url": "https://api.github.com/users/guyskk/received_events",
"repos_url": "https://api.github.com/users/guyskk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/guyskk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/guyskk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/guyskk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 23 | 2016-04-15T07:22:15Z | 2021-08-27T00:08:26Z | 2016-04-15T08:12:58Z | NONE | resolved | ```
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
DEBUG:requests.packages.urllib3.connectionpool:"POST /kkblog/ HTTP/1.1" 201 None
WARNING:requests.packages.urllib3.connectionpool:Failed to parse headers (url=http://127.0.0.1:5984/kkblog/): [MissingHeaderBodySeparatorDefect()], unparsed data: '³é\x97\xad\r\nETag: "1-967a00dff5e02add41819138abb3284d"\r\nDate: Fri, 15 Apr 2016 14:45:18 GMT\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Length: 69\r\nCache-Control: must-revalidate\r\n\r\n'
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 390, in _make_request
assert_header_parsing(httplib_response.msg)
File "/usr/lib/python3.5/site-packages/requests/packages/urllib3/util/response.py", line 59, in assert_header_parsing
raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
requests.packages.urllib3.exceptions.HeaderParsingError: [MissingHeaderBodySeparatorDefect()], unparsed data: '³é\x97\xad\r\nETag: "1-967a00dff5e02add41819138abb3284d"\r\nDate: Fri, 15 Apr 2016 14:45:18 GMT\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Length: 69\r\nCache-Control: must-revalidate\r\n\r\n'
```
here is the same request with curl:
```
curl -v -X POST 127.0.0.1:5984/kkblog/ -H "Content-Type: application/json" -d '{"_id": "关闭"}'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
> POST /kkblog/ HTTP/1.1
> Host: 127.0.0.1:5984
> User-Agent: curl/7.47.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 17
>
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 201 Created
< Server: CouchDB/1.6.1 (Erlang OTP/18)
< Location: http://127.0.0.1:5984/kkblog/关闭
< ETag: "3-bc27b6930ca514527d8954c7c43e6a09"
< Date: Fri, 15 Apr 2016 15:13:14 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 69
< Cache-Control: must-revalidate
<
{"ok":true,"id":"关闭","rev":"3-bc27b6930ca514527d8954c7c43e6a09"}
* Connection #0 to host 127.0.0.1 left intact
```
the problem is `Location: http://127.0.0.1:5984/kkblog/关闭` in the response header, I tried other Chinese chars but they didn't cause Exception.
```
>>> '关闭'.encode('utf-8')
b'\xe5\x85\xb3\xe9\x97\xad'
>>>
```
| {
"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/3098/reactions"
} | https://api.github.com/repos/psf/requests/issues/3098/timeline | null | completed | null | null | false | [
"The header parsing is done by httplib, in the Python standard library; that is the part that failed to parse. The failure to parse is understandable though: servers should not be shoving arbitrary bytes into headers. \n\nUsing UTF-8 for your headers is extremely unwise, as discussed by RFC 7230:\n\n> Historically,... |
https://api.github.com/repos/psf/requests/issues/3097 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3097/labels{/name} | https://api.github.com/repos/psf/requests/issues/3097/comments | https://api.github.com/repos/psf/requests/issues/3097/events | https://github.com/psf/requests/issues/3097 | 148,503,885 | MDU6SXNzdWUxNDg1MDM4ODU= | 3,097 | Be able to set _MAXHEADERS in httplib.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/1246420?v=4",
"events_url": "https://api.github.com/users/sloh/events{/privacy}",
"followers_url": "https://api.github.com/users/sloh/followers",
"following_url": "https://api.github.com/users/sloh/following{/other_user}",
"gists_url": "https://api.github.com/users/sloh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sloh",
"id": 1246420,
"login": "sloh",
"node_id": "MDQ6VXNlcjEyNDY0MjA=",
"organizations_url": "https://api.github.com/users/sloh/orgs",
"received_events_url": "https://api.github.com/users/sloh/received_events",
"repos_url": "https://api.github.com/users/sloh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sloh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sloh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sloh",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 136589914,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwxMzY1ODk5MTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20Info"
},
{
"color": "777777",
"default": false,
"description": null,
... | closed | true | null | [] | null | 1 | 2016-04-14T22:41:44Z | 2021-09-08T18:00:51Z | 2016-04-19T17:14:10Z | NONE | resolved | I am making a GET request which returns a response with 100+ headers because I am printing debug statements in it, so when I use requests to get the URL, I am a similar error like below:
Traceback (most recent call last):
File "......", line ....., in get_response
response = requests.get(url)
File "/Users/loh/myvirtualenvs/auto_ssai2.7/lib/python2.7/site-packages/requests/sessions.py", line 480, in get
return self.request('GET', url, *_kwargs)
File "/Users/loh/myvirtualenvs/auto_ssai2.7/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, *_send_kwargs)
File "/Users/loh/myvirtualenvs/auto_ssai2.7/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Users/loh/myvirtualenvs/auto_ssai2.7/lib/python2.7/site-packages/requests/adapters.py", line 426, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', HTTPException('got more than 100 headers',))
Need a way to change _MAXHEADERS in httplib.py as suggested here:
http://stackoverflow.com/questions/23055378/http-client-httpexception-got-more-than-100-headers
| {
"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/3097/reactions"
} | https://api.github.com/repos/psf/requests/issues/3097/timeline | null | completed | null | null | false | [
"I'm sorry. I don't understand. Does something like\n\n``` py\nimport httplib # or http.client if you're on Python 3\n\nhttplib._MAXHEADERS = 1000\n```\n\nNot work for you? Given that this seems to be exceptionally rare, I'm not sure we need a way to do this (or override this).\n"
] |
https://api.github.com/repos/psf/requests/issues/3096 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3096/labels{/name} | https://api.github.com/repos/psf/requests/issues/3096/comments | https://api.github.com/repos/psf/requests/issues/3096/events | https://github.com/psf/requests/pull/3096 | 148,412,460 | MDExOlB1bGxSZXF1ZXN0NjY1MTIzNTM= | 3,096 | Change _store of CaseInsensitiveDict to OrderedDict | {
"avatar_url": "https://avatars.githubusercontent.com/u/2237894?v=4",
"events_url": "https://api.github.com/users/piotrjurkiewicz/events{/privacy}",
"followers_url": "https://api.github.com/users/piotrjurkiewicz/followers",
"following_url": "https://api.github.com/users/piotrjurkiewicz/following{/other_user}",
"gists_url": "https://api.github.com/users/piotrjurkiewicz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotrjurkiewicz",
"id": 2237894,
"login": "piotrjurkiewicz",
"node_id": "MDQ6VXNlcjIyMzc4OTQ=",
"organizations_url": "https://api.github.com/users/piotrjurkiewicz/orgs",
"received_events_url": "https://api.github.com/users/piotrjurkiewicz/received_events",
"repos_url": "https://api.github.com/users/piotrjurkiewicz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotrjurkiewicz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotrjurkiewicz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotrjurkiewicz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2016-04-14T16:15:41Z | 2021-09-08T03:01:06Z | 2016-04-29T21:47:35Z | CONTRIBUTOR | resolved | This will preserve order of request headers when passed to request method as `OrderedDict`.
Closes #3038.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3096/reactions"
} | https://api.github.com/repos/psf/requests/issues/3096/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3096.diff",
"html_url": "https://github.com/psf/requests/pull/3096",
"merged_at": "2016-04-29T21:47:35Z",
"patch_url": "https://github.com/psf/requests/pull/3096.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3096"
} | true | [
"Thanks for this! I'd love a test that proves that this works: do you feel like you're up to writing one?\n",
"OK, now tests should pass on Python 2.6 as well.\n",
"@piotrjurkiewicz the tests fail on 3.3 and 3.4 now http://ci.kennethreitz.org/job/requests-pr/974/\n\nThis reminds me, I need to add Python 3.5 to ... |
https://api.github.com/repos/psf/requests/issues/3095 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3095/labels{/name} | https://api.github.com/repos/psf/requests/issues/3095/comments | https://api.github.com/repos/psf/requests/issues/3095/events | https://github.com/psf/requests/issues/3095 | 148,285,989 | MDU6SXNzdWUxNDgyODU5ODk= | 3,095 | SSLError: bad handshake (ssl3_get_server_certificate, certificate verify failed) | {
"avatar_url": "https://avatars.githubusercontent.com/u/158471?v=4",
"events_url": "https://api.github.com/users/djc/events{/privacy}",
"followers_url": "https://api.github.com/users/djc/followers",
"following_url": "https://api.github.com/users/djc/following{/other_user}",
"gists_url": "https://api.github.com/users/djc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/djc",
"id": 158471,
"login": "djc",
"node_id": "MDQ6VXNlcjE1ODQ3MQ==",
"organizations_url": "https://api.github.com/users/djc/orgs",
"received_events_url": "https://api.github.com/users/djc/received_events",
"repos_url": "https://api.github.com/users/djc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/djc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/djc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/djc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2016-04-14T08:13:04Z | 2021-09-08T07:00:39Z | 2016-04-14T08:23:51Z | NONE | resolved | After updating the Let's Encrypt certificate I use on my host (from one that uses one host to one that has multiple hostnames), a requests-using script I have started failing:
```
File "test.py", line 5, in get
rsp = requests.get(url)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 597, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 195, in resolve_redirects
**adapter_kwargs
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 433, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
```
I have requests-2.8.1, certifi-2015.11.20, urllib3-1.14 and openssl-1.0.2g. The affected host is https://xavamedia.nl/.
| {
"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/3095/reactions"
} | https://api.github.com/repos/psf/requests/issues/3095/timeline | null | completed | null | null | false | [
"What OS and Python version do you have?\n",
"Oh, nevermind, I've spotted it. Your intermediate certificate is wrong.\n\nA quick check using OpenSSL shows that you've served the following certificate chain:\n\n```\n 0 s:/CN=xavamedia.nl\n i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3\n 1 s:/C=US/O=Let's... |
https://api.github.com/repos/psf/requests/issues/3094 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3094/labels{/name} | https://api.github.com/repos/psf/requests/issues/3094/comments | https://api.github.com/repos/psf/requests/issues/3094/events | https://github.com/psf/requests/issues/3094 | 148,220,295 | MDU6SXNzdWUxNDgyMjAyOTU= | 3,094 | session proxy not working with user/password | {
"avatar_url": "https://avatars.githubusercontent.com/u/5225146?v=4",
"events_url": "https://api.github.com/users/emgerner-msft/events{/privacy}",
"followers_url": "https://api.github.com/users/emgerner-msft/followers",
"following_url": "https://api.github.com/users/emgerner-msft/following{/other_user}",
"gists_url": "https://api.github.com/users/emgerner-msft/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/emgerner-msft",
"id": 5225146,
"login": "emgerner-msft",
"node_id": "MDQ6VXNlcjUyMjUxNDY=",
"organizations_url": "https://api.github.com/users/emgerner-msft/orgs",
"received_events_url": "https://api.github.com/users/emgerner-msft/received_events",
"repos_url": "https://api.github.com/users/emgerner-msft/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/emgerner-msft/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/emgerner-msft/subscriptions",
"type": "User",
"url": "https://api.github.com/users/emgerner-msft",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-04-14T00:50:11Z | 2021-09-08T18:00:57Z | 2016-04-14T18:09:30Z | NONE | resolved | All of the below testing was done with Fiddler. User and password proxy auth in Fiddler was enabled the default way by doing Rules->Require Proxy Authentication which requires user be '1' and password be '1'. The code below does not contain the https section of the proxy as it's largely identical.
If a proxy is set on the session without user and password and Fiddler auth is off, Fiddler is used correctly:
`
session.proxies['http'] = 'http://127.0.0.1:8888'.format(proxy_string)
session.request(....)
`
If a proxy is set on the session with user and password, Fiddler returns proxy auth failures:
`
session.proxies['http'] = 'http://1:1@127.0.0.1:8888'.format(proxy_string)
session.request(....)
`
If I do exactly the same thing but send the proxy with the request directly, both cases work.
`
proxies = {}
proxies['http'] = 'http://1:1@127.0.0.1:8888'.format(proxy_string)
session.request(...., proxies=proxies)
`
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3094/reactions"
} | https://api.github.com/repos/psf/requests/issues/3094/timeline | null | completed | null | null | false | [
"Thanks for this report @emgerner-msft!\n\nFirstly, can I check: the proxy string in your code doesn't actually separate the port from the host with an `@` symbol. Was that was a typo? If not, that could very really break our parsing of the URL.\n\nAssuming it's a typo, I'd like you to try something for me. Can you... |
https://api.github.com/repos/psf/requests/issues/3093 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3093/labels{/name} | https://api.github.com/repos/psf/requests/issues/3093/comments | https://api.github.com/repos/psf/requests/issues/3093/events | https://github.com/psf/requests/issues/3093 | 148,200,495 | MDU6SXNzdWUxNDgyMDA0OTU= | 3,093 | Token string add error | {
"avatar_url": "https://avatars.githubusercontent.com/u/9083431?v=4",
"events_url": "https://api.github.com/users/Nuruddinjr/events{/privacy}",
"followers_url": "https://api.github.com/users/Nuruddinjr/followers",
"following_url": "https://api.github.com/users/Nuruddinjr/following{/other_user}",
"gists_url": "https://api.github.com/users/Nuruddinjr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Nuruddinjr",
"id": 9083431,
"login": "Nuruddinjr",
"node_id": "MDQ6VXNlcjkwODM0MzE=",
"organizations_url": "https://api.github.com/users/Nuruddinjr/orgs",
"received_events_url": "https://api.github.com/users/Nuruddinjr/received_events",
"repos_url": "https://api.github.com/users/Nuruddinjr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Nuruddinjr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Nuruddinjr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Nuruddinjr",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 136589914,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwxMzY1ODk5MTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20Info"
},
{
"color": "777777",
"default": false,
"description": null,
... | closed | true | null | [] | null | 3 | 2016-04-13T22:24:56Z | 2021-09-08T16:00:35Z | 2016-08-05T07:53:54Z | NONE | resolved | ``` python
url = "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token="+self.token
data = {}
if url:
data['url'] = url
result = requests.post(url, data)
```
Above code generating following error, even though schema is defined as in url. how to fix?
```
requests.exceptions.MissingSchema: Invalid URL '%sreally long string , facebook token':
No schema supplied. Perhaps you meant http://%sreally long string , facebook token?
```
| {
"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/3093/reactions"
} | https://api.github.com/repos/psf/requests/issues/3093/timeline | null | completed | null | null | false | [
"EAAHEisMO9u8BABL41ZCoUFeXRWzhhjxDb0jDNzyH7YdJeFVpUoYpRrqhp96YKkDrfzqFJfclbqhOZB4MMvihAOS2XBJLYpLDGLIyZAuXBuo8gpddNICEgc7Xo8mRGBH6F9q38ZALItZCaGfytrs59dPLRhi9ibEYeC2Pi0AbXXXXXXXX my token is as following\n",
"@Nuruddinjr Can you print the actual error message? It seems like the URL you've built is invalid, which ... |
https://api.github.com/repos/psf/requests/issues/3092 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3092/labels{/name} | https://api.github.com/repos/psf/requests/issues/3092/comments | https://api.github.com/repos/psf/requests/issues/3092/events | https://github.com/psf/requests/issues/3092 | 148,186,611 | MDU6SXNzdWUxNDgxODY2MTE= | 3,092 | Problem in json.dump with headers dictionary | {
"avatar_url": "https://avatars.githubusercontent.com/u/812863?v=4",
"events_url": "https://api.github.com/users/rodrigozanatta/events{/privacy}",
"followers_url": "https://api.github.com/users/rodrigozanatta/followers",
"following_url": "https://api.github.com/users/rodrigozanatta/following{/other_user}",
"gists_url": "https://api.github.com/users/rodrigozanatta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rodrigozanatta",
"id": 812863,
"login": "rodrigozanatta",
"node_id": "MDQ6VXNlcjgxMjg2Mw==",
"organizations_url": "https://api.github.com/users/rodrigozanatta/orgs",
"received_events_url": "https://api.github.com/users/rodrigozanatta/received_events",
"repos_url": "https://api.github.com/users/rodrigozanatta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rodrigozanatta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rodrigozanatta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rodrigozanatta",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-04-13T21:22:27Z | 2021-09-08T18:00:58Z | 2016-04-14T07:50:42Z | NONE | resolved | I really don't know what is happing. I make a `requests.get` and save the returned headers in a dictionary:
```
r = requests.get("http://myurl.com")
my_dic = {'my_header' : r.headers}
```
When I try to parse my_dic to JSON, I get an error.
```
with open('arq.txt', 'w') as fp:
json.dump(my_dic, fp)
```
For no special reason, it fail! I thought there was an illegal character or duplicate key, but no. It only work when I created this function:
```
def fix(old):
new = {}
for key, value in old.items():
new[key] = value
return new
```
So, I need to do this:
```
r = requests.get("http://myurl.com")
my_dic = {'my_header' : fix(r.headers)}
```
Why? Is this a bug? I am using the python 3.5 and believe all most update libraries.
| {
"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/3092/reactions"
} | https://api.github.com/repos/psf/requests/issues/3092/timeline | null | completed | null | null | false | [
"So you didn't actually print your error, but the reason it's a problem is that the json module really only accepts dictionaries. `r.headers` is not actually a dictionary:\n\n```\n>>> type(r.headers)\n<class 'requests.structures.CaseInsensitiveDict'>\n```\n\nYou can resolve the problem by simply calling `dict()` on... |
https://api.github.com/repos/psf/requests/issues/3091 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3091/labels{/name} | https://api.github.com/repos/psf/requests/issues/3091/comments | https://api.github.com/repos/psf/requests/issues/3091/events | https://github.com/psf/requests/pull/3091 | 148,113,322 | MDExOlB1bGxSZXF1ZXN0NjYzNTEwMTI= | 3,091 | Clear any pooled proxy connections | {
"avatar_url": "https://avatars.githubusercontent.com/u/559268?v=4",
"events_url": "https://api.github.com/users/bodgit/events{/privacy}",
"followers_url": "https://api.github.com/users/bodgit/followers",
"following_url": "https://api.github.com/users/bodgit/following{/other_user}",
"gists_url": "https://api.github.com/users/bodgit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodgit",
"id": 559268,
"login": "bodgit",
"node_id": "MDQ6VXNlcjU1OTI2OA==",
"organizations_url": "https://api.github.com/users/bodgit/orgs",
"received_events_url": "https://api.github.com/users/bodgit/received_events",
"repos_url": "https://api.github.com/users/bodgit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodgit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodgit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodgit",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-04-13T16:25:31Z | 2021-09-08T04:01:06Z | 2016-04-15T12:50:06Z | CONTRIBUTOR | resolved | Based on the explanation of the bug in #3090 this PR closes any pooled connections for any active ProxyManager object associated with the 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/3091/reactions"
} | https://api.github.com/repos/psf/requests/issues/3091/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3091.diff",
"html_url": "https://github.com/psf/requests/pull/3091",
"merged_at": "2016-04-15T12:50:06Z",
"patch_url": "https://github.com/psf/requests/pull/3091.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3091"
} | true | [
"This looks great to me. @bodgit could you add some tests to ensure this doesn't regress?\n",
"I'm wondering what/how I can test this. I had a look through `tests/test_requests.py` but I could only see one proxy-related test. Do you have any suggestions?\n",
"Create a dictionary with values which are mocks and ... |
https://api.github.com/repos/psf/requests/issues/3090 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3090/labels{/name} | https://api.github.com/repos/psf/requests/issues/3090/comments | https://api.github.com/repos/psf/requests/issues/3090/events | https://github.com/psf/requests/issues/3090 | 148,079,336 | MDU6SXNzdWUxNDgwNzkzMzY= | 3,090 | Session.close() doesn't work with proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/559268?v=4",
"events_url": "https://api.github.com/users/bodgit/events{/privacy}",
"followers_url": "https://api.github.com/users/bodgit/followers",
"following_url": "https://api.github.com/users/bodgit/following{/other_user}",
"gists_url": "https://api.github.com/users/bodgit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodgit",
"id": 559268,
"login": "bodgit",
"node_id": "MDQ6VXNlcjU1OTI2OA==",
"organizations_url": "https://api.github.com/users/bodgit/orgs",
"received_events_url": "https://api.github.com/users/bodgit/received_events",
"repos_url": "https://api.github.com/users/bodgit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodgit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodgit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodgit",
"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 | 4 | 2016-04-13T14:29:33Z | 2021-09-08T18:00:57Z | 2016-04-15T13:36:43Z | CONTRIBUTOR | resolved | I have an upstream server that supports both basic authentication and SSL client certificates for authenticating a client.
I have the following contrived requests client (with a session object) that hits the upstream server using basic auth and then switches to using SSL client certificates and repeats the request:
``` python
#!/usr/bin/env python
import requests
session = requests.Session()
session.verify = './cacert.pem'
session.auth = ('bob', 'password')
response = session.get('https://1.2.3.4/')
session.auth = None
session.cert = ('./cert.pem', './key.pem')
session.close()
response = session.get('https://1.2.3.4/')
```
Because the client certificates need to be presented at the beginning of the connection I use `session.close()` to tear down any active connections before attempting the second request. If I don't do this, the session connection pooling kicks in and reuses the existing connection from the first request which won't have presented any certificates and so the second request is unauthorised.
This is all understood however I then had a need for the client to access the server through a proxy so the code is updated to just add the proxy configuration:
``` python
#!/usr/bin/env python
import requests
session = requests.Session()
session.verify = False
session.auth = ('bob', 'password')
session.proxies = {
'https': 'http://alice:secret@5.6.7.8:3128/',
}
response = session.get('https://1.2.3.4/')
session.auth = None
session.cert = ('./cert.pem', './key.pem')
session.close()
response = session.get('https://1.2.3.4/')
```
Now the second request is unauthorised; `session.close()` seems to have no effect and doesn't tear down the connections through the proxy; there are no TCP FIN packets initiated from the client which I do see when no proxy is used.
The upstream server has keepalives enabled so if I add a sleep for longer than the idle timeout then the server terminates the connection between itself and the proxy, then the proxy terminates the connection to the client and then the second request is successful.
I appreciate this is probably a corner case but any ideas here? I would expect `session.close()` to correctly tear down the connections to the proxy. I've reproduced this against version 2.9.1.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/559268?v=4",
"events_url": "https://api.github.com/users/bodgit/events{/privacy}",
"followers_url": "https://api.github.com/users/bodgit/followers",
"following_url": "https://api.github.com/users/bodgit/following{/other_user}",
"gists_url": "https://api.github.com/users/bodgit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodgit",
"id": 559268,
"login": "bodgit",
"node_id": "MDQ6VXNlcjU1OTI2OA==",
"organizations_url": "https://api.github.com/users/bodgit/orgs",
"received_events_url": "https://api.github.com/users/bodgit/received_events",
"repos_url": "https://api.github.com/users/bodgit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodgit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodgit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodgit",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3090/reactions"
} | https://api.github.com/repos/psf/requests/issues/3090/timeline | null | completed | null | null | false | [
"Great spot, this is definitely a bug!\n\nThe bug is in `HTTPAdapter.close`: this currently clears the basic `PoolManager`, but doesn't clear any instantiated `ProxyManager` objects. That means that they inadvertently get preserved, which makes using them for this use-case untenable.\n\nThis bug is easily fixed, th... |
https://api.github.com/repos/psf/requests/issues/3089 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3089/labels{/name} | https://api.github.com/repos/psf/requests/issues/3089/comments | https://api.github.com/repos/psf/requests/issues/3089/events | https://github.com/psf/requests/pull/3089 | 147,938,482 | MDExOlB1bGxSZXF1ZXN0NjYyNjE4OTg= | 3,089 | add requests.util.parse funtions | {
"avatar_url": "https://avatars.githubusercontent.com/u/9625413?v=4",
"events_url": "https://api.github.com/users/sleshep/events{/privacy}",
"followers_url": "https://api.github.com/users/sleshep/followers",
"following_url": "https://api.github.com/users/sleshep/following{/other_user}",
"gists_url": "https://api.github.com/users/sleshep/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sleshep",
"id": 9625413,
"login": "sleshep",
"node_id": "MDQ6VXNlcjk2MjU0MTM=",
"organizations_url": "https://api.github.com/users/sleshep/orgs",
"received_events_url": "https://api.github.com/users/sleshep/received_events",
"repos_url": "https://api.github.com/users/sleshep/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sleshep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sleshep/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sleshep",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-04-13T03:44:27Z | 2021-09-08T04:00:58Z | 2016-04-13T07:23:19Z | NONE | resolved | help things easy
| {
"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/3089/reactions"
} | https://api.github.com/repos/psf/requests/issues/3089/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3089.diff",
"html_url": "https://github.com/psf/requests/pull/3089",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3089.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3089"
} | true | [
"Thanks for this!\n\nHowever, I don't believe we need either of these.\n\n`parse_rawpostdata_to_dict` is a less general version of `urlparse.parse_qs` from the standard library, so users should simply use that. `parse_rawcookies_to_dict` is a less general buggy version of `cookielib.CookieJar.add_cookie_header`. Bo... |
https://api.github.com/repos/psf/requests/issues/3088 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3088/labels{/name} | https://api.github.com/repos/psf/requests/issues/3088/comments | https://api.github.com/repos/psf/requests/issues/3088/events | https://github.com/psf/requests/issues/3088 | 147,487,047 | MDU6SXNzdWUxNDc0ODcwNDc= | 3,088 | badTimezone: cannot clone with git 2.8.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/225102?v=4",
"events_url": "https://api.github.com/users/rillian/events{/privacy}",
"followers_url": "https://api.github.com/users/rillian/followers",
"following_url": "https://api.github.com/users/rillian/following{/other_user}",
"gists_url": "https://api.github.com/users/rillian/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rillian",
"id": 225102,
"login": "rillian",
"node_id": "MDQ6VXNlcjIyNTEwMg==",
"organizations_url": "https://api.github.com/users/rillian/orgs",
"received_events_url": "https://api.github.com/users/rillian/received_events",
"repos_url": "https://api.github.com/users/rillian/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rillian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rillian/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rillian",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-04-11T16:46:00Z | 2021-08-31T00:07:02Z | 2016-04-11T16:50:12Z | NONE | resolved | I can't clone this repo. It complains:
```
$ git clone https://github.com/kennethreitz/requests
Cloning into 'requests'...
remote: Counting objects: 17048, done.
remote: Compressing objects: 100% (39/39), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
```
| {
"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/3088/reactions"
} | https://api.github.com/repos/psf/requests/issues/3088/timeline | null | completed | null | null | false | [
"This is a known problem: see #3008 and #2690 for previous discussions. The problem can be easily resolved on your end either by performing a shallow clone (if you don't need the history) or turning off the fsck timestamp check.\n",
"Thanks for the quick response.\n",
"@rillian did you enable verification yours... |
https://api.github.com/repos/psf/requests/issues/3087 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3087/labels{/name} | https://api.github.com/repos/psf/requests/issues/3087/comments | https://api.github.com/repos/psf/requests/issues/3087/events | https://github.com/psf/requests/issues/3087 | 147,332,696 | MDU6SXNzdWUxNDczMzI2OTY= | 3,087 | Is there a mistake on requests/docs/user/quickstart.rst | {
"avatar_url": "https://avatars.githubusercontent.com/u/16648345?v=4",
"events_url": "https://api.github.com/users/gaoxinge/events{/privacy}",
"followers_url": "https://api.github.com/users/gaoxinge/followers",
"following_url": "https://api.github.com/users/gaoxinge/following{/other_user}",
"gists_url": "https://api.github.com/users/gaoxinge/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gaoxinge",
"id": 16648345,
"login": "gaoxinge",
"node_id": "MDQ6VXNlcjE2NjQ4MzQ1",
"organizations_url": "https://api.github.com/users/gaoxinge/orgs",
"received_events_url": "https://api.github.com/users/gaoxinge/received_events",
"repos_url": "https://api.github.com/users/gaoxinge/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gaoxinge/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gaoxinge/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gaoxinge",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-11T06:58:01Z | 2021-09-08T18:01:00Z | 2016-04-11T07:09:38Z | NONE | resolved | I am reading the official document of requests. There is one code in quickstart.rst
``` python
>>> payload = {'key1': 'value1', 'key2': ['value2', 'value3']}
>>> r = requests.get('http://httpbin.org/get', params=payload)
>>> print(r.url)
```
However, the output is
``` python
http://httpbin.org/get?key2=value2&key2=value3&key1=value1
```
instead of what is in rst?
Is this a small mistake?
| {
"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/3087/reactions"
} | https://api.github.com/repos/psf/requests/issues/3087/timeline | null | completed | null | null | false | [
"No. =)\n\nPython dictionaries are _unordered_: that is, when iterated over the order in which elements are returned is not well defined. That means that iterating over the dictionary above can give you two possible options: first `'key1'` then `'key2'`, or first `'key2'` then `'key1'`. The first case gives you the... |
https://api.github.com/repos/psf/requests/issues/3086 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3086/labels{/name} | https://api.github.com/repos/psf/requests/issues/3086/comments | https://api.github.com/repos/psf/requests/issues/3086/events | https://github.com/psf/requests/pull/3086 | 147,328,998 | MDExOlB1bGxSZXF1ZXN0NjU5NDU5MTg= | 3,086 | add rtype in session.request,help pycharm easy. | {
"avatar_url": "https://avatars.githubusercontent.com/u/9625413?v=4",
"events_url": "https://api.github.com/users/sleshep/events{/privacy}",
"followers_url": "https://api.github.com/users/sleshep/followers",
"following_url": "https://api.github.com/users/sleshep/following{/other_user}",
"gists_url": "https://api.github.com/users/sleshep/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sleshep",
"id": 9625413,
"login": "sleshep",
"node_id": "MDQ6VXNlcjk2MjU0MTM=",
"organizations_url": "https://api.github.com/users/sleshep/orgs",
"received_events_url": "https://api.github.com/users/sleshep/received_events",
"repos_url": "https://api.github.com/users/sleshep/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sleshep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sleshep/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sleshep",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-04-11T06:35:18Z | 2021-09-08T04:01:08Z | 2016-04-11T07:14:39Z | NONE | resolved | add rtype in session.request,help pycharm easy.
| {
"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/3086/reactions"
} | https://api.github.com/repos/psf/requests/issues/3086/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3086.diff",
"html_url": "https://github.com/psf/requests/pull/3086",
"merged_at": "2016-04-11T07:14:39Z",
"patch_url": "https://github.com/psf/requests/pull/3086.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3086"
} | true | [
"Thanks! :sparkles: :cake: :sparkles:\n",
"Interesting! I didn't know about this feature. \n",
"We should add these all over. \n"
] |
https://api.github.com/repos/psf/requests/issues/3085 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3085/labels{/name} | https://api.github.com/repos/psf/requests/issues/3085/comments | https://api.github.com/repos/psf/requests/issues/3085/events | https://github.com/psf/requests/issues/3085 | 147,316,725 | MDU6SXNzdWUxNDczMTY3MjU= | 3,085 | Is there a way to specify filename in the post data? | {
"avatar_url": "https://avatars.githubusercontent.com/u/12237169?v=4",
"events_url": "https://api.github.com/users/imnisen/events{/privacy}",
"followers_url": "https://api.github.com/users/imnisen/followers",
"following_url": "https://api.github.com/users/imnisen/following{/other_user}",
"gists_url": "https://api.github.com/users/imnisen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/imnisen",
"id": 12237169,
"login": "imnisen",
"node_id": "MDQ6VXNlcjEyMjM3MTY5",
"organizations_url": "https://api.github.com/users/imnisen/orgs",
"received_events_url": "https://api.github.com/users/imnisen/received_events",
"repos_url": "https://api.github.com/users/imnisen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/imnisen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/imnisen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/imnisen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-04-11T05:04:01Z | 2021-09-08T18:00:59Z | 2016-04-11T07:13:31Z | NONE | resolved | Hi,
For example, I want to upload a video called "测试中文视频.mp4", which will be converted to`filename*=utf-8''%E6%B5%8B%E......`, the problem is that my working server does not recognize this format, so, is there a method to tell requests to convert the request message to like this: `filename=测试中文视频.mp4` or like this: `filename=u'\u6d4b\u8bd5\u4e2d\u6587\u89c6\u9891.mp4'`.
Thanks very much!
| {
"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/3085/reactions"
} | https://api.github.com/repos/psf/requests/issues/3085/timeline | null | completed | null | null | false | [
"I haven't worked on this, but a PreparedRequest I believe is what you want.\n\nOn Mon, 11 Apr 2016 15:04 imnisen notifications@github.com wrote:\n\n> Hi,\n> For example, I want to upload a image called \"测试中文视频.jpg\", which will be\n> converted tofilename*=utf-8''%E6%B5%8B%E......, the problem is that my\n> workin... |
https://api.github.com/repos/psf/requests/issues/3084 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3084/labels{/name} | https://api.github.com/repos/psf/requests/issues/3084/comments | https://api.github.com/repos/psf/requests/issues/3084/events | https://github.com/psf/requests/issues/3084 | 147,254,881 | MDU6SXNzdWUxNDcyNTQ4ODE= | 3,084 | requests attempts to use IPv6 even when IPv6 is disabled | {
"avatar_url": "https://avatars.githubusercontent.com/u/1066494?v=4",
"events_url": "https://api.github.com/users/kz26/events{/privacy}",
"followers_url": "https://api.github.com/users/kz26/followers",
"following_url": "https://api.github.com/users/kz26/following{/other_user}",
"gists_url": "https://api.github.com/users/kz26/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kz26",
"id": 1066494,
"login": "kz26",
"node_id": "MDQ6VXNlcjEwNjY0OTQ=",
"organizations_url": "https://api.github.com/users/kz26/orgs",
"received_events_url": "https://api.github.com/users/kz26/received_events",
"repos_url": "https://api.github.com/users/kz26/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kz26/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kz26/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kz26",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-04-10T19:19:19Z | 2021-09-08T18:01:01Z | 2016-04-10T19:31:39Z | NONE | resolved | This is an issue when running on a server without IPv6 (must be disabled because the network does not support it). Example when connecting to https://graph.facebook.com and IPv4 happens to fail:
Python 3.4.3, requests 2.9.1, `ipv6.disabled=1` in kernel, `gai.conf` set to prefer IPv4
``` python
HTTPSConnectionPool(host='graph.facebook.com', port=443): Max retries exceeded with url: /v2.5/me/feed (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4dbd158518>: Failed to establish a new connection: [Errno 97] Address family not supported by protocol',))
Traceback (most recent call last):
File "/home/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/home/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 71, in create_connection
sock = socket.socket(af, socktype, proto)
File "/usr/lib/python3.4/socket.py", line 126, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
```
| {
"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/3084/reactions"
} | https://api.github.com/repos/psf/requests/issues/3084/timeline | null | completed | null | null | false | [
"Requests doesn't do much special here. Requests calls `getaddrinfo` and then iterates through the entries in the order returned from `getaddrinfo` attempting to connect to each one in turn.\n\nThat exception only gets raised if we've attempted all our connections and they all fail. We then raise the final exceptio... |
https://api.github.com/repos/psf/requests/issues/3083 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3083/labels{/name} | https://api.github.com/repos/psf/requests/issues/3083/comments | https://api.github.com/repos/psf/requests/issues/3083/events | https://github.com/psf/requests/issues/3083 | 147,238,144 | MDU6SXNzdWUxNDcyMzgxNDQ= | 3,083 | Improvement to hook response. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1459670?v=4",
"events_url": "https://api.github.com/users/JackDandy/events{/privacy}",
"followers_url": "https://api.github.com/users/JackDandy/followers",
"following_url": "https://api.github.com/users/JackDandy/following{/other_user}",
"gists_url": "https://api.github.com/users/JackDandy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JackDandy",
"id": 1459670,
"login": "JackDandy",
"node_id": "MDQ6VXNlcjE0NTk2NzA=",
"organizations_url": "https://api.github.com/users/JackDandy/orgs",
"received_events_url": "https://api.github.com/users/JackDandy/received_events",
"repos_url": "https://api.github.com/users/JackDandy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JackDandy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JackDandy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JackDandy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-04-10T16:27:38Z | 2021-09-08T18:00:59Z | 2016-04-11T13:00:16Z | NONE | resolved | Hello,
It would be nice if the _response_ hook was called even if there is an error during the send() process flow.
Example, if a timeout occurs, the cb is not used and a requests constructed url and query data that can normally be saved via the cb is not available - that is, URL that caused a timeout.
Thanks for your consideration.
| {
"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/3083/reactions"
} | https://api.github.com/repos/psf/requests/issues/3083/timeline | null | completed | null | null | false | [
"@JackDandy If you pass `stream=True`, then the callback should fire once the response has been received, so that resolves the problem where timeouts are encountered downloading the response data.\n\nIf the timeout is encountered while actually downloading the response, we can't call the response hook because we do... |
https://api.github.com/repos/psf/requests/issues/3082 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3082/labels{/name} | https://api.github.com/repos/psf/requests/issues/3082/comments | https://api.github.com/repos/psf/requests/issues/3082/events | https://github.com/psf/requests/pull/3082 | 146,989,195 | MDExOlB1bGxSZXF1ZXN0NjU4MTk3ODg= | 3,082 | Added a test to show a faulty behaviour when posting binary data for an object with no __iter__ | {
"avatar_url": "https://avatars.githubusercontent.com/u/7489847?v=4",
"events_url": "https://api.github.com/users/tzickel/events{/privacy}",
"followers_url": "https://api.github.com/users/tzickel/followers",
"following_url": "https://api.github.com/users/tzickel/following{/other_user}",
"gists_url": "https://api.github.com/users/tzickel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tzickel",
"id": 7489847,
"login": "tzickel",
"node_id": "MDQ6VXNlcjc0ODk4NDc=",
"organizations_url": "https://api.github.com/users/tzickel/orgs",
"received_events_url": "https://api.github.com/users/tzickel/received_events",
"repos_url": "https://api.github.com/users/tzickel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tzickel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tzickel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tzickel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-04-08T17:28:11Z | 2021-09-08T04:01:07Z | 2016-04-11T12:38:50Z | NONE | resolved | An object with read / seek / tell but without __iter__ triggers a code path in requests which causes the stream to seek to the start instead of the position it was when it was passed into the data of the request. The faulty code is in models.py in the function prepare_content_length where it seeks to the start of the stream.
The tests fail currently because this is a test to expose the bug.
| {
"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/3082/reactions"
} | https://api.github.com/repos/psf/requests/issues/3082/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3082.diff",
"html_url": "https://github.com/psf/requests/pull/3082",
"merged_at": "2016-04-11T12:38:50Z",
"patch_url": "https://github.com/psf/requests/pull/3082.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3082"
} | true | [
"Ok awesome, this is a great first step! Are you interested in providing a fix as well?\n",
"I have made a dummy test so it works both on python 2 and 3. I hope the added fix is ok with all possible interactions (first time looking at requests code), but it might still not work with the redirect bug.\n",
"I thi... |
https://api.github.com/repos/psf/requests/issues/3081 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3081/labels{/name} | https://api.github.com/repos/psf/requests/issues/3081/comments | https://api.github.com/repos/psf/requests/issues/3081/events | https://github.com/psf/requests/issues/3081 | 146,893,172 | MDU6SXNzdWUxNDY4OTMxNzI= | 3,081 | Missing double quotation marks at "requests/packages/urllib3/fields.py" Line 46 | {
"avatar_url": "https://avatars.githubusercontent.com/u/12237169?v=4",
"events_url": "https://api.github.com/users/imnisen/events{/privacy}",
"followers_url": "https://api.github.com/users/imnisen/followers",
"following_url": "https://api.github.com/users/imnisen/following{/other_user}",
"gists_url": "https://api.github.com/users/imnisen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/imnisen",
"id": 12237169,
"login": "imnisen",
"node_id": "MDQ6VXNlcjEyMjM3MTY5",
"organizations_url": "https://api.github.com/users/imnisen/orgs",
"received_events_url": "https://api.github.com/users/imnisen/received_events",
"repos_url": "https://api.github.com/users/imnisen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/imnisen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/imnisen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/imnisen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-08T10:57:31Z | 2021-09-08T18:01:01Z | 2016-04-08T11:03:41Z | NONE | resolved | value = '%s_=%s' % (name, value)
should not be
value = '%s_="%s"' % (name, value)
:)
| {
"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/3081/reactions"
} | https://api.github.com/repos/psf/requests/issues/3081/timeline | null | completed | null | null | false | [
"Thanks for this report!\n\nNo double quotation mark is required here. All the characters that would require a quotation mark (e.g. spaces) are percent-encoded by `encode_rfc2231`. This means that, per that RFC, no quotation mark is required. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/3080 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3080/labels{/name} | https://api.github.com/repos/psf/requests/issues/3080/comments | https://api.github.com/repos/psf/requests/issues/3080/events | https://github.com/psf/requests/pull/3080 | 146,840,541 | MDExOlB1bGxSZXF1ZXN0NjU3NDY0Mjg= | 3,080 | Add 421 Misdirected Request. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-08T07:25:52Z | 2021-09-08T04:01:08Z | 2016-04-10T20:49:27Z | MEMBER | resolved | The 421 Misdirect Request status code was originally added in [RFC 7540](https://tools.ietf.org/html/rfc7540#section-11.7), and is going to be actively used in [RFC 7838](https://www.rfc-editor.org/rfc/rfc7838.txt). This adds it to our status code registry.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3080/reactions"
} | https://api.github.com/repos/psf/requests/issues/3080/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3080.diff",
"html_url": "https://github.com/psf/requests/pull/3080",
"merged_at": "2016-04-10T20:49:27Z",
"patch_url": "https://github.com/psf/requests/pull/3080.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3080"
} | true | [
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3079 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3079/labels{/name} | https://api.github.com/repos/psf/requests/issues/3079/comments | https://api.github.com/repos/psf/requests/issues/3079/events | https://github.com/psf/requests/issues/3079 | 146,747,996 | MDU6SXNzdWUxNDY3NDc5OTY= | 3,079 | requests gets stuck on post redirect where data is readable | {
"avatar_url": "https://avatars.githubusercontent.com/u/7489847?v=4",
"events_url": "https://api.github.com/users/tzickel/events{/privacy}",
"followers_url": "https://api.github.com/users/tzickel/followers",
"following_url": "https://api.github.com/users/tzickel/following{/other_user}",
"gists_url": "https://api.github.com/users/tzickel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tzickel",
"id": 7489847,
"login": "tzickel",
"node_id": "MDQ6VXNlcjc0ODk4NDc=",
"organizations_url": "https://api.github.com/users/tzickel/orgs",
"received_events_url": "https://api.github.com/users/tzickel/received_events",
"repos_url": "https://api.github.com/users/tzickel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tzickel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tzickel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tzickel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 18 | 2016-04-07T21:33:22Z | 2021-09-02T00:07:16Z | 2016-11-28T20:15:20Z | NONE | resolved | Checked on python 2.7. Unfortunately httpbin does not support 307 post redirects and thus it is not easy to test this issue in requests test suite currently.
Anyhow the issue seems to be with the stream being already over when the redirects tries to read it again. The response should be an exception if a stream is inputed and it's redirected (although this is known only in httplib).
example code:
``` python
from flask import Flask, request, redirect, url_for
import requests
import io
app = Flask('test')
@app.route('/redirect/', methods=['POST'])
def redirect():
response = app.make_response('')
response.status_code = 307
response.headers['Location'] = 'http://localhost:5000/'
return response
@app.route('/', methods=['POST'])
def index():
return request.get_data()
if __name__ == "__main__":
import threading
def loop():
app.run()
t = threading.Thread(target=loop)
t.daemon = True
t.start()
if requests.post('http://localhost:5000/redirect/', data='hey').text != 'hey':
raise Exception()
if requests.post('http://localhost:5000/redirect/', data=io.BytesIO('hey')).text != 'hey': # <-- This code gets stuck
raise Exception()
```
| {
"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/3079/reactions"
} | https://api.github.com/repos/psf/requests/issues/3079/timeline | null | completed | null | null | false | [
"So this is a very real problem: when passing requests any file-like object it does not rewind the file pointer on redirect. That means that if the original POST consumed the data, the follow-on POST will not.\n\nWith normal files, that causes a small behavioural error, because we'll usually conclude that the file ... |
https://api.github.com/repos/psf/requests/issues/3078 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3078/labels{/name} | https://api.github.com/repos/psf/requests/issues/3078/comments | https://api.github.com/repos/psf/requests/issues/3078/events | https://github.com/psf/requests/issues/3078 | 146,573,413 | MDU6SXNzdWUxNDY1NzM0MTM= | 3,078 | The request module redirects to a wrong URL if the 'Location' field of the response header contains utf-8 characters. | {
"avatar_url": "https://avatars.githubusercontent.com/u/441964?v=4",
"events_url": "https://api.github.com/users/odlbo/events{/privacy}",
"followers_url": "https://api.github.com/users/odlbo/followers",
"following_url": "https://api.github.com/users/odlbo/following{/other_user}",
"gists_url": "https://api.github.com/users/odlbo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/odlbo",
"id": 441964,
"login": "odlbo",
"node_id": "MDQ6VXNlcjQ0MTk2NA==",
"organizations_url": "https://api.github.com/users/odlbo/orgs",
"received_events_url": "https://api.github.com/users/odlbo/received_events",
"repos_url": "https://api.github.com/users/odlbo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/odlbo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/odlbo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/odlbo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-04-07T10:24:11Z | 2021-09-08T02:09:53Z | 2016-04-07T10:26:25Z | NONE | resolved | Hello!
The requests module redirects to a wrong URL if the 'Location' field of the response header contains UTF-8 characters (for example, https://picsrch.me/wCtd3uQF). The server typically does not return a response containing UTF-8 characters in the 'Location' field, but many HTTP clients (Firefox, Chrome, Wget, etc.) react correctly. As I can see, this module tries to solve this problem as well.
The main problem is that http.client module (which is used by requests module) decodes all fields in latin1, but requests module uses utf-8 encoding to prepare URL from 'Location' field (we can see this behavior in urllib.parse.quote function).
P.S.:
Python - 3.4.0
requests - 2.8.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/3078/reactions"
} | https://api.github.com/repos/psf/requests/issues/3078/timeline | null | completed | null | null | false | [
"Hi there!\n\nThis is a known issue that has a fix prepared for the 3.0.0 release: see #2754. Unfortunately, this change will subtly change the logic of the code for a lot of people, which is why it's scheduled for 3.0.0. However, we're aiming to have the 3.0.0 release out in the first half of this year.\n",
"Ok.... |
https://api.github.com/repos/psf/requests/issues/3077 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3077/labels{/name} | https://api.github.com/repos/psf/requests/issues/3077/comments | https://api.github.com/repos/psf/requests/issues/3077/events | https://github.com/psf/requests/issues/3077 | 146,155,870 | MDU6SXNzdWUxNDYxNTU4NzA= | 3,077 | %2e Being Decoded in URL | {
"avatar_url": "https://avatars.githubusercontent.com/u/5316939?v=4",
"events_url": "https://api.github.com/users/correcthorsebatterystaple-/events{/privacy}",
"followers_url": "https://api.github.com/users/correcthorsebatterystaple-/followers",
"following_url": "https://api.github.com/users/correcthorsebatterystaple-/following{/other_user}",
"gists_url": "https://api.github.com/users/correcthorsebatterystaple-/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/correcthorsebatterystaple-",
"id": 5316939,
"login": "correcthorsebatterystaple-",
"node_id": "MDQ6VXNlcjUzMTY5Mzk=",
"organizations_url": "https://api.github.com/users/correcthorsebatterystaple-/orgs",
"received_events_url": "https://api.github.com/users/correcthorsebatterystaple-/received_events",
"repos_url": "https://api.github.com/users/correcthorsebatterystaple-/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/correcthorsebatterystaple-/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/correcthorsebatterystaple-/subscriptions",
"type": "User",
"url": "https://api.github.com/users/correcthorsebatterystaple-",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-04-06T01:12:48Z | 2021-09-08T19:00:23Z | 2016-04-06T07:43:44Z | NONE | resolved | Hi there,
When a url-encoded period is included in a url (in path directory, path file, param name, or param value), it gets permanently converted to a period before the request is made (sometime before get_connection() is called in a subclassed HTTPAdapter). Other url-encoded things like single ticks (%27), double quotes (%22), semicolons (%3f), and percent symbols (%25) don't get decoded.
This means you can't successfully request a url with %2e anywhere in it because it gets changed to a '.', and if you try to double-url-encode it with %252e, it stays as %252e.
I've also tried passing %2e in via params=dict(...) and params='...bytes...', and nothing works.
Examples:
`requests.get('http://www.example.com/test.x%252ey/test.%252ey.html?test.x%252ey=test.x%252ey').url`
Output: u'http://www.example.com/test.x%252ey/test.%252ey.html?test.x%252ey=test.x%252ey'
First Line of Request When Viewing Through Proxy: GET /test.x%252ey/test.%252ey.html?test.x%252ey=test.x%252ey HTTP/1.1
`requests.get('http://www.example.com/', params=dict(a='x%2ey')).url`
Output: u'http://www.example.com/?a=x%252ey'
First Line of Request When Viewing Through Proxy: GET /?a=x%252ey HTTP/1.1
`requests.get('http://www.example.com/', params='a=x%2ey').url`
Output: u'http://www.example.com/?a=x.y'
First Line of Request When Viewing Through Proxy: GET /?a=x.y HTTP/1.1
`requests.get('http://www.example.com/', params='a=x.y').url`
Output: u'http://www.example.com/?a=x.y'
First Line of Request When Viewing Through Proxy: GET /?a=x.y HTTP/1.1
I just happen to be facing a use case where I need to be able to make a request containing a %2e in one of the parameters, so I'm a bit stuck on how to workaround this within the context of the Requests lib.
Best Regards,
-Justin
| {
"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/3077/reactions"
} | https://api.github.com/repos/psf/requests/issues/3077/timeline | null | completed | null | null | false | [
"Thanks for this @correcthorsebatterystaple-!\n\nRequests has strong opinions about the correct form of a URL: specifically, it does not percent-encode things that don't normally need percent encoding. I should note that your server is in this instance misbehaving: periods do not need to be percent encoded in query... |
https://api.github.com/repos/psf/requests/issues/3076 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3076/labels{/name} | https://api.github.com/repos/psf/requests/issues/3076/comments | https://api.github.com/repos/psf/requests/issues/3076/events | https://github.com/psf/requests/issues/3076 | 145,991,760 | MDU6SXNzdWUxNDU5OTE3NjA= | 3,076 | requests.get returns a response with the text doubled | {
"avatar_url": "https://avatars.githubusercontent.com/u/596935?v=4",
"events_url": "https://api.github.com/users/hachterberg/events{/privacy}",
"followers_url": "https://api.github.com/users/hachterberg/followers",
"following_url": "https://api.github.com/users/hachterberg/following{/other_user}",
"gists_url": "https://api.github.com/users/hachterberg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hachterberg",
"id": 596935,
"login": "hachterberg",
"node_id": "MDQ6VXNlcjU5NjkzNQ==",
"organizations_url": "https://api.github.com/users/hachterberg/orgs",
"received_events_url": "https://api.github.com/users/hachterberg/received_events",
"repos_url": "https://api.github.com/users/hachterberg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hachterberg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hachterberg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hachterberg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2016-04-05T13:37:32Z | 2021-09-08T19:00:24Z | 2016-04-05T14:56:20Z | NONE | resolved | In a rare instance, I managed to do a GET request to a server that should retrieve an xml document. However the response.text field contains the document twice (just concatenated, i.e. the first half of the data and second half of the data are exact duplicates):
``` python
>>> resp = requests.get('http://bigr-rad-xnat.erasmusmc.nl/schemas/xnat/xnat.xsd', auth=('username', 'password'))
>>> resp.text[:len(resp.text)/2] == resp.text[len(resp.text)/2:]
True
```
Now of course, it could happen that the document really is that, but it shouldn't and I tried the request using curl, postman (chromium extension), and chromium and it all returns just half the response of requests. As a final test I tried it using urllib2:
``` python
>>> import urllib2 base64
>>> req = urllib2.Request('http://bigr-rad-xnat.erasmusmc.nl/schemas/xnat/xnat.xsd')
>>> base64string = base64.encodestring(
'%s:%s' % ('password', 'password'))[:-1]
authheader = "Basic %s" % base64string
req.add_header("Authorization", authheader)
>>> handler = urllib2.urlopen(req)
>>> content = handler.read()
```
And that also gave me a single copy of the document. Hence I conclude something is probably going wrong in requests.
I am using requests version 2.9.1 on python 2.7.11 (and I also tried on 3.5.1) on debian stretch. The server is a tomcat server running XNAT (www.xnat.org). The problem is that the server serving this is located behind a hospital firewall and therefor I cannot give anyone from outside access to reproduce/test, but I can gather additional information.
I tried to look at the open bugs and did not find a similar report, but I could have missed it, if so I am sorry.
| {
"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/3076/reactions"
} | https://api.github.com/repos/psf/requests/issues/3076/timeline | null | completed | null | null | false | [
"@hachterberg Can you check whether the same problem exists for `resp.content`?\n",
"@Lukasa The result is the same for `resp.text` and `resp.content`\n",
"Ok, that's very interesting. Are you familiar with the tool Wireshark? If you are, I'd like to see the differences between the request and response headers ... |
https://api.github.com/repos/psf/requests/issues/3075 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3075/labels{/name} | https://api.github.com/repos/psf/requests/issues/3075/comments | https://api.github.com/repos/psf/requests/issues/3075/events | https://github.com/psf/requests/issues/3075 | 145,858,738 | MDU6SXNzdWUxNDU4NTg3Mzg= | 3,075 | Incorrect Request When URL Contains Uppercase Letters in "HTTPS" Protocol and When Using Proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/5316939?v=4",
"events_url": "https://api.github.com/users/correcthorsebatterystaple-/events{/privacy}",
"followers_url": "https://api.github.com/users/correcthorsebatterystaple-/followers",
"following_url": "https://api.github.com/users/correcthorsebatterystaple-/following{/other_user}",
"gists_url": "https://api.github.com/users/correcthorsebatterystaple-/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/correcthorsebatterystaple-",
"id": 5316939,
"login": "correcthorsebatterystaple-",
"node_id": "MDQ6VXNlcjUzMTY5Mzk=",
"organizations_url": "https://api.github.com/users/correcthorsebatterystaple-/orgs",
"received_events_url": "https://api.github.com/users/correcthorsebatterystaple-/received_events",
"repos_url": "https://api.github.com/users/correcthorsebatterystaple-/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/correcthorsebatterystaple-/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/correcthorsebatterystaple-/subscriptions",
"type": "User",
"url": "https://api.github.com/users/correcthorsebatterystaple-",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2016-04-05T01:51:09Z | 2021-09-08T19:00:24Z | 2016-04-05T09:06:04Z | NONE | resolved | Hi there,
First off, Requests is awesome. Thank you for the great library!
I'm writing a script that places a series of requests and manually follows some redirects, and one of the redirects is to a URL that starts with "HTTPS" (that is, the protocol is uppercase, like HTTPS://www.example.com instead of https://www.example.com). It would seem that Requests generates the wrong request when the following three conditions are met:
1. The protocol is HTTPS.
2. The protocol contains one or more uppercase letters. (e.g. "HTTPS", "httpS", "hTTps", "Https", etc.)
3. Proxies are being used.
I wrote a test script that uses a Session to GET www.example.com with variations in case for both http and https protocols, and here are the results:
| proto | proxies | result |
| --- | --- | --- |
| http | no | [OK] |
| htTp | no | [OK] |
| HTTP | no | [OK] |
| https | no | [OK] |
| HTTPS | no | [OK] |
| htTps | no | [OK] |
| httpS | no | [OK] |
| Https | no | [OK] |
| http | YES | [OK] |
| htTp | YES | [OK] |
| HTTP | YES | [OK] |
| https | YES | [OK] |
| HTTPS | YES | [ERROR] |
| htTps | YES | [ERROR] |
| httpS | YES | [ERROR] |
| Https | YES | [ERROR] |
In the ERROR case, my proxy (Burp) was generating the following error:
**Error**
Invalid client request received: First line of request did not contain an absolute URL - try enabling invisible proxy support.
GET / HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: _/_
User-Agent: python-requests/2.9.1
The issue can be replicated with the following couple lines of code:
`import requests`
`requests.request('GET', 'HTTPS://www.example.com/test', proxies=dict(http='localhost:8080', https='localhost:8080'))`
What happens will depend on your proxy. With Burp, when errors are given back as valid HTTP responses, the above will result in a 200 OK response object, and when you inspect the content of the response, you'll see Burp's error. However, if you suppress Burp errors, then Burp returns an empty response, causing requests to raise a ConnectionError exception:
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
Thank you for your time!
Best Regards,
-Justin
| {
"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/3075/reactions"
} | https://api.github.com/repos/psf/requests/issues/3075/timeline | null | completed | null | null | false | [
"Hey Justin! Good catch, this is definitely a bug.\n\nThe problem is that urllib3 expects only lowercase schemes in its proxy manager code. Requests could lowercase the scheme to urllib3 itself, but it seems like it'd be better to just make urllib3 tolerant of this kind of error.\n",
"Given that this problem is p... |
https://api.github.com/repos/psf/requests/issues/3074 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3074/labels{/name} | https://api.github.com/repos/psf/requests/issues/3074/comments | https://api.github.com/repos/psf/requests/issues/3074/events | https://github.com/psf/requests/issues/3074 | 145,857,516 | MDU6SXNzdWUxNDU4NTc1MTY= | 3,074 | proxy-scheme is case sensitivity or not? | {
"avatar_url": "https://avatars.githubusercontent.com/u/18046327?v=4",
"events_url": "https://api.github.com/users/henry51/events{/privacy}",
"followers_url": "https://api.github.com/users/henry51/followers",
"following_url": "https://api.github.com/users/henry51/following{/other_user}",
"gists_url": "https://api.github.com/users/henry51/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/henry51",
"id": 18046327,
"login": "henry51",
"node_id": "MDQ6VXNlcjE4MDQ2MzI3",
"organizations_url": "https://api.github.com/users/henry51/orgs",
"received_events_url": "https://api.github.com/users/henry51/received_events",
"repos_url": "https://api.github.com/users/henry51/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/henry51/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/henry51/subscriptions",
"type": "User",
"url": "https://api.github.com/users/henry51",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-04-05T01:45:29Z | 2021-09-08T19:00:24Z | 2016-04-05T09:10:27Z | NONE | resolved | This question came out when I tried to validate some proxies.
If proxy-scheme is uppercase as follows, it will return 200. (The host of proxy is not a true one.)
import requests
proxy = {
'HTTP': 'HTTP://111.1.11.1:8000'
}
r = requests.get('http://www.sina.com',proxies = proxy)
print (r.status_code)
However, if changing 'HTTP' to 'http', it will raise an error about httpconnectionerror.
So, it is confused me that proxy-scheme is case sensitivity or not? Or something went wrong about my code ?
Hoping to receive your instruction.
| {
"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/3074/reactions"
} | https://api.github.com/repos/psf/requests/issues/3074/timeline | null | completed | null | null | false | [
"Thanks for this!\n\nThis is a real bug, but it's a duplicate of #3075. Please see shazow/urllib3#833 to track work on this problem.\n"
] |
https://api.github.com/repos/psf/requests/issues/3073 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3073/labels{/name} | https://api.github.com/repos/psf/requests/issues/3073/comments | https://api.github.com/repos/psf/requests/issues/3073/events | https://github.com/psf/requests/issues/3073 | 145,170,191 | MDU6SXNzdWUxNDUxNzAxOTE= | 3,073 | Redacted | {
"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 | 6 | 2016-04-01T12:38:13Z | 2016-04-02T15:52:49Z | 2016-04-01T12:51:03Z | NONE | null | Redacted
| {
"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/3073/reactions"
} | https://api.github.com/repos/psf/requests/issues/3073/timeline | null | completed | null | null | false | [
"did you try `OrderedDict`? Python dict has unordered keys by design\n",
"@arcan1s you don't need an OrderedDict, you only need to provide a list of tuples. And questions should be asked on [StackOverflow](https://stackoverflow.com).\n",
"@MrAureliusR The terseness comes from the fact that we get several new is... |
https://api.github.com/repos/psf/requests/issues/3072 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3072/labels{/name} | https://api.github.com/repos/psf/requests/issues/3072/comments | https://api.github.com/repos/psf/requests/issues/3072/events | https://github.com/psf/requests/issues/3072 | 144,787,225 | MDU6SXNzdWUxNDQ3ODcyMjU= | 3,072 | find_no_duplicates raise KeyError | {
"avatar_url": "https://avatars.githubusercontent.com/u/4315746?v=4",
"events_url": "https://api.github.com/users/jackyliang/events{/privacy}",
"followers_url": "https://api.github.com/users/jackyliang/followers",
"following_url": "https://api.github.com/users/jackyliang/following{/other_user}",
"gists_url": "https://api.github.com/users/jackyliang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jackyliang",
"id": 4315746,
"login": "jackyliang",
"node_id": "MDQ6VXNlcjQzMTU3NDY=",
"organizations_url": "https://api.github.com/users/jackyliang/orgs",
"received_events_url": "https://api.github.com/users/jackyliang/received_events",
"repos_url": "https://api.github.com/users/jackyliang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jackyliang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jackyliang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jackyliang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-03-31T04:38:31Z | 2021-09-08T19:00:25Z | 2016-03-31T19:58:15Z | NONE | resolved | Hi there!
I am currently on `requests version: 2.9.1` I have getting the following error in my code:
```
Traceback (most recent call last):
File "./add.py", line 98, in <module>
'SESSID':term.cookies['SESSID'],
File "/usr/local/lib/python2.7/site-packages/requests/cookies.py", line 276, in __getitem__
return self._find_no_duplicates(name)
File "/usr/local/lib/python2.7/site-packages/requests/cookies.py", line 331, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='SESSID', domain=None, path=None"
```
Line 98 in `add.py` refers to the following:
```
# Grab the Add/Drop Class page cookies
ad_cookie = {
'SESSID':term.cookies['SESSID'],
'IDMSESSID':username
}
```
Just to make sure that the particular cookie in that page was not removed or missing, I checked the cURL for when I hit that page, and surely enough, both `SESSID` and `IDMSESSID` were in that cURL request.
Wondering what the issue is?
| {
"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/3072/reactions"
} | https://api.github.com/repos/psf/requests/issues/3072/timeline | null | completed | null | null | false | [
"Don't check curl, check requests. =) Can you print out:\n\n```\nfor resp in response.history:\n print resp.headers\nprint response.headers\n```\n\nThat should provide information about what cookies got set.\n",
"@Lukasa I feel dumb! Turns out my `username` and `password` were incorrect, and thus I was not aut... |
https://api.github.com/repos/psf/requests/issues/3071 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3071/labels{/name} | https://api.github.com/repos/psf/requests/issues/3071/comments | https://api.github.com/repos/psf/requests/issues/3071/events | https://github.com/psf/requests/issues/3071 | 144,347,300 | MDU6SXNzdWUxNDQzNDczMDA= | 3,071 | allow certs.where to return a file like object | {
"avatar_url": "https://avatars.githubusercontent.com/u/24433?v=4",
"events_url": "https://api.github.com/users/cburroughs/events{/privacy}",
"followers_url": "https://api.github.com/users/cburroughs/followers",
"following_url": "https://api.github.com/users/cburroughs/following{/other_user}",
"gists_url": "https://api.github.com/users/cburroughs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cburroughs",
"id": 24433,
"login": "cburroughs",
"node_id": "MDQ6VXNlcjI0NDMz",
"organizations_url": "https://api.github.com/users/cburroughs/orgs",
"received_events_url": "https://api.github.com/users/cburroughs/received_events",
"repos_url": "https://api.github.com/users/cburroughs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cburroughs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cburroughs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cburroughs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-29T18:23:49Z | 2021-09-08T19:00:25Z | 2016-03-29T18:31:11Z | NONE | resolved | Currently `certs.where` expects a file name that is then passed along and eventually opened. This means it is up to the caller to deal with eggs, wheels, install locations, zip_safe vs not etc, to eventually figure out where something is going to end up on the file system.. None of these issues are particularly fun. Instead of certs.where could return a file like object and a custom implantation could be as simple as `StringIO.StringIO(pkgutil.get_data(__name__, 'cacert.pem'))`
| {
"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/3071/reactions"
} | https://api.github.com/repos/psf/requests/issues/3071/timeline | null | completed | null | null | false | [
"Unfortunately, `certs.where` cannot return a file-like object: due to several limitations in the way OpenSSL's APIs behave across versions of Python the lowest common denominator is that we need to provide a _path on the filesystem_ to OpenSSL.\n\nThis makes it impossible for us to do that. Sorry, it's otherwise a... |
https://api.github.com/repos/psf/requests/issues/3070 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3070/labels{/name} | https://api.github.com/repos/psf/requests/issues/3070/comments | https://api.github.com/repos/psf/requests/issues/3070/events | https://github.com/psf/requests/issues/3070 | 144,324,837 | MDU6SXNzdWUxNDQzMjQ4Mzc= | 3,070 | Consider making Timeout option required or have a default | {
"avatar_url": "https://avatars.githubusercontent.com/u/236970?v=4",
"events_url": "https://api.github.com/users/mlissner/events{/privacy}",
"followers_url": "https://api.github.com/users/mlissner/followers",
"following_url": "https://api.github.com/users/mlissner/following{/other_user}",
"gists_url": "https://api.github.com/users/mlissner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mlissner",
"id": 236970,
"login": "mlissner",
"node_id": "MDQ6VXNlcjIzNjk3MA==",
"organizations_url": "https://api.github.com/users/mlissner/orgs",
"received_events_url": "https://api.github.com/users/mlissner/received_events",
"repos_url": "https://api.github.com/users/mlissner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mlissner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mlissner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mlissner",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
},
{
"color": "eb6420",
"default": false,
"description": null... | closed | true | null | [] | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
} | 62 | 2016-03-29T16:56:50Z | 2024-05-21T10:16:30Z | 2024-05-20T14:35:37Z | CONTRIBUTOR | null | I have a feeling I'm about to get a swift education on this topic, but I've been thinking about the pros/cons of changing `requests` so that somehow there is a timeout value configured for every request.
I think there are two ways to do this:
1. Provide a default value. I know browsers have a default, so that may be a simple place to begin.
2. Make every user configure this in every request -- bigger API breakage. Probably not the way to go.
The reason I'm thinking about this is because I've used requests for a few years now and until now I didn't realize the importance of providing a timeout. It took one of my programs hanging forever for me to realize that the default here isn't really very good for my purposes. (I'm in the process of updating all my code...)
I also see that a lot of people want `Session` objects to have a timeout parameter, and this might be a way to do that as well.
If a large default were provided to all requests and all sessions, what negative impact would that have? The only thing I can think of is that some programs will get timeout exceptions where they previously hung, which seems like an improvement to me.
## Caveat, added May 13, 2016:
Please don't use this issue to discuss adding a timeout attribute to requests. There are a number of discussions about this elsewhere (search closed issues), and we don't want that conversation to muddy this issue too. Thanks.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 66,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 11,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 77,
"url": "https://api.github.com/repos/psf/requests/issues/3070/reactions"
} | https://api.github.com/repos/psf/requests/issues/3070/timeline | null | completed | null | null | false | [
"This is an entirely reasonable suggestion.\n\nHonestly, I'm not averse to doing it: there are definitely worse things to do than this. I'd be open to providing a default timeout. However, I don't think we can do it until 3.0.0.\n\nOf course @kennethreitz as keeper of the spirit of requests has got the final say on... |
https://api.github.com/repos/psf/requests/issues/3069 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3069/labels{/name} | https://api.github.com/repos/psf/requests/issues/3069/comments | https://api.github.com/repos/psf/requests/issues/3069/events | https://github.com/psf/requests/pull/3069 | 144,231,246 | MDExOlB1bGxSZXF1ZXN0NjQ0NDg5NTQ= | 3,069 | Update docstring and API doc to document ability to add per-file headers in multipart POST | {
"avatar_url": "https://avatars.githubusercontent.com/u/13746639?v=4",
"events_url": "https://api.github.com/users/achermes/events{/privacy}",
"followers_url": "https://api.github.com/users/achermes/followers",
"following_url": "https://api.github.com/users/achermes/following{/other_user}",
"gists_url": "https://api.github.com/users/achermes/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/achermes",
"id": 13746639,
"login": "achermes",
"node_id": "MDQ6VXNlcjEzNzQ2NjM5",
"organizations_url": "https://api.github.com/users/achermes/orgs",
"received_events_url": "https://api.github.com/users/achermes/received_events",
"repos_url": "https://api.github.com/users/achermes/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/achermes/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/achermes/subscriptions",
"type": "User",
"url": "https://api.github.com/users/achermes",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-29T11:13:06Z | 2021-09-08T04:01:11Z | 2016-03-29T11:31:57Z | CONTRIBUTOR | resolved | I recently needed this function and could not find it in the docs - luckily SO pointed me at PR #1640.
However, I feel like this really should be documented, so here is my attempt.
Note:
- I have not run any tests whatsoever over this as this is "just a docs change" - I don't know if that's ok.
- The API docs seem a bit inaccurate in that they do not mention that `files` can also be a list. Similarly the docsstring in `_encode_files` does not discuss the case where instead of a tuple a file-obj is provided.
| {
"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/3069/reactions"
} | https://api.github.com/repos/psf/requests/issues/3069/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3069.diff",
"html_url": "https://github.com/psf/requests/pull/3069",
"merged_at": "2016-03-29T11:31:57Z",
"patch_url": "https://github.com/psf/requests/pull/3069.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3069"
} | true | [
"\\o/ This looks great, thanks @achermes! :sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3068 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3068/labels{/name} | https://api.github.com/repos/psf/requests/issues/3068/comments | https://api.github.com/repos/psf/requests/issues/3068/events | https://github.com/psf/requests/issues/3068 | 143,847,469 | MDU6SXNzdWUxNDM4NDc0Njk= | 3,068 | Response read hangs | {
"avatar_url": "https://avatars.githubusercontent.com/u/59870?v=4",
"events_url": "https://api.github.com/users/medecau/events{/privacy}",
"followers_url": "https://api.github.com/users/medecau/followers",
"following_url": "https://api.github.com/users/medecau/following{/other_user}",
"gists_url": "https://api.github.com/users/medecau/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/medecau",
"id": 59870,
"login": "medecau",
"node_id": "MDQ6VXNlcjU5ODcw",
"organizations_url": "https://api.github.com/users/medecau/orgs",
"received_events_url": "https://api.github.com/users/medecau/received_events",
"repos_url": "https://api.github.com/users/medecau/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/medecau/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/medecau/subscriptions",
"type": "User",
"url": "https://api.github.com/users/medecau",
"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 | 5 | 2016-03-27T20:57:08Z | 2021-09-08T19:00:26Z | 2016-03-28T15:35:07Z | NONE | resolved | python 2.7.11
requests installed from pip and up-to-date
URL -> 'http://archive.mid.ru/bdomp/zu_r.nsf/strawebeng!OpenView'
GET request hangs at read time.
I tried to use `stream=True` and then read from `response.raw` and it works. But doesn't finish on normal usage.
I looked at the headers and the `Content-Length` is duplicated.
When I try to read it from `response.headers['Content-Length']` I find a single string: `'133172, 133172'`.
The length is correct otherwise.
I am not entirely sure of what's causing this but my guess is that requests is getting confused by the duplicate header.
_thanks for everything_
| {
"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/3068/reactions"
} | https://api.github.com/repos/psf/requests/issues/3068/timeline | null | completed | null | null | false | [
"> I tried to use `stream=True` and then read from `response.raw` and it works.\n\nWhen you did this read, did you just do `read()`, or did you provide a length to the `read()` call?\n\nSo, the server is getting this wrong. It is strictly forbidden to send multiple content-length headers, and generally speaking I o... |
https://api.github.com/repos/psf/requests/issues/3067 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3067/labels{/name} | https://api.github.com/repos/psf/requests/issues/3067/comments | https://api.github.com/repos/psf/requests/issues/3067/events | https://github.com/psf/requests/issues/3067 | 143,795,601 | MDU6SXNzdWUxNDM3OTU2MDE= | 3,067 | No way to make requests redirect POST/PUT/DELETE requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/28710?v=4",
"events_url": "https://api.github.com/users/vmalloc/events{/privacy}",
"followers_url": "https://api.github.com/users/vmalloc/followers",
"following_url": "https://api.github.com/users/vmalloc/following{/other_user}",
"gists_url": "https://api.github.com/users/vmalloc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vmalloc",
"id": 28710,
"login": "vmalloc",
"node_id": "MDQ6VXNlcjI4NzEw",
"organizations_url": "https://api.github.com/users/vmalloc/orgs",
"received_events_url": "https://api.github.com/users/vmalloc/received_events",
"repos_url": "https://api.github.com/users/vmalloc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vmalloc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vmalloc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vmalloc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-03-27T10:25:46Z | 2021-09-08T19:00:25Z | 2016-03-27T10:31:31Z | NONE | resolved | In the documentation (see http://docs.python-requests.org/en/latest/api/#requests.request) it says that specifying _allow_redirects_ to `True` means that redirecting POST/PUT/DELETE is allowed.
Quick attempts show that the reality is that those requests _ALWAYS_ get redirected as `GET`s, even when this parameter is True (which it is by default). It seems like the tests [here](https://github.com/kennethreitz/requests/blame/3acf3a723892550719ca23bfe1be07549a8ad201/tests/test_requests.py#L165) support this claim.
The one commented out test [here](https://github.com/kennethreitz/requests/blame/3acf3a723892550719ca23bfe1be07549a8ad201/tests/test_requests.py#L208) supports the statement from the documentation, but is commented out (the reason seems to be a bug in httpbin, but no further explanation is supplied)
| {
"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/3067/reactions"
} | https://api.github.com/repos/psf/requests/issues/3067/timeline | null | completed | null | null | false | [
"Requests will change the verb used for a redirect in the following cases:\n- On a 303 See Other response, HEAD and GET are left alone: all other verbs get changed to GET, as per [RFC 7231 Section 6.4.4](https://tools.ietf.org/html/rfc7231#section-6.4.4).\n- On a 302 Found response, HEAD and GET are left alone: all... |
https://api.github.com/repos/psf/requests/issues/3066 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3066/labels{/name} | https://api.github.com/repos/psf/requests/issues/3066/comments | https://api.github.com/repos/psf/requests/issues/3066/events | https://github.com/psf/requests/issues/3066 | 143,481,469 | MDU6SXNzdWUxNDM0ODE0Njk= | 3,066 | auth and data set results in invalid http header | {
"avatar_url": "https://avatars.githubusercontent.com/u/709223?v=4",
"events_url": "https://api.github.com/users/julian-r/events{/privacy}",
"followers_url": "https://api.github.com/users/julian-r/followers",
"following_url": "https://api.github.com/users/julian-r/following{/other_user}",
"gists_url": "https://api.github.com/users/julian-r/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/julian-r",
"id": 709223,
"login": "julian-r",
"node_id": "MDQ6VXNlcjcwOTIyMw==",
"organizations_url": "https://api.github.com/users/julian-r/orgs",
"received_events_url": "https://api.github.com/users/julian-r/received_events",
"repos_url": "https://api.github.com/users/julian-r/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/julian-r/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/julian-r/subscriptions",
"type": "User",
"url": "https://api.github.com/users/julian-r",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] | closed | true | null | [] | null | 12 | 2016-03-25T11:30:41Z | 2021-09-08T13:05:42Z | 2016-12-08T12:33:12Z | NONE | resolved | https://stackoverflow.com/questions/36216274/uploading-a-0-bytes-file-to-owncloud-with-python-requests-hangs/36217781#36217781
When auth is set and a file object is passed to data, the header contains a content-length AND a Transfer-Encoding: chunked is set in the header and additionally the last chunk is not send.
| {
"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/3066/reactions"
} | https://api.github.com/repos/psf/requests/issues/3066/timeline | null | completed | null | null | false | [
"Yup, this is a real bug. `prepare_auth` unconditionally calls `prepare_content_length`, which does the wrong thing for situations where it doesn't know the content-length.\n",
"Working out exactly how best to fix this is tricky: `prepare_content_length` does weirdly quite a lot, and it's not entirely apparent wh... |
https://api.github.com/repos/psf/requests/issues/3065 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3065/labels{/name} | https://api.github.com/repos/psf/requests/issues/3065/comments | https://api.github.com/repos/psf/requests/issues/3065/events | https://github.com/psf/requests/issues/3065 | 143,121,766 | MDU6SXNzdWUxNDMxMjE3NjY= | 3,065 | ImportError No module ngd-httpsclient | {
"avatar_url": "https://avatars.githubusercontent.com/u/3597266?v=4",
"events_url": "https://api.github.com/users/jamesh38/events{/privacy}",
"followers_url": "https://api.github.com/users/jamesh38/followers",
"following_url": "https://api.github.com/users/jamesh38/following{/other_user}",
"gists_url": "https://api.github.com/users/jamesh38/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamesh38",
"id": 3597266,
"login": "jamesh38",
"node_id": "MDQ6VXNlcjM1OTcyNjY=",
"organizations_url": "https://api.github.com/users/jamesh38/orgs",
"received_events_url": "https://api.github.com/users/jamesh38/received_events",
"repos_url": "https://api.github.com/users/jamesh38/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamesh38/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamesh38/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamesh38",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 21 | 2016-03-24T01:37:53Z | 2021-09-08T19:00:26Z | 2016-03-25T14:06:59Z | NONE | resolved | Using AWS Lambda to send push notifications to Pusher app in Python. When I install Pusher and all its dependencies to a directory and zip up to Lambda I run a simple test and get this error.
No module named ndg.httpsclient.ssl_peer_verification
Here is the code I'm trying to run.
```
from pusher import Pusher
pusher = Pusher(app_id=u'id', key=u'key', secret=u'secret')
def createPitchZip(context, event):
pusher.trigger('testchannel', 'testevent', {u'some': u'data'})
```
I've seen several posts about this but installing the dependencies individually doesn't seem to be helping.
I've tried to post this on pusher github and have gotten to response. Banging my head on the wall
Here is the stack trace
```
Traceback (most recent call last):
File "pusherlambda.py", line 2, in <module>
pusher = Pusher(app_id=u'*****', key=*****', secret=u'****')
File "/home/vagrant/Code/Lamdba/venv/lib/python2.7/site-packages/pusher/pusher.py", line 42, in __init__
from pusher.requests import RequestsBackend
File "/home/vagrant/Code/Lamdba/venv/lib/python2.7/site-packages/pusher/requests.py", line 12, in <module>
import urllib3.contrib.pyopenssl
File "/home/vagrant/Code/Lamdba/venv/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 49, in <module>
from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
ImportError: No module named ndg.httpsclient.ssl_peer_verification
```
| {
"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/3065/reactions"
} | https://api.github.com/repos/psf/requests/issues/3065/timeline | null | completed | null | null | false | [
"I could be wrong but I think this is a urllib3 issue not requests\n\nOn Thu, 24 Mar 2016 11:38 James Hoegerl notifications@github.com wrote:\n\n> Using AWS Lambda to send push notifications to Pusher app in Python. When\n> I install Pusher and all its dependencies to a directory and zip up to\n> Lambda I run a sim... |
https://api.github.com/repos/psf/requests/issues/3064 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3064/labels{/name} | https://api.github.com/repos/psf/requests/issues/3064/comments | https://api.github.com/repos/psf/requests/issues/3064/events | https://github.com/psf/requests/issues/3064 | 142,948,566 | MDU6SXNzdWUxNDI5NDg1NjY= | 3,064 | Honor HTTP strict transport security headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/3287067?v=4",
"events_url": "https://api.github.com/users/asieira/events{/privacy}",
"followers_url": "https://api.github.com/users/asieira/followers",
"following_url": "https://api.github.com/users/asieira/following{/other_user}",
"gists_url": "https://api.github.com/users/asieira/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asieira",
"id": 3287067,
"login": "asieira",
"node_id": "MDQ6VXNlcjMyODcwNjc=",
"organizations_url": "https://api.github.com/users/asieira/orgs",
"received_events_url": "https://api.github.com/users/asieira/received_events",
"repos_url": "https://api.github.com/users/asieira/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asieira/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asieira/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asieira",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-03-23T12:35:49Z | 2021-09-08T19:00:27Z | 2016-03-23T12:36:57Z | CONTRIBUTOR | resolved | [HTTP strict transport security header](https://scotthelme.co.uk/hsts-the-missing-link-in-tls/) helps protect web applications against communications interception and MITM attacks. I would recommend that requests look for and honor the header by default.
| {
"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/3064/reactions"
} | https://api.github.com/repos/psf/requests/issues/3064/timeline | null | completed | null | null | false | [
"See shazow/urllib3#608, and the comment I just made on #3063: the same limitations that apply there apply here.\n",
"Perfect, thank you! :bow:\n"
] |
https://api.github.com/repos/psf/requests/issues/3063 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3063/labels{/name} | https://api.github.com/repos/psf/requests/issues/3063/comments | https://api.github.com/repos/psf/requests/issues/3063/events | https://github.com/psf/requests/issues/3063 | 142,947,860 | MDU6SXNzdWUxNDI5NDc4NjA= | 3,063 | Honor HTTP public key pinning headers for server certificate validation | {
"avatar_url": "https://avatars.githubusercontent.com/u/3287067?v=4",
"events_url": "https://api.github.com/users/asieira/events{/privacy}",
"followers_url": "https://api.github.com/users/asieira/followers",
"following_url": "https://api.github.com/users/asieira/following{/other_user}",
"gists_url": "https://api.github.com/users/asieira/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asieira",
"id": 3287067,
"login": "asieira",
"node_id": "MDQ6VXNlcjMyODcwNjc=",
"organizations_url": "https://api.github.com/users/asieira/orgs",
"received_events_url": "https://api.github.com/users/asieira/received_events",
"repos_url": "https://api.github.com/users/asieira/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asieira/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asieira/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asieira",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-03-23T12:31:56Z | 2021-09-08T19:00:26Z | 2016-03-23T12:36:20Z | CONTRIBUTOR | resolved | An interesting protection against MITM attacks could be provided by default if requests looked for and honored [Public-Key-Pins](https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning) headers in the server response for additional validation of the certificate presented.
| {
"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/3063/reactions"
} | https://api.github.com/repos/psf/requests/issues/3063/timeline | null | completed | null | null | false | [
"@asieira This is an idea we've been interested in for a long time: see shazow/urllib3#607.\n\nUnfortunately, any support we're likely to have will be of minimal use in practice unless deliberate effort is taken to harden your application. We'd need a cache in non-ephemeral storage (or the exit of your app cleans t... |
https://api.github.com/repos/psf/requests/issues/3062 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3062/labels{/name} | https://api.github.com/repos/psf/requests/issues/3062/comments | https://api.github.com/repos/psf/requests/issues/3062/events | https://github.com/psf/requests/issues/3062 | 142,444,095 | MDU6SXNzdWUxNDI0NDQwOTU= | 3,062 | Requests causing NoneType error | {
"avatar_url": "https://avatars.githubusercontent.com/u/17990713?v=4",
"events_url": "https://api.github.com/users/MNgeographer/events{/privacy}",
"followers_url": "https://api.github.com/users/MNgeographer/followers",
"following_url": "https://api.github.com/users/MNgeographer/following{/other_user}",
"gists_url": "https://api.github.com/users/MNgeographer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MNgeographer",
"id": 17990713,
"login": "MNgeographer",
"node_id": "MDQ6VXNlcjE3OTkwNzEz",
"organizations_url": "https://api.github.com/users/MNgeographer/orgs",
"received_events_url": "https://api.github.com/users/MNgeographer/received_events",
"repos_url": "https://api.github.com/users/MNgeographer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MNgeographer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MNgeographer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MNgeographer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-21T19:16:53Z | 2021-09-08T19:00:27Z | 2016-03-21T19:20:21Z | NONE | resolved | I've pip installed requests (requests-2.9.1-py2.py3-none-any). I'm working on a script to download an excel file from my company's SharePoint onto my local drive using Python 2.7. Even if I comment out every last bit of code other than "import requests" at the beginning, I get this error message:
_"AttributeError: 'NoneType' object has no attribute 'a2b_hex' "_
So something about importing the requests module is causing this problem. Here's the full traceback:
_Traceback (most recent call last): File "H:\PythonSandbox\GetSharePoint.py", line 1, in import requests
File "C:\Python27\ArcGIS10.1\lib\site-packages\requests__init__.py", line 58, in from . import utils
File "C:\Python27\ArcGIS10.1\lib\site-packages\requests\utils.py", line 26, in
from .compat import parse_http_list as _parse_list_header
File "C:\Python27\ArcGIS10.1\lib\site-packages\requests\compat.py", line 29, in
import json
File "C:\Python27\ArcGIS10.1\Lib\json__init__.py", line 108, in from .decoder import JSONDecoder
File "C:\Python27\ArcGIS10.1\Lib\json\decoder.py", line 24, in NaN, PosInf, NegInf = _floatconstants()
File "C:\Python27\ArcGIS10.1\Lib\json\decoder.py", line 18, in _floatconstants _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
File "C:\Python27\ArcGIS10.1\Lib\encodings\hex_codec.py", line 42, in hex_decode
output = binascii.a2b_hex(input)
AttributeError: 'NoneType' object has no attribute 'a2b_hex'
Failed to execute (GetSharePoint)._
Apologies if this isn't worded well, I'm a relative novice and new to github. Thanks!
| {
"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/3062/reactions"
} | https://api.github.com/repos/psf/requests/issues/3062/timeline | null | completed | null | null | false | [
"This looks like an error in your system. For some reason, the hex_codec module's import of binascii is broken: something is patching it away or otherwise messing with it such that it doesn't not function correctly.\n\nTaking you through debugging that is not really something that we can do here (this is a requests... |
https://api.github.com/repos/psf/requests/issues/3061 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3061/labels{/name} | https://api.github.com/repos/psf/requests/issues/3061/comments | https://api.github.com/repos/psf/requests/issues/3061/events | https://github.com/psf/requests/issues/3061 | 142,176,952 | MDU6SXNzdWUxNDIxNzY5NTI= | 3,061 | Getting tunnel CONNECT response headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/1206342?v=4",
"events_url": "https://api.github.com/users/jkryanchou/events{/privacy}",
"followers_url": "https://api.github.com/users/jkryanchou/followers",
"following_url": "https://api.github.com/users/jkryanchou/following{/other_user}",
"gists_url": "https://api.github.com/users/jkryanchou/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jkryanchou",
"id": 1206342,
"login": "jkryanchou",
"node_id": "MDQ6VXNlcjEyMDYzNDI=",
"organizations_url": "https://api.github.com/users/jkryanchou/orgs",
"received_events_url": "https://api.github.com/users/jkryanchou/received_events",
"repos_url": "https://api.github.com/users/jkryanchou/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jkryanchou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jkryanchou/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jkryanchou",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 21 | 2016-03-20T16:09:25Z | 2021-09-08T16:00:25Z | 2016-03-20T17:11:05Z | NONE | resolved | Hi all,
There was a issue with sending https requests via the rotating proxy service named ProxyMesh. Here is the code snippet.
```
>>> import requests
>>> auth = requests.auth.HTTPProxyAuth('foo', 'PASSWORD')
>>> proxies = {'https': 'http://us-ca.proxymesh.com:31280'}
>>> response = requests.get('https://example.com', proxies=proxies, auth=auth)
```
I couldn't get the tunnel `CONNECT` responses headers in the final response. While it contains the service-specified header X-ProxyMesh-IP which could be useful to requests-rate control.
`http://proxymesh.com/blog/pages/proxy-server-headers.html#https`
I have read source code related to https request handling, and found that requests mainly use the underlaying http library urllib3 to process http/https connections. It uses the ssl.wrap_socket() to wrap ssl suites on http connection and do some subsequent operations on the SSL Tunnel.
ref: https://github.com/kennethreitz/requests/blob/master/requests/packages/urllib3/util/ssl_.py
Is there any methods could inject or attach the CONNECT responses headers into final response returned by https requests? or some suggestions on using requests with rotating proxy services like ProxyMesh crawlera?
I wonder is there anyone have ever thought how to get the CONNECT response headers?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3061/reactions"
} | https://api.github.com/repos/psf/requests/issues/3061/timeline | null | completed | null | null | false | [
"Unfortunately, getting the headers on CONNECT responses is not easy to do, because the underlying HTTP library hides that request away from us. Changing that fact either requires monkey patching the underlying library, totally rewriting the way we handle tunnelling to do it explicitly ourselves, or using a new lib... |
https://api.github.com/repos/psf/requests/issues/3060 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3060/labels{/name} | https://api.github.com/repos/psf/requests/issues/3060/comments | https://api.github.com/repos/psf/requests/issues/3060/events | https://github.com/psf/requests/pull/3060 | 141,772,335 | MDExOlB1bGxSZXF1ZXN0NjMzMjY1OTE= | 3,060 | Consolidate logic for changing method during redirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/272675?v=4",
"events_url": "https://api.github.com/users/benweatherman/events{/privacy}",
"followers_url": "https://api.github.com/users/benweatherman/followers",
"following_url": "https://api.github.com/users/benweatherman/following{/other_user}",
"gists_url": "https://api.github.com/users/benweatherman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benweatherman",
"id": 272675,
"login": "benweatherman",
"node_id": "MDQ6VXNlcjI3MjY3NQ==",
"organizations_url": "https://api.github.com/users/benweatherman/orgs",
"received_events_url": "https://api.github.com/users/benweatherman/received_events",
"repos_url": "https://api.github.com/users/benweatherman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benweatherman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benweatherman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benweatherman",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-03-18T04:23:45Z | 2021-09-08T04:01:11Z | 2016-03-20T18:46:00Z | CONTRIBUTOR | resolved | I only moved the code into a function, there was no actual change to the code. I added a few tests to ensure we're doing things correctly.
The real point of me doing this is to make it easier to bring back `strict_mode` functionality. For you requests youngsters in the crowd, `strict_mode` followed the spec for redirects meaning the method wouldn't change to a GET. The current code follows the browser convention of changing the method to a GET when doing a 302 redirect. However, lots of servers want you to follow the standards (the nerve!) so I'd like to override the logic. Now that the method changing logic is in `rebuild_method`, I can simply override that function instead of overriding the entire `resolve_redirects` function as suggested by kennethreitz/requests#1325
| {
"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": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/3060/reactions"
} | https://api.github.com/repos/psf/requests/issues/3060/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3060.diff",
"html_url": "https://github.com/psf/requests/pull/3060",
"merged_at": "2016-03-20T18:46:00Z",
"patch_url": "https://github.com/psf/requests/pull/3060.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3060"
} | true | [
"So, I'm totally happy with this code change: I think it's a reasonable refactoring that helps improve some clarity, _as well_ as allow @benweatherman to perform the override you want.\n\nI'm also delighted to see some extra tests added for this. I think this change is wonderful! Pinging @kennethreitz or @sigmaviru... |
https://api.github.com/repos/psf/requests/issues/3059 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3059/labels{/name} | https://api.github.com/repos/psf/requests/issues/3059/comments | https://api.github.com/repos/psf/requests/issues/3059/events | https://github.com/psf/requests/pull/3059 | 141,688,800 | MDExOlB1bGxSZXF1ZXN0NjMyODE2OTc= | 3,059 | Raise a ProxyError for proxy related connection issues | {
"avatar_url": "https://avatars.githubusercontent.com/u/888394?v=4",
"events_url": "https://api.github.com/users/alexanderad/events{/privacy}",
"followers_url": "https://api.github.com/users/alexanderad/followers",
"following_url": "https://api.github.com/users/alexanderad/following{/other_user}",
"gists_url": "https://api.github.com/users/alexanderad/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexanderad",
"id": 888394,
"login": "alexanderad",
"node_id": "MDQ6VXNlcjg4ODM5NA==",
"organizations_url": "https://api.github.com/users/alexanderad/orgs",
"received_events_url": "https://api.github.com/users/alexanderad/received_events",
"repos_url": "https://api.github.com/users/alexanderad/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexanderad/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexanderad/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexanderad",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-03-17T19:47:29Z | 2021-09-08T04:01:09Z | 2016-04-06T19:01:25Z | CONTRIBUTOR | resolved | This one aims to address https://github.com/kennethreitz/requests/issues/3050
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3059/reactions"
} | https://api.github.com/repos/psf/requests/issues/3059/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3059.diff",
"html_url": "https://github.com/psf/requests/pull/3059",
"merged_at": "2016-04-06T19:01:25Z",
"patch_url": "https://github.com/psf/requests/pull/3059.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3059"
} | true | [
"Cool, I'm happy with this. @sigmavirus24 `ProxyError` is a `ConnectionError` subclass, so I think this can go in the next minor release. Agreed?\n",
"I agree. Do we have things we've merged that are not suitable for a minor release though?\n",
"I don't think so.\n"
] |
https://api.github.com/repos/psf/requests/issues/3058 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3058/labels{/name} | https://api.github.com/repos/psf/requests/issues/3058/comments | https://api.github.com/repos/psf/requests/issues/3058/events | https://github.com/psf/requests/issues/3058 | 141,629,779 | MDU6SXNzdWUxNDE2Mjk3Nzk= | 3,058 | 'SSLError: [Errno 2] No such file or directory' when reconfiguring the CA bundle a Session uses | {
"avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4",
"events_url": "https://api.github.com/users/jeremycline/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremycline/followers",
"following_url": "https://api.github.com/users/jeremycline/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremycline",
"id": 1977525,
"login": "jeremycline",
"node_id": "MDQ6VXNlcjE5Nzc1MjU=",
"organizations_url": "https://api.github.com/users/jeremycline/orgs",
"received_events_url": "https://api.github.com/users/jeremycline/received_events",
"repos_url": "https://api.github.com/users/jeremycline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremycline",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2016-03-17T16:09:46Z | 2021-09-08T19:00:27Z | 2016-03-17T16:18:29Z | CONTRIBUTOR | resolved | I want to start off by saying I think this is a pretty unusual use case and it appears to me to boil down to a behaviour in `urllib3`. However, I encountered it while working with `requests` and I'm not familiar enough with `urllib3` to say whether the behaviour is expected or not. It may be that the fix is to document this behaviour in `requests`, or make a change in `urllib3`, but I don't know for sure.
#### Problem Summary
1. Configure a `requests.sessions.Session` with a CA file.
2. Make a request using HTTPS to a host that has a certificate signed by this CA.
3. Reconfigure the `requests.sessions.Session` object with a _new_ CA file and delete the old one.
4. Wait until the connection with the server is closed (either from inactivity or by forcing it with 'Connection: close' on the request made in step 2).
5. Make a second request using HTTPS to a host that has a certificate signed by the new CA.
6. Instead of the same response from step 2, an exception is raised.
The exception looks something like this and is from the reproducer I've included below:
```
Traceback (most recent call last):
File "test_requests.py", line 78, in <module>
headers={'Connection': 'close'})
File "/home/jcline/.virtualenvs/test_requests/lib/python2.7/site-packages/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/home/jcline/.virtualenvs/test_requests/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/home/jcline/.virtualenvs/test_requests/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/home/jcline/.virtualenvs/test_requests/lib/python2.7/site-packages/requests/adapters.py", line 447, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 2] No such file or directory
```
I did some digging and what I concluded is that a when a connection is pulled out of the `urllib3` connection pool the CA certificates (maybe even the client certificates?) are not reconfigured on the connection object, so when it goes to validate the server's certificate when it restarts the TCP connection it gets that "No such file or directory" when it tries to read that old CA certificate file.
I thought about this a bit and it may be the case that if you reconfigure the session object with a new CA file and don't delete the old one, you might encounter odd cases where a certificate you expect to pass validation with the new CA bundle fails because the old bundle is actually being used on some of the connections in the pool (but possibly not all of them).
#### Environment
I encountered this on Fedora 23. I installed requests into a clean virtualenv with pip rather than using the distro-provided packages. I saw this with requests-2.9.1.
#### Reproducer
I've written up a little script that reproduces this problem. It uses the same CA for both requests, but they are in different files and the CA file used for the first request is deleted.
```
import os
import tempfile
import requests
# The CA that signed the certificate used at cdn.redhat.com
CA = """
-----BEGIN CERTIFICATE-----
MIIHZDCCBUygAwIBAgIJAOb+QiglyeZeMA0GCSqGSIb3DQEBBQUAMIGwMQswCQYD
VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1JhbGVp
Z2gxFjAUBgNVBAoMDVJlZCBIYXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0
d29yazEeMBwGA1UEAwwVRW50aXRsZW1lbnQgTWFzdGVyIENBMSQwIgYJKoZIhvcN
AQkBFhVjYS1zdXBwb3J0QHJlZGhhdC5jb20wHhcNMTAwMzE3MTkwMDQ0WhcNMzAw
MzEyMTkwMDQ0WjCBsDELMAkGA1UEBhMCVVMxFzAVBgNVBAgMDk5vcnRoIENhcm9s
aW5hMRAwDgYDVQQHDAdSYWxlaWdoMRYwFAYDVQQKDA1SZWQgSGF0LCBJbmMuMRgw
FgYDVQQLDA9SZWQgSGF0IE5ldHdvcmsxHjAcBgNVBAMMFUVudGl0bGVtZW50IE1h
c3RlciBDQTEkMCIGCSqGSIb3DQEJARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMIIC
IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2Z+mW7OYcBcGxWS+RSKG2GJ2
csMXiGGfEp36vKVsIvypmNS60SkicKENMYREalbdSjrgfXxPJygZWsVWJ5lHPfBV
o3WkFrFHTIXd/R6LxnaHD1m8Cx3GwEeuSlE/ASjc1ePtMnsHH7xqZ9wdl85b1C8O
scgO7fwuM192kvv/veI/BogIqUQugtG6szXpV8dp4ml029LXFoNIy2lfFoa2wKYw
MiUHwtYgAz7TDY63e8qGhd5PoqTv9XKQogo2ze9sF9y/npZjliNy5qf6bFE+24oW
E8pGsp3zqz8h5mvw4v+tfIx5uj7dwjDteFrrWD1tcT7UmNrBDWXjKMG81zchq3h4
etgF0iwMHEuYuixiJWNzKrLNVQbDmcLGNOvyJfq60tM8AUAd72OUQzivBegnWMit
CLcT5viCT1AIkYXt7l5zc/duQWLeAAR2FmpZFylSukknzzeiZpPclRziYTboDYHq
revM97eER1xsfoSYp4mJkBHfdlqMnf3CWPcNgru8NbEPeUGMI6+C0YvknPlqDDtU
ojfl4qNdf6nWL+YNXpR1YGKgWGWgTU6uaG8Sc6qGfAoLHh6oGwbuz102j84OgjAJ
DGv/S86svmZWSqZ5UoJOIEqFYrONcOSgztZ5tU+gP4fwRIkTRbTEWSgudVREOXhs
bfN1YGP7HYvS0OiBKZUCAwEAAaOCAX0wggF5MB0GA1UdDgQWBBSIS6ZFxEbsj9bP
pvYazyY8kMx/FzCB5QYDVR0jBIHdMIHagBSIS6ZFxEbsj9bPpvYazyY8kMx/F6GB
tqSBszCBsDELMAkGA1UEBhMCVVMxFzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRAw
DgYDVQQHDAdSYWxlaWdoMRYwFAYDVQQKDA1SZWQgSGF0LCBJbmMuMRgwFgYDVQQL
DA9SZWQgSGF0IE5ldHdvcmsxHjAcBgNVBAMMFUVudGl0bGVtZW50IE1hc3RlciBD
QTEkMCIGCSqGSIb3DQEJARYVY2Etc3VwcG9ydEByZWRoYXQuY29tggkA5v5CKCXJ
5l4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgEG
MCAGA1UdEQQZMBeBFWNhLXN1cHBvcnRAcmVkaGF0LmNvbTAgBgNVHRIEGTAXgRVj
YS1zdXBwb3J0QHJlZGhhdC5jb20wDQYJKoZIhvcNAQEFBQADggIBAJ1hEdNBDTRr
6kI6W6stoogSUwjuiWPDY8DptwGhdpyIfbCoxvBR7F52DlwyXOpCunogfKMRklnE
gH1Wt66RYkgNuJcenKHAhR5xgSLoPCOVF9rDjMunyyBuxjIbctM21R7BswVpsEIE
OpV5nlJ6wkHsrn0/E+Zk5UJdCzM+Fp4hqHtEn/c97nvRspQcpWeDg6oUvaJSZTGM
8yFpzR90X8ZO4rOgpoERukvYutUfJUzZuDyS3LLc6ysamemH93rZXr52zc4B+C9G
Em8zemDgIPaH42ce3C3TdVysiq/yk+ir7pxW8toeavFv75l1UojFSjND+Q2AlNQn
pYkmRznbD5TZ3yDuPFQG2xYKnMPACepGgKZPyErtOIljQKCdgcvb9EqNdZaJFz1+
/iWKYBL077Y0CKwb+HGIDeYdzrYxbEd95YuVU0aStnf2Yii2tLcpQtK9cC2+DXjL
Yf3kQs4xzH4ZejhG9wzv8PGXOS8wHYnfVNA3+fclDEQ1mEBKWHHmenGI6QKZUP8f
g0SQ3PNRnSZu8R+rhABOEuVFIBRlaYijg2Pxe0NgL9FlHsNyRfo6EUrB2QFRKACW
3Mo6pZyDjQt7O8J7l9B9IIURoJ1niwygf7VSJTMl2w3fFleNJlZTGgdXw0V+5g+9
Kg6Ay0rrsi4nw1JHue2GvdjdfVOaWSWC
-----END CERTIFICATE-----
"""
# Write two versions of the CA to temporary files. ca1 is used for the first request
# and ca2 is used for the second (after ca1 has been deleted).
fd, ca1_abs_path = tempfile.mkstemp(dir='/tmp/', text=True)
os.write(fd, CA)
os.close(fd)
fd, ca2_abs_path = tempfile.mkstemp(dir='/tmp/', text=True)
os.write(fd, CA)
os.close(fd)
# Make an initial request with the first CA
session = requests.sessions.Session()
session.verify = ca1_abs_path
response = session.get('https://cdn.redhat.com/',
headers={'Connection': 'close'})
print('Got HTTP ' + str(response.status_code) + ' (403 expected)')
# Remove the first CA and configure the session to use the second one.
os.remove(ca1_abs_path)
session.verify = ca2_abs_path
# This is going to end in a "file not found" because the connection needs to be
# re-established by urllib3 and the certificate on the connection is not
# updated to match the certificate on the connection pool.
try:
response = session.get('https://cdn.redhat.com/',
headers={'Connection': 'close'})
print('Got HTTP ' + str(response.status_code) + ' (403 expected)')
except requests.exceptions.SSLError as e:
os.remove(ca2_abs_path)
raise
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4",
"events_url": "https://api.github.com/users/jeremycline/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremycline/followers",
"following_url": "https://api.github.com/users/jeremycline/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremycline",
"id": 1977525,
"login": "jeremycline",
"node_id": "MDQ6VXNlcjE5Nzc1MjU=",
"organizations_url": "https://api.github.com/users/jeremycline/orgs",
"received_events_url": "https://api.github.com/users/jeremycline/received_events",
"repos_url": "https://api.github.com/users/jeremycline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremycline",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3058/reactions"
} | https://api.github.com/repos/psf/requests/issues/3058/timeline | null | completed | null | null | false | [
"Thanks for this very detailed bug report!\n\nUnfortunately, this is a known limitation: see #2863. We have the beginnings of a urllib3 patch outstanding but it's currently stalled a bit due to lack of time. For the moment, I'm afraid that the best approach here is to swap out either sessions or transport adapters ... |
https://api.github.com/repos/psf/requests/issues/3057 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3057/labels{/name} | https://api.github.com/repos/psf/requests/issues/3057/comments | https://api.github.com/repos/psf/requests/issues/3057/events | https://github.com/psf/requests/pull/3057 | 141,613,703 | MDExOlB1bGxSZXF1ZXN0NjMyMzk0MTg= | 3,057 | Clarify that SSL verification is on by default | {
"avatar_url": "https://avatars.githubusercontent.com/u/234019?v=4",
"events_url": "https://api.github.com/users/kevinburke/events{/privacy}",
"followers_url": "https://api.github.com/users/kevinburke/followers",
"following_url": "https://api.github.com/users/kevinburke/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinburke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kevinburke",
"id": 234019,
"login": "kevinburke",
"node_id": "MDQ6VXNlcjIzNDAxOQ==",
"organizations_url": "https://api.github.com/users/kevinburke/orgs",
"received_events_url": "https://api.github.com/users/kevinburke/received_events",
"repos_url": "https://api.github.com/users/kevinburke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kevinburke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinburke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kevinburke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-03-17T15:17:51Z | 2021-09-08T04:01:12Z | 2016-03-17T15:19:59Z | CONTRIBUTOR | resolved | Generally if a kwarg is present it indicates that an option other than the
default is being specified. Putting `verify=True` in the first code sample
for SSL confused me, because it seemed to indicate that you had to specify
`verify=True` to get SSL verification. The opposite is true; SSL verification
is turned on by default and you have to specify `verify=False` to opt out of
SSL verification.
Updates the docs to make this more clear. Furthermore, connections to
https://kennethreitz.com currently time out instead of presenting an invalid
certificate, so I replaced this domain with https://requestb.in, which presents
the same error message as is currently there.
| {
"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/3057/reactions"
} | https://api.github.com/repos/psf/requests/issues/3057/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3057.diff",
"html_url": "https://github.com/psf/requests/pull/3057",
"merged_at": "2016-03-17T15:19:59Z",
"patch_url": "https://github.com/psf/requests/pull/3057.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3057"
} | true | [
"Thanks @kevinburke! :sparkles: :cake: :sparkles:\n",
"What about https://self-signed.badssl.com/? (I am not affiliated, just an occasional user)\nThe problem is, that is validates without SNI...\n"
] |
https://api.github.com/repos/psf/requests/issues/3056 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3056/labels{/name} | https://api.github.com/repos/psf/requests/issues/3056/comments | https://api.github.com/repos/psf/requests/issues/3056/events | https://github.com/psf/requests/pull/3056 | 141,326,756 | MDExOlB1bGxSZXF1ZXN0NjMwOTQxODQ= | 3,056 | Import native Python JSON only | {
"avatar_url": "https://avatars.githubusercontent.com/u/243799?v=4",
"events_url": "https://api.github.com/users/digitaldavenyc/events{/privacy}",
"followers_url": "https://api.github.com/users/digitaldavenyc/followers",
"following_url": "https://api.github.com/users/digitaldavenyc/following{/other_user}",
"gists_url": "https://api.github.com/users/digitaldavenyc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/digitaldavenyc",
"id": 243799,
"login": "digitaldavenyc",
"node_id": "MDQ6VXNlcjI0Mzc5OQ==",
"organizations_url": "https://api.github.com/users/digitaldavenyc/orgs",
"received_events_url": "https://api.github.com/users/digitaldavenyc/received_events",
"repos_url": "https://api.github.com/users/digitaldavenyc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/digitaldavenyc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/digitaldavenyc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/digitaldavenyc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 19 | 2016-03-16T16:27:43Z | 2021-08-28T00:06:25Z | 2016-03-16T16:51:41Z | NONE | resolved | Pull Request derived from the discussion on issue #3052
| {
"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/3056/reactions"
} | https://api.github.com/repos/psf/requests/issues/3056/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3056.diff",
"html_url": "https://github.com/psf/requests/pull/3056",
"merged_at": "2016-03-16T16:51:41Z",
"patch_url": "https://github.com/psf/requests/pull/3056.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3056"
} | true | [
"LGTM.\n",
":sparkles: :cake: :sparkles:\n",
"Really, no longer a need for `json` to be in `compat` at all anymore, let alone be called `complexjson`. \n\nBut, that would require touching a lot more code. \n",
"@kennethreitz I actually was going to rename complexjson to json but there are json variable refere... |
https://api.github.com/repos/psf/requests/issues/3055 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3055/labels{/name} | https://api.github.com/repos/psf/requests/issues/3055/comments | https://api.github.com/repos/psf/requests/issues/3055/events | https://github.com/psf/requests/pull/3055 | 141,319,823 | MDExOlB1bGxSZXF1ZXN0NjMwOTAxNjY= | 3,055 | Import native Python JSON only | {
"avatar_url": "https://avatars.githubusercontent.com/u/243799?v=4",
"events_url": "https://api.github.com/users/digitaldavenyc/events{/privacy}",
"followers_url": "https://api.github.com/users/digitaldavenyc/followers",
"following_url": "https://api.github.com/users/digitaldavenyc/following{/other_user}",
"gists_url": "https://api.github.com/users/digitaldavenyc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/digitaldavenyc",
"id": 243799,
"login": "digitaldavenyc",
"node_id": "MDQ6VXNlcjI0Mzc5OQ==",
"organizations_url": "https://api.github.com/users/digitaldavenyc/orgs",
"received_events_url": "https://api.github.com/users/digitaldavenyc/received_events",
"repos_url": "https://api.github.com/users/digitaldavenyc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/digitaldavenyc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/digitaldavenyc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/digitaldavenyc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-16T16:04:00Z | 2021-09-08T04:01:12Z | 2016-03-16T16:17:12Z | NONE | resolved | Pull Request derived from the discussion on issue #3052
| {
"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/3055/reactions"
} | https://api.github.com/repos/psf/requests/issues/3055/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3055.diff",
"html_url": "https://github.com/psf/requests/pull/3055",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3055.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3055"
} | true | [
"Please branch off of proposed/3.0.0\n"
] |
https://api.github.com/repos/psf/requests/issues/3054 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3054/labels{/name} | https://api.github.com/repos/psf/requests/issues/3054/comments | https://api.github.com/repos/psf/requests/issues/3054/events | https://github.com/psf/requests/issues/3054 | 141,319,449 | MDU6SXNzdWUxNDEzMTk0NDk= | 3,054 | Set a default timeout on a Session instance | {
"avatar_url": "https://avatars.githubusercontent.com/u/108767?v=4",
"events_url": "https://api.github.com/users/rgov/events{/privacy}",
"followers_url": "https://api.github.com/users/rgov/followers",
"following_url": "https://api.github.com/users/rgov/following{/other_user}",
"gists_url": "https://api.github.com/users/rgov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rgov",
"id": 108767,
"login": "rgov",
"node_id": "MDQ6VXNlcjEwODc2Nw==",
"organizations_url": "https://api.github.com/users/rgov/orgs",
"received_events_url": "https://api.github.com/users/rgov/received_events",
"repos_url": "https://api.github.com/users/rgov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rgov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rgov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rgov",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-03-16T16:02:52Z | 2016-03-16T16:07:44Z | 2016-03-16T16:07:15Z | NONE | null | It would be useful to be able to set a default timeout on a Session instance, which would get used for any requests initiated from that Session in lieu of an explicitly supplied timeout.
| {
"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/3054/reactions"
} | https://api.github.com/repos/psf/requests/issues/3054/timeline | null | completed | null | null | false | [
"Please search the issue repository before you open new issues. If you had done so you'd have seen #2856 and #2011 which both cover this issue.\n",
"In the future please search the closed issues for similar ideas. This is one we have rejected numerous times. Further it is trivial to subclass the session class to ... |
https://api.github.com/repos/psf/requests/issues/3053 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3053/labels{/name} | https://api.github.com/repos/psf/requests/issues/3053/comments | https://api.github.com/repos/psf/requests/issues/3053/events | https://github.com/psf/requests/pull/3053 | 141,299,003 | MDExOlB1bGxSZXF1ZXN0NjMwNzc4NDE= | 3,053 | remove simplejson import, native python json import only | {
"avatar_url": "https://avatars.githubusercontent.com/u/243799?v=4",
"events_url": "https://api.github.com/users/digitaldavenyc/events{/privacy}",
"followers_url": "https://api.github.com/users/digitaldavenyc/followers",
"following_url": "https://api.github.com/users/digitaldavenyc/following{/other_user}",
"gists_url": "https://api.github.com/users/digitaldavenyc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/digitaldavenyc",
"id": 243799,
"login": "digitaldavenyc",
"node_id": "MDQ6VXNlcjI0Mzc5OQ==",
"organizations_url": "https://api.github.com/users/digitaldavenyc/orgs",
"received_events_url": "https://api.github.com/users/digitaldavenyc/received_events",
"repos_url": "https://api.github.com/users/digitaldavenyc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/digitaldavenyc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/digitaldavenyc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/digitaldavenyc",
"user_view_type": "public"
} | [
{
"color": "eb6420",
"default": false,
"description": null,
"id": 44501256,
"name": "Breaking API Change",
"node_id": "MDU6TGFiZWw0NDUwMTI1Ng==",
"url": "https://api.github.com/repos/psf/requests/labels/Breaking%20API%20Change"
},
{
"color": "e11d21",
"default": false,
"d... | closed | true | null | [] | null | 3 | 2016-03-16T14:55:30Z | 2021-09-08T04:01:13Z | 2016-03-16T16:00:24Z | NONE | resolved | Pull Request derived from the discussion on issue https://github.com/kennethreitz/requests/issues/3052
| {
"avatar_url": "https://avatars.githubusercontent.com/u/243799?v=4",
"events_url": "https://api.github.com/users/digitaldavenyc/events{/privacy}",
"followers_url": "https://api.github.com/users/digitaldavenyc/followers",
"following_url": "https://api.github.com/users/digitaldavenyc/following{/other_user}",
"gists_url": "https://api.github.com/users/digitaldavenyc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/digitaldavenyc",
"id": 243799,
"login": "digitaldavenyc",
"node_id": "MDQ6VXNlcjI0Mzc5OQ==",
"organizations_url": "https://api.github.com/users/digitaldavenyc/orgs",
"received_events_url": "https://api.github.com/users/digitaldavenyc/received_events",
"repos_url": "https://api.github.com/users/digitaldavenyc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/digitaldavenyc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/digitaldavenyc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/digitaldavenyc",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3053/reactions"
} | https://api.github.com/repos/psf/requests/issues/3053/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3053.diff",
"html_url": "https://github.com/psf/requests/pull/3053",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3053.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3053"
} | true | [
"This seems reasonable to me, and it's certainly the smallest diff that could achieve the job. I do wonder if we shouldn't just remove this from `compat` now though, and instead change the imports in the modules that use it.\n",
"@Lukasa That's a good point. There is actually only file that is importing json, [mo... |
https://api.github.com/repos/psf/requests/issues/3052 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3052/labels{/name} | https://api.github.com/repos/psf/requests/issues/3052/comments | https://api.github.com/repos/psf/requests/issues/3052/events | https://github.com/psf/requests/issues/3052 | 141,095,235 | MDU6SXNzdWUxNDEwOTUyMzU= | 3,052 | Why default to simplejson? | {
"avatar_url": "https://avatars.githubusercontent.com/u/243799?v=4",
"events_url": "https://api.github.com/users/digitaldavenyc/events{/privacy}",
"followers_url": "https://api.github.com/users/digitaldavenyc/followers",
"following_url": "https://api.github.com/users/digitaldavenyc/following{/other_user}",
"gists_url": "https://api.github.com/users/digitaldavenyc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/digitaldavenyc",
"id": 243799,
"login": "digitaldavenyc",
"node_id": "MDQ6VXNlcjI0Mzc5OQ==",
"organizations_url": "https://api.github.com/users/digitaldavenyc/orgs",
"received_events_url": "https://api.github.com/users/digitaldavenyc/received_events",
"repos_url": "https://api.github.com/users/digitaldavenyc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/digitaldavenyc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/digitaldavenyc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/digitaldavenyc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 39 | 2016-03-15T20:55:07Z | 2021-09-03T00:10:50Z | 2016-03-20T19:47:51Z | NONE | resolved | I've recently run into an issue where another library installed simple-json and because the requests library defaults to it if available, it caused all of our json requests to fail due to a decoding problem.
I'm unclear why requests even defaults to simple-json anymore. I'd be happy to contribute to a PR to make the json library for requests more controllable but wanted to submit an issue first. Or perhaps there is another way I'm unaware of that would allow more control over which json library requests will use.
| {
"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": 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/3052/reactions"
} | https://api.github.com/repos/psf/requests/issues/3052/timeline | null | completed | null | null | false | [
"Thanks for this report! Please see issue #2516 for the last time this was discussed.\n",
"So to be clear, I am now as I was then open to removing simplejson as an option entirely, but @kennethreitz wanted it there. =)\n",
"I'm not saying it should be removed ... but perhaps there is a better way to control the... |
https://api.github.com/repos/psf/requests/issues/3051 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3051/labels{/name} | https://api.github.com/repos/psf/requests/issues/3051/comments | https://api.github.com/repos/psf/requests/issues/3051/events | https://github.com/psf/requests/pull/3051 | 141,019,351 | MDExOlB1bGxSZXF1ZXN0NjI5MzAzMTY= | 3,051 | Fix 'Transfer-Encoding: chunked' bug when upload an empty file | {
"avatar_url": "https://avatars.githubusercontent.com/u/7709535?v=4",
"events_url": "https://api.github.com/users/monhz/events{/privacy}",
"followers_url": "https://api.github.com/users/monhz/followers",
"following_url": "https://api.github.com/users/monhz/following{/other_user}",
"gists_url": "https://api.github.com/users/monhz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/monhz",
"id": 7709535,
"login": "monhz",
"node_id": "MDQ6VXNlcjc3MDk1MzU=",
"organizations_url": "https://api.github.com/users/monhz/orgs",
"received_events_url": "https://api.github.com/users/monhz/received_events",
"repos_url": "https://api.github.com/users/monhz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/monhz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/monhz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/monhz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-15T15:59:26Z | 2021-09-08T04:01:13Z | 2016-03-15T16:08:14Z | NONE | resolved | Though we have the `stdout` (which is also a `fileno` type with length=0) to care about, when we post or put a normal empty file, we still can not force to set the `Transfer-Encoding` to `chunked`.
I think it is clearly meaning that "I don't want to transfer the file in chunked type", when someone set the `Content-length=0` in headers. `requests` does too much in this case, and it will bring out some problem when requesting some servers which not support chunked type. The `Transfer-Encoding` parameter should be user's response to add into the headers.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3051/reactions"
} | https://api.github.com/repos/psf/requests/issues/3051/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3051.diff",
"html_url": "https://github.com/psf/requests/pull/3051",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3051.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3051"
} | true | [
"I am :-1: on this change.\n\nThe reality is that I don't care about servers that don't support chunked transfer encoding. [RFC 7230 Section 4.1](https://tools.ietf.org/html/rfc7230#section-4.1) says:\n\n> A recipient MUST be able to parse and decode the chunked transfer coding.\n\nAnd this is hardly a new requirem... |
https://api.github.com/repos/psf/requests/issues/3050 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3050/labels{/name} | https://api.github.com/repos/psf/requests/issues/3050/comments | https://api.github.com/repos/psf/requests/issues/3050/events | https://github.com/psf/requests/issues/3050 | 140,481,019 | MDU6SXNzdWUxNDA0ODEwMTk= | 3,050 | Getting ProxyError exception out of ConnectionError | {
"avatar_url": "https://avatars.githubusercontent.com/u/888394?v=4",
"events_url": "https://api.github.com/users/alexanderad/events{/privacy}",
"followers_url": "https://api.github.com/users/alexanderad/followers",
"following_url": "https://api.github.com/users/alexanderad/following{/other_user}",
"gists_url": "https://api.github.com/users/alexanderad/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexanderad",
"id": 888394,
"login": "alexanderad",
"node_id": "MDQ6VXNlcjg4ODM5NA==",
"organizations_url": "https://api.github.com/users/alexanderad/orgs",
"received_events_url": "https://api.github.com/users/alexanderad/received_events",
"repos_url": "https://api.github.com/users/alexanderad/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexanderad/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexanderad/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexanderad",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-03-13T12:25:25Z | 2021-09-08T18:00:56Z | 2016-04-16T04:03:25Z | CONTRIBUTOR | resolved | When a request is made via proxy and a timeout happens you'll get a `ConnectTimeout` error, which is expected:
``` python
import requests
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
try:
requests.get(
'http://httpbin.org/ip', proxies=proxies, timeout=1
).json()
except requests.ConnectionError as e:
print(isinstance(e, requests.exceptions.ConnectTimeout)) # true
```
I believe this is possible because of "special handling" here on [these lines](https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L429-L432).
However, if the proxy cause a `Network unreachable` / `No route to host` error, [you'll get](https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L437) a "generic" `ConnectionError`, not a specific `ProxyError` and there is actually no way to get to the `ProxyError`.
> ConnectionError(MaxRetryError("HTTPConnectionPool(host='10.10.1.10', port=3128): Max retries exceeded with url: http://httpbin.org/ip (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x10fe268d0>: Failed to establish a new connection: [Errno 51] Network is unreachable',)))",),)
The question is: is it possible to get somehow down to, at least, `ProxyError` in this case?
| {
"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/3050/reactions"
} | https://api.github.com/repos/psf/requests/issues/3050/timeline | null | completed | null | null | false | [
"And yeah, in first place, thanks for great library, @kennethreitz and all the contributors :+1: \n",
"@alexanderad The `ProxyError` you see in that traceback is actually a urllib3 `ProxyError` class. If we wanted to try to abstract the `ProxyError` out we could in principle do that, and it looks like the same ch... |
https://api.github.com/repos/psf/requests/issues/3049 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3049/labels{/name} | https://api.github.com/repos/psf/requests/issues/3049/comments | https://api.github.com/repos/psf/requests/issues/3049/events | https://github.com/psf/requests/pull/3049 | 140,475,628 | MDExOlB1bGxSZXF1ZXN0NjI2NjgxNTI= | 3,049 | Added unit tests for hooks module | {
"avatar_url": "https://avatars.githubusercontent.com/u/1236561?v=4",
"events_url": "https://api.github.com/users/Stranger6667/events{/privacy}",
"followers_url": "https://api.github.com/users/Stranger6667/followers",
"following_url": "https://api.github.com/users/Stranger6667/following{/other_user}",
"gists_url": "https://api.github.com/users/Stranger6667/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stranger6667",
"id": 1236561,
"login": "Stranger6667",
"node_id": "MDQ6VXNlcjEyMzY1NjE=",
"organizations_url": "https://api.github.com/users/Stranger6667/orgs",
"received_events_url": "https://api.github.com/users/Stranger6667/received_events",
"repos_url": "https://api.github.com/users/Stranger6667/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stranger6667/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stranger6667/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stranger6667",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2016-03-13T11:03:49Z | 2021-09-08T04:01:10Z | 2016-04-06T19:04:16Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3049/reactions"
} | https://api.github.com/repos/psf/requests/issues/3049/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3049.diff",
"html_url": "https://github.com/psf/requests/pull/3049",
"merged_at": "2016-04-06T19:04:16Z",
"patch_url": "https://github.com/psf/requests/pull/3049.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3049"
} | true | [
"This also seems reasonable to me, but @Stranger6667 is sat right next to me. ;) @sigmavirus24/@kennethreitz, mind doing an extra review for me? This is +1 from me.\n",
"Hello folks seems somehow I got placed on this email alias By mistake.\nAnyway I can be removed.\n\nThank you\n-Ryan\nOn Sun, Mar 13, 2016 at 7:... | |
https://api.github.com/repos/psf/requests/issues/3048 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3048/labels{/name} | https://api.github.com/repos/psf/requests/issues/3048/comments | https://api.github.com/repos/psf/requests/issues/3048/events | https://github.com/psf/requests/pull/3048 | 140,471,356 | MDExOlB1bGxSZXF1ZXN0NjI2NjcxODU= | 3,048 | Added unit tests for structures module | {
"avatar_url": "https://avatars.githubusercontent.com/u/1236561?v=4",
"events_url": "https://api.github.com/users/Stranger6667/events{/privacy}",
"followers_url": "https://api.github.com/users/Stranger6667/followers",
"following_url": "https://api.github.com/users/Stranger6667/following{/other_user}",
"gists_url": "https://api.github.com/users/Stranger6667/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stranger6667",
"id": 1236561,
"login": "Stranger6667",
"node_id": "MDQ6VXNlcjEyMzY1NjE=",
"organizations_url": "https://api.github.com/users/Stranger6667/orgs",
"received_events_url": "https://api.github.com/users/Stranger6667/received_events",
"repos_url": "https://api.github.com/users/Stranger6667/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stranger6667/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stranger6667/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stranger6667",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-03-13T10:09:05Z | 2021-09-08T04:01:10Z | 2016-04-06T19:06:36Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3048/reactions"
} | https://api.github.com/repos/psf/requests/issues/3048/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3048.diff",
"html_url": "https://github.com/psf/requests/pull/3048",
"merged_at": "2016-04-06T19:06:36Z",
"patch_url": "https://github.com/psf/requests/pull/3048.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3048"
} | true | [
"@sigmavirus24 @kennethreitz Can one of you two do a separate code review of this? @Stranger6667 is here with me at PyCon SK writing some of these tests. I'm happy with these, but it'd be good if one of you two gave the ok/not-ok.\n",
"Hello @Lukasa @sigmavirus24 !\nI've updated this PR :)\n",
"Awesome, we're v... | |
https://api.github.com/repos/psf/requests/issues/3047 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3047/labels{/name} | https://api.github.com/repos/psf/requests/issues/3047/comments | https://api.github.com/repos/psf/requests/issues/3047/events | https://github.com/psf/requests/issues/3047 | 140,362,209 | MDU6SXNzdWUxNDAzNjIyMDk= | 3,047 | requests:Failed to establish a new c onnection | {
"avatar_url": "https://avatars.githubusercontent.com/u/10515655?v=4",
"events_url": "https://api.github.com/users/chengshuyi/events{/privacy}",
"followers_url": "https://api.github.com/users/chengshuyi/followers",
"following_url": "https://api.github.com/users/chengshuyi/following{/other_user}",
"gists_url": "https://api.github.com/users/chengshuyi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chengshuyi",
"id": 10515655,
"login": "chengshuyi",
"node_id": "MDQ6VXNlcjEwNTE1NjU1",
"organizations_url": "https://api.github.com/users/chengshuyi/orgs",
"received_events_url": "https://api.github.com/users/chengshuyi/received_events",
"repos_url": "https://api.github.com/users/chengshuyi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chengshuyi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chengshuyi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chengshuyi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-03-12T08:03:56Z | 2021-09-08T19:00:28Z | 2016-03-12T09:21:01Z | NONE | resolved | ### I can run correctly in my pc,but unusual in Ali cloud server above.This problem has been bothering me three days.I expect someone can help me with this problem.
> On my Windows Server and Ubuntu Server,I conducted the following test
``` python
import requests,sys
url='http://up.photo.qzone.qq.com/cgi-bin/upload/cgi_upload_image?g_tk=1541189572'
files ={'files':('s.jpg',open(sys.path[0]+'\\user\\1005052183437642\\image\\3951851877517768-0.jpg','rb'))}
r = requests.post(url, files=files)
print(r.text)
#I got a response, it shows my server can upload pictures to that server.
```
> But I run the entire program, to execute the above code where exceptionally.Here is my code snippet
``` python
#I think you do not need to consider the correctness of his, because the entire program can be run on my pc
files=self.i_f()
for i in p_list:
files['filename']=(i[-20:],open(i, 'rb'))
r=requests.post(url=u_url,cookies=self.cj,files=files,headers=self.headers)
if self.p_r(r.text) is False:
print('fail:',i)
else:
print('success:',i)
```
> Here is the exception code appears.
>
> ``` python
> Microsoft Windows [版本 6.0.6002]
> 版权所有 (C) 2006 Microsoft Corporation。保留所有权利。
> upload_img_url: http://tjup.photo.qzone.qq.com/cgi-bin/upload/cgi_upload_image?g
> _tk=146481784
> Traceback (most recent call last):
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connection.py", line 137, in _new_conn
> (self.host, self.port), self.timeout, **extra_kw)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\util\connection.py", line 91, in create_con
> nection
> raise err
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\util\connection.py", line 81, in create_con
> nection
> sock.connect(sa)
> TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没
> 有反应,连接尝试失败。
> #Note
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connectionpool.py", line 559, in urlopen
> body=body, headers=headers)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connectionpool.py", line 353, in _make_requ
> est
> conn.request(method, url, **httplib_request_kw)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\htt
> p\client.py", line 1083, in request
> self._send_request(method, url, body, headers)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\htt
> p\client.py", line 1128, in _send_request
> self.endheaders(body)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\htt
> p\client.py", line 1079, in endheaders
> self._send_output(message_body)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\htt
> p\client.py", line 911, in _send_output
> self.send(msg)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\htt
> p\client.py", line 854, in send
> self.connect()
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connection.py", line 162, in connect
> conn = self._new_conn()
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connection.py", line 146, in _new_conn
> self, "Failed to establish a new connection: %s" % e)
> requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urll
> ib3.connection.HTTPConnection object at 0x02168A10>: Failed to establish a new c
> onnection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反
> 应,连接尝试失败。
> #Note
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\adapters.py", line 376, in send
> timeout=timeout
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\connectionpool.py", line 609, in urlopen
> _stacktrace=sys.exc_info()[2])
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\packages\urllib3\util\retry.py", line 273, in increment
> raise MaxRetryError(_pool, url, error or ResponseError(cause))
> requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='tju
> p.photo.qzone.qq.com', port=80): Max retries exceeded with url: /cgi-bin/upload/
> cgi_upload_image?g_tk=146481784 (Caused by NewConnectionError('<requests.package
> s.urllib3.connection.HTTPConnection object at 0x02168A10>: Failed to establish a
> new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机
> 没有反应,连接尝试失败。',))
> #Note
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "main.py", line 10, in <module>
> util.work(u,p)
> File "C:\Users\Administrator\Documents\python\SnToTx\util.py", line 140, in wo
> rk
> p(u,pwd,pic_list,text,video,tcn,r['mid'])
> File "C:\Users\Administrator\Documents\python\SnToTx\util.py", line 94, in p
> rt=rm.r(p_list,t,v,n)
> File "C:\Users\Administrator\Documents\python\SnToTx\txModule\eModule\emotion.
> py", line 88, in r
> r=requests.post(url=u_url,cookies=self.cj,files=files,headers=self.headers)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\api.py", line 107, in post
> return request('post', url, data=data, json=json, **kwargs)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\api.py", line 53, in request
> return session.request(method=method, url=url, **kwargs)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\sessions.py", line 468, in request
> resp = self.send(prep, **send_kwargs)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\sessions.py", line 576, in send
> r = adapter.send(request, **kwargs)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
> e-packages\requests\adapters.py", line 437, in send
> raise ConnectionError(e, request=request)
> requests.exceptions.ConnectionError: HTTPConnectionPool(host='tjup.photo.qzone.q
> q.com', port=80): Max retries exceeded with url: /cgi-bin/upload/cgi_upload_imag
> e?g_tk=146481784 (Caused by NewConnectionError('<requests.packages.urllib3.conne
> ction.HTTPConnection object at 0x02168A10>: Failed to establish a new connection
> : [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接
> 尝试失败。',))
> C:\Users\Administrator\Documents\python\SnToTx>
> ```
The above is the cmd gives me the error message,If you need additional information, please leave a message.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/10515655?v=4",
"events_url": "https://api.github.com/users/chengshuyi/events{/privacy}",
"followers_url": "https://api.github.com/users/chengshuyi/followers",
"following_url": "https://api.github.com/users/chengshuyi/following{/other_user}",
"gists_url": "https://api.github.com/users/chengshuyi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chengshuyi",
"id": 10515655,
"login": "chengshuyi",
"node_id": "MDQ6VXNlcjEwNTE1NjU1",
"organizations_url": "https://api.github.com/users/chengshuyi/orgs",
"received_events_url": "https://api.github.com/users/chengshuyi/received_events",
"repos_url": "https://api.github.com/users/chengshuyi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chengshuyi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chengshuyi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chengshuyi",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3047/reactions"
} | https://api.github.com/repos/psf/requests/issues/3047/timeline | null | completed | null | null | false | [
"Th error being received is \"failed to establish a new connection\" to host `tjup.photo.qzone.qq.com`. This is probably specific to your machine, because it's working fine here, so I suspect this is specific to your network.\n\nDo you want to try seeing if you can connect directly to that host from your browser?\n... |
https://api.github.com/repos/psf/requests/issues/3046 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3046/labels{/name} | https://api.github.com/repos/psf/requests/issues/3046/comments | https://api.github.com/repos/psf/requests/issues/3046/events | https://github.com/psf/requests/issues/3046 | 140,137,021 | MDU6SXNzdWUxNDAxMzcwMjE= | 3,046 | python 3.5 requests 2.9.1 can not upload Chinese filename | {
"avatar_url": "https://avatars.githubusercontent.com/u/8475089?v=4",
"events_url": "https://api.github.com/users/pc10201/events{/privacy}",
"followers_url": "https://api.github.com/users/pc10201/followers",
"following_url": "https://api.github.com/users/pc10201/following{/other_user}",
"gists_url": "https://api.github.com/users/pc10201/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pc10201",
"id": 8475089,
"login": "pc10201",
"node_id": "MDQ6VXNlcjg0NzUwODk=",
"organizations_url": "https://api.github.com/users/pc10201/orgs",
"received_events_url": "https://api.github.com/users/pc10201/received_events",
"repos_url": "https://api.github.com/users/pc10201/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pc10201/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pc10201/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pc10201",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2016-03-11T09:38:41Z | 2021-09-08T19:00:29Z | 2016-03-11T15:17:37Z | NONE | resolved | source code
`import requests
headers = {
'Origin': 'http://home.ctfile.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36',
'Accept': '_/_',
'Referer': 'http://home.ctfile.com/',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.8',
}
files = {'file': open('中文.txt', 'rb')}
values = {'name': r'中文.txt', 'filesize': '101'}
url = 'xxxx'
r = requests.post(url, files=files, data=values, headers=headers)
print(r.content)`
I use fiddler to capture browser data.
The right data is:
Content-Disposition: form-data; name="file"; filename="中文.txt"
The python script data is
Content-Disposition: form-data; name="file"; filename*=中文.txt
so I change
Python35\Lib\site-packages\requests\packages\urllib3\fields.py
line 46-47 to
`# value = email.utils.encode_rfc2231(value, 'utf-8')
value = '%s="%s"' % (name, value)`
It is OK now.
| {
"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/3046/reactions"
} | https://api.github.com/repos/psf/requests/issues/3046/timeline | null | completed | null | null | false | [
"> The right data is:\n> Content-Disposition: form-data; name=\"file\"; filename=\"中文.txt\"\n\nThat is not the right data. This is:\n\n```\nContent-Disposition: form-data; name=\"file\"; filename*=utf-8''%E4%B8%AD%E6%96%87.txt\n```\n\nThis uses RFC 2231 already. To achieve it, change your code to this:\n\n``` pytho... |
https://api.github.com/repos/psf/requests/issues/3045 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3045/labels{/name} | https://api.github.com/repos/psf/requests/issues/3045/comments | https://api.github.com/repos/psf/requests/issues/3045/events | https://github.com/psf/requests/issues/3045 | 139,997,937 | MDU6SXNzdWUxMzk5OTc5Mzc= | 3,045 | Version/language widget causes massive URLs/redirect loops | {
"avatar_url": "https://avatars.githubusercontent.com/u/5297556?v=4",
"events_url": "https://api.github.com/users/nicktimko/events{/privacy}",
"followers_url": "https://api.github.com/users/nicktimko/followers",
"following_url": "https://api.github.com/users/nicktimko/following{/other_user}",
"gists_url": "https://api.github.com/users/nicktimko/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nicktimko",
"id": 5297556,
"login": "nicktimko",
"node_id": "MDQ6VXNlcjUyOTc1NTY=",
"organizations_url": "https://api.github.com/users/nicktimko/orgs",
"received_events_url": "https://api.github.com/users/nicktimko/received_events",
"repos_url": "https://api.github.com/users/nicktimko/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nicktimko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicktimko/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nicktimko",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2016-03-10T20:18:38Z | 2021-09-08T18:00:56Z | 2016-04-16T04:03:47Z | CONTRIBUTOR | resolved | The version/language selector widget causes problems when switching languages. As it's redundant with the Translations sidebar item, maybe removing the links would be OK?
## Reproducing
1. Go to http://docs.python-requests.org/en/master/user/install/ (i.e. _not_ the home page)
2. Click "v:master"
3. Click a language (e.g. "de")
4. End up at:
```
http://docs.python-requests.org/en/master/user_builds/requests/rtd-builds/master
/user_builds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/u
ser_builds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/use
r_builds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_
builds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_bu
ilds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_buil
ds/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_builds
/requests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_builds/r
equests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_builds/req
uests/rtd-builds/master/user_builds/requests/rtd-builds/master/user_builds/reque
sts/rtd-builds/master/user_builds/requests/translations/de/latest/user/install/i
ndex/index/index/index/index/index/index/index/index/index/index/index/index/ind
ex/index/index/index/index/index/index/index/
```
## Conditions
- Chrome 48 / Safari 9.0.3
- OS X 10.11
## Expected/Desired
1. Go to http://docs.python-requests.org/en/master/
2. Click the "v:master" version button at the bottom right
3. Click your favorite language.
or:
1. Go to http://docs.python-requests.org/en/master/user/install/
2. Click your favorite language under "Translations" on the sidebar
| {
"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/3045/reactions"
} | https://api.github.com/repos/psf/requests/issues/3045/timeline | null | completed | null | null | false | [
"Uh, so I don't reproduce that with Safari. What browser are you using?\n",
"@Lukasa both Chrome and Safari according to their \"Conditions\" section.\n",
"How about no browser:\n\n```\nimport requests\n\nurl = 'http://docs.python-requests.org/zh_CN/latest/user/install/'\nfor x in range(10):\n print(x, url)\... |
https://api.github.com/repos/psf/requests/issues/3044 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3044/labels{/name} | https://api.github.com/repos/psf/requests/issues/3044/comments | https://api.github.com/repos/psf/requests/issues/3044/events | https://github.com/psf/requests/issues/3044 | 139,776,178 | MDU6SXNzdWUxMzk3NzYxNzg= | 3,044 | Suggest to user to install 'certifi' Python module if CA bundle is not found and 'certifi' is not loaded | {
"avatar_url": "https://avatars.githubusercontent.com/u/14837209?v=4",
"events_url": "https://api.github.com/users/aahancoc/events{/privacy}",
"followers_url": "https://api.github.com/users/aahancoc/followers",
"following_url": "https://api.github.com/users/aahancoc/following{/other_user}",
"gists_url": "https://api.github.com/users/aahancoc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aahancoc",
"id": 14837209,
"login": "aahancoc",
"node_id": "MDQ6VXNlcjE0ODM3MjA5",
"organizations_url": "https://api.github.com/users/aahancoc/orgs",
"received_events_url": "https://api.github.com/users/aahancoc/received_events",
"repos_url": "https://api.github.com/users/aahancoc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aahancoc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aahancoc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aahancoc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2016-03-10T03:46:53Z | 2021-09-08T19:00:29Z | 2016-03-10T09:01:47Z | NONE | resolved | Requests grabs its CA bundle by either using the 'certifi' library, or if it's not installed, looking at the hard-coded filename 'cacert.pem'. The problem is that if you're on a Linux distro (ex: OpenSUSE) that doesn't have 'certifi' installed by default and doesn't have the CA bundle named 'cacert.pem', all you get is an unhelpful error telling you it could not find a suitable SSL CA certificate bundle.
What I'm suggesting is that, if the filename look fails and 'certifi' is not loaded, Requests adds a message in the "could not find a suitable SSL CA certificate bundle" error message that suggests that the user install 'certifi' to resolve the problem. It would save a lot of headache for people who aren't savvy enough to search the source code and figure out what they need to install in the first place.
| {
"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/3044/reactions"
} | https://api.github.com/repos/psf/requests/issues/3044/timeline | null | completed | null | null | false | [
"@aahancoc Requests ships the `cacert.pem` bundle by default, which means that if you're on a Linux distribution and it cannot be found your distribution removed that file themselves. This means your distribution broke your install.\n\nI recommend you take it up with the people breaking our software downstream. =)\... |
https://api.github.com/repos/psf/requests/issues/3043 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3043/labels{/name} | https://api.github.com/repos/psf/requests/issues/3043/comments | https://api.github.com/repos/psf/requests/issues/3043/events | https://github.com/psf/requests/pull/3043 | 139,608,622 | MDExOlB1bGxSZXF1ZXN0NjIyNDUyNTU= | 3,043 | Refactoring and Improving Readability | {
"avatar_url": "https://avatars.githubusercontent.com/u/2357025?v=4",
"events_url": "https://api.github.com/users/tusharmakkar08/events{/privacy}",
"followers_url": "https://api.github.com/users/tusharmakkar08/followers",
"following_url": "https://api.github.com/users/tusharmakkar08/following{/other_user}",
"gists_url": "https://api.github.com/users/tusharmakkar08/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tusharmakkar08",
"id": 2357025,
"login": "tusharmakkar08",
"node_id": "MDQ6VXNlcjIzNTcwMjU=",
"organizations_url": "https://api.github.com/users/tusharmakkar08/orgs",
"received_events_url": "https://api.github.com/users/tusharmakkar08/received_events",
"repos_url": "https://api.github.com/users/tusharmakkar08/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tusharmakkar08/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tusharmakkar08/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tusharmakkar08",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 78002701,
"name": "Do Not Merge",
"node_id": "MDU6TGFiZWw3ODAwMjcwMQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Do%20Not%20Merge"
},
{
"color": "e11d21",
"default": false,
"description": n... | closed | true | null | [] | null | 11 | 2016-03-09T15:28:46Z | 2016-03-16T20:28:22Z | 2016-03-09T18:11:26Z | NONE | null | Since `and` condition is there, `verify is not True` will be always false.
| {
"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/3043/reactions"
} | https://api.github.com/repos/psf/requests/issues/3043/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3043.diff",
"html_url": "https://github.com/psf/requests/pull/3043",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3043.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3043"
} | true | [
"Hey @tusharmakkar08,\n\nThanks for sending this pull request. Could you explain what bug you were seeing that made you change this? What instigated this change? It's not clear that this exhibits the same behaviour it did before, especially since tests have failed pretty consistently across all versions of Python.\... |
https://api.github.com/repos/psf/requests/issues/3042 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3042/labels{/name} | https://api.github.com/repos/psf/requests/issues/3042/comments | https://api.github.com/repos/psf/requests/issues/3042/events | https://github.com/psf/requests/pull/3042 | 139,476,640 | MDExOlB1bGxSZXF1ZXN0NjIxODAzMDY= | 3,042 | Fix api.rst References | {
"avatar_url": "https://avatars.githubusercontent.com/u/72231?v=4",
"events_url": "https://api.github.com/users/bsandrow/events{/privacy}",
"followers_url": "https://api.github.com/users/bsandrow/followers",
"following_url": "https://api.github.com/users/bsandrow/following{/other_user}",
"gists_url": "https://api.github.com/users/bsandrow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bsandrow",
"id": 72231,
"login": "bsandrow",
"node_id": "MDQ6VXNlcjcyMjMx",
"organizations_url": "https://api.github.com/users/bsandrow/orgs",
"received_events_url": "https://api.github.com/users/bsandrow/received_events",
"repos_url": "https://api.github.com/users/bsandrow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bsandrow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bsandrow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bsandrow",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-09T05:04:06Z | 2021-09-08T04:01:14Z | 2016-03-09T05:35:45Z | CONTRIBUTOR | resolved | `api.rst` references `requests.ConnectTimeout` and `requests.ReadTimeout`, but they aren't imported into the top-level of the package.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3042/reactions"
} | https://api.github.com/repos/psf/requests/issues/3042/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3042.diff",
"html_url": "https://github.com/psf/requests/pull/3042",
"merged_at": "2016-03-09T05:35:45Z",
"patch_url": "https://github.com/psf/requests/pull/3042.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3042"
} | true | [
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3041 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3041/labels{/name} | https://api.github.com/repos/psf/requests/issues/3041/comments | https://api.github.com/repos/psf/requests/issues/3041/events | https://github.com/psf/requests/pull/3041 | 139,476,341 | MDExOlB1bGxSZXF1ZXN0NjIxODAyMzE= | 3,041 | Fix autofunction Reference | {
"avatar_url": "https://avatars.githubusercontent.com/u/72231?v=4",
"events_url": "https://api.github.com/users/bsandrow/events{/privacy}",
"followers_url": "https://api.github.com/users/bsandrow/followers",
"following_url": "https://api.github.com/users/bsandrow/following{/other_user}",
"gists_url": "https://api.github.com/users/bsandrow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bsandrow",
"id": 72231,
"login": "bsandrow",
"node_id": "MDQ6VXNlcjcyMjMx",
"organizations_url": "https://api.github.com/users/bsandrow/orgs",
"received_events_url": "https://api.github.com/users/bsandrow/received_events",
"repos_url": "https://api.github.com/users/bsandrow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bsandrow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bsandrow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bsandrow",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-09T05:02:18Z | 2021-09-08T04:01:14Z | 2016-03-09T08:59:44Z | CONTRIBUTOR | resolved | `requests.codes` is a class (`LookupDict`), not a function.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3041/reactions"
} | https://api.github.com/repos/psf/requests/issues/3041/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3041.diff",
"html_url": "https://github.com/psf/requests/pull/3041",
"merged_at": "2016-03-09T08:59:44Z",
"patch_url": "https://github.com/psf/requests/pull/3041.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3041"
} | true | [
":sparkles: :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/3040 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3040/labels{/name} | https://api.github.com/repos/psf/requests/issues/3040/comments | https://api.github.com/repos/psf/requests/issues/3040/events | https://github.com/psf/requests/issues/3040 | 139,220,774 | MDU6SXNzdWUxMzkyMjA3NzQ= | 3,040 | got response with 'Connection: close', instead of closing connection but still send message body | {
"avatar_url": "https://avatars.githubusercontent.com/u/4945739?v=4",
"events_url": "https://api.github.com/users/zjulmh/events{/privacy}",
"followers_url": "https://api.github.com/users/zjulmh/followers",
"following_url": "https://api.github.com/users/zjulmh/following{/other_user}",
"gists_url": "https://api.github.com/users/zjulmh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zjulmh",
"id": 4945739,
"login": "zjulmh",
"node_id": "MDQ6VXNlcjQ5NDU3Mzk=",
"organizations_url": "https://api.github.com/users/zjulmh/orgs",
"received_events_url": "https://api.github.com/users/zjulmh/received_events",
"repos_url": "https://api.github.com/users/zjulmh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zjulmh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zjulmh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zjulmh",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-08T09:10:58Z | 2021-09-08T19:00:31Z | 2016-03-08T09:13:05Z | NONE | resolved | When I post a big file to a server with invalid authorization, the server response with a `400` error response and with `"Connection: close"` header before read all the request body and then close the connection, requests still send message body and get `connection aborted` exception, but according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.5), the client `SHOULD` monitor the network connection for an error response and immediately cease transmitting the body and close its side of the connection.
| {
"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/3040/reactions"
} | https://api.github.com/repos/psf/requests/issues/3040/timeline | null | completed | null | null | false | [
"@zjulmh This is a known problem. Unfortunately, the underlying HTTP library we're using makes it essentially impossible to actually do this: we only find out about the error response when the connection gets closed.\n\nWe'd need to replace httplib to avoid this problem, which is a substantial amount of work.\n"
] |
https://api.github.com/repos/psf/requests/issues/3039 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3039/labels{/name} | https://api.github.com/repos/psf/requests/issues/3039/comments | https://api.github.com/repos/psf/requests/issues/3039/events | https://github.com/psf/requests/issues/3039 | 139,213,935 | MDU6SXNzdWUxMzkyMTM5MzU= | 3,039 | Proxy settings not working | {
"avatar_url": "https://avatars.githubusercontent.com/u/7224106?v=4",
"events_url": "https://api.github.com/users/alejcas/events{/privacy}",
"followers_url": "https://api.github.com/users/alejcas/followers",
"following_url": "https://api.github.com/users/alejcas/following{/other_user}",
"gists_url": "https://api.github.com/users/alejcas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alejcas",
"id": 7224106,
"login": "alejcas",
"node_id": "MDQ6VXNlcjcyMjQxMDY=",
"organizations_url": "https://api.github.com/users/alejcas/orgs",
"received_events_url": "https://api.github.com/users/alejcas/received_events",
"repos_url": "https://api.github.com/users/alejcas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alejcas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alejcas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alejcas",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2016-03-08T08:43:32Z | 2021-09-08T19:00:31Z | 2016-03-08T08:54:08Z | NONE | resolved | HI, using urllib2, I can connect through a proxy without problems. But, using requests it's not working:
http://stackoverflow.com/questions/35851227/python-requests-behind-proxy
Can anyone 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/3039/reactions"
} | https://api.github.com/repos/psf/requests/issues/3039/timeline | null | completed | null | null | false | [
"Don't use `https` schemes. Your proxy dict should be:\n\n``` python\nproxy_dict = {\n 'http': 'http://10.20.23.5:8080',\n 'https': 'http://10.20.23.5:8080',\n}\n```\n",
"It is not working...\n\nWhy urllib2 is doing it correctly and requests is unable to handle this?\n",
"I notice in your urllib2 code you... |
https://api.github.com/repos/psf/requests/issues/3038 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3038/labels{/name} | https://api.github.com/repos/psf/requests/issues/3038/comments | https://api.github.com/repos/psf/requests/issues/3038/events | https://github.com/psf/requests/issues/3038 | 139,189,046 | MDU6SXNzdWUxMzkxODkwNDY= | 3,038 | Order of request headers should be preserved when sent to origin server | {
"avatar_url": "https://avatars.githubusercontent.com/u/764688?v=4",
"events_url": "https://api.github.com/users/davidfstr/events{/privacy}",
"followers_url": "https://api.github.com/users/davidfstr/followers",
"following_url": "https://api.github.com/users/davidfstr/following{/other_user}",
"gists_url": "https://api.github.com/users/davidfstr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidfstr",
"id": 764688,
"login": "davidfstr",
"node_id": "MDQ6VXNlcjc2NDY4OA==",
"organizations_url": "https://api.github.com/users/davidfstr/orgs",
"received_events_url": "https://api.github.com/users/davidfstr/received_events",
"repos_url": "https://api.github.com/users/davidfstr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidfstr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidfstr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidfstr",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 20 | 2016-03-08T06:04:36Z | 2021-08-30T00:06:18Z | 2016-04-29T21:47:35Z | NONE | resolved | #### Summary
If I made a request with code that looks like:
```
requests.get(
'http://127.0.0.1:8765/',
headers=OrderedDict([
('X-Header-1', 'ignoreme'),
('X-Header-2', 'ignoreme'),
('X-Header-3', 'ignoreme'),
('X-Header-4', 'ignoreme'),
])
)
```
I expect the recipient HTTP server to receive the X headers in the same order at they were listed in the code above. However I receive them in a random non-deterministic order.
#### Environment
- Requests 2.9.1
- Python 3.4.1
#### Repro Steps
- Download files in the following gist: https://gist.github.com/davidfstr/0dca5a133fa397cadd92
- Run reflect_server.py in terminal window 1.
- Run reflect_client.py in terminal window 2.
#### Expected Results
- Terminal window 1 shows a request made with the X headers in consecutive order from 1 to 4.
#### Actual Results
- Terminal window 1 shows a request made with the X headers in random non-deterministic order.
#### Notes
The following closed older issues suggest that preservation of order is indeed important:
- https://github.com/kennethreitz/requests/issues/284, https://github.com/kennethreitz/requests/issues/179
- https://github.com/kennethreitz/requests/issues/2668
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/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/3038/reactions"
} | https://api.github.com/repos/psf/requests/issues/3038/timeline | null | completed | null | null | false | [
"FWIW, I don't think any of those issues actually indicate that preservation of order on the wire is important. It _is_, but not for any of those reasons. The reason it's important is that headers can in principle be split up into multiple instances if the header is a comma-separated list, and maintaining the order... |
https://api.github.com/repos/psf/requests/issues/3037 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3037/labels{/name} | https://api.github.com/repos/psf/requests/issues/3037/comments | https://api.github.com/repos/psf/requests/issues/3037/events | https://github.com/psf/requests/issues/3037 | 139,087,894 | MDU6SXNzdWUxMzkwODc4OTQ= | 3,037 | using ipv6 with requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8584783?v=4",
"events_url": "https://api.github.com/users/1a1a11a/events{/privacy}",
"followers_url": "https://api.github.com/users/1a1a11a/followers",
"following_url": "https://api.github.com/users/1a1a11a/following{/other_user}",
"gists_url": "https://api.github.com/users/1a1a11a/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1a1a11a",
"id": 8584783,
"login": "1a1a11a",
"node_id": "MDQ6VXNlcjg1ODQ3ODM=",
"organizations_url": "https://api.github.com/users/1a1a11a/orgs",
"received_events_url": "https://api.github.com/users/1a1a11a/received_events",
"repos_url": "https://api.github.com/users/1a1a11a/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1a1a11a/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1a1a11a/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1a1a11a",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-07T20:40:02Z | 2021-09-08T19:00:31Z | 2016-03-07T20:49:53Z | NONE | resolved | Hi I read previous issue on using requests on ipv6, but I don't quite understand how to update the HOST header, could someone point out? (suppose I already have ipv6 address of a website, how do request it?)
Or is there any better solution available now?
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/3037/reactions"
} | https://api.github.com/repos/psf/requests/issues/3037/timeline | null | completed | null | null | false | [
"It's not clear what you mean when you say \"the previous issue\", but I assume it is #3002, which is a bug. You can work around it by doing `requests.get('https://[fe80::00]', headers={'Host': 'fe80::00'})`. Alternatively, wait for the next release, which should contain a fix.\n"
] |
https://api.github.com/repos/psf/requests/issues/3036 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3036/labels{/name} | https://api.github.com/repos/psf/requests/issues/3036/comments | https://api.github.com/repos/psf/requests/issues/3036/events | https://github.com/psf/requests/pull/3036 | 138,918,924 | MDExOlB1bGxSZXF1ZXN0NjE4ODYyNDk= | 3,036 | Allow for exceptions from tell() | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2016-03-07T08:33:52Z | 2021-09-08T04:01:13Z | 2016-03-11T13:30:53Z | MEMBER | resolved | Resolves #3035.
I'm not actually sure that this approach is the right one: I'm inclined to say that, when an exception is hit from `tell()`, that we may want to assume we don't know the length at all (return length 0) and use chunked-transfer encoding. That's a particularly good idea in this case, as frequently stdin has an unknown length altogether.
Thoughts on that point @sigmavirus24 and @jkbrzt?
| {
"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/3036/reactions"
} | https://api.github.com/repos/psf/requests/issues/3036/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3036.diff",
"html_url": "https://github.com/psf/requests/pull/3036",
"merged_at": "2016-03-11T13:30:53Z",
"patch_url": "https://github.com/psf/requests/pull/3036.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3036"
} | true | [
"> I'm inclined to say that, when an exception is hit from tell(), that we may want to assume we don't know the length at all (return length 0) and use chunked-transfer encoding\n\nExactly my thoughts :+1: \n\nBtw, I think `None` would be a better value to represent an unknown length. Length of zero can still be a ... |
https://api.github.com/repos/psf/requests/issues/3035 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3035/labels{/name} | https://api.github.com/repos/psf/requests/issues/3035/comments | https://api.github.com/repos/psf/requests/issues/3035/events | https://github.com/psf/requests/issues/3035 | 138,887,017 | MDU6SXNzdWUxMzg4ODcwMTc= | 3,035 | Sending piped stdin results in OSError: [Errno 29] Illegal seek | {
"avatar_url": "https://avatars.githubusercontent.com/u/326885?v=4",
"events_url": "https://api.github.com/users/jkbrzt/events{/privacy}",
"followers_url": "https://api.github.com/users/jkbrzt/followers",
"following_url": "https://api.github.com/users/jkbrzt/following{/other_user}",
"gists_url": "https://api.github.com/users/jkbrzt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jkbrzt",
"id": 326885,
"login": "jkbrzt",
"node_id": "MDQ6VXNlcjMyNjg4NQ==",
"organizations_url": "https://api.github.com/users/jkbrzt/orgs",
"received_events_url": "https://api.github.com/users/jkbrzt/received_events",
"repos_url": "https://api.github.com/users/jkbrzt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jkbrzt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jkbrzt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jkbrzt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2016-03-07T04:52:44Z | 2021-09-08T19:00:29Z | 2016-03-11T13:30:53Z | CONTRIBUTOR | resolved | I'm working on adding support for streamed uploads via `stdin` to HTTPie. It works fine when `stdin` redirected from a file, but fails with `OSError: [Errno 29] Illegal seek` when piping programs together.
**`test.py`:**
``` python
#!/usr/bin/env python
import sys
import requests
r = requests.post(
'http://httpbin.org/post',
data=getattr(sys.stdin, 'buffer', sys.stdin)
)
print(r.text)
```
:smile: **works:**
``` bash
$ python test.py < test.py
```
:disappointed: **fails:**
```
$ cat test.py | python test.py
```
``` python
Traceback (most recent call last):
File "test.py", line 5, in <module>
r = requests.post('http://httpbin.org/post', data=sys.stdin.buffer)
File "python3.5/site-packages/requests/api.py", line 107, in post
return request('post', url, data=data, json=json, **kwargs)
File "python3.5/site-packages/requests/api.py", line 53, in request
return session.request(method=method, url=url, **kwargs)
File "python3.5/site-packages/requests/sessions.py", line 454, in request
prep = self.prepare_request(req)
File "python3.5/site-packages/requests/sessions.py", line 388, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "python3.5/site-packages/requests/models.py", line 296, in prepare
self.prepare_body(data, files, json)
File "python3.5/site-packages/requests/models.py", line 430, in prepare_body
length = super_len(data)
File "python3.5/site-packages/requests/utils.py", line 86, in super_len
current_position = o.tell()
OSError: [Errno 29] Illegal seek
```
---
Tested on OS X 10.11.3 + Python 3.5.1 & 2.7.11 with `requests==2.9.1`.
---
I imagine checking for that error in the appropriate [`except` clause in model.py:431 ](https://github.com/kennethreitz/requests/blob/4f378b0e1a2f5f60e2e57daaec80081483f7150e/requests/models.py#L431) would do the trick. Or a more robust `super_len()`. I'll be happy to submit a pull request, if interested.
| {
"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/3035/reactions"
} | https://api.github.com/repos/psf/requests/issues/3035/timeline | null | completed | null | null | false | [
"@jkbrzt I think you're probably right. I'll have a little play today and see if I can convince myself you're definitely right, and then submit a patch.\n"
] |
https://api.github.com/repos/psf/requests/issues/3034 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3034/labels{/name} | https://api.github.com/repos/psf/requests/issues/3034/comments | https://api.github.com/repos/psf/requests/issues/3034/events | https://github.com/psf/requests/pull/3034 | 138,842,401 | MDExOlB1bGxSZXF1ZXN0NjE4NTYzMjE= | 3,034 | Support non-ASCII Reason Phrase as per RFC2616 | {
"avatar_url": "https://avatars.githubusercontent.com/u/447615?v=4",
"events_url": "https://api.github.com/users/rwe/events{/privacy}",
"followers_url": "https://api.github.com/users/rwe/followers",
"following_url": "https://api.github.com/users/rwe/following{/other_user}",
"gists_url": "https://api.github.com/users/rwe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rwe",
"id": 447615,
"login": "rwe",
"node_id": "MDQ6VXNlcjQ0NzYxNQ==",
"organizations_url": "https://api.github.com/users/rwe/orgs",
"received_events_url": "https://api.github.com/users/rwe/received_events",
"repos_url": "https://api.github.com/users/rwe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rwe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rwe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rwe",
"user_view_type": "public"
} | [
{
"color": "e11d21",
"default": false,
"description": null,
"id": 44501305,
"name": "Not Ready To Merge",
"node_id": "MDU6TGFiZWw0NDUwMTMwNQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Not%20Ready%20To%20Merge"
},
{
"color": "e11d21",
"default": false,
"d... | closed | true | null | [] | null | 2 | 2016-03-06T21:50:37Z | 2021-09-08T04:01:14Z | 2016-03-09T21:31:41Z | CONTRIBUTOR | resolved | RFC2616 specifies that header values and reason phrases are encoded in in ISO-8859-1 or RFC2047 (MIME for text). RFC7230, which obsoletes RC2616, recommends treating non-ASCII header values as 'opaque data'.
In the case of the Reason Phrase, however, we should try to decode it as described due to its possible/encouraged localization and due to its purpose for display to the user; treating it as 'opaque data' is not useful and prevents its intended use.
Note that several production servers, including Apache Tomcat, send responses conforming to RFC2616. Servers that respond only in US-ASCII are unaffected by this change. This _only_ regresses (by introducing possible encoding errors) for servers that send responses conforming to neither RFC, which I believe are either uncommon or non-existent.
Fixes kennethreitz/requests#3009
| {
"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/3034/reactions"
} | https://api.github.com/repos/psf/requests/issues/3034/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3034.diff",
"html_url": "https://github.com/psf/requests/pull/3034",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/3034.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3034"
} | true | [
"I'm sorry, but this reasoning is still not accurate, and so this code is still not right.\n\nFirstly, RFC 2616 is not relevant anymore except inasmuch as it provides guidance to what older implementations may do.\n\nSecondly, this argument is wrong:\n\n> In the case of the Reason Phrase, however, we should try to ... |
https://api.github.com/repos/psf/requests/issues/3033 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3033/labels{/name} | https://api.github.com/repos/psf/requests/issues/3033/comments | https://api.github.com/repos/psf/requests/issues/3033/events | https://github.com/psf/requests/issues/3033 | 138,629,976 | MDU6SXNzdWUxMzg2Mjk5NzY= | 3,033 | Moving documentation translation to translating platform | {
"avatar_url": "https://avatars.githubusercontent.com/u/2891235?v=4",
"events_url": "https://api.github.com/users/caizixian/events{/privacy}",
"followers_url": "https://api.github.com/users/caizixian/followers",
"following_url": "https://api.github.com/users/caizixian/following{/other_user}",
"gists_url": "https://api.github.com/users/caizixian/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/caizixian",
"id": 2891235,
"login": "caizixian",
"node_id": "MDQ6VXNlcjI4OTEyMzU=",
"organizations_url": "https://api.github.com/users/caizixian/orgs",
"received_events_url": "https://api.github.com/users/caizixian/received_events",
"repos_url": "https://api.github.com/users/caizixian/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/caizixian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/caizixian/subscriptions",
"type": "User",
"url": "https://api.github.com/users/caizixian",
"user_view_type": "public"
} | [
{
"color": "fbca04",
"default": false,
"description": null,
"id": 44501249,
"name": "Needs BDFL Input",
"node_id": "MDU6TGFiZWw0NDUwMTI0OQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20BDFL%20Input"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
} | 10 | 2016-03-05T01:22:38Z | 2024-05-20T14:35:33Z | 2024-05-20T14:35:32Z | NONE | null | #624 There're a bunch of translation repos under https://github.com/requests
They all started with a specific commit version of https://github.com/kennethreitz/requests , and then the translators worked on it.
But we lack a proper process to merge updates from upstream repo to these i18n repos. Translators cannot track what they need to retranslate if there's such change in upstream. As a result, some translation might be outdated, and therefore misleading. Maybe moving the whole translation project to Transifex or crowdin is a better idea.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/3033/reactions"
} | https://api.github.com/repos/psf/requests/issues/3033/timeline | null | completed | null | null | false | [
"I'm really intrigued by this idea. @kennethreitz?\n",
"Transifex has a really nice permissions system, you can set it to auto\nupdate the source translation from a url and a useful API.\n\nOn Sat, 5 Mar 2016 17:11 Cory Benfield notifications@github.com wrote:\n\n> I'm really intrigued by this idea. @kennethreitz... |
https://api.github.com/repos/psf/requests/issues/3032 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/3032/labels{/name} | https://api.github.com/repos/psf/requests/issues/3032/comments | https://api.github.com/repos/psf/requests/issues/3032/events | https://github.com/psf/requests/pull/3032 | 138,621,807 | MDExOlB1bGxSZXF1ZXN0NjE3ODk3Njk= | 3,032 | Changes for #3028 | {
"avatar_url": "https://avatars.githubusercontent.com/u/3794108?v=4",
"events_url": "https://api.github.com/users/davidsoncasey/events{/privacy}",
"followers_url": "https://api.github.com/users/davidsoncasey/followers",
"following_url": "https://api.github.com/users/davidsoncasey/following{/other_user}",
"gists_url": "https://api.github.com/users/davidsoncasey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidsoncasey",
"id": 3794108,
"login": "davidsoncasey",
"node_id": "MDQ6VXNlcjM3OTQxMDg=",
"organizations_url": "https://api.github.com/users/davidsoncasey/orgs",
"received_events_url": "https://api.github.com/users/davidsoncasey/received_events",
"repos_url": "https://api.github.com/users/davidsoncasey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidsoncasey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidsoncasey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidsoncasey",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2016-03-05T00:01:21Z | 2021-09-08T04:01:15Z | 2016-03-06T18:07:59Z | NONE | resolved | I've overwritten the `__contains__` method of `RequestsCookieJar` as discussed in the issue. It looks to be working as expected and tests pass, but this is my first contribution to this project so I could be missing something.
| {
"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/3032/reactions"
} | https://api.github.com/repos/psf/requests/issues/3032/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/3032.diff",
"html_url": "https://github.com/psf/requests/pull/3032",
"merged_at": "2016-03-06T18:07:59Z",
"patch_url": "https://github.com/psf/requests/pull/3032.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/3032"
} | true | [
"Thanks for this @davidsoncasey, this pretty much looks right! I left a few small notes inline for you to take a look at, but one those are addressed we can merge this!\n",
"@Lukasa great, thanks for taking a look! I'll have a chance later today to make those edits.\n",
"@Lukasa I added a couple fixes, take a l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.