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/2630 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2630/labels{/name} | https://api.github.com/repos/psf/requests/issues/2630/comments | https://api.github.com/repos/psf/requests/issues/2630/events | https://github.com/psf/requests/pull/2630 | 85,420,258 | MDExOlB1bGxSZXF1ZXN0MzcwMDA1MDU= | 2,630 | Declare tests_require and hook up 'test' command | {
"avatar_url": "https://avatars.githubusercontent.com/u/1011612?v=4",
"events_url": "https://api.github.com/users/koobs/events{/privacy}",
"followers_url": "https://api.github.com/users/koobs/followers",
"following_url": "https://api.github.com/users/koobs/following{/other_user}",
"gists_url": "https://api.github.com/users/koobs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koobs",
"id": 1011612,
"login": "koobs",
"node_id": "MDQ6VXNlcjEwMTE2MTI=",
"organizations_url": "https://api.github.com/users/koobs/orgs",
"received_events_url": "https://api.github.com/users/koobs/received_events",
"repos_url": "https://api.github.com/users/koobs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koobs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koobs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koobs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2015-06-05T04:39:31Z | 2021-09-08T05:01:00Z | 2016-01-30T03:49:28Z | CONTRIBUTOR | resolved | This change allows the existing test script (test_requests.py) to be invoked via the standard setuptools test command. It also declares pytest as a test_dependency, so that it is installed on a test run, if not available.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2630/reactions"
} | https://api.github.com/repos/psf/requests/issues/2630/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2630.diff",
"html_url": "https://github.com/psf/requests/pull/2630",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2630.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2630"
} | true | [
"Hey @koobs, thanks for the PR. Can I ask why you're adding this?\n",
"@sigmavirus24\n\nTLDR: Best practice python packaging.\n\nLonger version:\n\nThe 'test' command is the canonical method for running tests in Python land (ala make check for autotools projects) independent to how or what tests are run, or the t... |
https://api.github.com/repos/psf/requests/issues/2629 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2629/labels{/name} | https://api.github.com/repos/psf/requests/issues/2629/comments | https://api.github.com/repos/psf/requests/issues/2629/events | https://github.com/psf/requests/issues/2629 | 84,977,975 | MDU6SXNzdWU4NDk3Nzk3NQ== | 2,629 | Connection pool not recycling connections on timeout or connection exceptions | {
"avatar_url": "https://avatars.githubusercontent.com/u/12744068?v=4",
"events_url": "https://api.github.com/users/jlatherfold/events{/privacy}",
"followers_url": "https://api.github.com/users/jlatherfold/followers",
"following_url": "https://api.github.com/users/jlatherfold/following{/other_user}",
"gists_url": "https://api.github.com/users/jlatherfold/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jlatherfold",
"id": 12744068,
"login": "jlatherfold",
"node_id": "MDQ6VXNlcjEyNzQ0MDY4",
"organizations_url": "https://api.github.com/users/jlatherfold/orgs",
"received_events_url": "https://api.github.com/users/jlatherfold/received_events",
"repos_url": "https://api.github.com/users/jlatherfold/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jlatherfold/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jlatherfold/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jlatherfold",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-06-04T08:18:13Z | 2021-09-08T23:00:57Z | 2015-06-04T08:29:02Z | NONE | resolved | If preload_content is not specified on a request, connections are implicitly returned to the pool after the request is read. However, when a timeout error occurs or the connection is dropped the connection is closed but not returned in to the pool (since the response is None). This problem is compounded when retries are turned on since the next attempt will grab a new connection from the pool thus depleting it further. With non-blocking pools this is not a problem since we will create a new connection if the pool is empty but when the pool is blocking we have found that eventually the pool size becomes zero (after no.of connections timeout errors) which causes the calling application to hang on it's next request.
This can be fixed in connectionpool.urlopen in the exception handlers by explicitly returning the closed connection to the pool via _put_conn (if release_conn is false), since subsequent calls to _get_conn will check if the connection has been dropped and return a new one.
| {
"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/2629/reactions"
} | https://api.github.com/repos/psf/requests/issues/2629/timeline | null | completed | null | null | false | [
"This is a bug in [urllib3](https://github.com/shazow/urllib3): can you please open it there?\n",
"Thanks for the response. Yes I will do that.\n"
] |
https://api.github.com/repos/psf/requests/issues/2628 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2628/labels{/name} | https://api.github.com/repos/psf/requests/issues/2628/comments | https://api.github.com/repos/psf/requests/issues/2628/events | https://github.com/psf/requests/issues/2628 | 84,629,211 | MDU6SXNzdWU4NDYyOTIxMQ== | 2,628 | Incomplete HTML Request | {
"avatar_url": "https://avatars.githubusercontent.com/u/12733738?v=4",
"events_url": "https://api.github.com/users/Blizz8975/events{/privacy}",
"followers_url": "https://api.github.com/users/Blizz8975/followers",
"following_url": "https://api.github.com/users/Blizz8975/following{/other_user}",
"gists_url": "https://api.github.com/users/Blizz8975/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Blizz8975",
"id": 12733738,
"login": "Blizz8975",
"node_id": "MDQ6VXNlcjEyNzMzNzM4",
"organizations_url": "https://api.github.com/users/Blizz8975/orgs",
"received_events_url": "https://api.github.com/users/Blizz8975/received_events",
"repos_url": "https://api.github.com/users/Blizz8975/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Blizz8975/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Blizz8975/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Blizz8975",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2015-06-03T15:43:36Z | 2021-09-08T23:00:58Z | 2015-06-03T17:29:33Z | NONE | resolved | Hey guys! I'm currently working on some content migration and I can't seem to pull the entire html source code using Python.
Here is the on of the pages I'm working on: http://holytrinityhs.echalk.com/site_res_view_photoalbum.aspx?resourceId=0b744865-ad8a-4e76-8d42-15966cd7c4e2
So by using:
html = requests.get("http://holytrinityhs.echalk.com/site_res_view_photoalbum.aspx?resourceId=0b744865-ad8a-4e76-8d42-15966cd7c4e2")
and the calling:
html.text
gives me
```
'<HTML><HEAD><TITLE>Holy Trinity Diocesan High School</TITLE></HEAD><BODY>Holy Trinity Diocesan High School<BR>98 Cherry Lane<BR>Hicksville, NY 11801<BR><BR>516-433-2900</BODY></HTML><!--\r\nWeb Server: W04ECNJ\r\nTotal Time: 31.2492ms\r\nCache Key: site_res_view_photoalbum_aspx_Down_en_2107878629\r\n//--> \r\n'
```
which is not the full html source code.
Any help would be very much appreciated!
Thanks!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/12733738?v=4",
"events_url": "https://api.github.com/users/Blizz8975/events{/privacy}",
"followers_url": "https://api.github.com/users/Blizz8975/followers",
"following_url": "https://api.github.com/users/Blizz8975/following{/other_user}",
"gists_url": "https://api.github.com/users/Blizz8975/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Blizz8975",
"id": 12733738,
"login": "Blizz8975",
"node_id": "MDQ6VXNlcjEyNzMzNzM4",
"organizations_url": "https://api.github.com/users/Blizz8975/orgs",
"received_events_url": "https://api.github.com/users/Blizz8975/received_events",
"repos_url": "https://api.github.com/users/Blizz8975/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Blizz8975/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Blizz8975/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Blizz8975",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2628/reactions"
} | https://api.github.com/repos/psf/requests/issues/2628/timeline | null | completed | null | null | false | [
"Hmm, I can't test this because I keep getting 504s. Are you sure they sent a complete response?\n",
"I'm not exactly sure what you mean by a complete response, can you tell me how can I verify this? :)\n",
"Yeah, that's a bit tricky to verify. It would help to see the response headers if you can print them out... |
https://api.github.com/repos/psf/requests/issues/2627 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2627/labels{/name} | https://api.github.com/repos/psf/requests/issues/2627/comments | https://api.github.com/repos/psf/requests/issues/2627/events | https://github.com/psf/requests/issues/2627 | 83,953,323 | MDU6SXNzdWU4Mzk1MzMyMw== | 2,627 | SSLv3 - OSX use last OpenSSL version [tag: ssl.OPENSSL_VERSION // SSL.SSLeay_version(SSL.SSLEAY_VERSION)] | {
"avatar_url": "https://avatars.githubusercontent.com/u/122271?v=4",
"events_url": "https://api.github.com/users/PMickael/events{/privacy}",
"followers_url": "https://api.github.com/users/PMickael/followers",
"following_url": "https://api.github.com/users/PMickael/following{/other_user}",
"gists_url": "https://api.github.com/users/PMickael/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PMickael",
"id": 122271,
"login": "PMickael",
"node_id": "MDQ6VXNlcjEyMjI3MQ==",
"organizations_url": "https://api.github.com/users/PMickael/orgs",
"received_events_url": "https://api.github.com/users/PMickael/received_events",
"repos_url": "https://api.github.com/users/PMickael/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PMickael/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PMickael/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PMickael",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-06-02T10:09:43Z | 2021-09-08T23:04:43Z | 2015-06-02T11:31:47Z | NONE | resolved | Hi,
To reproduce the bug,
``` python
import requests
requests.get('https://www.monova.org/')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 344, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
if 'timed out' in str(err) or 'did not complete (read)' in str(err): # Python 2.6
TypeError: __str__ returned non-string (type Error)
```
On OSX python 2.7.10 and openssl 1.0.2a and requests 2.7.0
With openssl 0.9.8zd and python 2.7.8 and requests 2.6.0
``` python
File "python2.7/site-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/122271?v=4",
"events_url": "https://api.github.com/users/PMickael/events{/privacy}",
"followers_url": "https://api.github.com/users/PMickael/followers",
"following_url": "https://api.github.com/users/PMickael/following{/other_user}",
"gists_url": "https://api.github.com/users/PMickael/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PMickael",
"id": 122271,
"login": "PMickael",
"node_id": "MDQ6VXNlcjEyMjI3MQ==",
"organizations_url": "https://api.github.com/users/PMickael/orgs",
"received_events_url": "https://api.github.com/users/PMickael/received_events",
"repos_url": "https://api.github.com/users/PMickael/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PMickael/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PMickael/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PMickael",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2627/reactions"
} | https://api.github.com/repos/psf/requests/issues/2627/timeline | null | completed | null | null | false | [
"Yeah, this is a result of a change in urllib3. We fixed it in shazow/urllib3#622, and this should be fixed in the next release.\n",
"Yes for this error TypeError: **str** returned non-string (type Error), but the problem is also that I can do requests.get('https://www.monova.org/') for no reason ? The website is... |
https://api.github.com/repos/psf/requests/issues/2626 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2626/labels{/name} | https://api.github.com/repos/psf/requests/issues/2626/comments | https://api.github.com/repos/psf/requests/issues/2626/events | https://github.com/psf/requests/issues/2626 | 83,953,163 | MDU6SXNzdWU4Mzk1MzE2Mw== | 2,626 | Mistake | {
"avatar_url": "https://avatars.githubusercontent.com/u/255794?v=4",
"events_url": "https://api.github.com/users/leakid/events{/privacy}",
"followers_url": "https://api.github.com/users/leakid/followers",
"following_url": "https://api.github.com/users/leakid/following{/other_user}",
"gists_url": "https://api.github.com/users/leakid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/leakid",
"id": 255794,
"login": "leakid",
"node_id": "MDEyOk9yZ2FuaXphdGlvbjI1NTc5NA==",
"organizations_url": "https://api.github.com/users/leakid/orgs",
"received_events_url": "https://api.github.com/users/leakid/received_events",
"repos_url": "https://api.github.com/users/leakid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/leakid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/leakid/subscriptions",
"type": "Organization",
"url": "https://api.github.com/users/leakid",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-06-02T10:08:43Z | 2021-09-08T23:04:43Z | 2015-06-02T10:09:22Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/255794?v=4",
"events_url": "https://api.github.com/users/leakid/events{/privacy}",
"followers_url": "https://api.github.com/users/leakid/followers",
"following_url": "https://api.github.com/users/leakid/following{/other_user}",
"gists_url": "https://api.github.com/users/leakid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/leakid",
"id": 255794,
"login": "leakid",
"node_id": "MDEyOk9yZ2FuaXphdGlvbjI1NTc5NA==",
"organizations_url": "https://api.github.com/users/leakid/orgs",
"received_events_url": "https://api.github.com/users/leakid/received_events",
"repos_url": "https://api.github.com/users/leakid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/leakid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/leakid/subscriptions",
"type": "Organization",
"url": "https://api.github.com/users/leakid",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2626/reactions"
} | https://api.github.com/repos/psf/requests/issues/2626/timeline | null | completed | null | null | false | [
"wrong account\n"
] | |
https://api.github.com/repos/psf/requests/issues/2625 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2625/labels{/name} | https://api.github.com/repos/psf/requests/issues/2625/comments | https://api.github.com/repos/psf/requests/issues/2625/events | https://github.com/psf/requests/issues/2625 | 83,790,226 | MDU6SXNzdWU4Mzc5MDIyNg== | 2,625 | expose request start time | {
"avatar_url": "https://avatars.githubusercontent.com/u/23570?v=4",
"events_url": "https://api.github.com/users/est/events{/privacy}",
"followers_url": "https://api.github.com/users/est/followers",
"following_url": "https://api.github.com/users/est/following{/other_user}",
"gists_url": "https://api.github.com/users/est/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/est",
"id": 23570,
"login": "est",
"node_id": "MDQ6VXNlcjIzNTcw",
"organizations_url": "https://api.github.com/users/est/orgs",
"received_events_url": "https://api.github.com/users/est/received_events",
"repos_url": "https://api.github.com/users/est/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/est/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/est/subscriptions",
"type": "User",
"url": "https://api.github.com/users/est",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
}
] | closed | true | null | [] | null | 7 | 2015-06-02T02:06:39Z | 2021-09-08T23:00:55Z | 2015-06-15T03:59:05Z | NONE | resolved | When implementing time based throttle mechanism, the start of request time is quite useful, please consider expose it as instance property, so we don't need to wrap requests in a multiple `time.utctime()` calls. It's a waste of syscall and duplicated code.
https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L570
| {
"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/2625/reactions"
} | https://api.github.com/repos/psf/requests/issues/2625/timeline | null | completed | null | null | false | [
"I don't think we're going to expose it. We weren't keen to expose the `elapsed` attribute in the first place. We're not going to add yet another attribute, especially one we've never had a request for before. `elapsed` was only necessary because the hooks provided by requests were severely trimmed in 1.0.\n",
"I... |
https://api.github.com/repos/psf/requests/issues/2624 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2624/labels{/name} | https://api.github.com/repos/psf/requests/issues/2624/comments | https://api.github.com/repos/psf/requests/issues/2624/events | https://github.com/psf/requests/issues/2624 | 83,783,239 | MDU6SXNzdWU4Mzc4MzIzOQ== | 2,624 | Use keep-alive / streaming while processing | {
"avatar_url": "https://avatars.githubusercontent.com/u/505939?v=4",
"events_url": "https://api.github.com/users/kvarga/events{/privacy}",
"followers_url": "https://api.github.com/users/kvarga/followers",
"following_url": "https://api.github.com/users/kvarga/following{/other_user}",
"gists_url": "https://api.github.com/users/kvarga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kvarga",
"id": 505939,
"login": "kvarga",
"node_id": "MDQ6VXNlcjUwNTkzOQ==",
"organizations_url": "https://api.github.com/users/kvarga/orgs",
"received_events_url": "https://api.github.com/users/kvarga/received_events",
"repos_url": "https://api.github.com/users/kvarga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kvarga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kvarga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kvarga",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-06-02T01:40:21Z | 2021-09-08T23:04:44Z | 2015-06-02T02:19:36Z | NONE | resolved | Is there a way to send intermittent responses to client to avoid timeout for long-running tasks (~2minutes) ?
If not, I guess I will have to do the following flow:
1. User requests a webpage
2. Check if that webpage is available in cache
3. If not, redirect them to a holding page that checks ~15 seconds if that request is ready
4. Load the response
Seems less than ideal, but gets the added benefit of showing some sort of progress indicator to the user.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/505939?v=4",
"events_url": "https://api.github.com/users/kvarga/events{/privacy}",
"followers_url": "https://api.github.com/users/kvarga/followers",
"following_url": "https://api.github.com/users/kvarga/following{/other_user}",
"gists_url": "https://api.github.com/users/kvarga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kvarga",
"id": 505939,
"login": "kvarga",
"node_id": "MDQ6VXNlcjUwNTkzOQ==",
"organizations_url": "https://api.github.com/users/kvarga/orgs",
"received_events_url": "https://api.github.com/users/kvarga/received_events",
"repos_url": "https://api.github.com/users/kvarga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kvarga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kvarga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kvarga",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2624/reactions"
} | https://api.github.com/repos/psf/requests/issues/2624/timeline | null | completed | null | null | false | [
"@kvarga sorry, are you using the requests library? You seem to not be using it at all unless I'm misunderstanding your bug.\n",
"Oops. I meant to post this to flask. \n",
"No worries! :8ball: says the flask maintainers will be more helpful.\n"
] |
https://api.github.com/repos/psf/requests/issues/2623 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2623/labels{/name} | https://api.github.com/repos/psf/requests/issues/2623/comments | https://api.github.com/repos/psf/requests/issues/2623/events | https://github.com/psf/requests/issues/2623 | 83,778,310 | MDU6SXNzdWU4Mzc3ODMxMA== | 2,623 | why implement requests.util.timeout.Timeout() instead of bsd socket options? | {
"avatar_url": "https://avatars.githubusercontent.com/u/23570?v=4",
"events_url": "https://api.github.com/users/est/events{/privacy}",
"followers_url": "https://api.github.com/users/est/followers",
"following_url": "https://api.github.com/users/est/following{/other_user}",
"gists_url": "https://api.github.com/users/est/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/est",
"id": 23570,
"login": "est",
"node_id": "MDQ6VXNlcjIzNTcw",
"organizations_url": "https://api.github.com/users/est/orgs",
"received_events_url": "https://api.github.com/users/est/received_events",
"repos_url": "https://api.github.com/users/est/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/est/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/est/subscriptions",
"type": "User",
"url": "https://api.github.com/users/est",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-06-02T01:26:39Z | 2021-09-08T23:04:42Z | 2015-06-02T07:15:50Z | NONE | resolved | In python's socket module, `socket.timeout` could be used as connect timeout, also `setsockopt` can be used with `SO_RCVTIMEO` and `SO_SNDTIMEO`. It there a reason to implement our own `requests.util.timeout.Timeout` class instead?
| {
"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/2623/reactions"
} | https://api.github.com/repos/psf/requests/issues/2623/timeline | null | completed | null | null | false | [
"Are you looking at the right project? https://github.com/kennethreitz/requests/blob/master/requests/utils.py\n",
"More generally, the answer is yes. `Timeout` is not special: it's just a wrapper over the timeout functions available in the socket module. The reason it was written into urllib3 (which is where I th... |
https://api.github.com/repos/psf/requests/issues/2622 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2622/labels{/name} | https://api.github.com/repos/psf/requests/issues/2622/comments | https://api.github.com/repos/psf/requests/issues/2622/events | https://github.com/psf/requests/issues/2622 | 83,689,331 | MDU6SXNzdWU4MzY4OTMzMQ== | 2,622 | get fails for "http://www.merrickbank.com/" | {
"avatar_url": "https://avatars.githubusercontent.com/u/12498397?v=4",
"events_url": "https://api.github.com/users/benreisner/events{/privacy}",
"followers_url": "https://api.github.com/users/benreisner/followers",
"following_url": "https://api.github.com/users/benreisner/following{/other_user}",
"gists_url": "https://api.github.com/users/benreisner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benreisner",
"id": 12498397,
"login": "benreisner",
"node_id": "MDQ6VXNlcjEyNDk4Mzk3",
"organizations_url": "https://api.github.com/users/benreisner/orgs",
"received_events_url": "https://api.github.com/users/benreisner/received_events",
"repos_url": "https://api.github.com/users/benreisner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benreisner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benreisner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benreisner",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2015-06-01T20:55:20Z | 2021-09-08T23:04:42Z | 2015-06-01T21:38:44Z | NONE | resolved | I try requests.get("http://www.merrickbank.com/"), but it does not work. It takes minutes for it to just fail, freezing up quite a bit.
| {
"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/2622/reactions"
} | https://api.github.com/repos/psf/requests/issues/2622/timeline | null | completed | null | null | false | [
"Weirdly curl gets back a `Content-Length` header but requests gets `chunked`.\n",
"So if you announce compression it chunks.\n",
"So if they send chunked responses (when doing gzip) they send broken data. Especially:\n\n``` http\nX-Frame-Options: SAMEORIGIN\nSet-Cookie: mb-CookieP=; HttpOnly; \nSecure\nSet-Coo... |
https://api.github.com/repos/psf/requests/issues/2621 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2621/labels{/name} | https://api.github.com/repos/psf/requests/issues/2621/comments | https://api.github.com/repos/psf/requests/issues/2621/events | https://github.com/psf/requests/issues/2621 | 83,582,676 | MDU6SXNzdWU4MzU4MjY3Ng== | 2,621 | TLS hostname validation logic does not support subjectAltName with IP records | {
"avatar_url": "https://avatars.githubusercontent.com/u/3266662?v=4",
"events_url": "https://api.github.com/users/itamarst/events{/privacy}",
"followers_url": "https://api.github.com/users/itamarst/followers",
"following_url": "https://api.github.com/users/itamarst/following{/other_user}",
"gists_url": "https://api.github.com/users/itamarst/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/itamarst",
"id": 3266662,
"login": "itamarst",
"node_id": "MDQ6VXNlcjMyNjY2NjI=",
"organizations_url": "https://api.github.com/users/itamarst/orgs",
"received_events_url": "https://api.github.com/users/itamarst/received_events",
"repos_url": "https://api.github.com/users/itamarst/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/itamarst/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/itamarst/subscriptions",
"type": "User",
"url": "https://api.github.com/users/itamarst",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 25 | 2015-06-01T16:13:37Z | 2021-09-08T21:00:49Z | 2015-11-05T17:54:19Z | NONE | resolved | If I am running a custom certificate authority I might want to generate a TLS certificate that encodes its `subjectAltName` using an IP address (`iPAddress` in https://tools.ietf.org/html/rfc5280#section-4.2.1.6). this is useful when I do not have DNS records for servers in my application but I still want to validate identity.
Unfortunately, the hostname validation logic `requests` uses does not validate these records. It only validates DNS records within `subjectAltName`.
| {
"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/2621/reactions"
} | https://api.github.com/repos/psf/requests/issues/2621/timeline | null | completed | null | null | false | [
"You are entirely correct. This likely applies a bit more broadly than requests: we pulled this algorithm out of the standard library, which means it is likely affected. Similarly, I checked `service_identity`, and I believe it may also not handle this appropriately.\n\nCan I get some input from @reaperhulk, @hynek... |
https://api.github.com/repos/psf/requests/issues/2620 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2620/labels{/name} | https://api.github.com/repos/psf/requests/issues/2620/comments | https://api.github.com/repos/psf/requests/issues/2620/events | https://github.com/psf/requests/issues/2620 | 83,513,544 | MDU6SXNzdWU4MzUxMzU0NA== | 2,620 | Connect Error or Timeout Error | {
"avatar_url": "https://avatars.githubusercontent.com/u/3735327?v=4",
"events_url": "https://api.github.com/users/jongiddy/events{/privacy}",
"followers_url": "https://api.github.com/users/jongiddy/followers",
"following_url": "https://api.github.com/users/jongiddy/following{/other_user}",
"gists_url": "https://api.github.com/users/jongiddy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jongiddy",
"id": 3735327,
"login": "jongiddy",
"node_id": "MDQ6VXNlcjM3MzUzMjc=",
"organizations_url": "https://api.github.com/users/jongiddy/orgs",
"received_events_url": "https://api.github.com/users/jongiddy/received_events",
"repos_url": "https://api.github.com/users/jongiddy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jongiddy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jongiddy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jongiddy",
"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": "e102d8",
"default": false,
"description": null,
"id": 117745,
"... | 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"
} | 6 | 2015-06-01T14:00:42Z | 2021-09-08T23:04:42Z | 2015-06-02T20:53:50Z | NONE | resolved | At https://github.com/kennethreitz/requests/blob/8b5e457b756b2ab4c02473f7a42c2e0201ecc7e9/requests/models.py#L664 the urllib3 `ReadTimeoutError` gets mapped to a `requests.exceptions.ConnectionError`. It seems like the `requests.exceptions.ReadTimeout` would be a more obvious exception.
Is this just an oversight, or is there a reason for keeping it as `ConnectionError`?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/3735327?v=4",
"events_url": "https://api.github.com/users/jongiddy/events{/privacy}",
"followers_url": "https://api.github.com/users/jongiddy/followers",
"following_url": "https://api.github.com/users/jongiddy/following{/other_user}",
"gists_url": "https://api.github.com/users/jongiddy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jongiddy",
"id": 3735327,
"login": "jongiddy",
"node_id": "MDQ6VXNlcjM3MzUzMjc=",
"organizations_url": "https://api.github.com/users/jongiddy/orgs",
"received_events_url": "https://api.github.com/users/jongiddy/received_events",
"repos_url": "https://api.github.com/users/jongiddy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jongiddy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jongiddy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jongiddy",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2620/reactions"
} | https://api.github.com/repos/psf/requests/issues/2620/timeline | null | completed | null | null | false | [
"Good spot! I think this is an oversight.\n\nUnfortunately, changing the exception type is a backward incompatible change, because `ReadTimeoutError` does not inherit from `ConnectionError`. I think we should do it, but we can't do it until 3.0.0.\n",
"Sorry, just noticed this is a duplicate of https://github.com... |
https://api.github.com/repos/psf/requests/issues/2619 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2619/labels{/name} | https://api.github.com/repos/psf/requests/issues/2619/comments | https://api.github.com/repos/psf/requests/issues/2619/events | https://github.com/psf/requests/issues/2619 | 83,418,208 | MDU6SXNzdWU4MzQxODIwOA== | 2,619 | HTML PUT and GET | {
"avatar_url": "https://avatars.githubusercontent.com/u/11629690?v=4",
"events_url": "https://api.github.com/users/RubenvWyk/events{/privacy}",
"followers_url": "https://api.github.com/users/RubenvWyk/followers",
"following_url": "https://api.github.com/users/RubenvWyk/following{/other_user}",
"gists_url": "https://api.github.com/users/RubenvWyk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RubenvWyk",
"id": 11629690,
"login": "RubenvWyk",
"node_id": "MDQ6VXNlcjExNjI5Njkw",
"organizations_url": "https://api.github.com/users/RubenvWyk/orgs",
"received_events_url": "https://api.github.com/users/RubenvWyk/received_events",
"repos_url": "https://api.github.com/users/RubenvWyk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RubenvWyk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RubenvWyk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RubenvWyk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-06-01T10:07:20Z | 2021-09-08T23:04:44Z | 2015-06-01T10:41:44Z | NONE | resolved | Hi there,
I am new to the whole thing :) read n00b 101 hehe
Currently I am requesting sending a requests.get() to a html page. If I now print(r.text) the output shows the whole page.
The page has query section in which the request range can be set:

1. Is there a way for me to send the range required?
Then the data gets displayed:

1. Is there a way for me to only return this data?
At the moment, I can see the data in the text that is returned:
<tbody>
```
<tr class="even">
<td>
<input type="checkbox" class="noborder"
name="paths:list" id="cb_1566205447"
value="1566205447"
title="Select Channel 8"
alt="Select Channel 8" />
</td>
<td style="text-align:left">May 31, 2015 11:30 am</td>
<td style="text-align:right">2.28839</td>
</tr>
```
And here is the code returned for the range request:
</select>
</span>
```
<span>:</span>
<span>
<select name="end_query_minute"
id="date_select_form_end_query_None_minute"
size="1"
onchange="update_date_field('date_select_form_end_query_None','date_select_form_end_query_None_year','date_select_form_end_query_None_month','date_select_form_end_query_None_day','date_select_form_end_query_None_hour','date_select_form_end_query_None_minute','date_select_form_end_query_None_ampm')">
<option value="00">--</option>
<option value="00">00</option>
<option value="05">05</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="25">25</option>
<option value="30">30</option>
<option value="35 selected="selected"">35</option>
<option value="40">40</option>
<option value="45">45</option>
<option value="50">50</option>
<option value="55">55</option>
</select>
```
I am guessing that I can set the range using some code that will set the "end_query_minute" (and all other request range variables) and then query the page right after that to return the appropriate range of data. I can then extract the data using another method from the text returned... but I cannot find any relevant documentation on hoe Requests handles data/returns data/etc...
Any help would be highly appreciated.
A big thanks for this development, it has thus far made my life much easier :)
Regards,
| {
"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/2619/reactions"
} | https://api.github.com/repos/psf/requests/issues/2619/timeline | null | completed | null | null | false | [
"So, requests doesn't know anything about HTML. This means there's no programmatic code you can use to simply interact with that page by searching through the HTML.\n\nHowever, you can form the same requests that your browser would do. If you hit F12 in your browser it should bring up a developer console that you c... |
https://api.github.com/repos/psf/requests/issues/2618 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2618/labels{/name} | https://api.github.com/repos/psf/requests/issues/2618/comments | https://api.github.com/repos/psf/requests/issues/2618/events | https://github.com/psf/requests/issues/2618 | 83,270,944 | MDU6SXNzdWU4MzI3MDk0NA== | 2,618 | get url redirect hangs in requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/3759816?v=4",
"events_url": "https://api.github.com/users/gengjiawen/events{/privacy}",
"followers_url": "https://api.github.com/users/gengjiawen/followers",
"following_url": "https://api.github.com/users/gengjiawen/following{/other_user}",
"gists_url": "https://api.github.com/users/gengjiawen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gengjiawen",
"id": 3759816,
"login": "gengjiawen",
"node_id": "MDQ6VXNlcjM3NTk4MTY=",
"organizations_url": "https://api.github.com/users/gengjiawen/orgs",
"received_events_url": "https://api.github.com/users/gengjiawen/received_events",
"repos_url": "https://api.github.com/users/gengjiawen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gengjiawen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gengjiawen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gengjiawen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-06-01T02:23:52Z | 2021-09-08T23:04:44Z | 2015-06-02T01:08:05Z | NONE | resolved | I am trying to handle url redirect using requests,but it hangs.The original python lib works as expected.Below is the code(**Python 3**).
``` python
import urllib.request
import requests
url = "http://go.microsoft.com/fwlink/p/?LinkId=522148"
final_url = urllib.request.urlopen(url)
print(final_url.geturl())
r = requests.get(url)
print(r.url)
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/3759816?v=4",
"events_url": "https://api.github.com/users/gengjiawen/events{/privacy}",
"followers_url": "https://api.github.com/users/gengjiawen/followers",
"following_url": "https://api.github.com/users/gengjiawen/following{/other_user}",
"gists_url": "https://api.github.com/users/gengjiawen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gengjiawen",
"id": 3759816,
"login": "gengjiawen",
"node_id": "MDQ6VXNlcjM3NTk4MTY=",
"organizations_url": "https://api.github.com/users/gengjiawen/orgs",
"received_events_url": "https://api.github.com/users/gengjiawen/received_events",
"repos_url": "https://api.github.com/users/gengjiawen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gengjiawen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gengjiawen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gengjiawen",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2618/reactions"
} | https://api.github.com/repos/psf/requests/issues/2618/timeline | null | completed | null | null | false | [
"The code below also works fine:\n\n``` python\nr = requests.head('http://github.com', allow_redirects=True)\nprint(r.url)\n```\n\nshould I use **requests.head** over **requests.get** when handling url redirect?\n",
"@gengjiawen This URL redirects to a 4GB big ISO image. So the download takes a little bit.\nYou p... |
https://api.github.com/repos/psf/requests/issues/2617 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2617/labels{/name} | https://api.github.com/repos/psf/requests/issues/2617/comments | https://api.github.com/repos/psf/requests/issues/2617/events | https://github.com/psf/requests/pull/2617 | 82,033,090 | MDExOlB1bGxSZXF1ZXN0MzY0MjkyODM= | 2,617 | Move native string conversion to 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 | {
"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"
} | [
{
"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}... | {
"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"
} | 11 | 2015-05-28T17:09:51Z | 2021-09-08T07:00:50Z | 2015-07-18T15:43:50Z | MEMBER | resolved | This fixes #2613. I believe that this technically constitutes a backward-incompatible API change, so I've proposed this against 3.0.0. Let me know if you disagree @sigmavirus24 (the other option is really that this is a bugfix), and I'll propose against master.
| {
"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/2617/reactions"
} | https://api.github.com/repos/psf/requests/issues/2617/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2617.diff",
"html_url": "https://github.com/psf/requests/pull/2617",
"merged_at": "2015-07-18T15:43:50Z",
"patch_url": "https://github.com/psf/requests/pull/2617.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2617"
} | true | [
"hehehe The tests are trying to pass `None` as a method. We should either change that default or fix the tests.\n",
"Grr.\n",
"Stupid question: Why default to an empty string if method is None? I'm not entirely comfortable with that\n",
"Yeah, it was definitely a bit of a blind shot. A better idea might just ... |
https://api.github.com/repos/psf/requests/issues/2616 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2616/labels{/name} | https://api.github.com/repos/psf/requests/issues/2616/comments | https://api.github.com/repos/psf/requests/issues/2616/events | https://github.com/psf/requests/issues/2616 | 81,839,555 | MDU6SXNzdWU4MTgzOTU1NQ== | 2,616 | requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:600) | {
"avatar_url": "https://avatars.githubusercontent.com/u/1203138?v=4",
"events_url": "https://api.github.com/users/kristjanr/events{/privacy}",
"followers_url": "https://api.github.com/users/kristjanr/followers",
"following_url": "https://api.github.com/users/kristjanr/following{/other_user}",
"gists_url": "https://api.github.com/users/kristjanr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kristjanr",
"id": 1203138,
"login": "kristjanr",
"node_id": "MDQ6VXNlcjEyMDMxMzg=",
"organizations_url": "https://api.github.com/users/kristjanr/orgs",
"received_events_url": "https://api.github.com/users/kristjanr/received_events",
"repos_url": "https://api.github.com/users/kristjanr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kristjanr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kristjanr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kristjanr",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 21 | 2015-05-28T09:09:15Z | 2021-09-08T05:00:48Z | 2015-05-31T12:51:52Z | NONE | resolved | ```
r = requests.get('https://www.digitist.com', verify=False)
```
```
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:600)
```
I am using Python 3.4 on OSX Yosemite
| {
"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/2616/reactions"
} | https://api.github.com/repos/psf/requests/issues/2616/timeline | null | completed | null | null | false | [
"Python 3.4, OS X Yosemite, Requests 2.7.0: I cannot reproduce this bug. =) Can you consistently hit it? What requests version are you using?\n",
"Also, what version of openssl and do you have `pyOpenSSL` installed?\n",
"requests 2.7.0\nOpenSSL 1.0.2 22 Jan 2015\nI did not have pyOpenSSL installed.\n\nI install... |
https://api.github.com/repos/psf/requests/issues/2615 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2615/labels{/name} | https://api.github.com/repos/psf/requests/issues/2615/comments | https://api.github.com/repos/psf/requests/issues/2615/events | https://github.com/psf/requests/pull/2615 | 80,957,978 | MDExOlB1bGxSZXF1ZXN0MzYyMDExMTM= | 2,615 | Docs: Add more section labels for referencing | {
"avatar_url": "https://avatars.githubusercontent.com/u/3237256?v=4",
"events_url": "https://api.github.com/users/awiddersheim/events{/privacy}",
"followers_url": "https://api.github.com/users/awiddersheim/followers",
"following_url": "https://api.github.com/users/awiddersheim/following{/other_user}",
"gists_url": "https://api.github.com/users/awiddersheim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/awiddersheim",
"id": 3237256,
"login": "awiddersheim",
"node_id": "MDQ6VXNlcjMyMzcyNTY=",
"organizations_url": "https://api.github.com/users/awiddersheim/orgs",
"received_events_url": "https://api.github.com/users/awiddersheim/received_events",
"repos_url": "https://api.github.com/users/awiddersheim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/awiddersheim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/awiddersheim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/awiddersheim",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-05-26T13:17:17Z | 2021-09-08T07:00:56Z | 2015-05-26T14:12:33Z | CONTRIBUTOR | resolved | Allows for sections to be linked from other projects using Intersphinx.
| {
"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/2615/reactions"
} | https://api.github.com/repos/psf/requests/issues/2615/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2615.diff",
"html_url": "https://github.com/psf/requests/pull/2615",
"merged_at": "2015-05-26T14:12:33Z",
"patch_url": "https://github.com/psf/requests/pull/2615.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2615"
} | true | [
"No objection from me: @sigmavirus24?\n",
":+1: \n",
"Thanks @awiddersheim! :sparkles: :cake: :sparkles: \n"
] |
https://api.github.com/repos/psf/requests/issues/2614 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2614/labels{/name} | https://api.github.com/repos/psf/requests/issues/2614/comments | https://api.github.com/repos/psf/requests/issues/2614/events | https://github.com/psf/requests/pull/2614 | 80,668,713 | MDExOlB1bGxSZXF1ZXN0MzYxNTc5MjE= | 2,614 | fix unittest typo | {
"avatar_url": "https://avatars.githubusercontent.com/u/739280?v=4",
"events_url": "https://api.github.com/users/colindickson/events{/privacy}",
"followers_url": "https://api.github.com/users/colindickson/followers",
"following_url": "https://api.github.com/users/colindickson/following{/other_user}",
"gists_url": "https://api.github.com/users/colindickson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/colindickson",
"id": 739280,
"login": "colindickson",
"node_id": "MDQ6VXNlcjczOTI4MA==",
"organizations_url": "https://api.github.com/users/colindickson/orgs",
"received_events_url": "https://api.github.com/users/colindickson/received_events",
"repos_url": "https://api.github.com/users/colindickson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/colindickson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/colindickson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/colindickson",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-25T21:10:37Z | 2021-09-08T07:00:56Z | 2015-05-26T19:56:18Z | CONTRIBUTOR | resolved | IDE auto-complete error.
edit: edited to be a bit more pythonic
| {
"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/2614/reactions"
} | https://api.github.com/repos/psf/requests/issues/2614/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2614.diff",
"html_url": "https://github.com/psf/requests/pull/2614",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2614.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2614"
} | true | [
"@colindickson Thanks for this! Rather than merge two identically named commits and a merge commit I rebased them down into fd31453aa25f80f04e1ce36de9abff0460bd136a, and merged it in 8b5e457b756b2ab4c02473f7a42c2e0201ecc7e9.\n\nThanks again! :cake: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/2613 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2613/labels{/name} | https://api.github.com/repos/psf/requests/issues/2613/comments | https://api.github.com/repos/psf/requests/issues/2613/events | https://github.com/psf/requests/issues/2613 | 80,666,973 | MDU6SXNzdWU4MDY2Njk3Mw== | 2,613 | Prepared requests containing binary files will not send when unicode_literals is imported | {
"avatar_url": "https://avatars.githubusercontent.com/u/48100?v=4",
"events_url": "https://api.github.com/users/bboe/events{/privacy}",
"followers_url": "https://api.github.com/users/bboe/followers",
"following_url": "https://api.github.com/users/bboe/following{/other_user}",
"gists_url": "https://api.github.com/users/bboe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bboe",
"id": 48100,
"login": "bboe",
"node_id": "MDQ6VXNlcjQ4MTAw",
"organizations_url": "https://api.github.com/users/bboe/orgs",
"received_events_url": "https://api.github.com/users/bboe/received_events",
"repos_url": "https://api.github.com/users/bboe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bboe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bboe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bboe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-05-25T21:02:58Z | 2021-09-08T22:00:54Z | 2015-08-31T09:33:34Z | CONTRIBUTOR | resolved | ``` python
#!/usr/bin/env python
from __future__ import unicode_literals
import requests
import sys
def main():
request = requests.Request(method='PUT', url='https://httpbin.org/put')
with open(sys.argv[1], 'rb') as fp:
request.files = {'hello': fp}
prepared = request.prepare()
requests.Session().send(prepared)
if __name__ == '__main__':
sys.exit(main())
```
The above program works perfectly in python3, and in python2 when `unicode_literals` is not imported. If the request isn't prepared it works without a problem unfortunately, I require both prepared requests and `unicode_literals` in my project.
The exception raised is:
``````
Traceback (most recent call last):
File "./test.py", line 15, in <module>
sys.exit(main())
File "./test.py", line 12, in main
requests.Session().send(prepared)
File "/Users/bboe/.venv/p27/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Users/bboe/.venv/p27/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/adapters.py", line 370, in send
timeout=timeout
File "/Users/bboe/.venv/p27/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/Users/bboe/.venv/p27/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 349, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 848, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 109: ordinal not in range(128)```
``````
| {
"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/2613/reactions"
} | https://api.github.com/repos/psf/requests/issues/2613/timeline | null | completed | null | null | false | [
"Unfortunately this is a bit of a limitation imposed on us by httplib. As you can see, the place where unicode and bytes are concatenated together is actually deep inside httplib. I'm afraid you'll have to pass bytestrings to requests.\n",
"Can you explain why it works fine when the request isn't prepared? That s... |
https://api.github.com/repos/psf/requests/issues/2612 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2612/labels{/name} | https://api.github.com/repos/psf/requests/issues/2612/comments | https://api.github.com/repos/psf/requests/issues/2612/events | https://github.com/psf/requests/issues/2612 | 80,359,825 | MDU6SXNzdWU4MDM1OTgyNQ== | 2,612 | strange behavior with PostData - Set Cookie Header in Oracle Server | {
"avatar_url": "https://avatars.githubusercontent.com/u/3330998?v=4",
"events_url": "https://api.github.com/users/nguaman/events{/privacy}",
"followers_url": "https://api.github.com/users/nguaman/followers",
"following_url": "https://api.github.com/users/nguaman/following{/other_user}",
"gists_url": "https://api.github.com/users/nguaman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nguaman",
"id": 3330998,
"login": "nguaman",
"node_id": "MDQ6VXNlcjMzMzA5OTg=",
"organizations_url": "https://api.github.com/users/nguaman/orgs",
"received_events_url": "https://api.github.com/users/nguaman/received_events",
"repos_url": "https://api.github.com/users/nguaman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nguaman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nguaman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nguaman",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-05-25T02:59:20Z | 2021-09-08T22:00:53Z | 2015-08-31T09:35:52Z | NONE | resolved | Hello!
First of all, thanks for this lib!
Sorry for my english.
well, I already solve this, but I just want to make the report about an issue I found.
I am trying to make a simple login to a website (with all the headers, with session, etc)
Server where i am trying to send the request is an Oracle XML DB/Oracle Database Oracle-Web-Cache-11g/11.1.1.6.0
I use httpliveheader to see the log networking, I use all the headers!
Example :
s = requests.Session()
headers = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8',
'Accept-Language': 'es-CL,es;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate',
'Referer': 'http://domain:9090/apex/f?p=102:1',
'Content-Type': 'application/x-www-form-urlencoded',
}
data = { "data":"1",
"data":"2",
}
r1 = s.post('http://www.domain.com:9090/apex/wwv_flow.accept',data=data,allow_redirects=False,headers=headers)
print r1.headers
print(r1.status_code, r1.reason)
I use allow_redirects to see the set-cookie. that is all I want.
but for some reason, this is not working. honestly I dont know why, I dont see the header set-cookie, and the system say, the user and pass are incorrect, and that is wrong, because I can login in firefox with that credentials.
So I use sockets and works.
import socket #for sockets
import sys #for exit
# create an INET, STREAMing socket
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
print 'Failed to create socket'
sys.exit()
print 'Socket Created'
host = 'domain.com';
port = 9090;
try:
remote_ip = socket.gethostbyname( host )
except socket.gaierror:
#could not resolve
print 'Hostname could not be resolved. Exiting'
sys.exit()
# Connect to remote server
s.connect((remote_ip , port))
print 'Socket Connected to ' + host + ' on ip ' + remote_ip
# Send some data to remote server
message = 'POST /apex/wwv_flow.accept HTTP/1.1\r\n'
message += 'Host: domain:9090\r\n'
message += 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0\r\n'
message += 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8\r\n'
message += 'Accept-Language: es-CL,es;q=0.8,en-US;q=0.5,en;q=0.3\r\n'
message += 'Accept-Encoding: gzip, deflate\r\n'
message += 'Referer: http://domain.com/9090/apex/f?p=102:1\r\n'
message += 'Connection: keep-alive\r\n'
message += 'Content-Type: application/x-www-form-urlencoded\r\n'
message += 'Content-Length: LEN\r\n\r\n'
message += 'DATA'
try :
#Set the whole string
s.sendall(message)
except socket.error:
#Send failed
print 'Send failed'
sys.exit()
print 'Message send successfully'
# Now receive data
reply = s.recv(4096)
print reply
and now I receive the header with set-cookie.
maybe this could help to another person.
Regards.
| {
"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/2612/reactions"
} | https://api.github.com/repos/psf/requests/issues/2612/timeline | null | completed | null | null | false | [
"can you use tcpdump or a similar tool to compare the headers generated by requests and your code?\n",
"Hey @Lukasa !\n\nI use this command. (http://justniffer.sourceforge.net/)\nsudo justniffer -i eth0 -r > log_socket.txt\n\nHere is the log related with request:\nhttp://paste2.org/mhZCj2t7\n\nand here is the log... |
https://api.github.com/repos/psf/requests/issues/2611 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2611/labels{/name} | https://api.github.com/repos/psf/requests/issues/2611/comments | https://api.github.com/repos/psf/requests/issues/2611/events | https://github.com/psf/requests/issues/2611 | 80,344,926 | MDU6SXNzdWU4MDM0NDkyNg== | 2,611 | [Bug?] json.dumps(json)? | {
"avatar_url": "https://avatars.githubusercontent.com/u/2705927?v=4",
"events_url": "https://api.github.com/users/maxdandan/events{/privacy}",
"followers_url": "https://api.github.com/users/maxdandan/followers",
"following_url": "https://api.github.com/users/maxdandan/following{/other_user}",
"gists_url": "https://api.github.com/users/maxdandan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maxdandan",
"id": 2705927,
"login": "maxdandan",
"node_id": "MDQ6VXNlcjI3MDU5Mjc=",
"organizations_url": "https://api.github.com/users/maxdandan/orgs",
"received_events_url": "https://api.github.com/users/maxdandan/received_events",
"repos_url": "https://api.github.com/users/maxdandan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maxdandan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maxdandan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maxdandan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-05-25T02:10:39Z | 2021-09-08T23:04:46Z | 2015-05-25T02:53:11Z | NONE | resolved | download from https://pypi.python.org/pypi/requests/2.7.0
models.py
line 418
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/2611/reactions"
} | https://api.github.com/repos/psf/requests/issues/2611/timeline | null | completed | null | null | false | [
"Do you mean https://github.com/kennethreitz/requests/blob/b7bd29734022e634634d908e10bbf7a5ac15e76b/requests/models.py#L428 ? If so, no.\n",
"Yes,“json_dump” is True\nBut in kennethreitz-requests-v2.7.0-8-g4505f71.zip there is “json.dumps”\nFixed right now\nTks :) \n",
"There is no such file on PyPI. If yo... |
https://api.github.com/repos/psf/requests/issues/2610 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2610/labels{/name} | https://api.github.com/repos/psf/requests/issues/2610/comments | https://api.github.com/repos/psf/requests/issues/2610/events | https://github.com/psf/requests/pull/2610 | 80,170,358 | MDExOlB1bGxSZXF1ZXN0MzYxMDMwMjM= | 2,610 | fix contextlib.closing bug for sessions where content is not consumed… | {
"avatar_url": "https://avatars.githubusercontent.com/u/739280?v=4",
"events_url": "https://api.github.com/users/colindickson/events{/privacy}",
"followers_url": "https://api.github.com/users/colindickson/followers",
"following_url": "https://api.github.com/users/colindickson/following{/other_user}",
"gists_url": "https://api.github.com/users/colindickson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/colindickson",
"id": 739280,
"login": "colindickson",
"node_id": "MDQ6VXNlcjczOTI4MA==",
"organizations_url": "https://api.github.com/users/colindickson/orgs",
"received_events_url": "https://api.github.com/users/colindickson/received_events",
"repos_url": "https://api.github.com/users/colindickson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/colindickson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/colindickson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/colindickson",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-05-24T14:01:17Z | 2021-09-08T07:00:57Z | 2015-05-25T17:15:57Z | CONTRIBUTOR | resolved | … (issue #2593)
| {
"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/2610/reactions"
} | https://api.github.com/repos/psf/requests/issues/2610/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2610.diff",
"html_url": "https://github.com/psf/requests/pull/2610",
"merged_at": "2015-05-25T17:15:57Z",
"patch_url": "https://github.com/psf/requests/pull/2610.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2610"
} | true | [
"Why are you making 25 requests to three websites that we don't use anywhere else in the test suite?\n",
"mainly as an attempt to reproduce the bug demonstrated in the original issue. i suppose i could simplify it a great deal\n",
"Please don't create a new pull request. If you continue to push commits to thi... |
https://api.github.com/repos/psf/requests/issues/2609 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2609/labels{/name} | https://api.github.com/repos/psf/requests/issues/2609/comments | https://api.github.com/repos/psf/requests/issues/2609/events | https://github.com/psf/requests/issues/2609 | 78,970,053 | MDU6SXNzdWU3ODk3MDA1Mw== | 2,609 | Memory Leak | {
"avatar_url": "https://avatars.githubusercontent.com/u/6700330?v=4",
"events_url": "https://api.github.com/users/030io/events{/privacy}",
"followers_url": "https://api.github.com/users/030io/followers",
"following_url": "https://api.github.com/users/030io/following{/other_user}",
"gists_url": "https://api.github.com/users/030io/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/030io",
"id": 6700330,
"login": "030io",
"node_id": "MDQ6VXNlcjY3MDAzMzA=",
"organizations_url": "https://api.github.com/users/030io/orgs",
"received_events_url": "https://api.github.com/users/030io/received_events",
"repos_url": "https://api.github.com/users/030io/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/030io/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/030io/subscriptions",
"type": "User",
"url": "https://api.github.com/users/030io",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 24 | 2015-05-21T12:16:26Z | 2021-09-08T21:00:48Z | 2015-11-05T18:02:43Z | NONE | resolved | ### I just started applications

---
### After 24h

| {
"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/2609/reactions"
} | https://api.github.com/repos/psf/requests/issues/2609/timeline | null | completed | null | null | false | [
"At the beginning, the memory usage is 32MB.\nAfter 24h, the memory usage is 1.2G.\n",
"Unfortunately, this 'leak' is somewhat unclear. Can you reduce this to a single bit of reproducible code for me to see?\n",
"Sorry.\nMy code is very simple.\n\nLike:\n\n```\nclass GetHtml():\n ...\n def get(self, heade... |
https://api.github.com/repos/psf/requests/issues/2608 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2608/labels{/name} | https://api.github.com/repos/psf/requests/issues/2608/comments | https://api.github.com/repos/psf/requests/issues/2608/events | https://github.com/psf/requests/pull/2608 | 78,757,189 | MDExOlB1bGxSZXF1ZXN0MzU4ODk4MTk= | 2,608 | Fixed typos | {
"avatar_url": "https://avatars.githubusercontent.com/u/3112309?v=4",
"events_url": "https://api.github.com/users/radarhere/events{/privacy}",
"followers_url": "https://api.github.com/users/radarhere/followers",
"following_url": "https://api.github.com/users/radarhere/following{/other_user}",
"gists_url": "https://api.github.com/users/radarhere/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/radarhere",
"id": 3112309,
"login": "radarhere",
"node_id": "MDQ6VXNlcjMxMTIzMDk=",
"organizations_url": "https://api.github.com/users/radarhere/orgs",
"received_events_url": "https://api.github.com/users/radarhere/received_events",
"repos_url": "https://api.github.com/users/radarhere/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/radarhere/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/radarhere/subscriptions",
"type": "User",
"url": "https://api.github.com/users/radarhere",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-21T00:26:12Z | 2021-09-08T07:00:57Z | 2015-05-21T08:16:24Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2608/reactions"
} | https://api.github.com/repos/psf/requests/issues/2608/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2608.diff",
"html_url": "https://github.com/psf/requests/pull/2608",
"merged_at": "2015-05-21T08:16:24Z",
"patch_url": "https://github.com/psf/requests/pull/2608.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2608"
} | true | [
"\\o/ Thanks @radarhere! :cake: :sparkles:\n"
] | |
https://api.github.com/repos/psf/requests/issues/2607 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2607/labels{/name} | https://api.github.com/repos/psf/requests/issues/2607/comments | https://api.github.com/repos/psf/requests/issues/2607/events | https://github.com/psf/requests/issues/2607 | 78,148,003 | MDU6SXNzdWU3ODE0ODAwMw== | 2,607 | UnicodeDecodeError when post a local image file | {
"avatar_url": "https://avatars.githubusercontent.com/u/546163?v=4",
"events_url": "https://api.github.com/users/shelper/events{/privacy}",
"followers_url": "https://api.github.com/users/shelper/followers",
"following_url": "https://api.github.com/users/shelper/following{/other_user}",
"gists_url": "https://api.github.com/users/shelper/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelper",
"id": 546163,
"login": "shelper",
"node_id": "MDQ6VXNlcjU0NjE2Mw==",
"organizations_url": "https://api.github.com/users/shelper/orgs",
"received_events_url": "https://api.github.com/users/shelper/received_events",
"repos_url": "https://api.github.com/users/shelper/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelper/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelper/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelper",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-19T16:01:08Z | 2021-09-08T23:04:46Z | 2015-05-19T16:31:47Z | NONE | resolved | i am using python 3.4, and request 2.7
i am trying to post a local jpg image like this, and got encoding error:
```
import requests
response = requests.post("url here",
params={
"image": open("path to local image", mode="r")
}
)
```
if i change the mode to 'rb' the error is gone:
```
import requests
response = requests.post("url here",
params={
"image": open("path to local image", mode="rb")
}
)
```
the error details are listed below:
'Traceback (most recent call last):
File "test_facemark.py", line 7, in <module>
"image": open("path to the jpg file", mode="r")
File "c:\python34\lib\site-packages\requests\api.py", line 109, in post
return request('post', url, data=data, json=json, *_kwargs)
File "c:\python34\lib\site-packages\requests\api.py", line 50, in reques response = session.request(method=method, url=url, *_kwargs)
File "c:\python34\lib\site-packages\requests\sessions.py", line 451, in
t
prep = self.prepare_request(req)
File "c:\python34\lib\site-packages\requests\sessions.py", line 382, in
e_request
hooks=merge_hooks(request.hooks, self.hooks),
File "c:\python34\lib\site-packages\requests\models.py", line 304, in pr self.prepare_url(url, params)
File "c:\python34\lib\site-packages\requests\models.py", line 397, in prurl
enc_params = self._encode_params(params)
File "c:\python34\lib\site-packages\requests\models.py", line 92, in _enarams
for v in vs:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xff in position 0: illeltibyte sequence'
| {
"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/2607/reactions"
} | https://api.github.com/repos/psf/requests/issues/2607/timeline | null | completed | null | null | false | [
"In Python 3, if you open a file in `'r'` mode, that will open the file in _text_ mode. This means that Python will attempt to use your system encoding to decode the bytes in the file. That is causing this exception here.\n\nWhen uploading binary data to the web, you should always open the file in bytes mode: `'rb'... |
https://api.github.com/repos/psf/requests/issues/2606 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2606/labels{/name} | https://api.github.com/repos/psf/requests/issues/2606/comments | https://api.github.com/repos/psf/requests/issues/2606/events | https://github.com/psf/requests/pull/2606 | 78,084,605 | MDExOlB1bGxSZXF1ZXN0MzU3MjkwNDE= | 2,606 | Don’t break IPv6 address format | {
"avatar_url": "https://avatars.githubusercontent.com/u/1102886?v=4",
"events_url": "https://api.github.com/users/da2x/events{/privacy}",
"followers_url": "https://api.github.com/users/da2x/followers",
"following_url": "https://api.github.com/users/da2x/following{/other_user}",
"gists_url": "https://api.github.com/users/da2x/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/da2x",
"id": 1102886,
"login": "da2x",
"node_id": "MDQ6VXNlcjExMDI4ODY=",
"organizations_url": "https://api.github.com/users/da2x/orgs",
"received_events_url": "https://api.github.com/users/da2x/received_events",
"repos_url": "https://api.github.com/users/da2x/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/da2x/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/da2x/subscriptions",
"type": "User",
"url": "https://api.github.com/users/da2x",
"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"
}
] | closed | true | null | [] | null | 1 | 2015-05-19T13:20:55Z | 2021-09-08T07:00:57Z | 2015-05-19T13:26:58Z | NONE | resolved | No idea what this does to older supported Python versions. In Python 3.4.2, at least, you can’t strip away the brackets otherwise no IPv6 address will resolve.
| {
"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/2606/reactions"
} | https://api.github.com/repos/psf/requests/issues/2606/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2606.diff",
"html_url": "https://github.com/psf/requests/pull/2606",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2606.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2606"
} | true | [
"Thanks for this!\n\nTwo notes. First, this is a change in [urllib3](https://github.com/shazow/urllib3), please open this pull request on that repository. Secondly, given the comment above I don't think we can unilaterally remove this logic. Likely we'll have to detect what versions are affected.\n"
] |
https://api.github.com/repos/psf/requests/issues/2605 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2605/labels{/name} | https://api.github.com/repos/psf/requests/issues/2605/comments | https://api.github.com/repos/psf/requests/issues/2605/events | https://github.com/psf/requests/issues/2605 | 77,701,599 | MDU6SXNzdWU3NzcwMTU5OQ== | 2,605 | ENH: Session constructor should acccept kwargs as well, not just its get, post... methods | {
"avatar_url": "https://avatars.githubusercontent.com/u/3160562?v=4",
"events_url": "https://api.github.com/users/dr-leo/events{/privacy}",
"followers_url": "https://api.github.com/users/dr-leo/followers",
"following_url": "https://api.github.com/users/dr-leo/following{/other_user}",
"gists_url": "https://api.github.com/users/dr-leo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dr-leo",
"id": 3160562,
"login": "dr-leo",
"node_id": "MDQ6VXNlcjMxNjA1NjI=",
"organizations_url": "https://api.github.com/users/dr-leo/orgs",
"received_events_url": "https://api.github.com/users/dr-leo/received_events",
"repos_url": "https://api.github.com/users/dr-leo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dr-leo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dr-leo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dr-leo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-05-18T15:33:07Z | 2021-09-08T23:04:46Z | 2015-05-18T17:00:36Z | NONE | resolved | The documentation states that things like proxies, auth etc. can be set through the Session properties. That's fine, but leads to verbose code: Setting those properties when you have a kwargs dict requires a for loop and call to setattr() on each item.
Why not allow the following:
s = requests.Session(stream=True, proxies=myproxies)
or
s=requests.Session(**myhttp_config)
Am I 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/2605/reactions"
} | https://api.github.com/repos/psf/requests/issues/2605/timeline | null | completed | null | null | false | [
"Removing the arguments to the `Session` constructor was a deliberate decision made by @kennethreitz in 92355ada54a3a19341f7fbc65a8bc50816858c63. In this issue I cannot pretend to speak for him, but I believe in his view this was done for cleanliness (which seems reasonable to me). We have no plans to change that p... |
https://api.github.com/repos/psf/requests/issues/2604 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2604/labels{/name} | https://api.github.com/repos/psf/requests/issues/2604/comments | https://api.github.com/repos/psf/requests/issues/2604/events | https://github.com/psf/requests/issues/2604 | 77,360,557 | MDU6SXNzdWU3NzM2MDU1Nw== | 2,604 | SSL Error 14077438 | {
"avatar_url": "https://avatars.githubusercontent.com/u/12233053?v=4",
"events_url": "https://api.github.com/users/sergedroz/events{/privacy}",
"followers_url": "https://api.github.com/users/sergedroz/followers",
"following_url": "https://api.github.com/users/sergedroz/following{/other_user}",
"gists_url": "https://api.github.com/users/sergedroz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sergedroz",
"id": 12233053,
"login": "sergedroz",
"node_id": "MDQ6VXNlcjEyMjMzMDUz",
"organizations_url": "https://api.github.com/users/sergedroz/orgs",
"received_events_url": "https://api.github.com/users/sergedroz/received_events",
"repos_url": "https://api.github.com/users/sergedroz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sergedroz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sergedroz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sergedroz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-05-17T18:03:28Z | 2021-09-08T23:04:47Z | 2015-05-17T20:58:14Z | NONE | resolved | Certain cloudflare websites cannot be access with requests. I have dis problem across different distros. Same problem here: https://github.com/SiCKRAGETV/sickrage-issues/issues/1231
requests.get('https://sceneaccess.eu')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "requests/api.py", line 69, in get
return request('get', url, params=params, *_kwargs)
File "requests/api.py", line 50, in request
response = session.request(method=method, url=url, *_kwargs)
File "requests/sessions.py", line 465, in request
resp = self.send(prep, *_send_kwargs)
File "requests/sessions.py", line 573, in send
r = adapter.send(request, *_kwargs)
File "requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2604/reactions"
} | https://api.github.com/repos/psf/requests/issues/2604/timeline | null | completed | null | null | false | [
"Where have you installed requests from, and what versions do you have installed?\n",
"This is likely because you're linked against an old version of OpenSSL. Can you run this for me and show me the output?\n\n``` bash\npython -c 'from cryptography.hazmat.backends.openssl.backend import backend; print backend.ope... |
https://api.github.com/repos/psf/requests/issues/2603 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2603/labels{/name} | https://api.github.com/repos/psf/requests/issues/2603/comments | https://api.github.com/repos/psf/requests/issues/2603/events | https://github.com/psf/requests/pull/2603 | 76,451,587 | MDExOlB1bGxSZXF1ZXN0MzU0NDg4ODA= | 2,603 | Change "Staring new HTTP/S connection..." log message to DEBUG level | {
"avatar_url": "https://avatars.githubusercontent.com/u/3641285?v=4",
"events_url": "https://api.github.com/users/goodboybeau/events{/privacy}",
"followers_url": "https://api.github.com/users/goodboybeau/followers",
"following_url": "https://api.github.com/users/goodboybeau/following{/other_user}",
"gists_url": "https://api.github.com/users/goodboybeau/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/goodboybeau",
"id": 3641285,
"login": "goodboybeau",
"node_id": "MDQ6VXNlcjM2NDEyODU=",
"organizations_url": "https://api.github.com/users/goodboybeau/orgs",
"received_events_url": "https://api.github.com/users/goodboybeau/received_events",
"repos_url": "https://api.github.com/users/goodboybeau/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/goodboybeau/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/goodboybeau/subscriptions",
"type": "User",
"url": "https://api.github.com/users/goodboybeau",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-05-14T18:40:11Z | 2021-09-08T07:00:58Z | 2015-05-14T18:42:16Z | NONE | resolved | Of course there are ways to work around this on a per-execution basis (programmatically or manually), but I figured I'd address what I've heard from various developers as "the only annoying thing about python requests".
| {
"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/2603/reactions"
} | https://api.github.com/repos/psf/requests/issues/2603/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2603.diff",
"html_url": "https://github.com/psf/requests/pull/2603",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2603.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2603"
} | true | [
"This is a change to urllib3 and so belongs on [urllib3](/shazow/urllib3)\n",
"Ah, thanks...\n"
] |
https://api.github.com/repos/psf/requests/issues/2602 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2602/labels{/name} | https://api.github.com/repos/psf/requests/issues/2602/comments | https://api.github.com/repos/psf/requests/issues/2602/events | https://github.com/psf/requests/pull/2602 | 76,318,369 | MDExOlB1bGxSZXF1ZXN0MzU0MTEzMzQ= | 2,602 | morsel['max-age'] may be a str. Should it be converted to float? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1551736?v=4",
"events_url": "https://api.github.com/users/ly0/events{/privacy}",
"followers_url": "https://api.github.com/users/ly0/followers",
"following_url": "https://api.github.com/users/ly0/following{/other_user}",
"gists_url": "https://api.github.com/users/ly0/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ly0",
"id": 1551736,
"login": "ly0",
"node_id": "MDQ6VXNlcjE1NTE3MzY=",
"organizations_url": "https://api.github.com/users/ly0/orgs",
"received_events_url": "https://api.github.com/users/ly0/received_events",
"repos_url": "https://api.github.com/users/ly0/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ly0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ly0/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ly0",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2015-05-14T10:45:17Z | 2021-09-08T07:00:58Z | 2015-05-15T15:14:56Z | CONTRIBUTOR | resolved | Example:
here are Set-Cookie list:
``` python
sclst = ['dwac_bcIBMiaagZmkYaaadeYtg11eVR=j9jHdmPjUhgDOhyH9f89X4lQgehEmflVyeA%3D|dw-only|||CNY|false|Asia%2FShanghai|true; Path=/',
'sid=j9jHdmPjUhgDOhyH9f89X4lQgehEmflVyeA; Path=/',
'geoLocation=CN; Path=/',
'dwpersonalization_fae107a9dd0fc32ed99532ec1977f31f=bc8sEiaagZqRsaaadk8XoNTL8h20150506; Expires=Sun, 14-Jun-2015 10:37:07 GMT; Path=/',
'dwanonymous_fae107a9dd0fc32ed99532ec1977f31f=abjpA8kng31LjPp8ZEERDT4XVg; Version=1; Comment="Demandware anonymous cookie for site Sites-abercrombie_cn-Site"; Max-Age=15552000; Expires=Tue, 10-Nov-2015 10:37:07 GMT; Path=/',
'myStore=91156; Path=/',
'AF_PREF=en_CN; Path=/',
'dwsid=MiHJy3KYZKDcN0lZg4HS1zSpj1VV4s_tFu39ar0KXNpAx9aX8X2LlvZQ9m5fOOknb6QXtmmukHcOjmivYf31hg==; path=/; HttpOnly']
```
``` python
for sc in sclst:
C = Cookie.SimpleCookie(sc)
for morsel in C.values():
cookie = requests.cookies.morsel_to_cookie(morsel)
cookiejar.set_cookie(cookie)
```
Then, exception occured
``` shell
File "/Library/Python/2.7/site-packages/requests/cookies.py", line 402, in morsel_to_cookie
expires = time.time() + morsel['max-age']
TypeError: unsupported operand type(s) for +: 'float' and 'str'
```
As Cookie.SimpleCookie is in STL, should `morsel_to_cookie` check the type of `max-age`? On the other hand, if **max-age** can not be converted to float, it's illegal obviously.
| {
"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/2602/reactions"
} | https://api.github.com/repos/psf/requests/issues/2602/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2602.diff",
"html_url": "https://github.com/psf/requests/pull/2602",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2602.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2602"
} | true | [
"I think you're using `morsel_to_cookie` incorrectly. It expects a `Cookie.Morsel`. Did you try that to see if it works?\n",
"It's a `Cookie.Morsel` object.\n\nhere's the test code from real world:\n\n``` python\nimport Cookie\nimport requests\n\ncookiejar = requests.cookies.RequestsCookieJar()\nsclst = ['dwac_bc... |
https://api.github.com/repos/psf/requests/issues/2601 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2601/labels{/name} | https://api.github.com/repos/psf/requests/issues/2601/comments | https://api.github.com/repos/psf/requests/issues/2601/events | https://github.com/psf/requests/pull/2601 | 76,249,293 | MDExOlB1bGxSZXF1ZXN0MzUzOTY3NzI= | 2,601 | Auth handler calls close instead of raw.close_conn | {
"avatar_url": "https://avatars.githubusercontent.com/u/5676959?v=4",
"events_url": "https://api.github.com/users/sahutd/events{/privacy}",
"followers_url": "https://api.github.com/users/sahutd/followers",
"following_url": "https://api.github.com/users/sahutd/following{/other_user}",
"gists_url": "https://api.github.com/users/sahutd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sahutd",
"id": 5676959,
"login": "sahutd",
"node_id": "MDQ6VXNlcjU2NzY5NTk=",
"organizations_url": "https://api.github.com/users/sahutd/orgs",
"received_events_url": "https://api.github.com/users/sahutd/received_events",
"repos_url": "https://api.github.com/users/sahutd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sahutd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sahutd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sahutd",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-05-14T06:13:53Z | 2021-09-08T07:00:59Z | 2015-05-14T06:15:10Z | CONTRIBUTOR | resolved | Issue #2599
| {
"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/2601/reactions"
} | https://api.github.com/repos/psf/requests/issues/2601/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2601.diff",
"html_url": "https://github.com/psf/requests/pull/2601",
"merged_at": "2015-05-14T06:15:10Z",
"patch_url": "https://github.com/psf/requests/pull/2601.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2601"
} | true | [
"\\o/\n",
"thanks for this! :cake: :sparkles: \n"
] |
https://api.github.com/repos/psf/requests/issues/2600 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2600/labels{/name} | https://api.github.com/repos/psf/requests/issues/2600/comments | https://api.github.com/repos/psf/requests/issues/2600/events | https://github.com/psf/requests/issues/2600 | 76,221,981 | MDU6SXNzdWU3NjIyMTk4MQ== | 2,600 | requests silently sends second request and drops first response (auth in use) | {
"avatar_url": "https://avatars.githubusercontent.com/u/656957?v=4",
"events_url": "https://api.github.com/users/sawall/events{/privacy}",
"followers_url": "https://api.github.com/users/sawall/followers",
"following_url": "https://api.github.com/users/sawall/following{/other_user}",
"gists_url": "https://api.github.com/users/sawall/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sawall",
"id": 656957,
"login": "sawall",
"node_id": "MDQ6VXNlcjY1Njk1Nw==",
"organizations_url": "https://api.github.com/users/sawall/orgs",
"received_events_url": "https://api.github.com/users/sawall/received_events",
"repos_url": "https://api.github.com/users/sawall/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sawall/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sawall/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sawall",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-05-14T04:08:07Z | 2021-09-08T23:04:47Z | 2015-05-14T05:10:05Z | NONE | resolved | = short version =
When I am using a param and auth with `requests.get()`, `requests` appears to send a second request silently that's missing the param and then shows me the second response when i look at `response.text`.
= long version, with example and dumps =
I've been using requests to play a game. One level involved adding a param to a GET request in order to see hidden content on the webpage. This works fine with curl:
`curl --user natas22:chG9fbe1Tq2eWVMgjYYD1MsfIvN461kJ "http://natas22.natas.labs.overthewire.org/?revelio"`
Strangely, when I try something similar in requests I don't see the same response html text:
```
auth = ('natas22', 'chG9fbe1Tq2eWVMgjYYD1MsfIvN461kJ')
site = 'http://natas22.natas.labs.overthewire.org/?revelio'
r=requests.get(site,auth=auth)
r.text
```
After scanning with tcpdump, it appears that requests is getting the correct response, but then it interacts with the server a second time for some reason. During that second interaction requests fails to send the URL param.
Initial request:
```
22:59:10.459925 IP (tos 0x0, ttl 64, id 27245, offset 0, flags [DF], proto TCP (6), length 331)
XXXXXX.58647 > melinda.labs.overthewire.org.http: Flags [P.], cksum 0x6cdb (correct), seq 1:280, ack 1, win 4117, options [nop,nop,TS val 377042043 ecr 980610639], length 279
..{...|.......E..Kjm@.@......o.O.....P_.).3.......l......
.y4{:r.OGET /?revelio HTTP/1.1
Host: natas22.natas.labs.overthewire.org
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Basic bmF0YXMyMjpjaEc5ZmJlMVRxMmVXVk1nallZRDFNc2ZJdk40NjFrSg==
User-Agent: python-requests/2.7.0 CPython/2.7.9 Darwin/14.3.0
```
Initial successful response that I never see from the interpreter:
```
22:59:10.579617 IP (tos 0x0, ttl 53, id 61399, offset 0, flags [DF], proto TCP (6), length 1500)
melinda.labs.overthewire.org.http > XXXXXX.58647: Flags [.], cksum 0xed92 (correct), seq 1:1449, ack 280, win 235, options [nop,nop,TS val 980610675 ecr 377042043], length 1448
|.......{.....E.....@.5.T..O.....o.P..3..._.+............
:r.s.y4{HTTP/1.1 302 Found
Date: Thu, 14 May 2015 03:59:10 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Set-Cookie: PHPSESSID=p6ls9fd6jqaveoha3vc4kav7g0; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: /
Content-Length: 1049
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
<html>
[html page that I want]
```
Unlike curl, after this `requests` immediately sends some traffic back for reasons that are unclear to me. Note the `r.sGET / HTTP/1.1` line is missing the revelio param:
```
22:59:10.579704 IP (tos 0x0, ttl 64, id 53914, offset 0, flags [DF], proto TCP (6), length 52)
XXXXXX.58647 > melinda.labs.overthewire.org.http: Flags [.], cksum 0x4bc7 (correct), seq 280, ack 1497, win 4071, options [nop,nop,TS val 377042162 ecr 980610675], length 0
..{...|.......E..4..@.@.l....o.O.....P_.+.3.......K......
.y4.:r.s
22:59:10.584887 IP (tos 0x0, ttl 64, id 54853, offset 0, flags [DF], proto TCP (6), length 369)
XXXXXX.58647 > melinda.labs.overthewire.org.http: Flags [P.], cksum 0x2c85 (correct), seq 280:597, ack 1497, win 4096, options [nop,nop,TS val 377042167 ecr 980610675], length 317
..{...|.......E..q.E@.@.g....o.O.....P_.+.3.......,......
.y4.:r.sGET / HTTP/1.1
Host: natas22.natas.labs.overthewire.org
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.7.0 CPython/2.7.9 Darwin/14.3.0
Connection: keep-alive
Cookie: PHPSESSID=p6ls9fd6jqaveoha3vc4kav7g0
Authorization: Basic bmF0YXMyMjpjaEc5ZmJlMVRxMmVXVk1nallZRDFNc2ZJdk40NjFrSg==
```
The server then responds with a gzipped version of the page, which is what ends up being what requests shows me when I type `r.text`:
```
22:59:10.707316 IP (tos 0x0, ttl 53, id 61401, offset 0, flags [DF], proto TCP (6), length 843)
melinda.labs.overthewire.org.http > XXXXXX.58647: Flags [P.], cksum 0x8233 (correct), seq 1497:2288, ack 597, win 243, options [nop,nop,TS val 980610713 ecr 377042167], length 791
|.......{.....E..K..@.5.Wr.O.....o.P..3..._.,>.....3.....
:r...y4.HTTP/1.1 200 OK
Date: Thu, 14 May 2015 03:59:10 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 383
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html
```
Why is `requests` making this second request and dropping the param on the floor?
| {
"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/2600/reactions"
} | https://api.github.com/repos/psf/requests/issues/2600/timeline | null | completed | null | null | false | [
"Out of curiosity I checked to see if the problem persisted if I gave the param a value (i.e., `site = 'http://natas22.natas.labs.overthewire.org/?revelio=foo'`). I'm still experiencing the same pattern.\n",
"Because we got redirected. =)\n\nThe first response is a HTTP 302, which means 'the target resource resid... |
https://api.github.com/repos/psf/requests/issues/2599 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2599/labels{/name} | https://api.github.com/repos/psf/requests/issues/2599/comments | https://api.github.com/repos/psf/requests/issues/2599/events | https://github.com/psf/requests/issues/2599 | 76,019,537 | MDU6SXNzdWU3NjAxOTUzNw== | 2,599 | Auth handler should be calling close, not release_conn | {
"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"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"... | closed | true | null | [] | null | 2 | 2015-05-13T15:10:24Z | 2021-09-08T23:04:48Z | 2015-05-14T06:15:18Z | CONTRIBUTOR | resolved | On [this line](https://github.com/kennethreitz/requests/blob/956ec8321a76f0b5a9f5bcb591cf6e77d773f819/requests/auth.py#L182) we should be using the response's "close" method. We shouldn't be explicitly calling a method on the "raw" attribute.
| {
"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/2599/reactions"
} | https://api.github.com/repos/psf/requests/issues/2599/timeline | null | completed | null | null | false | [
"Resolved in #2601.\n",
"Should I add a test to ensure close gets called?\nWould using a mock object be the right way?\n"
] |
https://api.github.com/repos/psf/requests/issues/2598 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2598/labels{/name} | https://api.github.com/repos/psf/requests/issues/2598/comments | https://api.github.com/repos/psf/requests/issues/2598/events | https://github.com/psf/requests/pull/2598 | 75,861,193 | MDExOlB1bGxSZXF1ZXN0MzUyOTY4OTc= | 2,598 | Partially revert ab84f9be5740d4649d734e73b84f17f85e52ffc9 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/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"
} | [
{
"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}... | null | 8 | 2015-05-13T06:08:49Z | 2021-09-08T07:00:58Z | 2015-05-14T22:32:19Z | MEMBER | resolved | As discussed in the comments for ab84f9be5740d4649d734e73b84f17f85e52ffc9, this code block is necessary thanks to our shiny `json` parameter.
As a temporary workaround, this reinstates the code Kenneth hates so much so that the builds start working again. @kennethreitz feel free to replace this with something else longer term if you still hate it. :grin:
| {
"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/2598/reactions"
} | https://api.github.com/repos/psf/requests/issues/2598/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2598.diff",
"html_url": "https://github.com/psf/requests/pull/2598",
"merged_at": "2015-05-14T22:32:19Z",
"patch_url": "https://github.com/psf/requests/pull/2598.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2598"
} | true | [
"`import json as notsimplejson` :P\n",
"`import json as complexjson`? :grin:\n",
"`import json as _json` Really anything to make sure this works properly is a good thing.\n",
"ping @sigmavirus24 \n",
":+1: but the tests still seem to be broken because other things were relying on `json` being a module defin... |
https://api.github.com/repos/psf/requests/issues/2597 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2597/labels{/name} | https://api.github.com/repos/psf/requests/issues/2597/comments | https://api.github.com/repos/psf/requests/issues/2597/events | https://github.com/psf/requests/pull/2597 | 75,776,064 | MDExOlB1bGxSZXF1ZXN0MzUyODA5OTA= | 2,597 | do not blindly catch all AttributeErrors | {
"avatar_url": "https://avatars.githubusercontent.com/u/717901?v=4",
"events_url": "https://api.github.com/users/t-8ch/events{/privacy}",
"followers_url": "https://api.github.com/users/t-8ch/followers",
"following_url": "https://api.github.com/users/t-8ch/following{/other_user}",
"gists_url": "https://api.github.com/users/t-8ch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/t-8ch",
"id": 717901,
"login": "t-8ch",
"node_id": "MDQ6VXNlcjcxNzkwMQ==",
"organizations_url": "https://api.github.com/users/t-8ch/orgs",
"received_events_url": "https://api.github.com/users/t-8ch/received_events",
"repos_url": "https://api.github.com/users/t-8ch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/t-8ch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/t-8ch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/t-8ch",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-05-12T23:22:24Z | 2021-09-08T07:00:59Z | 2015-05-13T06:16:44Z | CONTRIBUTOR | resolved | see shazow/urllib3#618
| {
"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/2597/reactions"
} | https://api.github.com/repos/psf/requests/issues/2597/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2597.diff",
"html_url": "https://github.com/psf/requests/pull/2597",
"merged_at": "2015-05-13T06:16:44Z",
"patch_url": "https://github.com/psf/requests/pull/2597.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2597"
} | true | [
"So, perhaps this is a stupid question, by why is there this condition in the code in the first place?\n",
"It's to allow you to return file-like objects that aren't urllib3's HTTPResponse class. This is super common in tests, for example.\n\nThis LGTM.\n"
] |
https://api.github.com/repos/psf/requests/issues/2596 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2596/labels{/name} | https://api.github.com/repos/psf/requests/issues/2596/comments | https://api.github.com/repos/psf/requests/issues/2596/events | https://github.com/psf/requests/issues/2596 | 75,665,167 | MDU6SXNzdWU3NTY2NTE2Nw== | 2,596 | colon in get params is double encoded | {
"avatar_url": "https://avatars.githubusercontent.com/u/37143?v=4",
"events_url": "https://api.github.com/users/makoshark/events{/privacy}",
"followers_url": "https://api.github.com/users/makoshark/followers",
"following_url": "https://api.github.com/users/makoshark/following{/other_user}",
"gists_url": "https://api.github.com/users/makoshark/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makoshark",
"id": 37143,
"login": "makoshark",
"node_id": "MDQ6VXNlcjM3MTQz",
"organizations_url": "https://api.github.com/users/makoshark/orgs",
"received_events_url": "https://api.github.com/users/makoshark/received_events",
"repos_url": "https://api.github.com/users/makoshark/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makoshark/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makoshark/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makoshark",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-05-12T16:44:14Z | 2021-09-08T23:04:48Z | 2015-05-12T16:53:38Z | NONE | resolved | Thanks for maintaining requests! I love it!
If a parameters in <code>params</code> passed to <code>get()</code> includes a colon (as is required for categories in the MediaWiki AP, for exampleI) requests double encodes it. Here's some example code:
```
import requests
parameters = {'action' : 'query',
'list' : 'categorymembers',
'format' : 'json',
'cmtitle' : 'Category:London'}
r = requests.get('http://wikivoyage.org/w/api.php', params=parameters)
print(r.url)
```
This returns a double escaped colon as <code>http://en.wikivoyage.org/w/api.php?action=query&cmtitle=Category%253ALondon&list=categorymembers&format=json</code>.
A working URL would be: <code>http://en.wikivoyage.org/w/api.php?action=query&cmtitle=Category%3ALondon&list=categorymembers&format=json</code> or even the unescaped <code>http://en.wikivoyage.org/w/api.php?action=query&cmtitle=Category:London&list=categorymembers&format=json</code>, both of which work fine.
Shouldn't a colon in a parameter only be escaped once as "<code>%3A</code>"? Composing the URL and passing it directly in seems to work just fine.
| {
"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/2596/reactions"
} | https://api.github.com/repos/psf/requests/issues/2596/timeline | null | completed | null | null | false | [
"Requests does not double encode the colon. =)\n\nWhat you don't see in that code is that you've been redirected. That URL is actually where you ended up after a chain of redirects. If you look for the _first_ request in the chain, you'll see the correct URL:\n\n``` python\n>>> r.history[0].url\nu'http://wikivoyage... |
https://api.github.com/repos/psf/requests/issues/2595 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2595/labels{/name} | https://api.github.com/repos/psf/requests/issues/2595/comments | https://api.github.com/repos/psf/requests/issues/2595/events | https://github.com/psf/requests/issues/2595 | 75,352,263 | MDU6SXNzdWU3NTM1MjI2Mw== | 2,595 | UnicodeEncodeError handling gzipped responses on Google App Engine | {
"avatar_url": "https://avatars.githubusercontent.com/u/963973?v=4",
"events_url": "https://api.github.com/users/agfor/events{/privacy}",
"followers_url": "https://api.github.com/users/agfor/followers",
"following_url": "https://api.github.com/users/agfor/following{/other_user}",
"gists_url": "https://api.github.com/users/agfor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/agfor",
"id": 963973,
"login": "agfor",
"node_id": "MDQ6VXNlcjk2Mzk3Mw==",
"organizations_url": "https://api.github.com/users/agfor/orgs",
"received_events_url": "https://api.github.com/users/agfor/received_events",
"repos_url": "https://api.github.com/users/agfor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/agfor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/agfor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/agfor",
"user_view_type": "public"
} | [
{
"color": "fbca04",
"default": false,
"description": null,
"id": 615414998,
"name": "GAE Support",
"node_id": "MDU6TGFiZWw2MTU0MTQ5OTg=",
"url": "https://api.github.com/repos/psf/requests/labels/GAE%20Support"
}
] | closed | true | null | [] | null | 17 | 2015-05-11T20:45:32Z | 2021-09-08T09:00:49Z | 2015-05-12T18:15:48Z | NONE | resolved | https://github.com/braintree/braintree_python/issues/53 originally reported the issue. It's due to using requests 2.6.1+, which pulled in a version of urllib3 including f21c2a2b73e4256ba2787f8470dbee6872987d2d, which causes the problem.
I am able to reproduce using app engine development mode when switching https://github.com/agfor/braintree-python-appengine to use requests 2.6.1+ and un-commenting out the development mode enabling code in main.py.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2595/reactions"
} | https://api.github.com/repos/psf/requests/issues/2595/timeline | null | completed | null | null | false | [
"Have you tried requests 2.7.0? That fixed a number of problems associated with that urllib3 release.\n",
"@Lukasa The problem happens in requests 2.7.0 as well -- all released versions after 2.6.0. The problem is in urllib3 versions before https://github.com/shazow/urllib3/commit/22a9713fab2ed831204711906a974c3b... |
https://api.github.com/repos/psf/requests/issues/2594 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2594/labels{/name} | https://api.github.com/repos/psf/requests/issues/2594/comments | https://api.github.com/repos/psf/requests/issues/2594/events | https://github.com/psf/requests/issues/2594 | 75,086,835 | MDU6SXNzdWU3NTA4NjgzNQ== | 2,594 | grequest hangs after about 250,000 requests on windows 7 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1405491?v=4",
"events_url": "https://api.github.com/users/fivejjs/events{/privacy}",
"followers_url": "https://api.github.com/users/fivejjs/followers",
"following_url": "https://api.github.com/users/fivejjs/following{/other_user}",
"gists_url": "https://api.github.com/users/fivejjs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fivejjs",
"id": 1405491,
"login": "fivejjs",
"node_id": "MDQ6VXNlcjE0MDU0OTE=",
"organizations_url": "https://api.github.com/users/fivejjs/orgs",
"received_events_url": "https://api.github.com/users/fivejjs/received_events",
"repos_url": "https://api.github.com/users/fivejjs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fivejjs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fivejjs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fivejjs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-05-11T04:56:26Z | 2021-09-08T23:04:48Z | 2015-05-13T06:59:57Z | NONE | resolved | I was running grequests with 390,000 youtube video urls. But it hang there after about 250, 000 urls.
The error message:
Traceback (most recent call last):
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\gevent\greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\grequests.py", line 71, in send
self.url, *_merged_kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 464, in request
resp = self.send(prep, *_send_kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\adapters.py", line 424, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='www.googleapis.com', port=443): Max retries exceeded with url: /youtube/v3/videos?part=snippet&id=nv85S4L0kTU&key=xxxxxx (Caused by ProxyError('Cannot connect to proxy.', error(10053, 'An established connection was aborted by the software in your host machine')))
<Greenlet at 0x35eecc0L: <bound method AsyncRequest.send of <grequests.AsyncRequest object at 0x0000000007434128>>(stream=False)> failed with ConnectionError
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1405491?v=4",
"events_url": "https://api.github.com/users/fivejjs/events{/privacy}",
"followers_url": "https://api.github.com/users/fivejjs/followers",
"following_url": "https://api.github.com/users/fivejjs/following{/other_user}",
"gists_url": "https://api.github.com/users/fivejjs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fivejjs",
"id": 1405491,
"login": "fivejjs",
"node_id": "MDQ6VXNlcjE0MDU0OTE=",
"organizations_url": "https://api.github.com/users/fivejjs/orgs",
"received_events_url": "https://api.github.com/users/fivejjs/received_events",
"repos_url": "https://api.github.com/users/fivejjs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fivejjs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fivejjs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fivejjs",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2594/reactions"
} | https://api.github.com/repos/psf/requests/issues/2594/timeline | null | completed | null | null | false | [
"I'm afraid we need significantly more information to diagnose this. You say 'about' 250,000 URLs: is it consistently 250,000, or does the exact number vary? Do you have any logs from the run? Is there anything in stdout?\n",
"I just repeat the error. Ran the code last night and got it this morning. The youtube k... |
https://api.github.com/repos/psf/requests/issues/2593 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2593/labels{/name} | https://api.github.com/repos/psf/requests/issues/2593/comments | https://api.github.com/repos/psf/requests/issues/2593/events | https://github.com/psf/requests/issues/2593 | 74,703,156 | MDU6SXNzdWU3NDcwMzE1Ng== | 2,593 | contextlib.closing(response) is not enough when using sessions and stream = True | {
"avatar_url": "https://avatars.githubusercontent.com/u/6313150?v=4",
"events_url": "https://api.github.com/users/Beluki/events{/privacy}",
"followers_url": "https://api.github.com/users/Beluki/followers",
"following_url": "https://api.github.com/users/Beluki/following{/other_user}",
"gists_url": "https://api.github.com/users/Beluki/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Beluki",
"id": 6313150,
"login": "Beluki",
"node_id": "MDQ6VXNlcjYzMTMxNTA=",
"organizations_url": "https://api.github.com/users/Beluki/orgs",
"received_events_url": "https://api.github.com/users/Beluki/received_events",
"repos_url": "https://api.github.com/users/Beluki/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Beluki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Beluki/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Beluki",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2015-05-09T16:03:20Z | 2021-09-08T22:00:53Z | 2015-08-31T09:35:35Z | NONE | resolved | The requests documentation suggests using the following idiom to partially read response bodies (e.g. when stream = True):
``` python
from contextlib import closing
with closing(requests.get('http://httpbin.org/get', stream=True)) as r:
# Do things with the response here.
```
I thought this would be applicable to sessions, but it seems it's not enough.
The following program reliably raises an exception (BadStatusLine) even while it uses contextlib.closing, and the only way to stop that from happening is to consume the whole response content:
``` python
import contextlib
import random
import requests
urls = [
'http://reddit.com',
'http://news.ycombinator.com',
'http://github.com',
'http://bitbucket.org',
]
try:
session = requests.Session()
while True:
try:
with contextlib.closing(session.get(random.choice(urls), stream = True)) as r:
# uncomment the line below and the errors dissapear:
# r.content
pass
except Exception as ex:
print(str(ex))
except KeyboardInterrupt:
pass
```
Is this the expected behavior or actually a bug? (to be fair the documentation doesn't actually say that the idiom is also applicable to requests coming from sessions).
| {
"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/2593/reactions"
} | https://api.github.com/repos/psf/requests/issues/2593/timeline | null | completed | null | null | false | [
"I think this is expected, but it could arguably be worked around.\n\nThe problem is that urllib3 doesn't know whether we consumed the response, so it doesn't know that the socket has unread data in it. We should be able to support that case, I think.\n",
"Wait. I have a question.\n\nIn your first example, you ha... |
https://api.github.com/repos/psf/requests/issues/2592 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2592/labels{/name} | https://api.github.com/repos/psf/requests/issues/2592/comments | https://api.github.com/repos/psf/requests/issues/2592/events | https://github.com/psf/requests/issues/2592 | 73,242,223 | MDU6SXNzdWU3MzI0MjIyMw== | 2,592 | Redundancy when requesting URLs | {
"avatar_url": "https://avatars.githubusercontent.com/u/1908620?v=4",
"events_url": "https://api.github.com/users/cornelinux/events{/privacy}",
"followers_url": "https://api.github.com/users/cornelinux/followers",
"following_url": "https://api.github.com/users/cornelinux/following{/other_user}",
"gists_url": "https://api.github.com/users/cornelinux/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cornelinux",
"id": 1908620,
"login": "cornelinux",
"node_id": "MDQ6VXNlcjE5MDg2MjA=",
"organizations_url": "https://api.github.com/users/cornelinux/orgs",
"received_events_url": "https://api.github.com/users/cornelinux/received_events",
"repos_url": "https://api.github.com/users/cornelinux/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cornelinux/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cornelinux/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cornelinux",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-05T08:05:16Z | 2021-09-08T23:04:49Z | 2015-05-05T08:33:31Z | NONE | resolved | This is just a question I'd like to mark as feature request.
Is it ever planned to provide some kind of redundancy - i.e. add a list or URLs to the Request Object and the Request Object would try to fetch the next URL, if the first one timed out.
This might be interesting if requesting web APIs, where redundancy is not provided by the service.
Just tell if this is a bad idea.
| {
"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/2592/reactions"
} | https://api.github.com/repos/psf/requests/issues/2592/timeline | null | completed | null | null | false | [
"Thanks for the feature request @cornelinux!\n\nThis seems like the kind of thing that could easily be built on top of requests. =) If a `Session` object is used, it shouldn't be hard to write a little wrapper around it that does exactly that.\n\nHowever, I don't think we'll be adding this feature to requests core,... |
https://api.github.com/repos/psf/requests/issues/2591 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2591/labels{/name} | https://api.github.com/repos/psf/requests/issues/2591/comments | https://api.github.com/repos/psf/requests/issues/2591/events | https://github.com/psf/requests/issues/2591 | 73,086,681 | MDU6SXNzdWU3MzA4NjY4MQ== | 2,591 | Session post() sending a GET instead of a POST intermittently | {
"avatar_url": "https://avatars.githubusercontent.com/u/648320?v=4",
"events_url": "https://api.github.com/users/kkochis/events{/privacy}",
"followers_url": "https://api.github.com/users/kkochis/followers",
"following_url": "https://api.github.com/users/kkochis/following{/other_user}",
"gists_url": "https://api.github.com/users/kkochis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkochis",
"id": 648320,
"login": "kkochis",
"node_id": "MDQ6VXNlcjY0ODMyMA==",
"organizations_url": "https://api.github.com/users/kkochis/orgs",
"received_events_url": "https://api.github.com/users/kkochis/received_events",
"repos_url": "https://api.github.com/users/kkochis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkochis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkochis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkochis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-05-04T18:07:46Z | 2021-09-08T23:04:49Z | 2015-05-04T18:40:58Z | NONE | resolved | I can't figure out how this would be happening by looking into the source code but here is the behavior I am seeing:
```
>>> import requests
>>> s = requests.Session()
>>> r = s.post('http://mydomain.com/login/attempt', data={'username': 'user', 'password': 'pass'})
>>> r.request
<PreparedRequest [POST]>
>>> r2 = s.post('http://mydomain.com/api/v1/something', data={'name': 'foobar'})
>>> r2.request
<PreparedRequest [GET]>
>>> r3 = s.post('http://mydomain.com/api/v1/something', data={'name': 'foobar'})
>>> r3.request
<PreparedRequest [POST]>
```
I'm using Requests 2.7.0. Let me know if I should provide any other debug information.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/648320?v=4",
"events_url": "https://api.github.com/users/kkochis/events{/privacy}",
"followers_url": "https://api.github.com/users/kkochis/followers",
"following_url": "https://api.github.com/users/kkochis/following{/other_user}",
"gists_url": "https://api.github.com/users/kkochis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkochis",
"id": 648320,
"login": "kkochis",
"node_id": "MDQ6VXNlcjY0ODMyMA==",
"organizations_url": "https://api.github.com/users/kkochis/orgs",
"received_events_url": "https://api.github.com/users/kkochis/received_events",
"repos_url": "https://api.github.com/users/kkochis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkochis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkochis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkochis",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2591/reactions"
} | https://api.github.com/repos/psf/requests/issues/2591/timeline | null | completed | null | null | false | [
"`Session.post` is not sending a GET, you're being redirected. Check `r.history` for each one.\n",
"Thank you! user error.\n"
] |
https://api.github.com/repos/psf/requests/issues/2590 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2590/labels{/name} | https://api.github.com/repos/psf/requests/issues/2590/comments | https://api.github.com/repos/psf/requests/issues/2590/events | https://github.com/psf/requests/issues/2590 | 72,993,352 | MDU6SXNzdWU3Mjk5MzM1Mg== | 2,590 | PATCH get response 301(moved permanently) is redirected with empty body | {
"avatar_url": "https://avatars.githubusercontent.com/u/3015139?v=4",
"events_url": "https://api.github.com/users/sainttail/events{/privacy}",
"followers_url": "https://api.github.com/users/sainttail/followers",
"following_url": "https://api.github.com/users/sainttail/following{/other_user}",
"gists_url": "https://api.github.com/users/sainttail/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sainttail",
"id": 3015139,
"login": "sainttail",
"node_id": "MDQ6VXNlcjMwMTUxMzk=",
"organizations_url": "https://api.github.com/users/sainttail/orgs",
"received_events_url": "https://api.github.com/users/sainttail/received_events",
"repos_url": "https://api.github.com/users/sainttail/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sainttail/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sainttail/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sainttail",
"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"
} | 18 | 2015-05-04T11:14:05Z | 2021-09-08T13:05:40Z | 2016-12-12T16:10:44Z | NONE | resolved | I don't know this is normal behaviour or not but any reason to set body to empty with patch?
| {
"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/2590/reactions"
} | https://api.github.com/repos/psf/requests/issues/2590/timeline | null | completed | null | null | false | [
"What kind of body are you sending?\n",
"i sent something like this\n`r = requests.patch(url, data={\"data\": \"test\"})`\n",
"I think we're a bit over-zealous with stripping bodies on redirects. In #1084 we allowed 307 and 308 to keep their bodies, but all other redirects lose theirs. Arguably, a 301 for a non... |
https://api.github.com/repos/psf/requests/issues/2589 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2589/labels{/name} | https://api.github.com/repos/psf/requests/issues/2589/comments | https://api.github.com/repos/psf/requests/issues/2589/events | https://github.com/psf/requests/issues/2589 | 72,913,324 | MDU6SXNzdWU3MjkxMzMyNA== | 2,589 | Can't post BytesIO file-like object | {
"avatar_url": "https://avatars.githubusercontent.com/u/401600?v=4",
"events_url": "https://api.github.com/users/JetForMe/events{/privacy}",
"followers_url": "https://api.github.com/users/JetForMe/followers",
"following_url": "https://api.github.com/users/JetForMe/following{/other_user}",
"gists_url": "https://api.github.com/users/JetForMe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JetForMe",
"id": 401600,
"login": "JetForMe",
"node_id": "MDQ6VXNlcjQwMTYwMA==",
"organizations_url": "https://api.github.com/users/JetForMe/orgs",
"received_events_url": "https://api.github.com/users/JetForMe/received_events",
"repos_url": "https://api.github.com/users/JetForMe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JetForMe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JetForMe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JetForMe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-05-04T03:41:29Z | 2021-09-08T03:00:20Z | 2015-05-04T03:48:50Z | NONE | resolved | Hi. I'm trying to zip a directory in memory and then POST that to a server. Unfortunately, I don't seem to be able to use the BytesIO object to which the zip data is written. Instead, I have to get the bytes from it. But the docs seem to indicate I can provide either bytes or a file-like object in the tuple.
Here's a condensed version of the code:
```
zipData = io.BytesIO();
with zipfile.ZipFile(zipData, mode="w") as zf:
zf.write(<some content>)
url = "https://some.host/api/upload"
files = { "ipa" : open(ipaPath, "rb") }
#files["dsym"] = (zipName, zipData) # file-like object doesn't work?
files["dsym"] = (zipName, zipData.getvalue()) # works
r = requests.post(url, files=files)
```
It may well be user error; if so, sorry for the noise.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/401600?v=4",
"events_url": "https://api.github.com/users/JetForMe/events{/privacy}",
"followers_url": "https://api.github.com/users/JetForMe/followers",
"following_url": "https://api.github.com/users/JetForMe/following{/other_user}",
"gists_url": "https://api.github.com/users/JetForMe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JetForMe",
"id": 401600,
"login": "JetForMe",
"node_id": "MDQ6VXNlcjQwMTYwMA==",
"organizations_url": "https://api.github.com/users/JetForMe/orgs",
"received_events_url": "https://api.github.com/users/JetForMe/received_events",
"repos_url": "https://api.github.com/users/JetForMe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JetForMe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JetForMe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JetForMe",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2589/reactions"
} | https://api.github.com/repos/psf/requests/issues/2589/timeline | null | completed | null | null | false | [
"So try this on for size:\n\n``` py\nzipData = io.BytesIO();\nwith zipfile.ZipFile(zipData, mode=\"w\") as zf:\n zf.write(<some content>)\n\nzipData.seek(0, 0)\nurl = \"https://some.host/api/upload\"\n\nfiles = { \"ipa\" : open(ipaPath, \"rb\") }\n#files[\"dsym\"] = (zipName, zipData) # file-like obj... |
https://api.github.com/repos/psf/requests/issues/2588 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2588/labels{/name} | https://api.github.com/repos/psf/requests/issues/2588/comments | https://api.github.com/repos/psf/requests/issues/2588/events | https://github.com/psf/requests/pull/2588 | 72,889,953 | MDExOlB1bGxSZXF1ZXN0MzQ2MTA4MTI= | 2,588 | use reST link syntax | {
"avatar_url": "https://avatars.githubusercontent.com/u/219470?v=4",
"events_url": "https://api.github.com/users/benjaminp/events{/privacy}",
"followers_url": "https://api.github.com/users/benjaminp/followers",
"following_url": "https://api.github.com/users/benjaminp/following{/other_user}",
"gists_url": "https://api.github.com/users/benjaminp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benjaminp",
"id": 219470,
"login": "benjaminp",
"node_id": "MDQ6VXNlcjIxOTQ3MA==",
"organizations_url": "https://api.github.com/users/benjaminp/orgs",
"received_events_url": "https://api.github.com/users/benjaminp/received_events",
"repos_url": "https://api.github.com/users/benjaminp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benjaminp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benjaminp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benjaminp",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-04T00:34:20Z | 2021-09-08T07:01:00Z | 2015-05-04T02:18:37Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2588/reactions"
} | https://api.github.com/repos/psf/requests/issues/2588/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2588.diff",
"html_url": "https://github.com/psf/requests/pull/2588",
"merged_at": "2015-05-04T02:18:37Z",
"patch_url": "https://github.com/psf/requests/pull/2588.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2588"
} | true | [
"Thanks for catching this @gutworth! :sparkles: :cake: :sparkles: \n"
] | |
https://api.github.com/repos/psf/requests/issues/2587 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2587/labels{/name} | https://api.github.com/repos/psf/requests/issues/2587/comments | https://api.github.com/repos/psf/requests/issues/2587/events | https://github.com/psf/requests/pull/2587 | 72,852,379 | MDExOlB1bGxSZXF1ZXN0MzQ2MDYxMjA= | 2,587 | Remove the __bool__ and __nonzero__ response methods | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | {
"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"
} | 5 | 2015-05-03T19:24:01Z | 2021-09-08T07:01:00Z | 2015-05-04T13:05:36Z | CONTRIBUTOR | resolved | Many people expect to be able to say:
```
response = make_request(url)
if response:
body = response.content
```
Where the first part should test for whether or not response is None.
Instead, the **bool** and **nonzero** methods return response.ok, so if
the response is actually a 4xx or 5xx response, then the user would
expect to get the body of the response.
By removing these methods, we restore the functionality that most users
expect.
Closes #2002
---
**Note** this is development for 3.0.0
| {
"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/2587/reactions"
} | https://api.github.com/repos/psf/requests/issues/2587/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2587.diff",
"html_url": "https://github.com/psf/requests/pull/2587",
"merged_at": "2015-05-04T13:05:36Z",
"patch_url": "https://github.com/psf/requests/pull/2587.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2587"
} | true | [
"For the 3.0.0 stuff, I think we should try to be adding changelog updates for this: ideally, fairly thorough ones.\n",
"Otherwise, this looks totally reasonable. =)\n",
"Since we've discussed keeping this branch around for a while and the likelihood of having another release (at least), I made a different file... |
https://api.github.com/repos/psf/requests/issues/2586 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2586/labels{/name} | https://api.github.com/repos/psf/requests/issues/2586/comments | https://api.github.com/repos/psf/requests/issues/2586/events | https://github.com/psf/requests/pull/2586 | 72,808,110 | MDExOlB1bGxSZXF1ZXN0MzQ2MDE2ODk= | 2,586 | Cut 2.7.0 this weekend | {
"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 | 10 | 2015-05-03T13:43:44Z | 2021-09-08T08:00:47Z | 2015-05-03T15:02:21Z | MEMBER | resolved | Ok, I believe we've left enough time for the chunked stuff to bake, and no further issues seem to have come out of the woodwork. At this point, I think we should cut 2.7.0 and begin the switchover to our new release process.
@shazow are you open to tagging a new urllib3 release, and if so what commit would you like us to use? If you don't really care, by default we'd use shazow/urllib3@74073791a3429d9b9f375563954f57f2181599dc.
Things to do:
- [x] Update urllib3.
- [x] Confirm that the #2455 problem sites still work.
- [x] Update changelog.
- [ ] Tag.
- [ ] Push release.
- [ ] Have a drink.
| {
"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/2586/reactions"
} | https://api.github.com/repos/psf/requests/issues/2586/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2586.diff",
"html_url": "https://github.com/psf/requests/pull/2586",
"merged_at": "2015-05-03T15:02:21Z",
"patch_url": "https://github.com/psf/requests/pull/2586.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2586"
} | true | [
"In my ideal world we'd update the `certifi` bundle as well, but I'm now strongly averse to trying to do too much with these releases. @sigmavirus24?\n",
"I'm not strongly opposed to it. I'd like confirmation that the problem sites in #2455 at least work. Thoughts?\n",
"Agreed. Adding it to the list.\n",
"Alr... |
https://api.github.com/repos/psf/requests/issues/2585 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2585/labels{/name} | https://api.github.com/repos/psf/requests/issues/2585/comments | https://api.github.com/repos/psf/requests/issues/2585/events | https://github.com/psf/requests/issues/2585 | 72,459,274 | MDU6SXNzdWU3MjQ1OTI3NA== | 2,585 | Session.get_adapter won't work correctly for case-sensitive URLs | {
"avatar_url": "https://avatars.githubusercontent.com/u/1110390?v=4",
"events_url": "https://api.github.com/users/agilevic/events{/privacy}",
"followers_url": "https://api.github.com/users/agilevic/followers",
"following_url": "https://api.github.com/users/agilevic/following{/other_user}",
"gists_url": "https://api.github.com/users/agilevic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/agilevic",
"id": 1110390,
"login": "agilevic",
"node_id": "MDQ6VXNlcjExMTAzOTA=",
"organizations_url": "https://api.github.com/users/agilevic/orgs",
"received_events_url": "https://api.github.com/users/agilevic/received_events",
"repos_url": "https://api.github.com/users/agilevic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/agilevic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/agilevic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/agilevic",
"user_view_type": "public"
} | [
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
}
] | open | false | 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"
} | 6 | 2015-05-01T15:44:12Z | 2015-07-18T14:22:31Z | null | NONE | null | In its current implementation Session.get_adapter turns url to lowercase in line 637. If it is aiming for case-insensitive compare it should also turn prefix variable to lowercase in the same line or do that at registration in the mount() method. But this whole idea seems incorrect because URL paths can be case sensitive and one might register different adapters for different paths on the same site.
The fix should most likely be spliting the URL into components and using that tuple as a key in the self.adapters dictionary. Changes mount() and get_adapter().
``` python
In [48]: urlparse.urlparse('HTTP://lala.mi.do/path')
Out[48]: ParseResult(scheme='http', netloc='lala.mi.do', path='/path', params='', query='', fragment='')
In [49]: d = {}
In [50]: purl = urlparse.urlparse('HTTP://lala.mi.do/path')
In [51]: d[purl] = 'myadapter'
In [52]: purl = urlparse.urlparse('HTTP://lala.mi.do/Path2')
In [53]: purl
Out[53]: ParseResult(scheme='http', netloc='lala.mi.do', path='/Path2', params='', query='', fragment='')
In [54]: d[purl] = 'myadapter2'
In [55]: d
Out[55]:
{ParseResult(scheme='http', netloc='lala.mi.do', path='/Path2', params='', query='', fragment=''): 'myadapter2',
ParseResult(scheme='http', netloc='lala.mi.do', path='/path', params='', query='', fragment=''): 'myadapter'}
```
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2585/reactions"
} | https://api.github.com/repos/psf/requests/issues/2585/timeline | null | null | null | null | false | [
"Agreed that the case-insensitive compare is a bad idea, but I also think splitting the URL into components is not a good idea either. The correct thing to do is to remove the case-insensitive compare in 3.0.0.\n",
"If I remember correctly, we compare them case-insensitively because most people don't use adapters... |
https://api.github.com/repos/psf/requests/issues/2584 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2584/labels{/name} | https://api.github.com/repos/psf/requests/issues/2584/comments | https://api.github.com/repos/psf/requests/issues/2584/events | https://github.com/psf/requests/issues/2584 | 72,456,839 | MDU6SXNzdWU3MjQ1NjgzOQ== | 2,584 | Timeline for HTTP/2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/401438?v=4",
"events_url": "https://api.github.com/users/AstraLuma/events{/privacy}",
"followers_url": "https://api.github.com/users/AstraLuma/followers",
"following_url": "https://api.github.com/users/AstraLuma/following{/other_user}",
"gists_url": "https://api.github.com/users/AstraLuma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AstraLuma",
"id": 401438,
"login": "AstraLuma",
"node_id": "MDQ6VXNlcjQwMTQzOA==",
"organizations_url": "https://api.github.com/users/AstraLuma/orgs",
"received_events_url": "https://api.github.com/users/AstraLuma/received_events",
"repos_url": "https://api.github.com/users/AstraLuma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AstraLuma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AstraLuma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AstraLuma",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-01T15:33:48Z | 2021-09-08T23:04:54Z | 2015-05-01T15:59:30Z | NONE | resolved | With the finishing of the HTTP/2 standardization process, does requests have a timeline, goal, or idea of its HTTP/2 support?
| {
"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/2584/reactions"
} | https://api.github.com/repos/psf/requests/issues/2584/timeline | null | completed | null | null | false | [
"Please check old issues: #2082 #2451.\n"
] |
https://api.github.com/repos/psf/requests/issues/2583 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2583/labels{/name} | https://api.github.com/repos/psf/requests/issues/2583/comments | https://api.github.com/repos/psf/requests/issues/2583/events | https://github.com/psf/requests/issues/2583 | 72,431,519 | MDU6SXNzdWU3MjQzMTUxOQ== | 2,583 | ImportError: No module named 'requests.packages.chardet.sys' when frozen by PyInstaller | {
"avatar_url": "https://avatars.githubusercontent.com/u/784161?v=4",
"events_url": "https://api.github.com/users/htgoebel/events{/privacy}",
"followers_url": "https://api.github.com/users/htgoebel/followers",
"following_url": "https://api.github.com/users/htgoebel/following{/other_user}",
"gists_url": "https://api.github.com/users/htgoebel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/htgoebel",
"id": 784161,
"login": "htgoebel",
"node_id": "MDQ6VXNlcjc4NDE2MQ==",
"organizations_url": "https://api.github.com/users/htgoebel/orgs",
"received_events_url": "https://api.github.com/users/htgoebel/received_events",
"repos_url": "https://api.github.com/users/htgoebel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/htgoebel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/htgoebel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/htgoebel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-05-01T13:21:28Z | 2021-09-08T23:04:55Z | 2015-05-01T13:57:52Z | NONE | resolved | When running a simple test-program frozen by [PyInstaller](http://www.pyinstaller.org) this program fails with an `ImportError: No module named 'requests.packages.chardet.sys'`. The same program runs fine when run unfrozen (which means: directly from the command line).
This seams to be a problem with the import magic done in requests.packages. For some reasons requests.packages.chardet tries a relative import.
How to reproduce:
```
$ git clone --depth=1 https://github.com/pyinstaller/pyinstaller.git
$ cd pyinstaller
# the script runs unfrozen (well, it has an SSL-error, but no import error):
$ python tests/libraries/test_requests.py
# now freeze the application
$ cd tests/libraries/
$ ../../pyinstaller.py test_requests.py
# the frozen app fails:
$ dist/test_requests/test_requests
[...]
File "/tmp/pyinstaller/PyInstaller/loader/pyi_importers.py", line 276, in load_module
exec(bytecode, module.__dict__)
File "/tmp/pyinstaller/tests/libraries/build/test_requests/out00-PYZ.pyz/requests.packages.chardet", line 19, in <module>
File "/tmp/pyinstaller/tests/libraries/build/test_requests/out00-PYZ.pyz/requests.packages", line 95, in load_module
ImportError: No module named 'requests.packages.chardet.sys'
```
Tested with requests **version** = '2.6.0', **build** = 0x020503 and Python 2.7.9
| {
"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/2583/reactions"
} | https://api.github.com/repos/psf/requests/issues/2583/timeline | null | completed | null | null | false | [
"This is a known issue in 2.6.0 with the update machinery we introduced in 2.5.2. We fixed it in 2.6.1, but unfortunately that release also broke some chunked encoding stuff. The reality is that there are no good releases right now for pyinstaller (2.1.0 through 2.5.3 are affected by CVE 2015-2296, so don't use the... |
https://api.github.com/repos/psf/requests/issues/2582 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2582/labels{/name} | https://api.github.com/repos/psf/requests/issues/2582/comments | https://api.github.com/repos/psf/requests/issues/2582/events | https://github.com/psf/requests/pull/2582 | 72,348,225 | MDExOlB1bGxSZXF1ZXN0MzQ1MjAyMTQ= | 2,582 | Make docstring of api.get more clear | {
"avatar_url": "https://avatars.githubusercontent.com/u/1484098?v=4",
"events_url": "https://api.github.com/users/mhavard999/events{/privacy}",
"followers_url": "https://api.github.com/users/mhavard999/followers",
"following_url": "https://api.github.com/users/mhavard999/following{/other_user}",
"gists_url": "https://api.github.com/users/mhavard999/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mhavard999",
"id": 1484098,
"login": "mhavard999",
"node_id": "MDQ6VXNlcjE0ODQwOTg=",
"organizations_url": "https://api.github.com/users/mhavard999/orgs",
"received_events_url": "https://api.github.com/users/mhavard999/received_events",
"repos_url": "https://api.github.com/users/mhavard999/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mhavard999/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mhavard999/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mhavard999",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-01T04:01:51Z | 2021-09-08T08:00:48Z | 2015-05-01T05:59:46Z | CONTRIBUTOR | resolved | I opened issue #2581, and since it is such a small change, I just went ahead and opened the pull request immediately.
This makes the docstring for `requests.get` clearer so when someone does `help(requests.get)` they can see that `params` is an optional kwarg that can be used to attach query string parameters to a GET request. I think this change makes it symmetric with `requests.post` which specifically mentions `data` and `json` for body and json parameters. As I mentioned in #2581, query string parameters are as relevant to GET requests as json and body parameters are to POST requests, so this change makes a lot of sense in that respect.
| {
"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/2582/reactions"
} | https://api.github.com/repos/psf/requests/issues/2582/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2582.diff",
"html_url": "https://github.com/psf/requests/pull/2582",
"merged_at": "2015-05-01T05:59:46Z",
"patch_url": "https://github.com/psf/requests/pull/2582.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2582"
} | true | [
"Thanks for this @mhavard999, it looks great! :cake:\n"
] |
https://api.github.com/repos/psf/requests/issues/2581 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2581/labels{/name} | https://api.github.com/repos/psf/requests/issues/2581/comments | https://api.github.com/repos/psf/requests/issues/2581/events | https://github.com/psf/requests/issues/2581 | 72,347,918 | MDU6SXNzdWU3MjM0NzkxOA== | 2,581 | The docstring for `get` in `api.py` should be more clear. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1484098?v=4",
"events_url": "https://api.github.com/users/mhavard999/events{/privacy}",
"followers_url": "https://api.github.com/users/mhavard999/followers",
"following_url": "https://api.github.com/users/mhavard999/following{/other_user}",
"gists_url": "https://api.github.com/users/mhavard999/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mhavard999",
"id": 1484098,
"login": "mhavard999",
"node_id": "MDQ6VXNlcjE0ODQwOTg=",
"organizations_url": "https://api.github.com/users/mhavard999/orgs",
"received_events_url": "https://api.github.com/users/mhavard999/received_events",
"repos_url": "https://api.github.com/users/mhavard999/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mhavard999/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mhavard999/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mhavard999",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-05-01T03:56:46Z | 2021-09-08T23:04:55Z | 2015-05-01T05:59:57Z | CONTRIBUTOR | resolved | This is the docstring for `get` from `api.py`:
``` python
"""Sends a GET request.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
"""
```
So when someone does `help(requests.get)` they won't see anything about the optional kwarg `params` used to attach query string parameters to the request. If they're extra clever, they'll understand what "Optional arguments that ``request`` takes" mean and do `help(requests.request)`, which then explains the `params` kwarg parameter. Note that the docstring of `requests.post` mentions `data` and `json`, even though those params are explained in the docstring of `requests.requests`. Since query string parameters are as relevant to GET requests as body and json parameters are to POST requests, should the `requests.get` be changed to:
``` python
def get(url, params=None, **kwargs):
"""Sends a GET request.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
"""
kwargs.setdefault('allow_redirects', True)
return request('get', url, params=params, **kwargs)
```
Current version for reference:
``` python
def get(url, **kwargs):
"""Sends a GET request.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
"""
kwargs.setdefault('allow_redirects', True)
return request('get', url, **kwargs)
```
| {
"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/2581/reactions"
} | https://api.github.com/repos/psf/requests/issues/2581/timeline | null | completed | null | null | false | [
"Closed by #2582.\n"
] |
https://api.github.com/repos/psf/requests/issues/2580 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2580/labels{/name} | https://api.github.com/repos/psf/requests/issues/2580/comments | https://api.github.com/repos/psf/requests/issues/2580/events | https://github.com/psf/requests/issues/2580 | 71,988,571 | MDU6SXNzdWU3MTk4ODU3MQ== | 2,580 | Documentation for context manager? | {
"avatar_url": "https://avatars.githubusercontent.com/u/4295636?v=4",
"events_url": "https://api.github.com/users/Microserf/events{/privacy}",
"followers_url": "https://api.github.com/users/Microserf/followers",
"following_url": "https://api.github.com/users/Microserf/following{/other_user}",
"gists_url": "https://api.github.com/users/Microserf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Microserf",
"id": 4295636,
"login": "Microserf",
"node_id": "MDQ6VXNlcjQyOTU2MzY=",
"organizations_url": "https://api.github.com/users/Microserf/orgs",
"received_events_url": "https://api.github.com/users/Microserf/received_events",
"repos_url": "https://api.github.com/users/Microserf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Microserf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Microserf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Microserf",
"user_view_type": "public"
} | [
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
},
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 19127... | closed | true | null | [] | null | 4 | 2015-04-29T20:59:27Z | 2021-09-08T23:00:43Z | 2015-08-07T20:41:21Z | NONE | resolved | The documentation makes only a single reference to the fact that `requests` provides some sort of context manager, and it's in the release notes from version 0.6 in 2011:
> New persistient sessions object and context manager
Would it be possible to get examples of how to implement these context managers? Specifically, I'm looking to replace the following code:
``` python
with contextlib.closing(urllib2.urlopen(self.url)) as dl:
```
I can't find any place that documents how to use an equivalent `requests` context manager, so I'll have to dig through the code to find out. It would be nice to get a bit more visibility into the `requests` API...
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2580/reactions"
} | https://api.github.com/repos/psf/requests/issues/2580/timeline | null | completed | null | null | false | [
"So I believe that refers to the fact that you can do:\n\n``` py\nwith requests.Session() as session:\n response = session.get(self.url)\n```\n\nTo get the equivalent to that code though, you could do\n\n``` py\nimport requests\n\nsession = requests.Session()\n\nwith contextlib.closing(session.get(self.url, stre... |
https://api.github.com/repos/psf/requests/issues/2579 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2579/labels{/name} | https://api.github.com/repos/psf/requests/issues/2579/comments | https://api.github.com/repos/psf/requests/issues/2579/events | https://github.com/psf/requests/issues/2579 | 71,858,093 | MDU6SXNzdWU3MTg1ODA5Mw== | 2,579 | ResponseNotReady when getting GitHub raw URL | {
"avatar_url": "https://avatars.githubusercontent.com/u/634?v=4",
"events_url": "https://api.github.com/users/Bjwebb/events{/privacy}",
"followers_url": "https://api.github.com/users/Bjwebb/followers",
"following_url": "https://api.github.com/users/Bjwebb/following{/other_user}",
"gists_url": "https://api.github.com/users/Bjwebb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Bjwebb",
"id": 634,
"login": "Bjwebb",
"node_id": "MDQ6VXNlcjYzNA==",
"organizations_url": "https://api.github.com/users/Bjwebb/orgs",
"received_events_url": "https://api.github.com/users/Bjwebb/received_events",
"repos_url": "https://api.github.com/users/Bjwebb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Bjwebb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Bjwebb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Bjwebb",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-29T12:15:01Z | 2021-09-08T23:04:56Z | 2015-04-29T12:44:51Z | NONE | resolved | Trying to get https://github.com/kennethreitz/requests/blob/master/README.rst?raw=true fails. Getting https://github.com/kennethreitz/requests/raw/master/README.rst (which the former redirects to) succeeds, so I think this has something to do with the handling the redirect.
I'm not 100% sure this is an issue with requests (it's possible the server is misbehaving), but the same URL does work in the browser and in curl and wget.
```
$ python bjwebb@winslow
Python 3.4.3 (default, Mar 25 2015, 17:13:50)
[GCC 4.9.2 20150304 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.__version__
'2.6.2'
>>> r = requests.get('https://github.com/kennethreitz/requests/blob/master/README.rst?raw=true')
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 372, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 374, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.4/http/client.py", line 1162, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Request-sent
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 597, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py", line 245, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 374, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.4/http/client.py", line 1162, in getresponse
raise ResponseNotReady(self.__state)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ResponseNotReady('Request-sent',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/requests/api.py", line 68, in get
return request('get', url, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 594, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 594, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 196, in resolve_redirects
**adapter_kwargs
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))
>>>
```
| {
"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/2579/reactions"
} | https://api.github.com/repos/psf/requests/issues/2579/timeline | null | completed | null | null | false | [
"This is a duplicate of #2568.\n"
] |
https://api.github.com/repos/psf/requests/issues/2578 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2578/labels{/name} | https://api.github.com/repos/psf/requests/issues/2578/comments | https://api.github.com/repos/psf/requests/issues/2578/events | https://github.com/psf/requests/issues/2578 | 71,778,533 | MDU6SXNzdWU3MTc3ODUzMw== | 2,578 | POST Request turns into GET when prepared without a Session | {
"avatar_url": "https://avatars.githubusercontent.com/u/223908?v=4",
"events_url": "https://api.github.com/users/krey/events{/privacy}",
"followers_url": "https://api.github.com/users/krey/followers",
"following_url": "https://api.github.com/users/krey/following{/other_user}",
"gists_url": "https://api.github.com/users/krey/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/krey",
"id": 223908,
"login": "krey",
"node_id": "MDQ6VXNlcjIyMzkwOA==",
"organizations_url": "https://api.github.com/users/krey/orgs",
"received_events_url": "https://api.github.com/users/krey/received_events",
"repos_url": "https://api.github.com/users/krey/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/krey/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/krey/subscriptions",
"type": "User",
"url": "https://api.github.com/users/krey",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-04-29T04:58:41Z | 2021-09-08T23:04:56Z | 2015-04-29T06:07:58Z | NONE | resolved | The code below prints `<PreparedRequest [GET]>`
This isn't a huge issue (as I'm using `Version 2`), just kinda weird that POST is flipped to GET
``` python
import pickle
import requests
from lxml import html
from urllib.parse import urljoin
session = requests.Session()
form_url = "http://www.transtats.bts.gov/Data_Elements.aspx"
get_request = requests.Request("GET", form_url)
get_response = session.send(get_request.prepare())
page_html = html.fromstring(get_response.content)
form = page_html.xpath("id('form1')")[0]
action_url = urljoin(form_url, form.xpath("@action")[0])
hidden_inputs = form.xpath("//input[@type='hidden']")
extra_data = dict([(hidden.xpath("@name")[0],hidden.xpath("@value")[0]) for hidden in hidden_inputs ])
data = {"CarrierList" : "VX", "AirportList" : "All", "Submit": "Submit"}
data.update(extra_data)
post_request = requests.Request("POST", action_url, data=data)
# Version 1
post_response = session.send(post_request.prepare())
# Version 2
#post_response = session.send(session.prepare_request(post_request))
print(post_response.request)
```
(I'm using 2.6.2 on Arch)
| {
"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/2578/reactions"
} | https://api.github.com/repos/psf/requests/issues/2578/timeline | null | completed | null | null | false | [
"This is not a bug, you're being redirected. requests automatically follows redirects, when the POST is finished you're getting a 302 to some other URL. Check `post_response.history` to confirm. =)\n",
"You're absolutely correct, thank you\n"
] |
https://api.github.com/repos/psf/requests/issues/2577 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2577/labels{/name} | https://api.github.com/repos/psf/requests/issues/2577/comments | https://api.github.com/repos/psf/requests/issues/2577/events | https://github.com/psf/requests/issues/2577 | 71,746,970 | MDU6SXNzdWU3MTc0Njk3MA== | 2,577 | Custom auth handler not called on redirect | {
"avatar_url": "https://avatars.githubusercontent.com/u/2001681?v=4",
"events_url": "https://api.github.com/users/cefolger/events{/privacy}",
"followers_url": "https://api.github.com/users/cefolger/followers",
"following_url": "https://api.github.com/users/cefolger/following{/other_user}",
"gists_url": "https://api.github.com/users/cefolger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cefolger",
"id": 2001681,
"login": "cefolger",
"node_id": "MDQ6VXNlcjIwMDE2ODE=",
"organizations_url": "https://api.github.com/users/cefolger/orgs",
"received_events_url": "https://api.github.com/users/cefolger/received_events",
"repos_url": "https://api.github.com/users/cefolger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cefolger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cefolger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cefolger",
"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"
}
] | closed | true | null | [] | null | 1 | 2015-04-29T00:43:23Z | 2021-09-08T23:04:45Z | 2015-05-31T12:54:29Z | NONE | resolved | Hi,
I have a custom auth handler, and my problem is that if the service returns a 302 the handler needs to be re-run to generate auth headers for the request to the new url.
Right now I'm setting allow_redirects=False and handling this manually, but can this be done by requests instead?
| {
"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/2577/reactions"
} | https://api.github.com/repos/psf/requests/issues/2577/timeline | null | completed | null | null | false | [
"So auth handlers tend to register themselves as `response` hooks which are called every time [`send`](https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L579) is called. And that's also called when [requests handles redirects](https://github.com/kennethreitz/requests/blob/master/requests/ses... |
https://api.github.com/repos/psf/requests/issues/2576 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2576/labels{/name} | https://api.github.com/repos/psf/requests/issues/2576/comments | https://api.github.com/repos/psf/requests/issues/2576/events | https://github.com/psf/requests/issues/2576 | 71,728,416 | MDU6SXNzdWU3MTcyODQxNg== | 2,576 | Set-Cookie - violating rfc6265 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1061223?v=4",
"events_url": "https://api.github.com/users/henadzit/events{/privacy}",
"followers_url": "https://api.github.com/users/henadzit/followers",
"following_url": "https://api.github.com/users/henadzit/following{/other_user}",
"gists_url": "https://api.github.com/users/henadzit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/henadzit",
"id": 1061223,
"login": "henadzit",
"node_id": "MDQ6VXNlcjEwNjEyMjM=",
"organizations_url": "https://api.github.com/users/henadzit/orgs",
"received_events_url": "https://api.github.com/users/henadzit/received_events",
"repos_url": "https://api.github.com/users/henadzit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/henadzit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/henadzit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/henadzit",
"user_view_type": "public"
} | [] | 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 | 2015-04-28T22:52:08Z | 2024-05-20T14:36:08Z | 2024-05-20T14:36:07Z | NONE | null | Hey,
I found that requests (version 2.6.0) violates one paragraph of rfc6265 - http://tools.ietf.org/html/rfc6265#section-4.1.2.3
"If the server omits the Domain attribute, the user agent will return the cookie only to the origin server."
It means that if Set-Cookie is set without domain at test.com, the cookie shouldn't be visible at subdomain.test.com.
However, the RFC warns that some user agents behave that way. Have this been discussed before? I haven't found anything. I encountered that issue when I was requesting endpoint which sent me 301 to subdomain of the initial endpoint. The service didn't handle that properly.
Below the code that shows the issue.
``` python
"""
Use twoliner to add hosts to /etc/hosts
echo "127.0.0.1 test.com
127.0.0.1 subdomain.test.com" | sudo tee -a /etc/hosts
"""
import BaseHTTPServer
import requests
import threading
# http server
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
l = self.headers.get('Host').lower()
print "Server: processing {}".format(l)
if l == 'test.com:8000':
self.send_response(301)
self.send_header('Set-Cookie', 'Test=True')
self.send_header('Location', 'http://subdomain.test.com:8000')
elif l == 'subdomain.test.com:8000':
print "---> Cookie: {} <---".format(self.headers.get('Cookie'))
self.send_response(200)
else:
assert False, "Not supported"
httpd = BaseHTTPServer.HTTPServer(('', 8000), RequestHandler)
def server_callback():
while True:
httpd.handle_request()
server_thread = threading.Thread(target=server_callback)
server_thread.daemon = True
server_thread.start()
# http client
requests.get('http://test.com:8000')
```
The code outputs
```
Server: processing test.com:8000
127.0.0.1 - - [28/Apr/2015 23:47:55] "GET / HTTP/1.1" 301 -
Server: processing subdomain.test.com:8000
---> Cookie: Test=True <---
127.0.0.1 - - [28/Apr/2015 23:47:55] "GET / HTTP/1.1" 200 -
```
| {
"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/2576/reactions"
} | https://api.github.com/repos/psf/requests/issues/2576/timeline | null | completed | null | null | false | [
"So the code that handles cookies for us in the standard library. We rely on [the `add_cookie_header` method on a CookieJar](https://github.com/kennethreitz/requests/blob/master/requests/cookies.py#L135). We create a mock request object but as far as I can tell we're doing everything we should. If we look at that, ... |
https://api.github.com/repos/psf/requests/issues/2575 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2575/labels{/name} | https://api.github.com/repos/psf/requests/issues/2575/comments | https://api.github.com/repos/psf/requests/issues/2575/events | https://github.com/psf/requests/issues/2575 | 71,606,845 | MDU6SXNzdWU3MTYwNjg0NQ== | 2,575 | HEAD request not following redirects since 2.6.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/133945?v=4",
"events_url": "https://api.github.com/users/markunsworth/events{/privacy}",
"followers_url": "https://api.github.com/users/markunsworth/followers",
"following_url": "https://api.github.com/users/markunsworth/following{/other_user}",
"gists_url": "https://api.github.com/users/markunsworth/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/markunsworth",
"id": 133945,
"login": "markunsworth",
"node_id": "MDQ6VXNlcjEzMzk0NQ==",
"organizations_url": "https://api.github.com/users/markunsworth/orgs",
"received_events_url": "https://api.github.com/users/markunsworth/received_events",
"repos_url": "https://api.github.com/users/markunsworth/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/markunsworth/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markunsworth/subscriptions",
"type": "User",
"url": "https://api.github.com/users/markunsworth",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2015-04-28T14:33:31Z | 2021-09-08T23:04:57Z | 2015-04-28T15:26:27Z | NONE | resolved | The following should follow the redirects but it just hangs
```
import requests
requests.head("http://bit.ly/DyE5", allow_redirects=True)
```
Have tested this on version 2.6.0, 2.6.1 and 2.6.2 and it stopped working at 2.6.1.
Have also tested as a GET request and that works fine on all versions.
| {
"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/2575/reactions"
} | https://api.github.com/repos/psf/requests/issues/2575/timeline | null | completed | null | null | false | [
"_not_ a duplicate of #2568\n",
"Most probably a duplicate of shazow/urllib3#601\nThe server does not do `Transfer-Encoding: chunked` but rather an explicit `Content-Length` without a body following.\n",
"@t-8ch This is an odd dupe of shazow/urllib3#601 then, but I suppose it's possible. Definitely seems like t... |
https://api.github.com/repos/psf/requests/issues/2574 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2574/labels{/name} | https://api.github.com/repos/psf/requests/issues/2574/comments | https://api.github.com/repos/psf/requests/issues/2574/events | https://github.com/psf/requests/issues/2574 | 71,598,917 | MDU6SXNzdWU3MTU5ODkxNw== | 2,574 | requests 2.6.1 and 2.6.2 causes ResponseNotReady error for 303 answers | {
"avatar_url": "https://avatars.githubusercontent.com/u/10611832?v=4",
"events_url": "https://api.github.com/users/obormotov/events{/privacy}",
"followers_url": "https://api.github.com/users/obormotov/followers",
"following_url": "https://api.github.com/users/obormotov/following{/other_user}",
"gists_url": "https://api.github.com/users/obormotov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/obormotov",
"id": 10611832,
"login": "obormotov",
"node_id": "MDQ6VXNlcjEwNjExODMy",
"organizations_url": "https://api.github.com/users/obormotov/orgs",
"received_events_url": "https://api.github.com/users/obormotov/received_events",
"repos_url": "https://api.github.com/users/obormotov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/obormotov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/obormotov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/obormotov",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-28T14:05:41Z | 2021-09-08T23:04:57Z | 2015-04-28T14:23:07Z | NONE | resolved | now I've got for redirections:
```
File "bin/eggs/requests-2.6.2-py2.7.egg/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "bin/eggs/requests-2.6.2-py2.7.egg/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', ResponseNotReady())
```
requests 2.6 works fine.
| {
"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/2574/reactions"
} | https://api.github.com/repos/psf/requests/issues/2574/timeline | null | completed | null | null | false | [
"This is a duplicate of #2568.\n"
] |
https://api.github.com/repos/psf/requests/issues/2573 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2573/labels{/name} | https://api.github.com/repos/psf/requests/issues/2573/comments | https://api.github.com/repos/psf/requests/issues/2573/events | https://github.com/psf/requests/issues/2573 | 71,057,069 | MDU6SXNzdWU3MTA1NzA2OQ== | 2,573 | SSLV3_ALERT_HANDSHAKE_FAILURE in 2.6.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/2545428?v=4",
"events_url": "https://api.github.com/users/Nelluk/events{/privacy}",
"followers_url": "https://api.github.com/users/Nelluk/followers",
"following_url": "https://api.github.com/users/Nelluk/following{/other_user}",
"gists_url": "https://api.github.com/users/Nelluk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Nelluk",
"id": 2545428,
"login": "Nelluk",
"node_id": "MDQ6VXNlcjI1NDU0Mjg=",
"organizations_url": "https://api.github.com/users/Nelluk/orgs",
"received_events_url": "https://api.github.com/users/Nelluk/received_events",
"repos_url": "https://api.github.com/users/Nelluk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Nelluk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Nelluk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Nelluk",
"user_view_type": "public"
} | [
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
},
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 19127... | closed | true | null | [] | null | 18 | 2015-04-26T11:56:17Z | 2022-02-26T04:00:40Z | 2021-11-28T03:01:25Z | NONE | resolved | ```
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:600)
```
Started happening consistently after upgrading to Requests 2.6.2. Tested in both Yosemite and Ubuntu 14.04. Python 3.4.3.
Downgrading to Requests 2.6.0 solves the issue.
| {
"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": 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/2573/reactions"
} | https://api.github.com/repos/psf/requests/issues/2573/timeline | null | completed | null | null | false | [
"@Nelluk Can you provide more information on what causes this? Which server are you accessing, etc?\n\nAt the moment, the most likely change in that delta is the fact that we slightly changed our default SSL cipher list:\n\n```\n- ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+... |
https://api.github.com/repos/psf/requests/issues/2572 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2572/labels{/name} | https://api.github.com/repos/psf/requests/issues/2572/comments | https://api.github.com/repos/psf/requests/issues/2572/events | https://github.com/psf/requests/pull/2572 | 70,964,869 | MDExOlB1bGxSZXF1ZXN0MzQxMTI3MTA= | 2,572 | Add basic contributing guide | {
"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 | 2015-04-25T20:39:52Z | 2021-09-08T08:00:48Z | 2015-04-25T21:34:45Z | MEMBER | resolved | For #2560.
This is adapted from hyper's contributing 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"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2572/reactions"
} | https://api.github.com/repos/psf/requests/issues/2572/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2572.diff",
"html_url": "https://github.com/psf/requests/pull/2572",
"merged_at": "2015-04-25T21:34:45Z",
"patch_url": "https://github.com/psf/requests/pull/2572.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2572"
} | true | [
"Requests should always be capitalized. \n",
"cleaned this up a bit, removed some things i found a bit too serious :)\n"
] |
https://api.github.com/repos/psf/requests/issues/2571 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2571/labels{/name} | https://api.github.com/repos/psf/requests/issues/2571/comments | https://api.github.com/repos/psf/requests/issues/2571/events | https://github.com/psf/requests/issues/2571 | 70,886,124 | MDU6SXNzdWU3MDg4NjEyNA== | 2,571 | Post vs Get | {
"avatar_url": "https://avatars.githubusercontent.com/u/1729141?v=4",
"events_url": "https://api.github.com/users/bmutinda/events{/privacy}",
"followers_url": "https://api.github.com/users/bmutinda/followers",
"following_url": "https://api.github.com/users/bmutinda/following{/other_user}",
"gists_url": "https://api.github.com/users/bmutinda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bmutinda",
"id": 1729141,
"login": "bmutinda",
"node_id": "MDQ6VXNlcjE3MjkxNDE=",
"organizations_url": "https://api.github.com/users/bmutinda/orgs",
"received_events_url": "https://api.github.com/users/bmutinda/received_events",
"repos_url": "https://api.github.com/users/bmutinda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bmutinda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bmutinda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bmutinda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-04-25T09:59:07Z | 2021-09-08T23:04:58Z | 2015-04-25T10:11:00Z | NONE | resolved | Why is this that if I make a post request without a "/" at the end of the url I can't access the params with $_POST[] in php but the param is available in the $_REQUEST. Is there something that I am doing wrong?
Here is my code
``` python
import requests
# version1 - POST params are accessible
payload = {"message": "my message here"}
r = requests.post("http://localhost/apps/myapp/", data=payload)
print r.text
# version2 - POST params not available
r = requests.post("http://localhost/apps/myapp", data=payload)
print r.text
```
| {
"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/2571/reactions"
} | https://api.github.com/repos/psf/requests/issues/2571/timeline | null | completed | null | null | false | [
"My guess is that your PHP app redirects from the URL that doesn't have a `/` to the one that does, and when it does so it uses a status code that causes us to convert our POST to a GET.\n\nYou should check what your PHP application is up to.\n",
"@Lukasa - there is no redirection in my php code. this is what the... |
https://api.github.com/repos/psf/requests/issues/2570 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2570/labels{/name} | https://api.github.com/repos/psf/requests/issues/2570/comments | https://api.github.com/repos/psf/requests/issues/2570/events | https://github.com/psf/requests/pull/2570 | 70,830,165 | MDExOlB1bGxSZXF1ZXN0MzQwOTY3MjE= | 2,570 | Add new release process to docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-25T00:29:09Z | 2021-09-08T08:00:48Z | 2015-04-25T21:46:31Z | CONTRIBUTOR | resolved | Closes #2569
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2570/reactions"
} | https://api.github.com/repos/psf/requests/issues/2570/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2570.diff",
"html_url": "https://github.com/psf/requests/pull/2570",
"merged_at": "2015-04-25T21:46:31Z",
"patch_url": "https://github.com/psf/requests/pull/2570.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2570"
} | true | [
"Looks good, some small notes.\n"
] |
https://api.github.com/repos/psf/requests/issues/2569 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2569/labels{/name} | https://api.github.com/repos/psf/requests/issues/2569/comments | https://api.github.com/repos/psf/requests/issues/2569/events | https://github.com/psf/requests/issues/2569 | 70,694,577 | MDU6SXNzdWU3MDY5NDU3Nw== | 2,569 | [Proposal] New Release Management Process | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-04-24T13:43:18Z | 2021-09-08T23:04:58Z | 2015-04-25T21:46:31Z | CONTRIBUTOR | resolved | In v2.6.1 we pulled in a new copy of urllib3. Typically this doesn't negatively affect us but in this case we've seen a bunch of new issues from the chunked encoding refactor in urllib3. Because that kind of stuff _should_ not break in a `.x` release I'm proposing we follow this process when preparing releases (and that we document it for the future):
For an `v*.*.x` release, e.g., `v2.6.1`, `v2.6.2`, `v2.6.3`, etc. we _only_ include changes to requests itself. This means anything that does not live in `requests/packages/{urllib3,chardet}/*`.
For a `v*.x.0` release, e.g., `v2.6.0`, `v2.7.0`, etc. we include changes to requests _and_ update the vendored libraries. The same goes for a `vx.0.0` release, but of course those have other implications as well.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2569/reactions"
} | https://api.github.com/repos/psf/requests/issues/2569/timeline | null | completed | null | null | false | [
"+1. Write it down in the docs, let's make it so.\n",
":cake: Will do tonight or tomorrow morning\n"
] |
https://api.github.com/repos/psf/requests/issues/2568 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2568/labels{/name} | https://api.github.com/repos/psf/requests/issues/2568/comments | https://api.github.com/repos/psf/requests/issues/2568/events | https://github.com/psf/requests/issues/2568 | 70,680,582 | MDU6SXNzdWU3MDY4MDU4Mg== | 2,568 | Keep-alive broken in 2.6.1 and 2.6.2 with chunked transfer-encoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/6117199?v=4",
"events_url": "https://api.github.com/users/lmikkelsen/events{/privacy}",
"followers_url": "https://api.github.com/users/lmikkelsen/followers",
"following_url": "https://api.github.com/users/lmikkelsen/following{/other_user}",
"gists_url": "https://api.github.com/users/lmikkelsen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmikkelsen",
"id": 6117199,
"login": "lmikkelsen",
"node_id": "MDQ6VXNlcjYxMTcxOTk=",
"organizations_url": "https://api.github.com/users/lmikkelsen/orgs",
"received_events_url": "https://api.github.com/users/lmikkelsen/received_events",
"repos_url": "https://api.github.com/users/lmikkelsen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmikkelsen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmikkelsen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmikkelsen",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": "2015-06-09T19:04:55Z",
"closed_issues": 1,
"created_at": "2015-01-18T20:07:07Z",
"creator": {
"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"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/24",
"id": 940766,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/24/labels",
"node_id": "MDk6TWlsZXN0b25lOTQwNzY2",
"number": 24,
"open_issues": 0,
"state": "closed",
"title": "2.7.0",
"updated_at": "2015-06-09T19:04:55Z",
"url": "https://api.github.com/repos/psf/requests/milestones/24"
} | 8 | 2015-04-24T12:41:40Z | 2021-09-08T23:04:53Z | 2015-05-03T15:03:10Z | NONE | resolved | Starting in 2.6.1 an exception is thrown if a connection with chunked transfer-encoding is reused. I suspect that the bug is in the bundled urllib3 which was upgraded from 1.10.2 to 1.10.3.
``` python
#!/usr/bin/env python
import requests
s = requests.Session()
r = s.get('http://httpbin.org/stream/1')
r.json()
r = s.get('http://httpbin.org/stream/1')
r.json()
```
```
$ ./test.py
Traceback (most recent call last):
File "./test.py", line 10, in <module>
r = s.get('http://httpbin.org/stream/1')
File "[...]/requests/requests/sessions.py", line 477, in get
return self.request('GET', url, **kwargs)
File "[...]/requests/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "[...]/requests/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "[...]/requests/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady())
```
| {
"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/2568/reactions"
} | https://api.github.com/repos/psf/requests/issues/2568/timeline | null | completed | null | null | false | [
"> I suspect that the bug is in the bundled urllib3 which was upgraded from 1.10.2 to 1.10.3.\n\nAs do I: can you open this bug over there, please? We'll fix it in that repository.\n",
"We should start preparing requests 2.7.0 with the fix for shazow/urllib3#598\n",
"Is there any workaround for this? I've gone ... |
https://api.github.com/repos/psf/requests/issues/2567 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2567/labels{/name} | https://api.github.com/repos/psf/requests/issues/2567/comments | https://api.github.com/repos/psf/requests/issues/2567/events | https://github.com/psf/requests/pull/2567 | 70,647,200 | MDExOlB1bGxSZXF1ZXN0MzQwMzQ4MDk= | 2,567 | Import aliases for Debian | {
"avatar_url": "https://avatars.githubusercontent.com/u/837573?v=4",
"events_url": "https://api.github.com/users/untitaker/events{/privacy}",
"followers_url": "https://api.github.com/users/untitaker/followers",
"following_url": "https://api.github.com/users/untitaker/following{/other_user}",
"gists_url": "https://api.github.com/users/untitaker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/untitaker",
"id": 837573,
"login": "untitaker",
"node_id": "MDQ6VXNlcjgzNzU3Mw==",
"organizations_url": "https://api.github.com/users/untitaker/orgs",
"received_events_url": "https://api.github.com/users/untitaker/received_events",
"repos_url": "https://api.github.com/users/untitaker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/untitaker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/untitaker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/untitaker",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": "2015-10-12T10:32:06Z",
"closed_issues": 7,
"created_at": "2015-04-29T13:03:39Z",
"creator": {
"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"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/25",
"id": 1089203,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lMTA4OTIwMw==",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "2.8.0",
"updated_at": "2015-10-12T10:32:06Z",
"url": "https://api.github.com/repos/psf/requests/milestones/25"
} | 63 | 2015-04-24T10:05:43Z | 2021-09-08T06:00:57Z | 2015-10-05T14:09:46Z | CONTRIBUTOR | resolved | Alternative to #2375, on the risk of being naive...
| {
"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/2567/reactions"
} | https://api.github.com/repos/psf/requests/issues/2567/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2567.diff",
"html_url": "https://github.com/psf/requests/pull/2567",
"merged_at": "2015-10-05T14:09:46Z",
"patch_url": "https://github.com/psf/requests/pull/2567.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2567"
} | true | [
"@sigmavirus24 You own this logic for the most part: how does this look?\n",
"Also I suppose it'd be nice if @dcramer tries this (because of https://github.com/kennethreitz/requests/issues/2558)\n",
"It _looks_ okay but I want to toy with it a bit before we merge it.\n",
"If you're fine with this, I'd like to... |
https://api.github.com/repos/psf/requests/issues/2566 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2566/labels{/name} | https://api.github.com/repos/psf/requests/issues/2566/comments | https://api.github.com/repos/psf/requests/issues/2566/events | https://github.com/psf/requests/issues/2566 | 70,638,217 | MDU6SXNzdWU3MDYzODIxNw== | 2,566 | Runtime Error | {
"avatar_url": "https://avatars.githubusercontent.com/u/2977844?v=4",
"events_url": "https://api.github.com/users/caimaoy/events{/privacy}",
"followers_url": "https://api.github.com/users/caimaoy/followers",
"following_url": "https://api.github.com/users/caimaoy/following{/other_user}",
"gists_url": "https://api.github.com/users/caimaoy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/caimaoy",
"id": 2977844,
"login": "caimaoy",
"node_id": "MDQ6VXNlcjI5Nzc4NDQ=",
"organizations_url": "https://api.github.com/users/caimaoy/orgs",
"received_events_url": "https://api.github.com/users/caimaoy/received_events",
"repos_url": "https://api.github.com/users/caimaoy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/caimaoy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/caimaoy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/caimaoy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-04-24T09:26:44Z | 2021-09-08T23:04:52Z | 2015-05-03T15:04:33Z | NONE | resolved | 
just requests.post()
.py file is ok, but I packaged .py file to .exe file with pyinstaller in win7 32bits, and then when I ran the .exe file in a win7 64bits matchine, It was like this.
| {
"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/2566/reactions"
} | https://api.github.com/repos/psf/requests/issues/2566/timeline | null | completed | null | null | false | [
"This does not like it could possibly be our problem. Do you see this if you replace the requests import with an import of any other third party library?\n",
"```\n# -*- coding: UTF-8 -*-\n\n'''\nLast modified time: 2015-04-24 17:16:47\nEdit time: 2015-04-24 17:17:16\nFile name: text.py\nEdit by caimaoy\n'''\n\ni... |
https://api.github.com/repos/psf/requests/issues/2565 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2565/labels{/name} | https://api.github.com/repos/psf/requests/issues/2565/comments | https://api.github.com/repos/psf/requests/issues/2565/events | https://github.com/psf/requests/issues/2565 | 70,570,132 | MDU6SXNzdWU3MDU3MDEzMg== | 2,565 | regression over 2.6.0 with session behind proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/12093095?v=4",
"events_url": "https://api.github.com/users/AlphaScorpii-dev/events{/privacy}",
"followers_url": "https://api.github.com/users/AlphaScorpii-dev/followers",
"following_url": "https://api.github.com/users/AlphaScorpii-dev/following{/other_user}",
"gists_url": "https://api.github.com/users/AlphaScorpii-dev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AlphaScorpii-dev",
"id": 12093095,
"login": "AlphaScorpii-dev",
"node_id": "MDQ6VXNlcjEyMDkzMDk1",
"organizations_url": "https://api.github.com/users/AlphaScorpii-dev/orgs",
"received_events_url": "https://api.github.com/users/AlphaScorpii-dev/received_events",
"repos_url": "https://api.github.com/users/AlphaScorpii-dev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AlphaScorpii-dev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AlphaScorpii-dev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AlphaScorpii-dev",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 13 | 2015-04-24T02:58:22Z | 2021-09-08T23:04:54Z | 2015-04-25T18:32:27Z | NONE | resolved | Hello everyone
Here is a piece of code that used to work until Requests 2.6.0
``` python
def __init__(self, proxy=None):
super(Model, self).__init__()
self.br = requests.Session()
if proxy is not None:
self.br.proxies = {"http": proxy, "https": proxy}
def __open_http(self, encoding, root_url):
if codecs.lookup(encoding).name == "shift_jis":
encoding = "cp932"
def open_http(method, url, values):
val = {x: y.encode(encoding) for (x, y) in values if y}
url = urljoin(root_url, url)
if method == "GET":
return self.br.get(url=url, params=val)
elif method == "POST":
return self.br.post(url=url, params=val)
return open_http
def login(self, user, password):
url = "http://mysite.html"
data = {"aACTION": "mailbox"}
reply = self.br.get(url=url, params=data)
doc = lxml.html.fromstring(reply.text)
form = doc.forms[1]
form.fields["aEMAIL"] = user
form.fields["aPASSWORD"] = password
response = lxml.html.submit_form(form, open_http=self.__open_http(encoding=reply.encoding, root_url=reply.url))
```
Since I upgraded to 2.6.1, I noticed that this login function would fail when I'm behind a proxy.
I did some debugging in the console, with 2.6.2, and could get the following.
1) the code works just fine with no proxy
2) when calling self.br.post(url=url, params=val), I always need to call it twice before having a valid reply. The first time results in a ResponseNotReady exception
3) when calling directly from requests.post instead of session.post, it works from the first time, even behind a proxy
Here is also the stacktrace I get
``` python
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request
httplib_response = conn.getresponse()
File "C:\Python34\lib\http\client.py", line 1164, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Request-sent
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request
httplib_response = conn.getresponse()
File "C:\Python34\lib\http\client.py", line 1164, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Request-sent
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\requests\adapters.py", line 370, in send
timeout=timeout
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 597, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\retry.py",line 245, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise
raise value.with_traceback(tb)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request
httplib_response = conn.getresponse()
File "C:\Python34\lib\http\client.py", line 1164, in getresponse
raise ResponseNotReady(self.__state)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ResponseNotReady('Request-sent',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\MyApp\MyApp.py", line 148, in updateModel
data_model.login(myaddress, mypassword)
File "F:\MyApp\model.py", line 108, in login
response = lxml.html.submit_form(form, open_http=self.__open_http(encoding=reply.encoding, root_url=reply.url))
File "C:\Python34\lib\site-packages\lxml\html\__init__.py", line 953, in submit_form
return open_http(form.method, url, values)
File "F:\MyApp\model.py", line 97, in open_http
return self.br.post(url=url, params=val)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 508, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "C:\Python34\lib\site-packages\requests\adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))
```
| {
"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/2565/reactions"
} | https://api.github.com/repos/psf/requests/issues/2565/timeline | null | completed | null | null | false | [
"Are you sure that it doesn't work the _first_ time in your sample code, and fail thereafter?\n",
"Indeed you are right... Sorry for the confusion.\nIn my case the first get is indeed sucessful, then the post fails, and i\nneed to send it a second time to make things work correctly.\n",
"Ok, so the problem we h... |
https://api.github.com/repos/psf/requests/issues/2564 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2564/labels{/name} | https://api.github.com/repos/psf/requests/issues/2564/comments | https://api.github.com/repos/psf/requests/issues/2564/events | https://github.com/psf/requests/issues/2564 | 70,462,809 | MDU6SXNzdWU3MDQ2MjgwOQ== | 2,564 | requests (2.6.1) sometimes does not decompress gzip-encoded content | {
"avatar_url": "https://avatars.githubusercontent.com/u/1677933?v=4",
"events_url": "https://api.github.com/users/convexset/events{/privacy}",
"followers_url": "https://api.github.com/users/convexset/followers",
"following_url": "https://api.github.com/users/convexset/following{/other_user}",
"gists_url": "https://api.github.com/users/convexset/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/convexset",
"id": 1677933,
"login": "convexset",
"node_id": "MDQ6VXNlcjE2Nzc5MzM=",
"organizations_url": "https://api.github.com/users/convexset/orgs",
"received_events_url": "https://api.github.com/users/convexset/received_events",
"repos_url": "https://api.github.com/users/convexset/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/convexset/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/convexset/subscriptions",
"type": "User",
"url": "https://api.github.com/users/convexset",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-23T17:08:46Z | 2021-09-08T23:04:59Z | 2015-04-23T17:30:51Z | NONE | resolved | I've been trying out the DigitalOcean API when I encountered the following "problem" with requests (2.6.1):
```
token = "xxxxxxxxxxxxxx"
api = "/account/keys"
headers = {"Content-Type": "application/json", "Authorization": "Bearer "+token}
r = requests.get("https://api.digitalocean.com/v2/"+api, headers=headers, data=data)
```
... results in output for r.content and r.text like...
```
'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03mR\xd9\xae\xa2@\x14\xfc\x95\x9b~\xd5\x19\x96\x06\x81Nn2(^\x14\x95\xc5\x05\xc5\xc9d\xd2t\xb7\n\xb2\xc9\xa6h\xfc\xf7a\xe6y\xce\xc3IUN\xaa\xea\xa1\xce\x0bT\xd5\xe5\xf7\x95u\x15@?_ \xa2\x00)P\x82<\x1c\x82S\x94\x9dYY\x94QV\x03\x04h\x88\xa0\x8c DPA#\x01\x11\x19i<\x12\t\xc2\x1aR%D)\x12\x05D\x05\xa4\xa9(<!\x85\x81!(\x9a0\x89\xc8_\xef^\xde\xa7|++\xfc\xa1\xf73\x86\xf6\x13O\x84\x8e\x88\xd3\x7ft~\xef\xb77\xd5\x85\x8b\x95^\x07\x83\xbd(\xd3\xb9f\xc0\xe7(\xd0\x06\xd0\x89oYP\xe4\xb9\xc2\xf9\xfb\xfc\x10\xedR\xe8u#\xb8.EM.}>\xc6\xce$\x9c\x8d\x0e\xc1\xed:\xad5\xee\xacz!\x9d\xc8d\x99\x19\xb9{\xbc1ek\x8a\xc6\x05\xe3\xb83w\xd3\x91_\xeb{\xb1c\xa4\x11f>]\x96\xf1ym\xca\xde\xf3\xde\x92\xb0\xb1\xa5\xa7\x15\xef\x14\x87\x97\xdb\x96O\x9d\x9d/rT\xa2\xf1\xa2\x13\x85\xbcQ7\xb6\xd9|\xe9\x87|\x99\xa8\xae\xa4\xb1\x95\xd4\x9et%\x0e\xd2\xc3\x02{\xa2\xdb\xf8\xb2\xe9\x06\xe3k\x97\x10\xb9*\x83\x88\x8ef\x92\x15\x84\xba\x91Y\xedT\xf8:[c\xc1\xa5\x0bC\x80\xcb\xbd2\xd8\x13\xc3\xa8!\x966\xdc\xa5\xd8\x1232\xb9\xc5\xca\xa0\xeb\xc6\x9e\x901~\xda\xa9\xee5\xbc\xbcN\xac\xbbAg~\xd6\xb9\xf3\xa2VI\xf2\x9c\x04\x85\xe2\xac\x8e\xcc\x91\xac\xf95\xc8}u\x93\\v\xb6Wp\x0f\x9a?,\x0f\x87\xcb4\x0e\xdc\xaea\x99\xfe\xb5=\xcd\x99S\xb5j\xa9\xdc;\xeex\xff\xfc\xfc y\xd6\xb2G\xc5\xea\x1f\xe7\x14G\xc9w\x92\xa7}?\x19NY\xdf\xcc\xff\x8e\xef_C\x90D\xd9\xb5\x7f\x8a\xd7{\x08RV\xe3\x1e\x81:\xafq\x02\x90\xf0~\xff\x01T\xdb#\x867\x02\x00\x00'
```
... which has to be ameliorated with...
```
import zlib
data = zlib.decompress(r.content, 16+zlib.MAX_WBITS)
```
... because `r.headers['content-encoding']` happens to be `'gzip'`.
It may be good to detect gzip and other compressive encodings and proactively decompress it. Or have a default option to decompress (because in some applications, premature decompression is undesirable).
But all this seems a bit unusual because the documentation says that "_Requests automatically decompresses gzip-encoded responses, and does its best to decode response content to unicode when possible._"
Same thing happens on CentOS Linux release 7.0.1406 (Core) (Python Python 2.7.5 via yum; requests 2.6.1) and OS X Yosemite 10.10.2 (Python 2.7.9 via Brew; requests 2.6.1).
| {
"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/2564/reactions"
} | https://api.github.com/repos/psf/requests/issues/2564/timeline | null | completed | null | null | false | [
"This is a duplicate of #2561 (or #2562 - I'm on my phone and can't check). Upgrading to v2.6.2 will fix this.\n"
] |
https://api.github.com/repos/psf/requests/issues/2563 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2563/labels{/name} | https://api.github.com/repos/psf/requests/issues/2563/comments | https://api.github.com/repos/psf/requests/issues/2563/events | https://github.com/psf/requests/issues/2563 | 70,459,058 | MDU6SXNzdWU3MDQ1OTA1OA== | 2,563 | Specify local port | {
"avatar_url": "https://avatars.githubusercontent.com/u/3183355?v=4",
"events_url": "https://api.github.com/users/vishalwy/events{/privacy}",
"followers_url": "https://api.github.com/users/vishalwy/followers",
"following_url": "https://api.github.com/users/vishalwy/following{/other_user}",
"gists_url": "https://api.github.com/users/vishalwy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vishalwy",
"id": 3183355,
"login": "vishalwy",
"node_id": "MDQ6VXNlcjMxODMzNTU=",
"organizations_url": "https://api.github.com/users/vishalwy/orgs",
"received_events_url": "https://api.github.com/users/vishalwy/received_events",
"repos_url": "https://api.github.com/users/vishalwy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vishalwy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vishalwy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vishalwy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-23T16:46:36Z | 2021-09-08T23:04:59Z | 2015-04-23T17:53:44Z | NONE | resolved | How do I specify the local port for the socket rather than picking up a random free port?
| {
"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/2563/reactions"
} | https://api.github.com/repos/psf/requests/issues/2563/timeline | null | completed | null | null | false | [
"You can do this using the [requests toolbelt](https://toolbelt.readthedocs.org/en/latest/). Get it by running `pip install requests-toolbelt`.\n\n``` python\n>>> import requests\n>>> from requests_toolbelt.adapters.source import SourceAddressAdapter\n>>> s = requests.Session()\n>>> s.mount('https://google.com', So... |
https://api.github.com/repos/psf/requests/issues/2562 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2562/labels{/name} | https://api.github.com/repos/psf/requests/issues/2562/comments | https://api.github.com/repos/psf/requests/issues/2562/events | https://github.com/psf/requests/issues/2562 | 70,417,288 | MDU6SXNzdWU3MDQxNzI4OA== | 2,562 | Merge with requesocks | {
"avatar_url": "https://avatars.githubusercontent.com/u/921251?v=4",
"events_url": "https://api.github.com/users/ikus060/events{/privacy}",
"followers_url": "https://api.github.com/users/ikus060/followers",
"following_url": "https://api.github.com/users/ikus060/following{/other_user}",
"gists_url": "https://api.github.com/users/ikus060/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ikus060",
"id": 921251,
"login": "ikus060",
"node_id": "MDQ6VXNlcjkyMTI1MQ==",
"organizations_url": "https://api.github.com/users/ikus060/orgs",
"received_events_url": "https://api.github.com/users/ikus060/received_events",
"repos_url": "https://api.github.com/users/ikus060/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ikus060/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ikus060/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ikus060",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2015-04-23T13:50:36Z | 2021-09-08T23:04:59Z | 2015-04-23T14:13:47Z | NONE | resolved | Any plan to merge modification made to requests to support SOCKS proxy ?
See https://github.com/dvska/requesocks
| {
"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/2562/reactions"
} | https://api.github.com/repos/psf/requests/issues/2562/timeline | null | completed | null | null | false | [
"It doesn't seem likely that we'll merge with requesocks as that hasn't been updated in over 2 years. Also that author never propsed a merge on their own.\n",
"May I propose to add this feature to requests ?\n",
"@ikus060 Many people have proposed it and even begun work: see #2425, #2156, #1982, shazow/urllib3#... |
https://api.github.com/repos/psf/requests/issues/2561 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2561/labels{/name} | https://api.github.com/repos/psf/requests/issues/2561/comments | https://api.github.com/repos/psf/requests/issues/2561/events | https://github.com/psf/requests/issues/2561 | 70,304,433 | MDU6SXNzdWU3MDMwNDQzMw== | 2,561 | Content-Encoding: Gzip not automatically decoded in 2.6.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1538550?v=4",
"events_url": "https://api.github.com/users/elsimir/events{/privacy}",
"followers_url": "https://api.github.com/users/elsimir/followers",
"following_url": "https://api.github.com/users/elsimir/following{/other_user}",
"gists_url": "https://api.github.com/users/elsimir/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elsimir",
"id": 1538550,
"login": "elsimir",
"node_id": "MDQ6VXNlcjE1Mzg1NTA=",
"organizations_url": "https://api.github.com/users/elsimir/orgs",
"received_events_url": "https://api.github.com/users/elsimir/received_events",
"repos_url": "https://api.github.com/users/elsimir/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elsimir/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elsimir/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elsimir",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2015-04-23T04:28:58Z | 2021-09-08T23:04:58Z | 2015-04-23T16:29:38Z | NONE | resolved | When using requests on python 2.7.8 ubuntu 14.10 from pypi, the current version 2.6.1 exhibits different behaviour from 2.6.0. Response.content is a gzipped binary string, instead of a decoded unicode string in 2.6.0. Is this change in behaviour intended? Running this script in both 2.6.0 and 2.6.1 shows the difference.
```
import requests
import gzip
import json
from StringIO import StringIO
resp = requests.get('https://liquidstate.atlassian.net/rest/api/2/serverInfo')
try:
print 'Reading as JSON'
print resp.json()
except Exception:
print 'Failed to load JSON, reading as Gzip'
print 'Reading as Gzip'
content = StringIO()
content.write(resp.content)
content.seek(0)
gz = gzip.GzipFile(fileobj=content)
print json.loads(gz.read())
```
Under version 2.6.0:
Reading as JSON
{u'versionNumbers': [6, 5, 0], u'serverTitle': u'JIRA', u'buildDate': u'2015-04-08T00:00:00.000+1000', u'scmInfo': u'0dc1796b325ae7e85b1dca228885a3417f39097a', u'baseUrl': u'https://liquidstate.atlassian.net', u'buildNumber': 65000, u'version': u'6.5-OD-01-120'}
And under version 2.6.1:
Reading as JSON
Failed to load JSON, reading as Gzip
Reading as Gzip
{u'versionNumbers': [6, 5, 0], u'serverTitle': u'JIRA', u'buildDate': u'2015-04-08T00:00:00.000+1000', u'scmInfo': u'0dc1796b325ae7e85b1dca228885a3417f39097a', u'baseUrl': u'https://liquidstate.atlassian.net', u'buildNumber': 65000, u'version': u'6.5-OD-01-120'}
| {
"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/2561/reactions"
} | https://api.github.com/repos/psf/requests/issues/2561/timeline | null | completed | null | null | false | [
"Thanks for this!\n\nThis is actually a regression in urllib3, so I've raised an issue there (shazow/urllib3#593). We'll fix it up and release a fix shortly. =)\n",
"This is likely to be an issue for many people. Thanks for fixing!\n",
"Was broken for us as well this morning (used by our product's CI tests), wo... |
https://api.github.com/repos/psf/requests/issues/2560 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2560/labels{/name} | https://api.github.com/repos/psf/requests/issues/2560/comments | https://api.github.com/repos/psf/requests/issues/2560/events | https://github.com/psf/requests/issues/2560 | 70,248,207 | MDU6SXNzdWU3MDI0ODIwNw== | 2,560 | Add contribution guidelines | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-04-22T22:10:45Z | 2021-09-08T23:04:56Z | 2015-04-29T13:04:27Z | CONTRIBUTOR | resolved | https://github.com/benoitc/gunicorn/blob/master/CONTRIBUTING.md
| {
"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/2560/reactions"
} | https://api.github.com/repos/psf/requests/issues/2560/timeline | null | completed | null | null | false | [
"Presumably this document will be pretty similar to the content of [these](http://docs.python-requests.org/en/latest/dev/philosophy/) [two](http://docs.python-requests.org/en/latest/dev/todo/) pages.\n",
"Thoughts on adding something akin to [this](https://github.com/sigmavirus24/requests-toolbelt/blob/master/COD... |
https://api.github.com/repos/psf/requests/issues/2559 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2559/labels{/name} | https://api.github.com/repos/psf/requests/issues/2559/comments | https://api.github.com/repos/psf/requests/issues/2559/events | https://github.com/psf/requests/issues/2559 | 70,222,691 | MDU6SXNzdWU3MDIyMjY5MQ== | 2,559 | Make an official logo and stickers for it | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2015-04-22T20:07:01Z | 2021-09-08T18:00:53Z | 2016-04-16T04:14:01Z | CONTRIBUTOR | resolved | Proposed logo:
:sparkles: :cake: :sparkles:
| {
"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/2559/reactions"
} | https://api.github.com/repos/psf/requests/issues/2559/timeline | null | completed | null | null | false | [
"If we could get a designer to render it in a way that wasn't just emoji, this'd be perfect.\n",
"/cc @kennethreitz \n",
"This would be the second emoji logo stick I have!\n\n:muscle: :computer: :us: \n",
"YES!\n",
"`>>> import requests`\n:sparkles: :cake: :sparkles:\n",
"the github3.py stickers are some ... |
https://api.github.com/repos/psf/requests/issues/2558 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2558/labels{/name} | https://api.github.com/repos/psf/requests/issues/2558/comments | https://api.github.com/repos/psf/requests/issues/2558/events | https://github.com/psf/requests/issues/2558 | 70,200,961 | MDU6SXNzdWU3MDIwMDk2MQ== | 2,558 | Import issues in 2.5.2+ | {
"avatar_url": "https://avatars.githubusercontent.com/u/23610?v=4",
"events_url": "https://api.github.com/users/dcramer/events{/privacy}",
"followers_url": "https://api.github.com/users/dcramer/followers",
"following_url": "https://api.github.com/users/dcramer/following{/other_user}",
"gists_url": "https://api.github.com/users/dcramer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dcramer",
"id": 23610,
"login": "dcramer",
"node_id": "MDQ6VXNlcjIzNjEw",
"organizations_url": "https://api.github.com/users/dcramer/orgs",
"received_events_url": "https://api.github.com/users/dcramer/received_events",
"repos_url": "https://api.github.com/users/dcramer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dcramer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dcramer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dcramer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-04-22T18:27:52Z | 2021-09-08T23:05:00Z | 2015-04-22T21:27:35Z | NONE | resolved | While I'm not entirely certain of the problem, this reproduces in our environment with an obscure (unrelated to requests) import error.
I've confirmed this was introduced in 2.5.2 and exists in 2.6.0, as well as 1f0e5775f28d6c2db3430fdc16a095762816bf87
If I had to guess, I'd say its related to this:
- Copy pip's import machinery. When downstream redistributors remove requests.packages.urllib3 the import machinery will continue to let those same symbols work. Example usage in requests' documentation and 3rd-party libraries relying on the vendored copies of urllib3 will work without having to fallback to the system urllib3.
| {
"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/2558/reactions"
} | https://api.github.com/repos/psf/requests/issues/2558/timeline | null | completed | null | null | false | [
"If i end up with some spare time I will try to dig into this more. Unfortunately the codebase that this reproduces on is not public. That said, here's the error (though all I can say is it happens somewhere in the import cycle after some initial things load):\n\n```\n./bin/sentry upgrade --noinput\n/Users/dcramer/... |
https://api.github.com/repos/psf/requests/issues/2557 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2557/labels{/name} | https://api.github.com/repos/psf/requests/issues/2557/comments | https://api.github.com/repos/psf/requests/issues/2557/events | https://github.com/psf/requests/issues/2557 | 70,194,424 | MDU6SXNzdWU3MDE5NDQyNA== | 2,557 | Make chardet an optional dependency | {
"avatar_url": "https://avatars.githubusercontent.com/u/23610?v=4",
"events_url": "https://api.github.com/users/dcramer/events{/privacy}",
"followers_url": "https://api.github.com/users/dcramer/followers",
"following_url": "https://api.github.com/users/dcramer/following{/other_user}",
"gists_url": "https://api.github.com/users/dcramer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dcramer",
"id": 23610,
"login": "dcramer",
"node_id": "MDQ6VXNlcjIzNjEw",
"organizations_url": "https://api.github.com/users/dcramer/orgs",
"received_events_url": "https://api.github.com/users/dcramer/received_events",
"repos_url": "https://api.github.com/users/dcramer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dcramer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dcramer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dcramer",
"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": "f7c6c7",
"default": false,
"d... | closed | true | null | [] | null | 7 | 2015-04-22T17:59:41Z | 2021-09-08T21:00:48Z | 2015-11-05T18:03:33Z | NONE | resolved | It has a serious performance hit and it'd be nice if it was easier to disable than:
```
if not response.encoding:
response.encoding = 'utf-8'
```
I can't stress "serious" enough in the performance hit here. It was enough to cripple the entirety of Sentry's worker cluster which is way under utilization most of the time.
| {
"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/2557/reactions"
} | https://api.github.com/repos/psf/requests/issues/2557/timeline | null | completed | null | null | false | [
"The easiest way to disable it would be to disable the package entirely in your infrastructure. This could be done by monkeying about with `sys.modules`, monkeypatching directly, or by providing another package called chardet that is just a no-op.\n\nThe best we're likely to get to an 'official' API for this is to ... |
https://api.github.com/repos/psf/requests/issues/2556 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2556/labels{/name} | https://api.github.com/repos/psf/requests/issues/2556/comments | https://api.github.com/repos/psf/requests/issues/2556/events | https://github.com/psf/requests/pull/2556 | 70,123,697 | MDExOlB1bGxSZXF1ZXN0MzM4NTcwMzU= | 2,556 | Prepare v2.6.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 22 | 2015-04-22T13:19:47Z | 2021-09-08T07:01:00Z | 2015-04-22T22:12:26Z | CONTRIBUTOR | resolved | I'll probably update the history and such in this branch too.
/cc @aanand
| {
"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/2556/reactions"
} | https://api.github.com/repos/psf/requests/issues/2556/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2556.diff",
"html_url": "https://github.com/psf/requests/pull/2556",
"merged_at": "2015-04-22T22:12:26Z",
"patch_url": "https://github.com/psf/requests/pull/2556.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2556"
} | true | [
"LGTM, but it updates urllib3, so we need to co-ordinate with @shazow to make sure he's comfortable with pushing a new release of urllib3 as well.\n\nThoughts @shazow?\n",
"Courtesy nod to @shazow that we'd like to release soon so you might get bugged by downstream redistributors\n",
"Also, a head's up to @erio... |
https://api.github.com/repos/psf/requests/issues/2555 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2555/labels{/name} | https://api.github.com/repos/psf/requests/issues/2555/comments | https://api.github.com/repos/psf/requests/issues/2555/events | https://github.com/psf/requests/issues/2555 | 69,912,824 | MDU6SXNzdWU2OTkxMjgyNA== | 2,555 | requests does not respect the timeout set by socket.setdefaultimeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/221386?v=4",
"events_url": "https://api.github.com/users/ikatson/events{/privacy}",
"followers_url": "https://api.github.com/users/ikatson/followers",
"following_url": "https://api.github.com/users/ikatson/following{/other_user}",
"gists_url": "https://api.github.com/users/ikatson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ikatson",
"id": 221386,
"login": "ikatson",
"node_id": "MDQ6VXNlcjIyMTM4Ng==",
"organizations_url": "https://api.github.com/users/ikatson/orgs",
"received_events_url": "https://api.github.com/users/ikatson/received_events",
"repos_url": "https://api.github.com/users/ikatson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ikatson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ikatson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ikatson",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-21T18:02:43Z | 2021-09-08T23:05:01Z | 2015-04-21T18:43:36Z | NONE | resolved | Steps to reproduce:
``` py
import socket
import requests
socket.setdefaultimeout(0.0001)
# Expected this to raise exception, but it does not.
requests.get('http://google.com')
# These 2 raise an exception
requests.get('http://google.com', timeout=socket.gettimeout())
requests.get('http://google.com', timeout=socket._GLOBAL_DEFAULT_TIMEOUT)
```
Looks like the default "None" value is propagated to urllib3, which has `socket._GLOBAL_DEFAULT_TIMEOUT` set as the default timeout.
Is this by-design or a 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/2555/reactions"
} | https://api.github.com/repos/psf/requests/issues/2555/timeline | null | completed | null | null | false | [
"Duplicate of #2228. Please check open issues in the future for possible duplicates.\n"
] |
https://api.github.com/repos/psf/requests/issues/2554 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2554/labels{/name} | https://api.github.com/repos/psf/requests/issues/2554/comments | https://api.github.com/repos/psf/requests/issues/2554/events | https://github.com/psf/requests/issues/2554 | 69,869,660 | MDU6SXNzdWU2OTg2OTY2MA== | 2,554 | Ability to prefix session URLs | {
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"events_url": "https://api.github.com/users/foxx/events{/privacy}",
"followers_url": "https://api.github.com/users/foxx/followers",
"following_url": "https://api.github.com/users/foxx/following{/other_user}",
"gists_url": "https://api.github.com/users/foxx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/foxx",
"id": 651797,
"login": "foxx",
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"organizations_url": "https://api.github.com/users/foxx/orgs",
"received_events_url": "https://api.github.com/users/foxx/received_events",
"repos_url": "https://api.github.com/users/foxx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/foxx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/foxx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/foxx",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 16 | 2015-04-21T14:57:39Z | 2021-08-31T00:06:41Z | 2015-04-21T15:23:33Z | NONE | resolved | It would be nice to be able to prefix session URLs to avoid repetitive code.
Consider the following code;
```
from requests import Session
class MyTestCase(LiveServerTestCase):
def test_url(self):
s = Session()
s.get("{}/api/people'.format(self.server_url))
s.get("{}/api/cats'.format(self.server_url))
```
This could look a lot prettier by doing;
```
from requests import Session
class MyTestCase(LiveServerTestCase):
def test_url(self):
s = Session(prefix_url='http://example.com')
s.get('/api/people')
s.get('/api/cats')
```
In the mean time, I was able to achieve this by using a subclass;
```
class Session(requests.Session):
"""Helpers for performing API queries"""
def __init__(self, *args, **kwargs):
self.prefix_url = kwargs.get('prefix_url', None)
super(Session, self).__init__(*args, **kwargs)
def request(self, method, url, *args, **kwargs):
if self.prefix_url:
url = "{}{}".format(self.prefix_url, url)
return super(Session, self).request(method, url, *args, **kwargs)
```
@kennethreitz would such a PR be accepted? Or does anyone know of a better way this could be done?
| {
"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/2554/reactions"
} | https://api.github.com/repos/psf/requests/issues/2554/timeline | null | completed | null | null | false | [
"As we've described in previous issues (https://github.com/kennethreitz/requests/issues/2445, https://github.com/kennethreitz/requests/issues/133) this is not something we feel belongs in requests itself. There are several libraries that do this in differing ways.\n\nThe easiest way to implement this yourself would... |
https://api.github.com/repos/psf/requests/issues/2553 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2553/labels{/name} | https://api.github.com/repos/psf/requests/issues/2553/comments | https://api.github.com/repos/psf/requests/issues/2553/events | https://github.com/psf/requests/pull/2553 | 69,715,867 | MDExOlB1bGxSZXF1ZXN0MzM3MjEzMTc= | 2,553 | Simplify PreparedRequest.prepare API | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2015-04-21T01:14:53Z | 2021-09-08T08:00:49Z | 2015-04-21T05:59:55Z | CONTRIBUTOR | resolved | Do not require that hooks be passed as an empty list to
PreparedRequest.prepare. In the event hooks is None in prepare or
prepare_hooks, use an empty list as a default.
Related to #2552
| {
"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/2553/reactions"
} | https://api.github.com/repos/psf/requests/issues/2553/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2553.diff",
"html_url": "https://github.com/psf/requests/pull/2553",
"merged_at": "2015-04-21T05:59:55Z",
"patch_url": "https://github.com/psf/requests/pull/2553.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2553"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/2552 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2552/labels{/name} | https://api.github.com/repos/psf/requests/issues/2552/comments | https://api.github.com/repos/psf/requests/issues/2552/events | https://github.com/psf/requests/issues/2552 | 69,663,441 | MDU6SXNzdWU2OTY2MzQ0MQ== | 2,552 | Why does the PreparedRequest.prepare method provide None as the default parameter value for those who cannot be None? | {
"avatar_url": "https://avatars.githubusercontent.com/u/4114154?v=4",
"events_url": "https://api.github.com/users/zhaoguixu/events{/privacy}",
"followers_url": "https://api.github.com/users/zhaoguixu/followers",
"following_url": "https://api.github.com/users/zhaoguixu/following{/other_user}",
"gists_url": "https://api.github.com/users/zhaoguixu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zhaoguixu",
"id": 4114154,
"login": "zhaoguixu",
"node_id": "MDQ6VXNlcjQxMTQxNTQ=",
"organizations_url": "https://api.github.com/users/zhaoguixu/orgs",
"received_events_url": "https://api.github.com/users/zhaoguixu/received_events",
"repos_url": "https://api.github.com/users/zhaoguixu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zhaoguixu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhaoguixu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zhaoguixu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-04-20T19:33:14Z | 2021-09-08T23:04:53Z | 2015-05-03T15:03:37Z | NONE | resolved | Hi,
I just inspect some test cases of your project, and find some test cases like
``` python
def test_prepare_unicode_url():
p = PreparedRequest()
p.prepare(
method='GET',
url=u('http://www.example.com/üniçø∂é'),
hooks=[]
)
assert_copy(p, p.copy())
```
When I remove some parameters for calling the prepare method, it will raise exceptions(with url being missed) or traceback(with hooks being missed).
Is it unreasonable to provide None default parameter for some arguments cannot be None?
(A related PR is #2301).
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/2552/reactions"
} | https://api.github.com/repos/psf/requests/issues/2552/timeline | null | completed | null | null | false | [
"I see no good reason to leave those as `None`-able defaults. I think we could get away with patching this in a minor release, because while it's _technically_ backward-incompatible, in practice I don't think anyone can be correctly relying on this behaviour. @sigmavirus24?\n",
"Personally, I like the idea of mor... |
https://api.github.com/repos/psf/requests/issues/2551 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2551/labels{/name} | https://api.github.com/repos/psf/requests/issues/2551/comments | https://api.github.com/repos/psf/requests/issues/2551/events | https://github.com/psf/requests/pull/2551 | 68,199,299 | MDExOlB1bGxSZXF1ZXN0MzMyMDU2NTg= | 2,551 | EditorConfig | {
"avatar_url": "https://avatars.githubusercontent.com/u/285352?v=4",
"events_url": "https://api.github.com/users/treyhunner/events{/privacy}",
"followers_url": "https://api.github.com/users/treyhunner/followers",
"following_url": "https://api.github.com/users/treyhunner/following{/other_user}",
"gists_url": "https://api.github.com/users/treyhunner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/treyhunner",
"id": 285352,
"login": "treyhunner",
"node_id": "MDQ6VXNlcjI4NTM1Mg==",
"organizations_url": "https://api.github.com/users/treyhunner/orgs",
"received_events_url": "https://api.github.com/users/treyhunner/received_events",
"repos_url": "https://api.github.com/users/treyhunner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/treyhunner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/treyhunner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/treyhunner",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-13T21:30:47Z | 2021-09-08T08:00:50Z | 2015-04-13T21:45:23Z | MEMBER | resolved | Previously proposed and declined in #893.
I am opening this because I think it is time to reassess whether EditorConfig is appropriate for this project.
I did some GitHub diving and found the following Python projects which use EditorConfig:
- [flask-wtf](https://github.com/lepture/flask-wtf)
- [cookiecutter-django](https://github.com/pydanny/cookiecutter-django)
I also found the following Python-powered websites that use EditorConfig:
- [MDN](https://github.com/mozilla/kuma)
- [gratipay](https://github.com/gratipay/gratipay.com)
- [mozilla.org](https://github.com/mozilla/bedrock)
This file is a human-readable auto-enforced whitespace style guide for all files (_not just Python_).
For:
- **users of editors with built-in support** (e.g. PyCharm, Coda 2, SourceLair) this file will ensure the code style is enforced automatically.
- **users with a plugin installed** (available for most major editors) this file will also auto-enforce the code style
- **all other users** this simply serves as a white space style guide.
| {
"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/2551/reactions"
} | https://api.github.com/repos/psf/requests/issues/2551/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2551.diff",
"html_url": "https://github.com/psf/requests/pull/2551",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2551.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2551"
} | true | [
"Thanks for this!\n\nI do not believe that EditorConfig is appropriate at this time. In general, I resent the relentless expansion of dotfiles that various tools require people to add to the project root. I appreciate that these tools are close to many people's hearts, and that they provide value for plenty of peop... |
https://api.github.com/repos/psf/requests/issues/2550 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2550/labels{/name} | https://api.github.com/repos/psf/requests/issues/2550/comments | https://api.github.com/repos/psf/requests/issues/2550/events | https://github.com/psf/requests/pull/2550 | 68,129,304 | MDExOlB1bGxSZXF1ZXN0MzMxNzUzOTU= | 2,550 | Recommended packages. | {
"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 | 5 | 2015-04-13T15:40:17Z | 2021-09-08T08:00:49Z | 2015-04-17T12:44:38Z | MEMBER | resolved | Beginnings of work to have a list of recommended third-party (fourth-party?) packages.
@sigmavirus24 @kennethreitz feel free to push on top of this branch to add other things if you want.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2550/reactions"
} | https://api.github.com/repos/psf/requests/issues/2550/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2550.diff",
"html_url": "https://github.com/psf/requests/pull/2550",
"merged_at": "2015-04-17T12:44:38Z",
"patch_url": "https://github.com/psf/requests/pull/2550.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2550"
} | true | [
"@kennethreitz added the requests-toolbelt to the sidebar a while back. Would it be best to move it here?\n",
"Maybe have it here as well?\n",
"Let's replace the toolbar link to a link to this page. \n",
"`==kennethreitz`. I'll push an update for that tonight I think\n",
"@sigmavirus24 send another pr with ... |
https://api.github.com/repos/psf/requests/issues/2549 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2549/labels{/name} | https://api.github.com/repos/psf/requests/issues/2549/comments | https://api.github.com/repos/psf/requests/issues/2549/events | https://github.com/psf/requests/issues/2549 | 67,885,372 | MDU6SXNzdWU2Nzg4NTM3Mg== | 2,549 | Cookies issue causing segfault still in 2.6? | {
"avatar_url": "https://avatars.githubusercontent.com/u/10351369?v=4",
"events_url": "https://api.github.com/users/11phc/events{/privacy}",
"followers_url": "https://api.github.com/users/11phc/followers",
"following_url": "https://api.github.com/users/11phc/following{/other_user}",
"gists_url": "https://api.github.com/users/11phc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/11phc",
"id": 10351369,
"login": "11phc",
"node_id": "MDQ6VXNlcjEwMzUxMzY5",
"organizations_url": "https://api.github.com/users/11phc/orgs",
"received_events_url": "https://api.github.com/users/11phc/received_events",
"repos_url": "https://api.github.com/users/11phc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/11phc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/11phc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/11phc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-04-12T08:11:06Z | 2021-09-08T23:05:42Z | 2015-04-12T11:23:51Z | NONE | resolved | FYI I think there might still be a cookies related issue... I was having issues two weeks ago with cookies.py in 2.5.3 i think, but I have downloaded the new requests 2.6 running on raspberry pi for a datalogger every minute, and it's much better but now it segfaults every 24 hours or so in a slightly different place. (FYI I'm not very competent on python debugging yet)
Traceback show's it segfaulting on line 241 in python2.7/rfc822.py (it shows as line 243 in my screenshot but I had already added a couple of lines above for debugging - it is whatever line "for line in self.headers" is on in getAllMatchingHeaders), invoked ultimately from requests/cookies.py.
The process is just repeatedly loading a webserver.html page on a PLC we have on our intranet, to read it's variables, so it's not going over the internet.
When running, normally the 'lst' variable is always returned as [] so I dont even need this procedure and for now I've bypassed the "for line in self.headers" bit to keep it from segfaulting once a day.
If you want more info do please let me know what you need.
And of course, thanks for the great work.

| {
"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/2549/reactions"
} | https://api.github.com/repos/psf/requests/issues/2549/timeline | null | completed | null | null | false | [
"Or is this just a python2.7 bug?\n",
"@11phc it is just a python2.7 bug. I would check bugs.python.org to figure out which version number has the fix. If you can, I would update your version of python to 2.7.9 on your Pi.\n\nCheers,\nIan\n",
"ok thanks very much Ian. I was on version 2.7.3, but unfortunately ... |
https://api.github.com/repos/psf/requests/issues/2548 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2548/labels{/name} | https://api.github.com/repos/psf/requests/issues/2548/comments | https://api.github.com/repos/psf/requests/issues/2548/events | https://github.com/psf/requests/pull/2548 | 67,708,226 | MDExOlB1bGxSZXF1ZXN0MzMwOTMyNTg= | 2,548 | Add a timeout to select(), otherwise we can block forever on a bad socket | {
"avatar_url": "https://avatars.githubusercontent.com/u/1581257?v=4",
"events_url": "https://api.github.com/users/natecode/events{/privacy}",
"followers_url": "https://api.github.com/users/natecode/followers",
"following_url": "https://api.github.com/users/natecode/following{/other_user}",
"gists_url": "https://api.github.com/users/natecode/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/natecode",
"id": 1581257,
"login": "natecode",
"node_id": "MDQ6VXNlcjE1ODEyNTc=",
"organizations_url": "https://api.github.com/users/natecode/orgs",
"received_events_url": "https://api.github.com/users/natecode/received_events",
"repos_url": "https://api.github.com/users/natecode/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/natecode/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/natecode/subscriptions",
"type": "User",
"url": "https://api.github.com/users/natecode",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2015-04-11T00:08:31Z | 2021-09-08T08:00:51Z | 2015-04-11T00:12:53Z | NONE | resolved | All the other select.select() calls in this module use a timeout. Without this bugfix, a server that fails to complete the handshake will block forever. We've seen this in production.
| {
"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/2548/reactions"
} | https://api.github.com/repos/psf/requests/issues/2548/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2548.diff",
"html_url": "https://github.com/psf/requests/pull/2548",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/2548.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2548"
} | true | [
"Can you open this pull request on urllib3? All your code changes are there.\n",
"Please re-open this issue. I just checked `urllib3` and it has this same fix in it so `requests` needs to update your code from urllib3.\n",
"It appears great minds think alike https://github.com/shazow/urllib3/commit/14d09fc8fd9d... |
https://api.github.com/repos/psf/requests/issues/2547 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2547/labels{/name} | https://api.github.com/repos/psf/requests/issues/2547/comments | https://api.github.com/repos/psf/requests/issues/2547/events | https://github.com/psf/requests/pull/2547 | 67,687,062 | MDExOlB1bGxSZXF1ZXN0MzMwODUwNzM= | 2,547 | Fix MisssingSchema error message does not handle unicode input correctly #2540 | {
"avatar_url": "https://avatars.githubusercontent.com/u/11888277?v=4",
"events_url": "https://api.github.com/users/sh1buy/events{/privacy}",
"followers_url": "https://api.github.com/users/sh1buy/followers",
"following_url": "https://api.github.com/users/sh1buy/following{/other_user}",
"gists_url": "https://api.github.com/users/sh1buy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sh1buy",
"id": 11888277,
"login": "sh1buy",
"node_id": "MDQ6VXNlcjExODg4Mjc3",
"organizations_url": "https://api.github.com/users/sh1buy/orgs",
"received_events_url": "https://api.github.com/users/sh1buy/received_events",
"repos_url": "https://api.github.com/users/sh1buy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sh1buy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sh1buy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sh1buy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2015-04-10T21:27:24Z | 2021-09-08T08:00:51Z | 2015-04-11T02:59:13Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2547/reactions"
} | https://api.github.com/repos/psf/requests/issues/2547/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2547.diff",
"html_url": "https://github.com/psf/requests/pull/2547",
"merged_at": "2015-04-11T02:59:13Z",
"patch_url": "https://github.com/psf/requests/pull/2547.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2547"
} | true | [
"I think this won't work on Python 3 with a binary URL, though I need to test that.\n",
"You rigth. This add 'b' to url. \n\n```\nrequests.exceptions.MissingSchema: Invalid URL b'example.com': \nNo schema supplied. Perhaps you meant http://b'example.com'?\n```\n",
"Whether it is necessary to display URL comple... | |
https://api.github.com/repos/psf/requests/issues/2546 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2546/labels{/name} | https://api.github.com/repos/psf/requests/issues/2546/comments | https://api.github.com/repos/psf/requests/issues/2546/events | https://github.com/psf/requests/pull/2546 | 67,657,112 | MDExOlB1bGxSZXF1ZXN0MzMwNzIzMzc= | 2,546 | Keepers of the Three Crystals. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}... | null | 1 | 2015-04-10T18:41:20Z | 2021-09-08T08:00:50Z | 2015-04-14T18:03:08Z | MEMBER | resolved | PyCon's weird.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2546/reactions"
} | https://api.github.com/repos/psf/requests/issues/2546/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2546.diff",
"html_url": "https://github.com/psf/requests/pull/2546",
"merged_at": "2015-04-14T18:03:08Z",
"patch_url": "https://github.com/psf/requests/pull/2546.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2546"
} | true | [
":sparkles: :sparkles: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/2545 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2545/labels{/name} | https://api.github.com/repos/psf/requests/issues/2545/comments | https://api.github.com/repos/psf/requests/issues/2545/events | https://github.com/psf/requests/issues/2545 | 67,650,255 | MDU6SXNzdWU2NzY1MDI1NQ== | 2,545 | Document filtering of 'None' values for url-encoded parameters | {
"avatar_url": "https://avatars.githubusercontent.com/u/524596?v=4",
"events_url": "https://api.github.com/users/Varriount/events{/privacy}",
"followers_url": "https://api.github.com/users/Varriount/followers",
"following_url": "https://api.github.com/users/Varriount/following{/other_user}",
"gists_url": "https://api.github.com/users/Varriount/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Varriount",
"id": 524596,
"login": "Varriount",
"node_id": "MDQ6VXNlcjUyNDU5Ng==",
"organizations_url": "https://api.github.com/users/Varriount/orgs",
"received_events_url": "https://api.github.com/users/Varriount/received_events",
"repos_url": "https://api.github.com/users/Varriount/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Varriount/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Varriount/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Varriount",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-10T18:05:41Z | 2021-09-08T23:05:44Z | 2015-04-10T18:46:53Z | NONE | resolved | Currently, when passing a dictionary/list of pairs to the request constructor's `params` parameter, any 'None' values are filtered when encoding the request url. If this is intended behavior or not something that will change, then this should be documented (actually, even if it is subject to change, it should probably by documented anyway so that people don't rely on it)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2545/reactions"
} | https://api.github.com/repos/psf/requests/issues/2545/timeline | null | completed | null | null | false | [
"It already is documented. =) See [this block](http://docs.python-requests.org/en/latest/user/quickstart/#passing-parameters-in-urls).\n"
] |
https://api.github.com/repos/psf/requests/issues/2544 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2544/labels{/name} | https://api.github.com/repos/psf/requests/issues/2544/comments | https://api.github.com/repos/psf/requests/issues/2544/events | https://github.com/psf/requests/issues/2544 | 67,565,002 | MDU6SXNzdWU2NzU2NTAwMg== | 2,544 | Fully disable cookie handling in Sessions | {
"avatar_url": "https://avatars.githubusercontent.com/u/1148150?v=4",
"events_url": "https://api.github.com/users/logc/events{/privacy}",
"followers_url": "https://api.github.com/users/logc/followers",
"following_url": "https://api.github.com/users/logc/following{/other_user}",
"gists_url": "https://api.github.com/users/logc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/logc",
"id": 1148150,
"login": "logc",
"node_id": "MDQ6VXNlcjExNDgxNTA=",
"organizations_url": "https://api.github.com/users/logc/orgs",
"received_events_url": "https://api.github.com/users/logc/received_events",
"repos_url": "https://api.github.com/users/logc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/logc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/logc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/logc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-04-10T10:36:29Z | 2021-09-08T23:05:43Z | 2015-04-10T11:03:59Z | NONE | resolved | This is a feature request, not a bug.
When creating a new `Session` in order to issue multiple requests, one can specify a `CookiePolicy` to reject all cookies (e.g. [this way](http://stackoverflow.com/a/21714597/2250036)). But for each new request, a new `RequestsCookieJar` is created, with a `DefaultCookiePolicy`, where previous cookies are merged.
Since there are no previous cookies, the behaviour is correct (no cookies are accepted), but the creation of those objects is costly and leads to a decreased performance. Working around this issue, with a subclass of Session that does not perform any cookie handling, gives a speedup of 1.32x or more, in our measurements.
Furthermore, it is a bit surprising that `Session` imposes this object creation to users, even if the user has specified that no cookie handling is needed (by setting the custom `CookiePolicy` after initialization), and even for a single request that does not create a `Session` (since a `Session` is created under the hood by all convenience methods like `requests.get`, `requests.post`).
Why is this behaviour so? Are there plans to create a variant of `Session` where cookies can be fully disabled? May we contribute our own workaround, if there is interest from other users?
| {
"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/2544/reactions"
} | https://api.github.com/repos/psf/requests/issues/2544/timeline | null | completed | null | null | false | [
"Thanks for this feature request!\n\nThe reality is that you haven't told the `Session` no cookie handling is needed, you've only told the cookiejar it owns. The `Session` has no way to be told that you don't want cookie handling, and it's simply not a feature requests possesses.\n\nThe reality is, vastly more user... |
https://api.github.com/repos/psf/requests/issues/2543 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2543/labels{/name} | https://api.github.com/repos/psf/requests/issues/2543/comments | https://api.github.com/repos/psf/requests/issues/2543/events | https://github.com/psf/requests/issues/2543 | 67,485,553 | MDU6SXNzdWU2NzQ4NTU1Mw== | 2,543 | OpenSSL.SSL.SysCallError: (104, 'Connection reset by peer') | {
"avatar_url": "https://avatars.githubusercontent.com/u/3755338?v=4",
"events_url": "https://api.github.com/users/stamaimer/events{/privacy}",
"followers_url": "https://api.github.com/users/stamaimer/followers",
"following_url": "https://api.github.com/users/stamaimer/following{/other_user}",
"gists_url": "https://api.github.com/users/stamaimer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stamaimer",
"id": 3755338,
"login": "stamaimer",
"node_id": "MDQ6VXNlcjM3NTUzMzg=",
"organizations_url": "https://api.github.com/users/stamaimer/orgs",
"received_events_url": "https://api.github.com/users/stamaimer/received_events",
"repos_url": "https://api.github.com/users/stamaimer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stamaimer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stamaimer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stamaimer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 39 | 2015-04-10T01:31:08Z | 2021-09-08T23:00:52Z | 2015-04-21T05:58:54Z | NONE | resolved | I'm using the python package `requests` to send requests to https://mobile.twitter.com/username/following.
At first, I encounter the exception : requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol. To solve that, I follow this solution to write a SSLAdapter to specify PROTOCOL_TLSv1.
After that, I encounter another exception : requests.exceptions.SSLError: [Errno bad handshake] (-1, 'Unexpected EOF’). And, I found this, but i send request and receive data in the same process.
And then, I use `requests` to send requests to https://api.twitter.com/1.1/friends/ids.json. The second exception is gone(still didn't understand why). But I encounter third exception : OpenSSL.SSL.SysCallError: (104, 'Connection reset by peer'). I found [this](http://stackoverflow.com/questions/383738/104-connection-reset-by-peer-socket-error-or-when-does-closing-a-socket-resu) in SO. And I add `time.sleep(10)` before send requests. But the third exception still happen.
So the second and the third exception still happen. Maybe the response content is too big too read? Or it's the problem of twitter server(some SO [solutions](http://stackoverflow.com/questions/23397460/error-handling-boto-error-104-connection-reset-by-peer) said about it ).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2543/reactions"
} | https://api.github.com/repos/psf/requests/issues/2543/timeline | null | completed | null | null | false | [
"All of those exceptions indicate that Twitter is closing the connection on you. You should check whether your data is valid.\n",
"the data means the request header?\n",
"Could be the request headers, could be the request body. \n",
"the requests send to twitter need to be authorized. Maybe the bearer token i... |
https://api.github.com/repos/psf/requests/issues/2542 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2542/labels{/name} | https://api.github.com/repos/psf/requests/issues/2542/comments | https://api.github.com/repos/psf/requests/issues/2542/events | https://github.com/psf/requests/issues/2542 | 67,485,487 | MDU6SXNzdWU2NzQ4NTQ4Nw== | 2,542 | Simple get request never returns | {
"avatar_url": "https://avatars.githubusercontent.com/u/1853442?v=4",
"events_url": "https://api.github.com/users/tomkcook/events{/privacy}",
"followers_url": "https://api.github.com/users/tomkcook/followers",
"following_url": "https://api.github.com/users/tomkcook/following{/other_user}",
"gists_url": "https://api.github.com/users/tomkcook/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomkcook",
"id": 1853442,
"login": "tomkcook",
"node_id": "MDQ6VXNlcjE4NTM0NDI=",
"organizations_url": "https://api.github.com/users/tomkcook/orgs",
"received_events_url": "https://api.github.com/users/tomkcook/received_events",
"repos_url": "https://api.github.com/users/tomkcook/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomkcook/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomkcook/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomkcook",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-10T01:30:24Z | 2021-09-08T23:05:44Z | 2015-04-10T02:21:09Z | NONE | resolved | The following request never returns:
```
import requests
r = requests.get('http://en.wikipedia.org/w/api.php?rcprop=ids&format=json&action=query&rclimit=10&rctype=edit&list=recentchanges&rcnamespace=0', headers={'user-agent': 'api test'})
```
I've tried under both Python 2.7 and Python 3.
Adding a timeout (eg 5 seconds) causes the request to complete successfully - but adds 5s latency to every request. And, of course, makes the request fail if the API call takes longer than 5s to process. So I guess what is happening is that the server has finished sending the response but Requests is sat waiting for ... something ... to happen. What? Is it possible that the server is sending a wrong content-length?
| {
"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/2542/reactions"
} | https://api.github.com/repos/psf/requests/issues/2542/timeline | null | completed | null | null | false | [
"Sorry, this turned out to be because IPv6 claims to work on my network but doesn't work very well. Setting a timeout would then cause the IPv6 request to timeout and the request would fall back to IPv4, which succeeds.\n"
] |
https://api.github.com/repos/psf/requests/issues/2541 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2541/labels{/name} | https://api.github.com/repos/psf/requests/issues/2541/comments | https://api.github.com/repos/psf/requests/issues/2541/events | https://github.com/psf/requests/issues/2541 | 67,095,121 | MDU6SXNzdWU2NzA5NTEyMQ== | 2,541 | Bundled cacert.pem with too much certificate? | {
"avatar_url": "https://avatars.githubusercontent.com/u/297578?v=4",
"events_url": "https://api.github.com/users/Glandos/events{/privacy}",
"followers_url": "https://api.github.com/users/Glandos/followers",
"following_url": "https://api.github.com/users/Glandos/following{/other_user}",
"gists_url": "https://api.github.com/users/Glandos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Glandos",
"id": 297578,
"login": "Glandos",
"node_id": "MDQ6VXNlcjI5NzU3OA==",
"organizations_url": "https://api.github.com/users/Glandos/orgs",
"received_events_url": "https://api.github.com/users/Glandos/received_events",
"repos_url": "https://api.github.com/users/Glandos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Glandos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Glandos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Glandos",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2015-04-08T10:06:01Z | 2021-09-08T23:05:44Z | 2015-04-10T09:30:30Z | NONE | resolved | I am currently using pip and requests on SLES11SP3, which has the following software installed:
- python-2.6.8 (but I got the same behavior with a self-compiled 2.7.9)
- openssl-0.9.8j
- curl-7.19.7
- python-pip-6.0.8
I am experiencing really strange issues. With the bundled cacert.pem from requests-2.6.0, I have an SSL exception:
```
>>> import requests
>>> requests.get('https://pypi.python.org')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/test/lib/python2.6/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/root/test/lib/python2.6/site-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/root/test/lib/python2.6/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/root/test/lib/python2.6/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/root/test/lib/python2.6/site-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:491: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
```
This behavior is confirmed with curl:
```
# curl --capath /dev/null --cacert cacert.pem.requests https://pypi.python.org
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
```
However, if I remove any of the last 4 certificates in the bundle, everything works as expected. Currently, the last 4 issuers are:
```
# Issuer: CN=CA Disig Root R1 O=Disig a.s.
# Issuer: CN=CA Disig Root R2 O=Disig a.s.
# Issuer: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV
# Issuer: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA
```
Do you have any idea why? Is it linked to openssl being too old? Unfortunately, I can't upgrade it, it is a system library. But modifying every virtualenv I create on this machine to change the bundle will be a pain…
| {
"avatar_url": "https://avatars.githubusercontent.com/u/297578?v=4",
"events_url": "https://api.github.com/users/Glandos/events{/privacy}",
"followers_url": "https://api.github.com/users/Glandos/followers",
"following_url": "https://api.github.com/users/Glandos/following{/other_user}",
"gists_url": "https://api.github.com/users/Glandos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Glandos",
"id": 297578,
"login": "Glandos",
"node_id": "MDQ6VXNlcjI5NzU3OA==",
"organizations_url": "https://api.github.com/users/Glandos/orgs",
"received_events_url": "https://api.github.com/users/Glandos/received_events",
"repos_url": "https://api.github.com/users/Glandos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Glandos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Glandos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Glandos",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2541/reactions"
} | https://api.github.com/repos/psf/requests/issues/2541/timeline | null | completed | null | null | false | [
"I'm not finding any problem on my ubuntu machine. I also find it particularly hard to understand this problem because none of those four certificates have anything to do with the trust path:\n\n```\n---\nCertificate chain\n 0 s:/businessCategory=Private Organization/1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2... |
https://api.github.com/repos/psf/requests/issues/2540 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2540/labels{/name} | https://api.github.com/repos/psf/requests/issues/2540/comments | https://api.github.com/repos/psf/requests/issues/2540/events | https://github.com/psf/requests/issues/2540 | 67,022,847 | MDU6SXNzdWU2NzAyMjg0Nw== | 2,540 | MisssingSchema error message does not handle unicode input correctly | {
"avatar_url": "https://avatars.githubusercontent.com/u/928271?v=4",
"events_url": "https://api.github.com/users/ma2rten/events{/privacy}",
"followers_url": "https://api.github.com/users/ma2rten/followers",
"following_url": "https://api.github.com/users/ma2rten/following{/other_user}",
"gists_url": "https://api.github.com/users/ma2rten/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ma2rten",
"id": 928271,
"login": "ma2rten",
"node_id": "MDQ6VXNlcjkyODI3MQ==",
"organizations_url": "https://api.github.com/users/ma2rten/orgs",
"received_events_url": "https://api.github.com/users/ma2rten/received_events",
"repos_url": "https://api.github.com/users/ma2rten/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ma2rten/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ma2rten/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ma2rten",
"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 | 3 | 2015-04-08T00:56:52Z | 2021-09-08T23:05:43Z | 2015-04-11T19:11:01Z | NONE | resolved | using requests 2.6.0, Python 2.7.6
```
import requests
requests.get(u"hällo world")
```
```
---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
<ipython-input-3-bf1281984b3a> in <module>()
----> 1 requests.get(url)
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/api.pyc in get(url, **kwargs)
66
67 kwargs.setdefault('allow_redirects', True)
---> 68 return request('get', url, **kwargs)
69
70
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/api.pyc in request(method, url, **kwargs)
48
49 session = sessions.Session()
---> 50 response = session.request(method=method, url=url, **kwargs)
51 # By explicitly closing the session, we avoid leaving sockets open which
52 # can trigger a ResourceWarning in some cases, and look like a memory leak
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
448 hooks = hooks,
449 )
--> 450 prep = self.prepare_request(req)
451
452 proxies = proxies or {}
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/sessions.pyc in prepare_request(self, request)
379 auth=merge_setting(auth, self.auth),
380 cookies=merged_cookies,
--> 381 hooks=merge_hooks(request.hooks, self.hooks),
382 )
383 return p
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/models.pyc in prepare(self, method, url, headers, files, data, params, auth, cookies, hooks, json)
302
303 self.prepare_method(method)
--> 304 self.prepare_url(url, params)
305 self.prepare_headers(headers)
306 self.prepare_cookies(cookies)
/Library/Python/2.7/site-packages/requests-2.6.0-py2.7.egg/requests/models.pyc in prepare_url(self, url, params)
359 if not scheme:
360 raise MissingSchema("Invalid URL {0!r}: No schema supplied. "
--> 361 "Perhaps you meant http://{0}?".format(url))
362
363 if not host:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 1: ordinal not in range(128)
```
| {
"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/2540/reactions"
} | https://api.github.com/repos/psf/requests/issues/2540/timeline | null | completed | null | null | false | [
"Ugh, Python 2, why do you suck so much?\n\nI don't consider this a highly urgent bug because to hit it requires that you be using not just a unicode URL but an invalid one. It's also impossible to hit in Python 3, which further limits its scope. That said, it's definitely a real bug and if anyone wants to fix it t... |
https://api.github.com/repos/psf/requests/issues/2539 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2539/labels{/name} | https://api.github.com/repos/psf/requests/issues/2539/comments | https://api.github.com/repos/psf/requests/issues/2539/events | https://github.com/psf/requests/issues/2539 | 66,985,855 | MDU6SXNzdWU2Njk4NTg1NQ== | 2,539 | Noisy SSL warnings | {
"avatar_url": "https://avatars.githubusercontent.com/u/7684843?v=4",
"events_url": "https://api.github.com/users/tonyennis/events{/privacy}",
"followers_url": "https://api.github.com/users/tonyennis/followers",
"following_url": "https://api.github.com/users/tonyennis/following{/other_user}",
"gists_url": "https://api.github.com/users/tonyennis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tonyennis",
"id": 7684843,
"login": "tonyennis",
"node_id": "MDQ6VXNlcjc2ODQ4NDM=",
"organizations_url": "https://api.github.com/users/tonyennis/orgs",
"received_events_url": "https://api.github.com/users/tonyennis/received_events",
"repos_url": "https://api.github.com/users/tonyennis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tonyennis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tonyennis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tonyennis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2015-04-07T20:43:18Z | 2021-09-08T23:05:45Z | 2015-04-08T00:34:40Z | NONE | resolved | Is there a way to suppress these noisy SSL warnings? I got them by specifying requests.get(..., verify=False) when I was trying to use some self-signed web services.
/usr/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
| {
"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/2539/reactions"
} | https://api.github.com/repos/psf/requests/issues/2539/timeline | null | completed | null | null | false | [
"`requests.packages.urllib3.disable_warnings()`.\n",
"Thank you!\n"
] |
https://api.github.com/repos/psf/requests/issues/2538 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2538/labels{/name} | https://api.github.com/repos/psf/requests/issues/2538/comments | https://api.github.com/repos/psf/requests/issues/2538/events | https://github.com/psf/requests/issues/2538 | 66,858,705 | MDU6SXNzdWU2Njg1ODcwNQ== | 2,538 | Dependency is not satisfiable: python (>= 2.7.5-5~) | {
"avatar_url": "https://avatars.githubusercontent.com/u/3397477?v=4",
"events_url": "https://api.github.com/users/francesco1119/events{/privacy}",
"followers_url": "https://api.github.com/users/francesco1119/followers",
"following_url": "https://api.github.com/users/francesco1119/following{/other_user}",
"gists_url": "https://api.github.com/users/francesco1119/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/francesco1119",
"id": 3397477,
"login": "francesco1119",
"node_id": "MDQ6VXNlcjMzOTc0Nzc=",
"organizations_url": "https://api.github.com/users/francesco1119/orgs",
"received_events_url": "https://api.github.com/users/francesco1119/received_events",
"repos_url": "https://api.github.com/users/francesco1119/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/francesco1119/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/francesco1119/subscriptions",
"type": "User",
"url": "https://api.github.com/users/francesco1119",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2015-04-07T11:26:36Z | 2021-09-08T23:05:45Z | 2015-04-07T13:40:08Z | NONE | resolved | hello,
I'm trying to install python-requests on my Debian Wheezy from the .deb:
# gdebi python-requests_2.4.3-6_all.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done
This package is uninstallable
Dependency is not satisfiable: python (>= 2.7.5-5~)
Well, is quite strange as with a "python -V" the output is: Python 2.7.7.
And I have already tried all of those chances: http://docs.python-requests.org/en/latest/user/install/#install
Any idea?
| {
"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/2538/reactions"
} | https://api.github.com/repos/psf/requests/issues/2538/timeline | null | completed | null | null | false | [
"I'm afraid we can't support you with the `.deb`, because we don't build or maintain that package, @ralphbean does. I recommend raising a bug with debian if you're having trouble.\n\nWhen you say you've tried the install methods on our website, which methods have you actually tried and how did they fail?\n",
"Tha... |
https://api.github.com/repos/psf/requests/issues/2537 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2537/labels{/name} | https://api.github.com/repos/psf/requests/issues/2537/comments | https://api.github.com/repos/psf/requests/issues/2537/events | https://github.com/psf/requests/issues/2537 | 66,774,224 | MDU6SXNzdWU2Njc3NDIyNA== | 2,537 | Support DNS roundrobin with failure detection | {
"avatar_url": "https://avatars.githubusercontent.com/u/905538?v=4",
"events_url": "https://api.github.com/users/twiggy/events{/privacy}",
"followers_url": "https://api.github.com/users/twiggy/followers",
"following_url": "https://api.github.com/users/twiggy/following{/other_user}",
"gists_url": "https://api.github.com/users/twiggy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twiggy",
"id": 905538,
"login": "twiggy",
"node_id": "MDQ6VXNlcjkwNTUzOA==",
"organizations_url": "https://api.github.com/users/twiggy/orgs",
"received_events_url": "https://api.github.com/users/twiggy/received_events",
"repos_url": "https://api.github.com/users/twiggy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twiggy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twiggy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twiggy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2015-04-07T04:46:49Z | 2021-09-08T23:05:45Z | 2015-04-07T11:30:50Z | NONE | resolved | As we move into the cloud world with multiple subnets failing over transparently is becoming more and more of a pain.
Many database systems for instance support the DNS entry for the server having multiple IP addresses in a set. The client is smart enough to know which IP is up and listening and failover to the other quickly.
HTTP doesn't come with such facilities, but Requests is a perfect place to add it.
Imagine website.com having a record set of 10.10.10.5/24 and 10.10.11.5/25. Imagine these are load balancers such as nginx or haproxy sitting in two distinct subnets perhaps even in two data centers.
The client is going to make web service requests of website.com. If 10.10.11.5/24 goes down the clients should make requests to 10.10.10.5/24 only.
This is more a request for peoples opinions on whether this should be added to the framework and where. Typically this kind of functionality is accomplished transparently to the web clients using a "smart" dns server with health checks among other things. IMHO I feel like that just creates complexities that could be done better and more importantly faster at the client level.
Thanks,
Eric
| {
"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/2537/reactions"
} | https://api.github.com/repos/psf/requests/issues/2537/timeline | null | completed | null | null | false | [
"If you specify a connection timeout and Requests can't connect to the first host specified via a DNS lookup, it will try the next host. \n\nThis request will take 18 seconds for example: \n\n``` python\nstart = time.time()\ntry:\n requests.get('http://google.com:81', \n timeout=3)\nexcept ConnectTim... |
https://api.github.com/repos/psf/requests/issues/2536 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2536/labels{/name} | https://api.github.com/repos/psf/requests/issues/2536/comments | https://api.github.com/repos/psf/requests/issues/2536/events | https://github.com/psf/requests/pull/2536 | 66,668,496 | MDExOlB1bGxSZXF1ZXN0MzI2OTcwNjU= | 2,536 | Document that "PreparedRequest.prepare_cookies" can only be called once | {
"avatar_url": "https://avatars.githubusercontent.com/u/354181?v=4",
"events_url": "https://api.github.com/users/smiley/events{/privacy}",
"followers_url": "https://api.github.com/users/smiley/followers",
"following_url": "https://api.github.com/users/smiley/following{/other_user}",
"gists_url": "https://api.github.com/users/smiley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smiley",
"id": 354181,
"login": "smiley",
"node_id": "MDQ6VXNlcjM1NDE4MQ==",
"organizations_url": "https://api.github.com/users/smiley/orgs",
"received_events_url": "https://api.github.com/users/smiley/received_events",
"repos_url": "https://api.github.com/users/smiley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smiley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smiley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smiley",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2015-04-06T18:10:05Z | 2021-09-08T08:00:53Z | 2015-04-06T22:29:17Z | CONTRIBUTOR | resolved | I've done the documentation changes suggested in #2532.
I also documented a way to work around this in the docstring, but I'm not sure if it'd be good to do so. (As it may lead to hacked-together solutions) Then again, other solutions like creating a brand new `Request` might lead to worse problems. (e.g.: loss of data)
@sigmavirus24, what do you think?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/2536/reactions"
} | https://api.github.com/repos/psf/requests/issues/2536/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2536.diff",
"html_url": "https://github.com/psf/requests/pull/2536",
"merged_at": "2015-04-06T22:29:17Z",
"patch_url": "https://github.com/psf/requests/pull/2536.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2536"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/2535 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2535/labels{/name} | https://api.github.com/repos/psf/requests/issues/2535/comments | https://api.github.com/repos/psf/requests/issues/2535/events | https://github.com/psf/requests/pull/2535 | 66,612,642 | MDExOlB1bGxSZXF1ZXN0MzI2ODAyMjk= | 2,535 | Fix build version number in metadata | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-06T14:02:45Z | 2021-09-08T08:00:53Z | 2015-04-06T21:54:22Z | CONTRIBUTOR | resolved | Closes #2530
| {
"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/2535/reactions"
} | https://api.github.com/repos/psf/requests/issues/2535/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2535.diff",
"html_url": "https://github.com/psf/requests/pull/2535",
"merged_at": "2015-04-06T21:54:22Z",
"patch_url": "https://github.com/psf/requests/pull/2535.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2535"
} | true | [
"_/me forgot to make this last night_ Sorry @Lukasa \n"
] |
https://api.github.com/repos/psf/requests/issues/2534 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2534/labels{/name} | https://api.github.com/repos/psf/requests/issues/2534/comments | https://api.github.com/repos/psf/requests/issues/2534/events | https://github.com/psf/requests/pull/2534 | 66,508,792 | MDExOlB1bGxSZXF1ZXN0MzI2NTkwMTA= | 2,534 | Copy a PreparedRequest's CookieJar reliably | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-06T02:29:14Z | 2021-09-08T08:00:54Z | 2015-04-06T11:15:55Z | CONTRIBUTOR | resolved | When a PreparedRequests's cookie jar is not a RequestsCookieJar instance, it
will not have a "copy" method. By adding _copy_cookie_jar we can reliably copy
cookie jars so that we have an actual copy instead of the same instance on
different prepared requests.
This also updates the RequestsCookieJar.update logic to create copies of
cookies from the other jar.
Closes #2527
| {
"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/2534/reactions"
} | https://api.github.com/repos/psf/requests/issues/2534/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2534.diff",
"html_url": "https://github.com/psf/requests/pull/2534",
"merged_at": "2015-04-06T11:15:55Z",
"patch_url": "https://github.com/psf/requests/pull/2534.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2534"
} | true | [
"LGTM. :cake:\n"
] |
https://api.github.com/repos/psf/requests/issues/2533 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2533/labels{/name} | https://api.github.com/repos/psf/requests/issues/2533/comments | https://api.github.com/repos/psf/requests/issues/2533/events | https://github.com/psf/requests/pull/2533 | 66,505,832 | MDExOlB1bGxSZXF1ZXN0MzI2NTgzOTA= | 2,533 | Place VendorAlias first in meta_path | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [] | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url... | null | 0 | 2015-04-06T01:57:05Z | 2021-09-08T08:00:54Z | 2015-04-06T11:19:15Z | CONTRIBUTOR | resolved | When other libraries or tools add items to the meta_path, we need to preempt
some of their import hooks to be sure modules can be properly found. This also
prevents problems importing built-in modules on Python 2 where it will first
attempt to import something like:
```
requests.packages.chardet.sys
```
By placing our VendorAlias first, the above will fail and then it will fall
back to trying to import sys directly instead.
Closes #2465
| {
"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/2533/reactions"
} | https://api.github.com/repos/psf/requests/issues/2533/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2533.diff",
"html_url": "https://github.com/psf/requests/pull/2533",
"merged_at": "2015-04-06T11:19:15Z",
"patch_url": "https://github.com/psf/requests/pull/2533.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2533"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/2532 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2532/labels{/name} | https://api.github.com/repos/psf/requests/issues/2532/comments | https://api.github.com/repos/psf/requests/issues/2532/events | https://github.com/psf/requests/issues/2532 | 66,505,311 | MDU6SXNzdWU2NjUwNTMxMQ== | 2,532 | "PreparedRequest.prepare_cookies" can only be called once (and "succeeds" silently if called again) | {
"avatar_url": "https://avatars.githubusercontent.com/u/354181?v=4",
"events_url": "https://api.github.com/users/smiley/events{/privacy}",
"followers_url": "https://api.github.com/users/smiley/followers",
"following_url": "https://api.github.com/users/smiley/following{/other_user}",
"gists_url": "https://api.github.com/users/smiley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smiley",
"id": 354181,
"login": "smiley",
"node_id": "MDQ6VXNlcjM1NDE4MQ==",
"organizations_url": "https://api.github.com/users/smiley/orgs",
"received_events_url": "https://api.github.com/users/smiley/received_events",
"repos_url": "https://api.github.com/users/smiley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smiley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smiley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smiley",
"user_view_type": "public"
} | [
{
"color": "0b02e1",
"default": false,
"description": null,
"id": 191274,
"name": "Contributor Friendly",
"node_id": "MDU6TGFiZWwxOTEyNzQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Contributor%20Friendly"
},
{
"color": "fad8c7",
"default": false,
"descrip... | closed | true | null | [] | null | 8 | 2015-04-06T01:49:17Z | 2021-09-08T23:05:47Z | 2015-04-06T23:19:25Z | CONTRIBUTOR | resolved | I'm writing an adapter that interfaces with a CDN, and it requires that I "sign" my requests with a cookie, but it doesn't send the cookie back in `Set-Cookie`.
I manage to send it on the first request, but then the site behind the CDN _does_ send a `Set-Cookie` header (this is expected), and `prepare_cookies` called by the `Session` works its magic. The problem is, due to how `cookielib` is written, if a `Cookie` header was already composed, it won't be re-composed: (Even if cookies have changed between calls)
``` python
# cookielib.py:CookieJar.add_cookie_header (starts at 1312)
# ...
attrs = self._cookie_attrs(cookies)
if attrs:
if not request.has_header("Cookie"):
request.add_unredirected_header(
"Cookie", "; ".join(attrs))
#...
```
This causes a problem when any request past the first one on the same `Session` object renders my adapter worthless, as authentication fails and attempts to properly add cookies fail silently:
``` python
def _prepare_request(self, request):
"""
:type request: requests.PreparedRequest
"""
request.prepare_cookies({self.COOKIE_NAME: self._get_authorization_cookie(request.url)})
```
`request._cookies` is modified properly, but `request.headers['Cookie']` is still its former self.
If fixing this isn't possible (it _is_ a bundled library after all), maybe `requests` could delete the header before calling `CookieJar.add_cookie_header`?
| {
"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/2532/reactions"
} | https://api.github.com/repos/psf/requests/issues/2532/timeline | null | completed | null | null | false | [
"> If fixing this isn't possible (it is a bundled library after all), maybe requests could delete the header before calling CookieJar.add_cookie_header?\n\nI assume this is happening because of [this line](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L511). And that's why you quoted code ... |
https://api.github.com/repos/psf/requests/issues/2531 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/2531/labels{/name} | https://api.github.com/repos/psf/requests/issues/2531/comments | https://api.github.com/repos/psf/requests/issues/2531/events | https://github.com/psf/requests/pull/2531 | 66,484,648 | MDExOlB1bGxSZXF1ZXN0MzI2NTQ3ODY= | 2,531 | Issue 2062: Updated custom header precedence info with .netrc example | {
"avatar_url": "https://avatars.githubusercontent.com/u/4780134?v=4",
"events_url": "https://api.github.com/users/benjaminran/events{/privacy}",
"followers_url": "https://api.github.com/users/benjaminran/followers",
"following_url": "https://api.github.com/users/benjaminran/following{/other_user}",
"gists_url": "https://api.github.com/users/benjaminran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benjaminran",
"id": 4780134,
"login": "benjaminran",
"node_id": "MDQ6VXNlcjQ3ODAxMzQ=",
"organizations_url": "https://api.github.com/users/benjaminran/orgs",
"received_events_url": "https://api.github.com/users/benjaminran/received_events",
"repos_url": "https://api.github.com/users/benjaminran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benjaminran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benjaminran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benjaminran",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2015-04-05T21:34:04Z | 2021-09-08T08:00:52Z | 2015-04-05T22:33:29Z | CONTRIBUTOR | resolved | I revised the custom header documentation to include .netrc authentication like Ian recommended.
| {
"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/2531/reactions"
} | https://api.github.com/repos/psf/requests/issues/2531/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/2531.diff",
"html_url": "https://github.com/psf/requests/pull/2531",
"merged_at": "2015-04-05T22:33:29Z",
"patch_url": "https://github.com/psf/requests/pull/2531.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/2531"
} | true | [
"\\o/ :sparkles:\n"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.