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/4964
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4964/labels{/name}
https://api.github.com/repos/psf/requests/issues/4964/comments
https://api.github.com/repos/psf/requests/issues/4964/events
https://github.com/psf/requests/issues/4964
407,256,395
MDU6SXNzdWU0MDcyNTYzOTU=
4,964
phython error
{ "avatar_url": "https://avatars.githubusercontent.com/u/47377273?v=4", "events_url": "https://api.github.com/users/achyuthachu/events{/privacy}", "followers_url": "https://api.github.com/users/achyuthachu/followers", "following_url": "https://api.github.com/users/achyuthachu/following{/other_user}", "gists_url": "https://api.github.com/users/achyuthachu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/achyuthachu", "id": 47377273, "login": "achyuthachu", "node_id": "MDQ6VXNlcjQ3Mzc3Mjcz", "organizations_url": "https://api.github.com/users/achyuthachu/orgs", "received_events_url": "https://api.github.com/users/achyuthachu/received_events", "repos_url": "https://api.github.com/users/achyuthachu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/achyuthachu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/achyuthachu/subscriptions", "type": "User", "url": "https://api.github.com/users/achyuthachu", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-02-06T14:18:06Z
2021-09-05T00:07:03Z
2019-02-06T14:29:47Z
NONE
resolved
Summary. ## Expected Result output should run without any error or exception What you expected. ## Actual Result Can please resolve this issue?? ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred: self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x02D87DB0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred:
{ "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": 1, "confused": 1, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/4964/reactions" }
https://api.github.com/repos/psf/requests/issues/4964/timeline
null
completed
null
null
false
[ "This is not a Requests bug. " ]
https://api.github.com/repos/psf/requests/issues/4963
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4963/labels{/name}
https://api.github.com/repos/psf/requests/issues/4963/comments
https://api.github.com/repos/psf/requests/issues/4963/events
https://github.com/psf/requests/issues/4963
407,086,311
MDU6SXNzdWU0MDcwODYzMTE=
4,963
problem in python
{ "avatar_url": "https://avatars.githubusercontent.com/u/47377273?v=4", "events_url": "https://api.github.com/users/achyuthachu/events{/privacy}", "followers_url": "https://api.github.com/users/achyuthachu/followers", "following_url": "https://api.github.com/users/achyuthachu/following{/other_user}", "gists_url": "https://api.github.com/users/achyuthachu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/achyuthachu", "id": 47377273, "login": "achyuthachu", "node_id": "MDQ6VXNlcjQ3Mzc3Mjcz", "organizations_url": "https://api.github.com/users/achyuthachu/orgs", "received_events_url": "https://api.github.com/users/achyuthachu/received_events", "repos_url": "https://api.github.com/users/achyuthachu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/achyuthachu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/achyuthachu/subscriptions", "type": "User", "url": "https://api.github.com/users/achyuthachu", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2019-02-06T05:28:47Z
2021-09-05T00:07:04Z
2019-02-06T12:32:40Z
NONE
resolved
Can please resolve this issue?? ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred: self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x02D87DB0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred:
{ "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": 1, "confused": 1, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/4963/reactions" }
https://api.github.com/repos/psf/requests/issues/4963/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4962
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4962/labels{/name}
https://api.github.com/repos/psf/requests/issues/4962/comments
https://api.github.com/repos/psf/requests/issues/4962/events
https://github.com/psf/requests/issues/4962
406,947,123
MDU6SXNzdWU0MDY5NDcxMjM=
4,962
Requests.get producing different JSON than curl
{ "avatar_url": "https://avatars.githubusercontent.com/u/30030760?v=4", "events_url": "https://api.github.com/users/MikeFindsThings/events{/privacy}", "followers_url": "https://api.github.com/users/MikeFindsThings/followers", "following_url": "https://api.github.com/users/MikeFindsThings/following{/other_user}", "gists_url": "https://api.github.com/users/MikeFindsThings/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MikeFindsThings", "id": 30030760, "login": "MikeFindsThings", "node_id": "MDQ6VXNlcjMwMDMwNzYw", "organizations_url": "https://api.github.com/users/MikeFindsThings/orgs", "received_events_url": "https://api.github.com/users/MikeFindsThings/received_events", "repos_url": "https://api.github.com/users/MikeFindsThings/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MikeFindsThings/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MikeFindsThings/subscriptions", "type": "User", "url": "https://api.github.com/users/MikeFindsThings", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2019-02-05T19:50:53Z
2021-09-05T00:07:04Z
2019-02-05T21:55:48Z
NONE
resolved
When making a get request requests.get and curl, the returned JSON object is identical in every way, except with requests.get leading digits in an "id":# kv pair are omitted. ## Expected Result cURL and requests.get returned JSON objects should be identical ## Actual Result requests.get returns `"id":12345` Whereas curl returns `"id":10000000000012345` ## Reproduction Steps ```python import requests HEADERS = {'Authorization': f'Bearer {args.api_key}'} API_URL = f'https://canvas.instructure.com/api/v1' STUDENT = requests.get(f'{API_URL}/courses/', params=None, headers=HEADERS) studnetlst = STUDENT.json() print(studnetlst) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.2" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "101000af" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ``` More info: https://stackoverflow.com/questions/54527648/pythons-requests-get-producing-different-json-than-api-client This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "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/4962/reactions" }
https://api.github.com/repos/psf/requests/issues/4962/timeline
null
completed
null
null
false
[ "Can you share the relevant bit from `STUDENT.content`?", "`STUDENT.content`:\r\n\r\n`b'[{\"id\":12345,\"name\":\"Class1\",\"account_id\":188,\"uuid\":\"itsadifferentsecret\",\"start_at\":\"2019-01-13T17:33:04Z\",\"grading_standard_id\":null}]'`\r\n\r\nthe desired result should look like:\r\n\r\n`b'[{\"id\":10000...
https://api.github.com/repos/psf/requests/issues/4961
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4961/labels{/name}
https://api.github.com/repos/psf/requests/issues/4961/comments
https://api.github.com/repos/psf/requests/issues/4961/events
https://github.com/psf/requests/issues/4961
406,537,271
MDU6SXNzdWU0MDY1MzcyNzE=
4,961
OpenSSL.SSL.Error raised with invalid client cert and openssl 1.1.1.
{ "avatar_url": "https://avatars.githubusercontent.com/u/308610?v=4", "events_url": "https://api.github.com/users/jaraco/events{/privacy}", "followers_url": "https://api.github.com/users/jaraco/followers", "following_url": "https://api.github.com/users/jaraco/following{/other_user}", "gists_url": "https://api.github.com/users/jaraco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jaraco", "id": 308610, "login": "jaraco", "node_id": "MDQ6VXNlcjMwODYxMA==", "organizations_url": "https://api.github.com/users/jaraco/orgs", "received_events_url": "https://api.github.com/users/jaraco/received_events", "repos_url": "https://api.github.com/users/jaraco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jaraco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jaraco/subscriptions", "type": "User", "url": "https://api.github.com/users/jaraco", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2019-02-04T21:56:01Z
2021-11-05T03:00:28Z
2021-08-07T02:30:33Z
CONTRIBUTOR
resolved
In https://github.com/cherrypy/cheroot/issues/173, we discovered that with the release of cryptography 2.5, built against OpenSSL 1.1.1a, a [call to requests.get](https://github.com/cherrypy/cheroot/blob/e616c2542d5fb0a414344fd5c8864e5c970444e0/cheroot/test/test_ssl.py#L272-L281) with a client certificate referencing an unknown CA will raise an `OpenSSL.SSL.Error` not wrapped in a `requests.exceptions.SSLError`, whereas with cryptography < 2.5 (openssl 1.1.0), the error is wrapped. Due to the complexities of this situation, I've not yet been able to put together an isolated test case that replicates the issue. It's possible there are other factors in the cheroot test suite that are affecting this behavior. I wanted to raise this issue here to see if the requests maintainers have some insight into this issue - either how the situation above might arise or how one might be able to simply replicate the conditions that lead to situation so further investigation could be done. Any advice is appreciated.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4961/reactions" }
https://api.github.com/repos/psf/requests/issues/4961/timeline
null
completed
null
null
false
[ "This is probably something for urllib3 instead of requests?", "@sethmlarson so it's plausible urllib3 isn't catching/re-raising that exception appropriately. It sounds like we're also missing the bit where `pyOpenSSL` is used here (as that's the only time an `OpenSSL.SSL.Error` would occur. Once urllib3 raises t...
https://api.github.com/repos/psf/requests/issues/4960
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4960/labels{/name}
https://api.github.com/repos/psf/requests/issues/4960/comments
https://api.github.com/repos/psf/requests/issues/4960/events
https://github.com/psf/requests/pull/4960
406,330,404
MDExOlB1bGxSZXF1ZXN0MjUwMDUxNzcx
4,960
docs: correct error in 'merge_environment_settings' usage
{ "avatar_url": "https://avatars.githubusercontent.com/u/715421?v=4", "events_url": "https://api.github.com/users/andrewbonney/events{/privacy}", "followers_url": "https://api.github.com/users/andrewbonney/followers", "following_url": "https://api.github.com/users/andrewbonney/following{/other_user}", "gists_url": "https://api.github.com/users/andrewbonney/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andrewbonney", "id": 715421, "login": "andrewbonney", "node_id": "MDQ6VXNlcjcxNTQyMQ==", "organizations_url": "https://api.github.com/users/andrewbonney/orgs", "received_events_url": "https://api.github.com/users/andrewbonney/received_events", "repos_url": "https://api.github.com/users/andrewbonney/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andrewbonney/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andrewbonney/subscriptions", "type": "User", "url": "https://api.github.com/users/andrewbonney", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-02-04T13:30:48Z
2021-08-31T00:07:26Z
2019-02-04T15:22:41Z
CONTRIBUTOR
resolved
This resolves a very minor documentation issue for the proxies argument in 'merge_environment_settings' See #4959
{ "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/4960/reactions" }
https://api.github.com/repos/psf/requests/issues/4960/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4960.diff", "html_url": "https://github.com/psf/requests/pull/4960", "merged_at": "2019-02-04T15:22:41Z", "patch_url": "https://github.com/psf/requests/pull/4960.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4960" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4960?src=pr&el=h1) Report\n> Merging [#4960](https://codecov.io/gh/requests/requests/pull/4960?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/64bde6582d9b49e9345d9b8df16aaa26dc372d13?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4959
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4959/labels{/name}
https://api.github.com/repos/psf/requests/issues/4959/comments
https://api.github.com/repos/psf/requests/issues/4959/events
https://github.com/psf/requests/issues/4959
406,272,001
MDU6SXNzdWU0MDYyNzIwMDE=
4,959
Exception when calling 'merge_environment_settings' as documented
{ "avatar_url": "https://avatars.githubusercontent.com/u/715421?v=4", "events_url": "https://api.github.com/users/andrewbonney/events{/privacy}", "followers_url": "https://api.github.com/users/andrewbonney/followers", "following_url": "https://api.github.com/users/andrewbonney/following{/other_user}", "gists_url": "https://api.github.com/users/andrewbonney/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andrewbonney", "id": 715421, "login": "andrewbonney", "node_id": "MDQ6VXNlcjcxNTQyMQ==", "organizations_url": "https://api.github.com/users/andrewbonney/orgs", "received_events_url": "https://api.github.com/users/andrewbonney/received_events", "repos_url": "https://api.github.com/users/andrewbonney/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andrewbonney/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andrewbonney/subscriptions", "type": "User", "url": "https://api.github.com/users/andrewbonney", "user_view_type": "public" }
[ { "color": "fad8c7", "default": false, "description": null, "id": 136616769, "name": "Documentation", "node_id": "MDU6TGFiZWwxMzY2MTY3Njk=", "url": "https://api.github.com/repos/psf/requests/labels/Documentation" }, { "color": "69ccdb", "default": false, "description": nu...
closed
true
null
[]
null
1
2019-02-04T10:48:55Z
2021-09-06T00:06:30Z
2019-02-04T15:23:10Z
CONTRIBUTOR
resolved
When calling `merge_environment_settings` as documented in http://docs.python-requests.org/en/master/user/advanced/#prepared-requests an exception occurs. There appears to be a conflict between the code and the documentation. ## Expected Result Calling `merge_environment_settings` on a Session object with 'None' in all arguments except the first proceeds without error. ## Actual Result An exception occurs: `'NoneType' object has no attribute 'setdefault'`. This is caused by https://github.com/requests/requests/blob/eaab47f033cae3bd443abb6707dfc30ae3482c36/requests/sessions.py#L702 when the 'proxies' argument is set to 'None'. ## Reproduction Steps As-per the documentation example ```python from requests import Request, Session s = Session() url = "https://google.com" req = Request('GET', url) prepped = s.prepare_request(req) settings = s.merge_environment_settings(prepped.url, None, None, None, None) ``` ## System Information ``` Python 3.5 Requests 2.9.1 Ubuntu Xenial ```
{ "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/4959/reactions" }
https://api.github.com/repos/psf/requests/issues/4959/timeline
null
completed
null
null
false
[ "Yes, the documentation is out of date. I'd be happy to merge a pull request that updates it." ]
https://api.github.com/repos/psf/requests/issues/4958
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4958/labels{/name}
https://api.github.com/repos/psf/requests/issues/4958/comments
https://api.github.com/repos/psf/requests/issues/4958/events
https://github.com/psf/requests/pull/4958
406,093,740
MDExOlB1bGxSZXF1ZXN0MjQ5ODgwNzcy
4,958
Delegate chunked encoding handling to urllib
{ "avatar_url": "https://avatars.githubusercontent.com/u/3791127?v=4", "events_url": "https://api.github.com/users/leamingrad/events{/privacy}", "followers_url": "https://api.github.com/users/leamingrad/followers", "following_url": "https://api.github.com/users/leamingrad/following{/other_user}", "gists_url": "https://api.github.com/users/leamingrad/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leamingrad", "id": 3791127, "login": "leamingrad", "node_id": "MDQ6VXNlcjM3OTExMjc=", "organizations_url": "https://api.github.com/users/leamingrad/orgs", "received_events_url": "https://api.github.com/users/leamingrad/received_events", "repos_url": "https://api.github.com/users/leamingrad/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leamingrad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leamingrad/subscriptions", "type": "User", "url": "https://api.github.com/users/leamingrad", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-02-03T14:29:23Z
2021-08-29T00:06:59Z
2020-03-17T09:50:18Z
NONE
resolved
This MR removes the custom handling of sending chunked HTTP requests from requests to delegate to the equivalent logic in urllib3 (https://github.com/urllib3/urllib3/blob/4325867d1ae0d139a11c8689c2d2a5ba2c666c83/src/urllib3/connectionpool.py#L351). As far as I can tell this has a couple of advantages: * Remove code that is duplicated between the two libraries * Allow fixes for outstanding issues in this area to be made in urllib3 so that users of both libraries benefit (I noticed #4445 when having a quick trawl of the issues but I guess there are more) * All requests are now logged by the urllib3 debug logger (which was the issue I was originally trying to diagnose)
{ "avatar_url": "https://avatars.githubusercontent.com/u/3791127?v=4", "events_url": "https://api.github.com/users/leamingrad/events{/privacy}", "followers_url": "https://api.github.com/users/leamingrad/followers", "following_url": "https://api.github.com/users/leamingrad/following{/other_user}", "gists_url": "https://api.github.com/users/leamingrad/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leamingrad", "id": 3791127, "login": "leamingrad", "node_id": "MDQ6VXNlcjM3OTExMjc=", "organizations_url": "https://api.github.com/users/leamingrad/orgs", "received_events_url": "https://api.github.com/users/leamingrad/received_events", "repos_url": "https://api.github.com/users/leamingrad/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leamingrad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leamingrad/subscriptions", "type": "User", "url": "https://api.github.com/users/leamingrad", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4958/reactions" }
https://api.github.com/repos/psf/requests/issues/4958/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4958.diff", "html_url": "https://github.com/psf/requests/pull/4958", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4958.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4958" }
true
[ "Quick note on testing that I forgot to put in the description: I haven't added any specific tests to cover this feature, but I think that the code is covered by existing tests from what I can see - if there are extras that would be helpful I am happy to add them.", "# [Codecov](https://codecov.io/gh/requests/req...
https://api.github.com/repos/psf/requests/issues/4957
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4957/labels{/name}
https://api.github.com/repos/psf/requests/issues/4957/comments
https://api.github.com/repos/psf/requests/issues/4957/events
https://github.com/psf/requests/issues/4957
405,873,041
MDU6SXNzdWU0MDU4NzMwNDE=
4,957
Unsatisfiable byte range request (416), but iter_content() still provides data
{ "avatar_url": "https://avatars.githubusercontent.com/u/37048747?v=4", "events_url": "https://api.github.com/users/Jacob-Stevens-Haas/events{/privacy}", "followers_url": "https://api.github.com/users/Jacob-Stevens-Haas/followers", "following_url": "https://api.github.com/users/Jacob-Stevens-Haas/following{/other_user}", "gists_url": "https://api.github.com/users/Jacob-Stevens-Haas/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Jacob-Stevens-Haas", "id": 37048747, "login": "Jacob-Stevens-Haas", "node_id": "MDQ6VXNlcjM3MDQ4NzQ3", "organizations_url": "https://api.github.com/users/Jacob-Stevens-Haas/orgs", "received_events_url": "https://api.github.com/users/Jacob-Stevens-Haas/received_events", "repos_url": "https://api.github.com/users/Jacob-Stevens-Haas/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Jacob-Stevens-Haas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jacob-Stevens-Haas/subscriptions", "type": "User", "url": "https://api.github.com/users/Jacob-Stevens-Haas", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-02-01T21:05:31Z
2021-09-06T00:06:31Z
2019-02-02T14:50:04Z
NONE
resolved
## Summary I accidentally requested a byte range that was out of the targeted resource's range, but iter_content() still provided bytes despite receiving a 416 error code. Apparently, in addition to the 416 error code, the server is returning an unrequested html document describing a 416 error code. I've read [Since RFC 7233](https://tools.ietf.org/html/rfc7233), but I'm unable to tell what should happen. ## Expected Result Either * (a) the server is allowed to return something like that, and `requests` is behaving correctly by receiving the data. The off-by-one error that caused the bad request was my fault, and I should have been more diligent about checking status codes. Close the issue, and I can go sit in the corner of shame. * (b) the server is not allowed to return unrelated content with a 416, and `requests` should be catching the error * (c) the server is allowed to return unrelated content with a 416, but it's such bad form that `requests`, as "HTTP for Humans," should warn or throw an error. ## Actual Result I was streaming a zip file, and i accidentally requested a start and end past the end of the file. I appended the results from iter_content() to my file (Windows ended up ignoring the extra bytes, but that's not the point). The reproduction code shows the extra data that I received in a 416: ``` <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>416 Requested Range Not Satisfiable</title> </head><body> <h1>Requested Range Not Satisfiable</h1> <p>None of the range-specifier values in the Range request-header field overlap the current extent of the selected resource.</p> </body></html> ``` ## Reproduction Steps ```python import requests import sys ais = 'https://coast.noaa.gov/htdata/CMSP/AISDataHandler/2017/AIS_2017_01_Zone10.zip' requests.get(url=ais, stream=True) #Out[4]: <Response [200]> requests.get(url=ais, stream=True).headers['content-length'] #Out[5]: '941900127' header={'Range':'bytes=%s-%s' % (941900127,941900127)} req = requests.get(url=ais, stream=True, headers=header) for chunk in req.iter_content(chunk_size=1): if chunk: sys.stdout.write(chunk) ``` ## System Information ``` C:\Users\600301>python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.4.2" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010101f", "version": "18.0.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": 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" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4957/reactions" }
https://api.github.com/repos/psf/requests/issues/4957/timeline
null
completed
null
null
false
[ "Requests does not and can not (within reason) protect you from yourself or a misbehaving server. We don't introspect headers to guess what you're trying to do (in this case a range request) and we don't automagically raise exceptions for error-class status codes. We expect users to check status codes or use `raise...
https://api.github.com/repos/psf/requests/issues/4956
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4956/labels{/name}
https://api.github.com/repos/psf/requests/issues/4956/comments
https://api.github.com/repos/psf/requests/issues/4956/events
https://github.com/psf/requests/issues/4956
405,545,488
MDU6SXNzdWU0MDU1NDU0ODg=
4,956
Content-Length is not checked, resulting in short reads with no error
{ "avatar_url": "https://avatars.githubusercontent.com/u/40829765?v=4", "events_url": "https://api.github.com/users/debugmiller/events{/privacy}", "followers_url": "https://api.github.com/users/debugmiller/followers", "following_url": "https://api.github.com/users/debugmiller/following{/other_user}", "gists_url": "https://api.github.com/users/debugmiller/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/debugmiller", "id": 40829765, "login": "debugmiller", "node_id": "MDQ6VXNlcjQwODI5NzY1", "organizations_url": "https://api.github.com/users/debugmiller/orgs", "received_events_url": "https://api.github.com/users/debugmiller/received_events", "repos_url": "https://api.github.com/users/debugmiller/repos", "site_admin": false, "starred_url": "https://api.github.com/users/debugmiller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/debugmiller/subscriptions", "type": "User", "url": "https://api.github.com/users/debugmiller", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2019-02-01T04:17:37Z
2024-07-24T00:03:29Z
2023-07-24T22:07:39Z
NONE
resolved
Currently, requests does not detect when the length of a response body does not match the `Content-Length` header. This behavior results in undetected failures when a TCP connection is closed early (for example) and is contrary to the behavior of other tools (e.g. `curl`) and libraries (e.g. `reqwest`) which fail if a body length does not match `Content-Length` [3]. It is also contrary to the HTTP 1.1 RFC [5]. Frustration with this behavior is well documented ([1][2][3][4]) and was first reported as a bug 5 years ago [5]. In [1] it was agreed that the underlying checking should be done in urllib3. This was implemented in urllib3 v1.17 with the `enforce_content_length` setting [6]. However the setting defaults to False. At the time this was implemented in urllib3, there was a merge on requests:proposed/3.0.0 [7] that set `enforce_content_length` to True so that short reads would be detected (~~it was later reverted~~ edit: it wasn't reverted), but no such merge happened on requests 2.x branch. Requests master now requires urllib3>=1.21 so we are guaranteed to have enforce_content_length. There is a strong argument to be made that `enforce_content_length=True` should be the default but at the very least it should be possible for a user to opt into this. [1] https://github.com/requests/requests/pull/2833 [2] https://github.com/requests/requests/issues/2275 [3] https://blog.petrzemek.net/2018/04/22/on-incomplete-http-reads-and-the-requests-library-in-python/ [4] https://news.ycombinator.com/item?id=16896899 [5] https://github.com/requests/requests/issues/1855 [6] https://github.com/urllib3/urllib3/pull/949 [7] https://github.com/requests/requests/pull/3563. ## Expected Result HTTP bodies that do not match the HTTP `Content-Length` header should be detected ## Actual Result HTTP bodies that do not match the HTTP `Content-Length` header are not detected. ## Reproduction Steps https://github.com/requests/requests/pull/2833#issuecomment-148813870 ## System Information ``` $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.7.0" }, "platform": { "release": "18.2.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1000211f" }, "urllib3": { "version": "1.24" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 17, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 1, "total_count": 18, "url": "https://api.github.com/repos/psf/requests/issues/4956/reactions" }
https://api.github.com/repos/psf/requests/issues/4956/timeline
null
completed
null
null
false
[ "I should also add that I'm happy to port over https://github.com/requests/requests/pull/3563 but I'm unclear on why it was reverted or if the approach applies to requests 2.x", "I have realized it wasn't reverted, I misread the PR that I thought reverted it.", "I can confirm that Requests ignores `Content-Leng...
https://api.github.com/repos/psf/requests/issues/4955
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4955/labels{/name}
https://api.github.com/repos/psf/requests/issues/4955/comments
https://api.github.com/repos/psf/requests/issues/4955/events
https://github.com/psf/requests/issues/4955
404,813,179
MDU6SXNzdWU0MDQ4MTMxNzk=
4,955
requests.post taking integer as string
{ "avatar_url": "https://avatars.githubusercontent.com/u/16844254?v=4", "events_url": "https://api.github.com/users/amruizva/events{/privacy}", "followers_url": "https://api.github.com/users/amruizva/followers", "following_url": "https://api.github.com/users/amruizva/following{/other_user}", "gists_url": "https://api.github.com/users/amruizva/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amruizva", "id": 16844254, "login": "amruizva", "node_id": "MDQ6VXNlcjE2ODQ0MjU0", "organizations_url": "https://api.github.com/users/amruizva/orgs", "received_events_url": "https://api.github.com/users/amruizva/received_events", "repos_url": "https://api.github.com/users/amruizva/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amruizva/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amruizva/subscriptions", "type": "User", "url": "https://api.github.com/users/amruizva", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-30T15:04:24Z
2021-09-06T00:06:31Z
2019-01-30T16:05:51Z
NONE
resolved
There is something I am not able to understand using the **requests.post** method, Having this set of parameters, the requests.post works perfect. params = { "profiles": 123456789, "date_start": 2019-01-01, "date_end": 2019-01-10, "fields": [ "attachments", "author_id", "comments", "created_time", "id", "interactions", "likes", "message", "post_labels", "type", "insights_engagement", "insights_impressions", "insights_reach", "insights_saved", "insights_video_views", "url" ], } However, when I add a key as an **integer**, I am getting a response that is taken as a **string** Here is the example adding the new key: params = { "profiles": 123456789, "date_start": 2019-01-01, "date_end": 2019-01-10, "fields": [ "attachments", "author_id", "comments", "created_time", "id", "interactions", "likes", "message", "post_labels", "type", "insights_engagement", "insights_impressions", "insights_reach", "insights_saved", "insights_video_views", "url" ], "limit": 500 }
{ "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/4955/reactions" }
https://api.github.com/repos/psf/requests/issues/4955/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here." ]
https://api.github.com/repos/psf/requests/issues/4954
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4954/labels{/name}
https://api.github.com/repos/psf/requests/issues/4954/comments
https://api.github.com/repos/psf/requests/issues/4954/events
https://github.com/psf/requests/pull/4954
404,678,570
MDExOlB1bGxSZXF1ZXN0MjQ4ODAzMzMy
4,954
[fix] Remove extra blank line
{ "avatar_url": "https://avatars.githubusercontent.com/u/26180963?v=4", "events_url": "https://api.github.com/users/zengjuchen/events{/privacy}", "followers_url": "https://api.github.com/users/zengjuchen/followers", "following_url": "https://api.github.com/users/zengjuchen/following{/other_user}", "gists_url": "https://api.github.com/users/zengjuchen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zengjuchen", "id": 26180963, "login": "zengjuchen", "node_id": "MDQ6VXNlcjI2MTgwOTYz", "organizations_url": "https://api.github.com/users/zengjuchen/orgs", "received_events_url": "https://api.github.com/users/zengjuchen/received_events", "repos_url": "https://api.github.com/users/zengjuchen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zengjuchen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zengjuchen/subscriptions", "type": "User", "url": "https://api.github.com/users/zengjuchen", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-30T09:32:01Z
2021-08-31T00:07:27Z
2019-01-30T12:13:37Z
NONE
resolved
1. The removed blank line was added at commit 8a2014e26 by Kenneth Reitz at 2017-05-26 22:51:40. The blank line under it was created at 2012, there is a 5 year gap between them. 2. It has conflict with the style used on line 63. So I assume it was misadded and removed 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" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4954/reactions" }
https://api.github.com/repos/psf/requests/issues/4954/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4954.diff", "html_url": "https://github.com/psf/requests/pull/4954", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4954.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4954" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4954?src=pr&el=h1) Report\n> Merging [#4954](https://codecov.io/gh/requests/requests/pull/4954?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/64bde6582d9b49e9345d9b8df16aaa26dc372d13?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4953
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4953/labels{/name}
https://api.github.com/repos/psf/requests/issues/4953/comments
https://api.github.com/repos/psf/requests/issues/4953/events
https://github.com/psf/requests/issues/4953
404,438,032
MDU6SXNzdWU0MDQ0MzgwMzI=
4,953
Unable to call API on a system using unsigned SSL cert
{ "avatar_url": "https://avatars.githubusercontent.com/u/22796280?v=4", "events_url": "https://api.github.com/users/espressobeanies/events{/privacy}", "followers_url": "https://api.github.com/users/espressobeanies/followers", "following_url": "https://api.github.com/users/espressobeanies/following{/other_user}", "gists_url": "https://api.github.com/users/espressobeanies/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/espressobeanies", "id": 22796280, "login": "espressobeanies", "node_id": "MDQ6VXNlcjIyNzk2Mjgw", "organizations_url": "https://api.github.com/users/espressobeanies/orgs", "received_events_url": "https://api.github.com/users/espressobeanies/received_events", "repos_url": "https://api.github.com/users/espressobeanies/repos", "site_admin": false, "starred_url": "https://api.github.com/users/espressobeanies/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/espressobeanies/subscriptions", "type": "User", "url": "https://api.github.com/users/espressobeanies", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-01-29T18:57:05Z
2021-09-06T00:06:32Z
2019-01-29T21:38:06Z
NONE
resolved
I'm not able to call an API on a system using an unsigned SSL certificate ## Expected Result JSON output data ## Actual Result `requests.exceptions.SSLError: HTTPSConnectionPool(host='apitest.internal', port=443): Max retries exceeded with url: /login/oauth2/token (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)')`,)) ## Reproduction Steps ```python from oauthlib.oauth2 import BackendApplicationClient from requests.auth import HTTPBasicAuth from requests_oauthlib import OAuth2Session import requests, json def client_credentials(client_id, client_secret, token_uri): auth = HTTPBasicAuth(client_id, client_secret) client = BackendApplicationClient(client_id=client_id) oauth = OAuth2Session(client=client) token = oauth.fetch_token(token_url=token_uri, auth=auth) return token storecreds=client_credentials(client_id, client_secret, token_uri) print(storecreds) ``` ## System Information $ python3 -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.7" }, "platform": { "release": "4.15.0-43-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.0" }, "system_ssl": { "version": "1010007f" }, "urllib3": { "version": "1.23" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4953/reactions" }
https://api.github.com/repos/psf/requests/issues/4953/timeline
null
completed
null
null
false
[ "Same issue if I install pyOpenSSL and upgrade PIP to 18.0\r\n\r\n`{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"2.5\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.6\"\r\n },\r\n \"implementation\": {\r\n \"name\": \"CPython\",\r\n \"version\"...
https://api.github.com/repos/psf/requests/issues/4952
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4952/labels{/name}
https://api.github.com/repos/psf/requests/issues/4952/comments
https://api.github.com/repos/psf/requests/issues/4952/events
https://github.com/psf/requests/issues/4952
404,296,059
MDU6SXNzdWU0MDQyOTYwNTk=
4,952
About the difference of requests.get and requests.session().get
{ "avatar_url": "https://avatars.githubusercontent.com/u/32119584?v=4", "events_url": "https://api.github.com/users/zhongxinghong/events{/privacy}", "followers_url": "https://api.github.com/users/zhongxinghong/followers", "following_url": "https://api.github.com/users/zhongxinghong/following{/other_user}", "gists_url": "https://api.github.com/users/zhongxinghong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zhongxinghong", "id": 32119584, "login": "zhongxinghong", "node_id": "MDQ6VXNlcjMyMTE5NTg0", "organizations_url": "https://api.github.com/users/zhongxinghong/orgs", "received_events_url": "https://api.github.com/users/zhongxinghong/received_events", "repos_url": "https://api.github.com/users/zhongxinghong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zhongxinghong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zhongxinghong/subscriptions", "type": "User", "url": "https://api.github.com/users/zhongxinghong", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-29T13:40:36Z
2021-09-06T00:06:32Z
2019-01-29T13:43:26Z
NONE
resolved
Hai ! In your `api.py` file, the function `get` declare the para `params`, and assign a default value to it, then we can use the `get` func like `requests.get(url, {"k1":"v1", "k2":"v2"})` without pointing out the key `params` of the second para. But in your `sessions.py` file, the method `get` of the class `Session` didn't declare the para `params`, so we must use the `Session.get` method like `s.get(url, params={"k1":"v1", "k2":"v2"})`, or it will raise a TypeError `TypeError: get() takes 2 positional arguments but 3 were given`. I checked all request methods defined under the class `Session` and all requests API in the `api.py` file, and found that only the `get` method has this little difference. It used to bother me. Could you please eliminate this little difference? :) Good Luck !
{ "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/4952/reactions" }
https://api.github.com/repos/psf/requests/issues/4952/timeline
null
completed
null
null
false
[ "I don't think this warrants an update. Keyword parameters are better and as soon as we can get on Python 3 only I think we should switch everything except URL to be a keyword-only parameter. This just nudges people in the right direction sooner. We could, however, make `params` be a keyword argument in the functio...
https://api.github.com/repos/psf/requests/issues/4951
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4951/labels{/name}
https://api.github.com/repos/psf/requests/issues/4951/comments
https://api.github.com/repos/psf/requests/issues/4951/events
https://github.com/psf/requests/issues/4951
404,226,225
MDU6SXNzdWU0MDQyMjYyMjU=
4,951
Allow redirects not configurable in sessions
{ "avatar_url": "https://avatars.githubusercontent.com/u/6770124?v=4", "events_url": "https://api.github.com/users/Paradoxis/events{/privacy}", "followers_url": "https://api.github.com/users/Paradoxis/followers", "following_url": "https://api.github.com/users/Paradoxis/following{/other_user}", "gists_url": "https://api.github.com/users/Paradoxis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Paradoxis", "id": 6770124, "login": "Paradoxis", "node_id": "MDQ6VXNlcjY3NzAxMjQ=", "organizations_url": "https://api.github.com/users/Paradoxis/orgs", "received_events_url": "https://api.github.com/users/Paradoxis/received_events", "repos_url": "https://api.github.com/users/Paradoxis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Paradoxis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Paradoxis/subscriptions", "type": "User", "url": "https://api.github.com/users/Paradoxis", "user_view_type": "public" }
[]
open
false
null
[]
null
0
2019-01-29T10:39:05Z
2019-01-29T10:39:05Z
null
NONE
null
I have an application I need to reach behind a firewall, I've set up a tunnel to this application via SSH running on my machine which forwards all connections from `127.0.0.1:1234` to `192.168.1.10:80`. Whenever I make a request to my application, it redirects me to a login page first. The issue with this is that all redirect URL's have the `192.168.1.10` hostname, which requests tries to follow and inevitably crashes (as this host does not exist on *my* network). I tried to set `allow_redirects` to `False` on my session by overriding the `request` method, but the session source hard-codes the `allow_redirects` option to `True` if it isn't explicitly set when calling `get`, `head` and `options` ([source](https://github.com/requests/requests/blob/master/requests/sessions.py#L545)) ## Expected Result I expected no redirect to be followed, but rather that that the request ends after the first response. I expected the `allow_redirects` option to be configurable in sessions like the `verify` flag is ([source](https://github.com/requests/requests/blob/master/requests/sessions.py#L625)) ## Actual Result The 302 was resolved, and attempted to redirect me to a nonexistent host, leading to a connection error exception. ## Reproduction Steps ```python import requests class Example(requests.Session): def __init__(self, allow_redirects=False, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.allow_redirects = allow_redirects def request(self, *args, **kwargs): kwargs.setdefault('allow_redirects', self.allow_redirects) return super(Example, self).request(*args, **kwargs) sess = Example() sess.get('http://127.0.0.1:1234') # ConnectionError ... 192.168.1.10 connection refused (redirected) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.6.0" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "100020af" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ```
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/4951/reactions" }
https://api.github.com/repos/psf/requests/issues/4951/timeline
null
null
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4950
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4950/labels{/name}
https://api.github.com/repos/psf/requests/issues/4950/comments
https://api.github.com/repos/psf/requests/issues/4950/events
https://github.com/psf/requests/issues/4950
404,149,337
MDU6SXNzdWU0MDQxNDkzMzc=
4,950
post multipart form data with additional parameters inContent-Disposition
{ "avatar_url": "https://avatars.githubusercontent.com/u/5386998?v=4", "events_url": "https://api.github.com/users/LeiYangGH/events{/privacy}", "followers_url": "https://api.github.com/users/LeiYangGH/followers", "following_url": "https://api.github.com/users/LeiYangGH/following{/other_user}", "gists_url": "https://api.github.com/users/LeiYangGH/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LeiYangGH", "id": 5386998, "login": "LeiYangGH", "node_id": "MDQ6VXNlcjUzODY5OTg=", "organizations_url": "https://api.github.com/users/LeiYangGH/orgs", "received_events_url": "https://api.github.com/users/LeiYangGH/received_events", "repos_url": "https://api.github.com/users/LeiYangGH/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LeiYangGH/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LeiYangGH/subscriptions", "type": "User", "url": "https://api.github.com/users/LeiYangGH", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-29T07:02:06Z
2021-09-06T00:06:32Z
2019-01-29T12:57:52Z
NONE
resolved
This question is a bit special but I cannot find the solution anywhere. I've posted the same question in stackoverflow but there's no answer yet.https://stackoverflow.com/questions/54209711/python-requests-post-multipart-form-data-with-additional-parameters-in-content-d I have curl data like this(it's working) --message_boundary_0001-- Content-Disposition: form-data; name="RequestData" Content-Type: application/json; charset=utf-8 { "appKey": "525348e77144a9cee9a7471a8b67c50ea85b9e3eb377a3c1a3a23db88f9150eefe76e6a339fdbc62b817595f53d72549d9ebe36438f8c2619846b963e9f43a93", "appId": "SAMPLE_DEBUG_NMAID_TO_BE_REPLACED", "outCodec": "OPUS_16K", "cmdName": "NVC_TTS_CMD", "cmdDict": { "tts_language":"eng-USA", "tts_voice":"ava-ml", "tts_log_level": "FULL", "supportedTtsFeature":{ "tts_multi_logic_stream_flag": "true", "tts_early_emission_flag": "true" } } } --message_boundary_0001-- Content-Disposition: form-data; name="TtsParameter"; **paramName**="TEXT_TO_READ" Content-Type: application/json; charset=utf-8 { "tts_type": "native_text", "tts_input":"The result will be millions of Americans who have insurance who did not have it before. Thats the goal. And the goal is not about the website. The goal is that the American people who have been shut out of affordable health care options in the past have those options available to them." } --message_boundary_0001-- but I don't know how to convert it to requests code. ## Expected Result python3 requests library should be able to post above data. the main difficulty is there's special Content-Disposition. Content-Disposition: form-data; name="RequestData" Content-Disposition: form-data; name="TtsParameter"; **paramName**="TEXT_TO_READ" please note the second one is called 'paramName', instead of 'filename', which can be solved by another solved issue: _Can't set headers per part of multipart requests_ https://github.com/requests/requests/issues/1495 ## What you expected. Some python code sample to convert my curl data. ## Actual Result my code not work. always got 403, or connection timeout error. ## Reproduction Steps Since I'm in private network you cannot debug directly. `import requests from requests_toolbelt import MultipartEncoder RequestData = '''{ "appKey": "525348e77144a9cee9a7471a8b67c50ea85b9e3eb377a3c1a3a23db88f9150eefe76e6a339fdbc62b817595f53d72549d9ebe36438f8c2619846b963e9f43a93", "appId": "SAMPLE_DEBUG_NMAID_TO_BE_REPLACED", "outCodec": "OPUS_16K", "cmdName": "NVC_TTS_CMD", "cmdDict": { "tts_language":"eng-USA", "tts_voice":"ava-ml", "supportedTtsFeature":{ "tts_multi_logic_stream_flag": "true", "tts_early_emission_flag": "true" } } }''' TtsParameter_TEXT_TO_READ = '''{ "tts_type": "native_text", "tts_input":"9 The result will be millions of Americans who have insurance who did not have it before. " }''' multipart_data = MultipartEncoder( fields={ 'RequestData': (None, RequestData, 'application/json; charset=utf-8'), 'TtsParameter': ('TEXT_TO_READ', TtsParameter_TEXT_TO_READ, 'application/json; charset=utf-8') } ) #url = 'https://httpbin.org/post' url = 'http://10.3.65.142:21857/NmspServlet/' headers = { 'Accept': 'audio/ogg;codecs=opus;', 'Connection': 'keep-alive' } resp = requests.post(url, data=multipart_data, headers=headers, timeout=6) print(resp.status_code) print(resp.content.decode('utf-8')) #requests.exceptions.ReadTimeout` ## System Information Windows 10, python3.6
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4950/reactions" }
https://api.github.com/repos/psf/requests/issues/4950/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nYou already have a question on StackOverflow so ...
https://api.github.com/repos/psf/requests/issues/4949
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4949/labels{/name}
https://api.github.com/repos/psf/requests/issues/4949/comments
https://api.github.com/repos/psf/requests/issues/4949/events
https://github.com/psf/requests/issues/4949
402,644,148
MDU6SXNzdWU0MDI2NDQxNDg=
4,949
chardet/urllib3 warnings
{ "avatar_url": "https://avatars.githubusercontent.com/u/27003?v=4", "events_url": "https://api.github.com/users/till/events{/privacy}", "followers_url": "https://api.github.com/users/till/followers", "following_url": "https://api.github.com/users/till/following{/other_user}", "gists_url": "https://api.github.com/users/till/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/till", "id": 27003, "login": "till", "node_id": "MDQ6VXNlcjI3MDAz", "organizations_url": "https://api.github.com/users/till/orgs", "received_events_url": "https://api.github.com/users/till/received_events", "repos_url": "https://api.github.com/users/till/repos", "site_admin": false, "starred_url": "https://api.github.com/users/till/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/till/subscriptions", "type": "User", "url": "https://api.github.com/users/till", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-24T10:39:02Z
2021-09-05T00:06:53Z
2019-01-24T12:50:23Z
NONE
resolved
While debugging a bug in Ansible, I noticed these warnings: ``` RequestsDependencyWarning: urllib3 (1.24.1) or chardet (2.2.1) doesn't match a supported version! RequestsDependencyWarning) ``` I spent some time trying to get rid off them, but to no avail. What are the exact/supported dependencies? Here is a list of installed packages: ``` # pip list backports.ssl-match-hostname (3.5.0.1) cached-property (1.5.1) certifi (2018.11.29) chardet (3.0.4) configobj (4.7.2) decorator (3.4.0) docker (3.7.0) docker-compose (1.23.2) docker-pycreds (0.4.0) dockerpty (0.4.1) docopt (0.6.2) enum34 (1.1.6) functools32 (3.2.3.post2) idna (2.7) iniparse (0.4) ipaddress (1.0.16) IPy (0.75) jsonschema (2.6.0) kitchen (1.1.1) perf (0.1) pip (8.1.2) policycoreutils-default-encoding (0.1) pycurl (7.19.0) pygobject (3.22.0) pygpgme (0.3) pyliblzma (0.5.3) python-linux-procfs (0.4.9) pyudev (0.15) pyxattr (0.5.1) PyYAML (3.13) requests (2.21.0) schedutils (0.4) seobject (0.1) sepolicy (1.1) setuptools (0.9.8) six (1.12.0) slip (0.4.0) slip.dbus (0.4.0) texttable (0.9.1) urlgrabber (3.10) urllib3 (1.24.1) websocket-client (0.54.0) yum-metadata-parser (1.1.4) ``` ## Expected Result No warning. ## Actual Result Warning. ## System Information $ python -m requests.help ``` # python -m requests.help /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (2.2.1) doesn't match a supported version! RequestsDependencyWarning) { "chardet": { "version": "2.2.1" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "2.7.5" }, "platform": { "release": "3.10.0-957.el7.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ``` OS: ``` # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) ```
{ "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/4949/reactions" }
https://api.github.com/repos/psf/requests/issues/4949/timeline
null
completed
null
null
false
[ "Should have read the source:\r\nhttps://github.com/requests/requests/blob/master/requests/__init__.py#L57-L71\r\n\r\n - urllib3: < 1.23\r\n - charded: < 3.0.0\r\n\r\nAny reason why this is not enforced via `requirements.txt`? (I am new to Python, so excuse my ignorance.) ", "It is enforced via Python packaging m...
https://api.github.com/repos/psf/requests/issues/4948
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4948/labels{/name}
https://api.github.com/repos/psf/requests/issues/4948/comments
https://api.github.com/repos/psf/requests/issues/4948/events
https://github.com/psf/requests/issues/4948
401,707,086
MDU6SXNzdWU0MDE3MDcwODY=
4,948
gevent 1.4.0 and urllib3 1.22 does not work with requests 2.20.1
{ "avatar_url": "https://avatars.githubusercontent.com/u/46923905?v=4", "events_url": "https://api.github.com/users/a82singh/events{/privacy}", "followers_url": "https://api.github.com/users/a82singh/followers", "following_url": "https://api.github.com/users/a82singh/following{/other_user}", "gists_url": "https://api.github.com/users/a82singh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/a82singh", "id": 46923905, "login": "a82singh", "node_id": "MDQ6VXNlcjQ2OTIzOTA1", "organizations_url": "https://api.github.com/users/a82singh/orgs", "received_events_url": "https://api.github.com/users/a82singh/received_events", "repos_url": "https://api.github.com/users/a82singh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/a82singh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/a82singh/subscriptions", "type": "User", "url": "https://api.github.com/users/a82singh", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-22T10:53:55Z
2021-09-06T00:06:33Z
2019-01-22T18:52:12Z
NONE
resolved
## Expected Result My python module is executed successfully with the following: gevent 1.4.0, urllib3 1.22 work with requests 2.10.0 with no error ## Actual Result but with gevent 1.4.0, urllib3 1.22 with requests 2.20.1 gives File "/home/abc/xyz/lib/python2.7/site-packages/urllib3/util/wait.py", line 33, in wait_for_read return _wait_for_io_events(socks, EVENT_READ, timeout) File "/home/abc/xyz/lib/python2.7/site-packages/urllib3/util/wait.py", line 22, in _wait_for_io_events with DefaultSelector() as selector: File "/home/abc/xyz/lib/python2.7/site-packages/urllib3/util/selectors.py", line 581, in DefaultSelector return _DEFAULT_SELECTOR() File "/home/abc/xyz/lib/python2.7/site-packages/urllib3/util/selectors.py", line 394, in __init__ self._epoll = select.epoll() AttributeError: 'module' object has no attribute 'epoll' There is absolutely no changes in our code and gevent.monkey.patch_all() is the first statement before any imports. ## System Information $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.15" }, "platform": { "release": "3.10.0-693.2.2.el7.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1000105f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false }
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4948/reactions" }
https://api.github.com/repos/psf/requests/issues/4948/timeline
null
completed
null
null
false
[ "You should try upgrading to a newer version of urllib3. When we first added selectors we had many people coming to us with monkey-patching problems. Essentially due to incorrect import ordering urllib3 used to detect that `select.epoll` was available but then gevent patches it out and then when we go to use `selec...
https://api.github.com/repos/psf/requests/issues/4947
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4947/labels{/name}
https://api.github.com/repos/psf/requests/issues/4947/comments
https://api.github.com/repos/psf/requests/issues/4947/events
https://github.com/psf/requests/pull/4947
401,427,141
MDExOlB1bGxSZXF1ZXN0MjQ2MzUwMTI2
4,947
Docstring explaining when HTTPError is/is not raised
{ "avatar_url": "https://avatars.githubusercontent.com/u/322909?v=4", "events_url": "https://api.github.com/users/jerojasro/events{/privacy}", "followers_url": "https://api.github.com/users/jerojasro/followers", "following_url": "https://api.github.com/users/jerojasro/following{/other_user}", "gists_url": "https://api.github.com/users/jerojasro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jerojasro", "id": 322909, "login": "jerojasro", "node_id": "MDQ6VXNlcjMyMjkwOQ==", "organizations_url": "https://api.github.com/users/jerojasro/orgs", "received_events_url": "https://api.github.com/users/jerojasro/received_events", "repos_url": "https://api.github.com/users/jerojasro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jerojasro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jerojasro/subscriptions", "type": "User", "url": "https://api.github.com/users/jerojasro", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-21T16:26:24Z
2021-08-27T00:08:46Z
2021-02-20T14:51:02Z
NONE
resolved
This is mostly to tell the reader about when HTTP error must be handled, and to better link to the other places in the doc. where this is explained.
{ "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/4947/reactions" }
https://api.github.com/repos/psf/requests/issues/4947/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4947.diff", "html_url": "https://github.com/psf/requests/pull/4947", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4947.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4947" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4947?src=pr&el=h1) Report\n> Merging [#4947](https://codecov.io/gh/requests/requests/pull/4947?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/67a9ed47aec4f9f8280e58e4e05e3a753f62ae15?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4946
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4946/labels{/name}
https://api.github.com/repos/psf/requests/issues/4946/comments
https://api.github.com/repos/psf/requests/issues/4946/events
https://github.com/psf/requests/issues/4946
401,313,830
MDU6SXNzdWU0MDEzMTM4MzA=
4,946
CURL command works from command line but fails when using requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/11543287?v=4", "events_url": "https://api.github.com/users/elilurie/events{/privacy}", "followers_url": "https://api.github.com/users/elilurie/followers", "following_url": "https://api.github.com/users/elilurie/following{/other_user}", "gists_url": "https://api.github.com/users/elilurie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/elilurie", "id": 11543287, "login": "elilurie", "node_id": "MDQ6VXNlcjExNTQzMjg3", "organizations_url": "https://api.github.com/users/elilurie/orgs", "received_events_url": "https://api.github.com/users/elilurie/received_events", "repos_url": "https://api.github.com/users/elilurie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/elilurie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/elilurie/subscriptions", "type": "User", "url": "https://api.github.com/users/elilurie", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-01-21T11:38:22Z
2021-09-06T00:06:33Z
2019-01-21T13:47:43Z
NONE
resolved
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
{ "avatar_url": "https://avatars.githubusercontent.com/u/11543287?v=4", "events_url": "https://api.github.com/users/elilurie/events{/privacy}", "followers_url": "https://api.github.com/users/elilurie/followers", "following_url": "https://api.github.com/users/elilurie/following{/other_user}", "gists_url": "https://api.github.com/users/elilurie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/elilurie", "id": 11543287, "login": "elilurie", "node_id": "MDQ6VXNlcjExNTQzMjg3", "organizations_url": "https://api.github.com/users/elilurie/orgs", "received_events_url": "https://api.github.com/users/elilurie/received_events", "repos_url": "https://api.github.com/users/elilurie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/elilurie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/elilurie/subscriptions", "type": "User", "url": "https://api.github.com/users/elilurie", "user_view_type": "public" }
{ "+1": 0, "-1": 1, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4946/reactions" }
https://api.github.com/repos/psf/requests/issues/4946/timeline
null
completed
null
null
false
[ "Using CURL POST works in UBUNTU command line works but does not work from a python script \r\n**Curl command:**\r\n```\r\ncurl -X POST \\\r\n https://wstest3.edensprings.com/API/mobile/GetData \\\r\n -H 'cache-control: no-cache' \\\r\n -H 'content-type: application/json' \\\r\n ...
https://api.github.com/repos/psf/requests/issues/4945
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4945/labels{/name}
https://api.github.com/repos/psf/requests/issues/4945/comments
https://api.github.com/repos/psf/requests/issues/4945/events
https://github.com/psf/requests/issues/4945
401,282,598
MDU6SXNzdWU0MDEyODI1OTg=
4,945
API reference doesn't include Response.raw
{ "avatar_url": "https://avatars.githubusercontent.com/u/500451?v=4", "events_url": "https://api.github.com/users/pfalcon/events{/privacy}", "followers_url": "https://api.github.com/users/pfalcon/followers", "following_url": "https://api.github.com/users/pfalcon/following{/other_user}", "gists_url": "https://api.github.com/users/pfalcon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pfalcon", "id": 500451, "login": "pfalcon", "node_id": "MDQ6VXNlcjUwMDQ1MQ==", "organizations_url": "https://api.github.com/users/pfalcon/orgs", "received_events_url": "https://api.github.com/users/pfalcon/received_events", "repos_url": "https://api.github.com/users/pfalcon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pfalcon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pfalcon/subscriptions", "type": "User", "url": "https://api.github.com/users/pfalcon", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-21T10:18:29Z
2021-09-04T00:06:16Z
2019-08-24T02:09:11Z
NONE
resolved
Look under http://docs.python-requests.org/en/master/api/#requests.Response - `raw` attribute is not listed, even though it's described in http://docs.python-requests.org/en/master/user/quickstart/#raw-response-content , etc. ## Expected Result The API reference should be complete. ## Actual Result See above. ## Reproduction Steps See above. ## System Information The model.py has it like this (f37daf25006a4b475b1bea90fecdd035146dbc3b): ~~~ #: File-like object representation of response (for advanced usage). #: Use of ``raw`` requires that ``stream=True`` be set on the request. # This requirement does not apply for use internally to Requests. self.raw = None ~~~ Note that last comment line doesn't start with `#:`. Maybe that causes the entire comment block to **not** be treated as doc-comment and the field is excluded from docs.
{ "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/4945/reactions" }
https://api.github.com/repos/psf/requests/issues/4945/timeline
null
completed
null
null
false
[ "Ping?\r\n" ]
https://api.github.com/repos/psf/requests/issues/4944
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4944/labels{/name}
https://api.github.com/repos/psf/requests/issues/4944/comments
https://api.github.com/repos/psf/requests/issues/4944/events
https://github.com/psf/requests/pull/4944
401,180,680
MDExOlB1bGxSZXF1ZXN0MjQ2MTYyMTEz
4,944
Fixes: TestSuperLen class
{ "avatar_url": "https://avatars.githubusercontent.com/u/28245482?v=4", "events_url": "https://api.github.com/users/deepio/events{/privacy}", "followers_url": "https://api.github.com/users/deepio/followers", "following_url": "https://api.github.com/users/deepio/following{/other_user}", "gists_url": "https://api.github.com/users/deepio/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/deepio", "id": 28245482, "login": "deepio", "node_id": "MDQ6VXNlcjI4MjQ1NDgy", "organizations_url": "https://api.github.com/users/deepio/orgs", "received_events_url": "https://api.github.com/users/deepio/received_events", "repos_url": "https://api.github.com/users/deepio/repos", "site_admin": false, "starred_url": "https://api.github.com/users/deepio/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/deepio/subscriptions", "type": "User", "url": "https://api.github.com/users/deepio", "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
3
2019-01-21T03:32:28Z
2021-08-31T00:07:25Z
2019-02-08T12:39:21Z
NONE
resolved
Pytest itself would fail, until I fixed the semantics of the pytest params in the decorator for `test_io_streams`. I am not certain unittests are being used currently, as many tests failed prior to changing anything. Am I not using them correctly? I also wanted to start a discussion and share thoughts on default_ports, I believe it should be written in the same manner as default_headers.
{ "avatar_url": "https://avatars.githubusercontent.com/u/28245482?v=4", "events_url": "https://api.github.com/users/deepio/events{/privacy}", "followers_url": "https://api.github.com/users/deepio/followers", "following_url": "https://api.github.com/users/deepio/following{/other_user}", "gists_url": "https://api.github.com/users/deepio/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/deepio", "id": 28245482, "login": "deepio", "node_id": "MDQ6VXNlcjI4MjQ1NDgy", "organizations_url": "https://api.github.com/users/deepio/orgs", "received_events_url": "https://api.github.com/users/deepio/received_events", "repos_url": "https://api.github.com/users/deepio/repos", "site_admin": false, "starred_url": "https://api.github.com/users/deepio/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/deepio/subscriptions", "type": "User", "url": "https://api.github.com/users/deepio", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4944/reactions" }
https://api.github.com/repos/psf/requests/issues/4944/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4944.diff", "html_url": "https://github.com/psf/requests/pull/4944", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4944.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4944" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4944?src=pr&el=h1) Report\n> Merging [#4944](https://codecov.io/gh/requests/requests/pull/4944?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/64bde6582d9b49e9345d9b8df16aaa26dc372d13?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4943
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4943/labels{/name}
https://api.github.com/repos/psf/requests/issues/4943/comments
https://api.github.com/repos/psf/requests/issues/4943/events
https://github.com/psf/requests/issues/4943
401,108,264
MDU6SXNzdWU0MDExMDgyNjQ=
4,943
Replace the license file with license full text, because GitHub doesn't detect the license in the current state of the repo
{ "avatar_url": "https://avatars.githubusercontent.com/u/240344?v=4", "events_url": "https://api.github.com/users/KOLANICH/events{/privacy}", "followers_url": "https://api.github.com/users/KOLANICH/followers", "following_url": "https://api.github.com/users/KOLANICH/following{/other_user}", "gists_url": "https://api.github.com/users/KOLANICH/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/KOLANICH", "id": 240344, "login": "KOLANICH", "node_id": "MDQ6VXNlcjI0MDM0NA==", "organizations_url": "https://api.github.com/users/KOLANICH/orgs", "received_events_url": "https://api.github.com/users/KOLANICH/received_events", "repos_url": "https://api.github.com/users/KOLANICH/repos", "site_admin": false, "starred_url": "https://api.github.com/users/KOLANICH/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/KOLANICH/subscriptions", "type": "User", "url": "https://api.github.com/users/KOLANICH", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-01-20T15:25:48Z
2021-09-02T00:07:17Z
2020-02-18T07:16:10Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4943/reactions" }
https://api.github.com/repos/psf/requests/issues/4943/timeline
null
completed
null
null
false
[ "I don't believe this is an issue anymore. Resolving since it appears correctly in current Github.", "It is still the issue. When GH detects project's license, you see not `View license`, but its SPDX identifier." ]
https://api.github.com/repos/psf/requests/issues/4942
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4942/labels{/name}
https://api.github.com/repos/psf/requests/issues/4942/comments
https://api.github.com/repos/psf/requests/issues/4942/events
https://github.com/psf/requests/pull/4942
401,059,835
MDExOlB1bGxSZXF1ZXN0MjQ2MDg1OTc5
4,942
Update sessions.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/1960194?v=4", "events_url": "https://api.github.com/users/xuhuan/events{/privacy}", "followers_url": "https://api.github.com/users/xuhuan/followers", "following_url": "https://api.github.com/users/xuhuan/following{/other_user}", "gists_url": "https://api.github.com/users/xuhuan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xuhuan", "id": 1960194, "login": "xuhuan", "node_id": "MDQ6VXNlcjE5NjAxOTQ=", "organizations_url": "https://api.github.com/users/xuhuan/orgs", "received_events_url": "https://api.github.com/users/xuhuan/received_events", "repos_url": "https://api.github.com/users/xuhuan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xuhuan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xuhuan/subscriptions", "type": "User", "url": "https://api.github.com/users/xuhuan", "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
2019-01-20T03:49:50Z
2021-08-31T00:07:25Z
2019-02-14T14:13:27Z
NONE
resolved
make proxies.update can use in get or post
{ "avatar_url": "https://avatars.githubusercontent.com/u/3725578?v=4", "events_url": "https://api.github.com/users/Projjol-zz/events{/privacy}", "followers_url": "https://api.github.com/users/Projjol-zz/followers", "following_url": "https://api.github.com/users/Projjol-zz/following{/other_user}", "gists_url": "https://api.github.com/users/Projjol-zz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Projjol-zz", "id": 3725578, "login": "Projjol-zz", "node_id": "MDQ6VXNlcjM3MjU1Nzg=", "organizations_url": "https://api.github.com/users/Projjol-zz/orgs", "received_events_url": "https://api.github.com/users/Projjol-zz/received_events", "repos_url": "https://api.github.com/users/Projjol-zz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Projjol-zz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Projjol-zz/subscriptions", "type": "User", "url": "https://api.github.com/users/Projjol-zz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4942/reactions" }
https://api.github.com/repos/psf/requests/issues/4942/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4942.diff", "html_url": "https://github.com/psf/requests/pull/4942", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4942.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4942" }
true
[ "Closing due to label, please re-open in the future if needed" ]
https://api.github.com/repos/psf/requests/issues/4941
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4941/labels{/name}
https://api.github.com/repos/psf/requests/issues/4941/comments
https://api.github.com/repos/psf/requests/issues/4941/events
https://github.com/psf/requests/issues/4941
400,199,470
MDU6SXNzdWU0MDAxOTk0NzA=
4,941
Leakage of results from one request to another while using session
{ "avatar_url": "https://avatars.githubusercontent.com/u/16288600?v=4", "events_url": "https://api.github.com/users/dilipvamsi/events{/privacy}", "followers_url": "https://api.github.com/users/dilipvamsi/followers", "following_url": "https://api.github.com/users/dilipvamsi/following{/other_user}", "gists_url": "https://api.github.com/users/dilipvamsi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dilipvamsi", "id": 16288600, "login": "dilipvamsi", "node_id": "MDQ6VXNlcjE2Mjg4NjAw", "organizations_url": "https://api.github.com/users/dilipvamsi/orgs", "received_events_url": "https://api.github.com/users/dilipvamsi/received_events", "repos_url": "https://api.github.com/users/dilipvamsi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dilipvamsi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dilipvamsi/subscriptions", "type": "User", "url": "https://api.github.com/users/dilipvamsi", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-17T10:08:31Z
2024-10-04T00:39:57Z
2024-10-04T00:39:53Z
NONE
null
Hi, I was facing this issue when using the requests session in gevent workers threads. (https://github.com/ArangoDB-Community/pyArango/issues/65). I faced the same issue when using Celery (which was not using the gevent for workers) while communicating to the db. I have changed the code such that for every call to the db a new session is created and issue seemed to be resolved. I think the issue may be due to large number of concurrent calls to db using the same session. Regards, Dilip Vamsi.
{ "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/4941/reactions" }
https://api.github.com/repos/psf/requests/issues/4941/timeline
null
completed
null
null
false
[ "As far as I can tell, `requests.Session` is not thread safe, see https://github.com/kennethreitz/requests/issues/2766. So creating a new session per thread is probably the way to go?", "@sethmlarson is this issue resolved? Per your comment in https://github.com/psf/requests/issues/2766#issuecomment-2119324917 it...
https://api.github.com/repos/psf/requests/issues/4940
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4940/labels{/name}
https://api.github.com/repos/psf/requests/issues/4940/comments
https://api.github.com/repos/psf/requests/issues/4940/events
https://github.com/psf/requests/pull/4940
400,078,082
MDExOlB1bGxSZXF1ZXN0MjQ1MzUxOTk0
4,940
Remove sudo: from .travis.yml
{ "avatar_url": "https://avatars.githubusercontent.com/u/2379650?v=4", "events_url": "https://api.github.com/users/sloria/events{/privacy}", "followers_url": "https://api.github.com/users/sloria/followers", "following_url": "https://api.github.com/users/sloria/following{/other_user}", "gists_url": "https://api.github.com/users/sloria/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sloria", "id": 2379650, "login": "sloria", "node_id": "MDQ6VXNlcjIzNzk2NTA=", "organizations_url": "https://api.github.com/users/sloria/orgs", "received_events_url": "https://api.github.com/users/sloria/received_events", "repos_url": "https://api.github.com/users/sloria/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sloria/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sloria/subscriptions", "type": "User", "url": "https://api.github.com/users/sloria", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-01-17T01:59:35Z
2021-08-31T00:07:27Z
2019-01-21T18:50:28Z
CONTRIBUTOR
resolved
TravisCI has migrated their infrastructure: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
{ "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/4940/reactions" }
https://api.github.com/repos/psf/requests/issues/4940/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4940.diff", "html_url": "https://github.com/psf/requests/pull/4940", "merged_at": "2019-01-21T18:50:28Z", "patch_url": "https://github.com/psf/requests/pull/4940.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4940" }
true
[ "Test failures seem unrelated and are happening on `master` as well.", "# [Codecov](https://codecov.io/gh/requests/requests/pull/4940?src=pr&el=h1) Report\n> Merging [#4940](https://codecov.io/gh/requests/requests/pull/4940?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/67a9ed47aec4f...
https://api.github.com/repos/psf/requests/issues/4939
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4939/labels{/name}
https://api.github.com/repos/psf/requests/issues/4939/comments
https://api.github.com/repos/psf/requests/issues/4939/events
https://github.com/psf/requests/issues/4939
399,365,119
MDU6SXNzdWUzOTkzNjUxMTk=
4,939
Determining the IP address of server with bad TLS cert.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1912206?v=4", "events_url": "https://api.github.com/users/tmontes/events{/privacy}", "followers_url": "https://api.github.com/users/tmontes/followers", "following_url": "https://api.github.com/users/tmontes/following{/other_user}", "gists_url": "https://api.github.com/users/tmontes/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tmontes", "id": 1912206, "login": "tmontes", "node_id": "MDQ6VXNlcjE5MTIyMDY=", "organizations_url": "https://api.github.com/users/tmontes/orgs", "received_events_url": "https://api.github.com/users/tmontes/received_events", "repos_url": "https://api.github.com/users/tmontes/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tmontes/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tmontes/subscriptions", "type": "User", "url": "https://api.github.com/users/tmontes", "user_view_type": "public" }
[]
open
false
null
[]
null
8
2019-01-15T14:17:58Z
2019-01-15T18:00:44Z
null
NONE
null
Preliminary notes: * Thanks for `requests`! * I investigated quite a bit and couldn't find an obvious solution to the issue. Where I looked: documentation, stack overflow, general web search. Scenario: * HTTPS service available via a DNS name mapped to multiple IP addresses. * Each such address is handled by a different server. * Some of those servers configured with a bad/wrong TLS certificate. The issue: * Requests like `requests.get('https://multiple.example.net/')` will sometimes succeed TLS validation and other times fail. How to determine the IP address of the server with the bad TLS certificate? Why? * I would like to be able to tell the service provider that their server at IP address "so and so" is presenting a wrong certificate. The "give me an IP address" solutions I found all assume the HTTP connection has been established and are mostly based in the idea of using streaming mode to get to the underlying socket, calling `getpeername()` from there. Those do not work in this scenario given that an `requests.exceptions.SSLError` exception is properly raised and there's no response object to work with from that point on. Unless the exception holds a reference to the socket, but I couldn't find it there. Questions: * Other than monkey-patching approaches, is there any solution for this challenge I may be missing? * If not, should/could `requests.exceptions.SSLError` include a reference to the socket that lead to the failure, pretty much like all other requests exceptions include a reference to the request and response objects? Thanks in advance.
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/4939/reactions" }
https://api.github.com/repos/psf/requests/issues/4939/timeline
null
null
null
null
false
[ "I wrote a thing to handle this, sort of: https://github.com/lifehackjim/cert_human/\r\n\r\nYou can get a cert from a server (regardless of it's validity), then perform whatever validation, reporting, or what-have you on it. Ex:\r\n\r\n```\r\n>>> import cert_human\r\n>>> store = cert_human.CertStore.from_request(\"...
https://api.github.com/repos/psf/requests/issues/4938
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4938/labels{/name}
https://api.github.com/repos/psf/requests/issues/4938/comments
https://api.github.com/repos/psf/requests/issues/4938/events
https://github.com/psf/requests/issues/4938
399,127,304
MDU6SXNzdWUzOTkxMjczMDQ=
4,938
Session doesn't keep SSL setting
{ "avatar_url": "https://avatars.githubusercontent.com/u/11529426?v=4", "events_url": "https://api.github.com/users/AndTheDaysGoBy/events{/privacy}", "followers_url": "https://api.github.com/users/AndTheDaysGoBy/followers", "following_url": "https://api.github.com/users/AndTheDaysGoBy/following{/other_user}", "gists_url": "https://api.github.com/users/AndTheDaysGoBy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AndTheDaysGoBy", "id": 11529426, "login": "AndTheDaysGoBy", "node_id": "MDQ6VXNlcjExNTI5NDI2", "organizations_url": "https://api.github.com/users/AndTheDaysGoBy/orgs", "received_events_url": "https://api.github.com/users/AndTheDaysGoBy/received_events", "repos_url": "https://api.github.com/users/AndTheDaysGoBy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AndTheDaysGoBy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AndTheDaysGoBy/subscriptions", "type": "User", "url": "https://api.github.com/users/AndTheDaysGoBy", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-14T23:54:23Z
2021-09-05T00:06:59Z
2019-02-14T15:03:58Z
NONE
resolved
Summary. https://github.com/requests/requests/blob/f37daf25006a4b475b1bea90fecdd035146dbc3b/requests/sessions.py#L340 Looking at the Session object above, we have verify in the` __attr__` field. Let `s = Session()`. One way to set the parameters of the session is to perform `s.<field> = value`. This works for some of them, but not all of them. In particular, consider the situation where you have a cacert you have to verify with. With a standard curl, you could send this with --cacert, with a standard request, you could pass this in with `requests.get(url, verify="/path/to/cacert"`. In a session however, you could at best set it "per each request" (against the purpose of a session) by performing `s.get(url, verify="path/to/cacert")`. To fulfill the purpose of a session, authentication and other fields are usually set via `s.<field> = value`, and then you at most have to do `s.get(url)`. This is how it's used in docker-py. However, this fails to work like a session should due to the implementation of the get method: https://github.com/requests/requests/blob/f37daf25006a4b475b1bea90fecdd035146dbc3b/requests/sessions.py#L537 in conjunction with the request() method: https://github.com/requests/requests/blob/f37daf25006a4b475b1bea90fecdd035146dbc3b/requests/sessions.py#L466 Notice how the get method at most passes in the url down to the request method, and the rest are passed in as kwargs. As a result, the verify field will only be passed on to the request if "verify" is in the kwargs (i.e. you perform `s.get(url, verify="path/to/cacert")` as you would in a normal request). Since it wont be (after all, it's supposed to be a setting of the session, set via `s.verify = "path/to/cacert"`), the request() method will default it to None. This None value will be passed into the merge_environment_settings method: https://github.com/requests/requests/blob/f37daf25006a4b475b1bea90fecdd035146dbc3b/requests/sessions.py#L690 Since the default value for trust_env is True, the first if statement will occur. Then, since verify was improperly passed in as None, the second one will also occur. Therefore, we will have `verify = (os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE'))` Now, verify will proceed to go to the merge_setting() method, i.e. `verify = merge_setting(verify, self.verify)`: https://github.com/requests/requests/blob/f37daf25006a4b475b1bea90fecdd035146dbc3b/requests/sessions.py#L49 However, now that verify actually has a value (the value resulting from or'ing the BUNDLEs), the first if in this method will not occur, the second one will not occur (the one we wanted to occur), but the third one (which I guess is error-handling related) will occur (which defaults to returning the request_settings, in this case it'd be the or of the BUNDLEs as opposed to the value set via `s.verify = "path/to/cacert"`). The most straightforward solution I can give is in the PR I've created. I.e. pass in a value for verify into the kwargs for the request() method. Consequently, verify wont be None so it wont be overwritten by the BUNDLEs in the merge_environment_settings() method. Then, that error method in merge_settings() (the third if, i.e. the if not) will at least return the correct default thing. If there was to be another fix that doesn't hack around how merge_settings functions (i.e. allows us to take the second if), it would be to mess around in the merge_environment_settings() method so that it wont default to setting verify to the BUNDLEs. Otherwise, you'd have to have a special case in the merge_setting() method for "verify" that will allow either request_settings is None or request_settings is "the or of the CURL CA BUNDLE and REQUEST CA BUNDLE" for the second if statement.
{ "avatar_url": "https://avatars.githubusercontent.com/u/6740665?v=4", "events_url": "https://api.github.com/users/lmiguelvargasf/events{/privacy}", "followers_url": "https://api.github.com/users/lmiguelvargasf/followers", "following_url": "https://api.github.com/users/lmiguelvargasf/following{/other_user}", "gists_url": "https://api.github.com/users/lmiguelvargasf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lmiguelvargasf", "id": 6740665, "login": "lmiguelvargasf", "node_id": "MDQ6VXNlcjY3NDA2NjU=", "organizations_url": "https://api.github.com/users/lmiguelvargasf/orgs", "received_events_url": "https://api.github.com/users/lmiguelvargasf/received_events", "repos_url": "https://api.github.com/users/lmiguelvargasf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lmiguelvargasf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lmiguelvargasf/subscriptions", "type": "User", "url": "https://api.github.com/users/lmiguelvargasf", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4938/reactions" }
https://api.github.com/repos/psf/requests/issues/4938/timeline
null
completed
null
null
false
[ "Closed due to inactivity." ]
https://api.github.com/repos/psf/requests/issues/4937
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4937/labels{/name}
https://api.github.com/repos/psf/requests/issues/4937/comments
https://api.github.com/repos/psf/requests/issues/4937/events
https://github.com/psf/requests/issues/4937
399,031,464
MDU6SXNzdWUzOTkwMzE0NjQ=
4,937
Connection reset by peer when sending POST
{ "avatar_url": "https://avatars.githubusercontent.com/u/107323?v=4", "events_url": "https://api.github.com/users/rdgoite/events{/privacy}", "followers_url": "https://api.github.com/users/rdgoite/followers", "following_url": "https://api.github.com/users/rdgoite/following{/other_user}", "gists_url": "https://api.github.com/users/rdgoite/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rdgoite", "id": 107323, "login": "rdgoite", "node_id": "MDQ6VXNlcjEwNzMyMw==", "organizations_url": "https://api.github.com/users/rdgoite/orgs", "received_events_url": "https://api.github.com/users/rdgoite/received_events", "repos_url": "https://api.github.com/users/rdgoite/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rdgoite/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rdgoite/subscriptions", "type": "User", "url": "https://api.github.com/users/rdgoite", "user_view_type": "public" }
[]
closed
true
null
[]
null
26
2019-01-14T19:08:58Z
2021-11-26T05:00:33Z
2021-08-28T04:03:32Z
NONE
resolved
Client code that uses Requests module to send data via HTTP POST encounters a `ConnectionResetError`. The entire operation (composed of multiple POST requests to a small set of service endpoints) can sometimes succeed, but most of the time, it fails with this error. ## Expected Result Operation succeeds (or fails) without connection issues. ## Actual Result The operation fails with `ConnectionResetError`. ## Additional Information It's a little difficult to provide basic reproduction for the issue as we're running into this problem with a test payload that's specific to our system. The server (peer) is a Java application that's configured to terminate/reset connection after a given time of no use (idle). The client sends multiple one-off POST requests, but it seems like internally, the connections are being reused similar to issue #4506, and the operation eventually runs into a connection that's already been reset and raises the error. However, unlike #4506, we are not using Sessions. Here are some tracebacks that could hopefully describe the problem better: ``` Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "<string>", line 2, in raise_from File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/local/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.7/http/client.py", line 257, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "<string>", line 2, in raise_from File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/local/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.7/http/client.py", line 257, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) ... Traceback (most recent call last): ... File "../client-code.py", line 322, in createFile r = requests.post(fileSubmissionsUrl, data=json.dumps(fileToCreateObject), headers=self.headers) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3.1" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.7.1" }, "platform": { "release": "4.14.42-61.37.amzn2.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1000211f", "version": "18.0.0" }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "20000000" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 7, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 7, "url": "https://api.github.com/repos/psf/requests/issues/4937/reactions" }
https://api.github.com/repos/psf/requests/issues/4937/timeline
null
completed
null
null
false
[ "+1 same issue here", "test", "We are also experiencing a lot of errors (14%) on some servers. POST call is not retried by requests as it's not idempotent.\r\n\r\nAfter installing `requests[security]`, error changed to `('Connection aborted.', OSError(\"(104, 'ECONNRESET')\",))`. ", "I can reproduce single `E...
https://api.github.com/repos/psf/requests/issues/4936
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4936/labels{/name}
https://api.github.com/repos/psf/requests/issues/4936/comments
https://api.github.com/repos/psf/requests/issues/4936/events
https://github.com/psf/requests/pull/4936
398,602,691
MDExOlB1bGxSZXF1ZXN0MjQ0MjQ5MTMy
4,936
Fix typo
{ "avatar_url": "https://avatars.githubusercontent.com/u/9677399?v=4", "events_url": "https://api.github.com/users/ofek/events{/privacy}", "followers_url": "https://api.github.com/users/ofek/followers", "following_url": "https://api.github.com/users/ofek/following{/other_user}", "gists_url": "https://api.github.com/users/ofek/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ofek", "id": 9677399, "login": "ofek", "node_id": "MDQ6VXNlcjk2NzczOTk=", "organizations_url": "https://api.github.com/users/ofek/orgs", "received_events_url": "https://api.github.com/users/ofek/received_events", "repos_url": "https://api.github.com/users/ofek/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ofek/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ofek/subscriptions", "type": "User", "url": "https://api.github.com/users/ofek", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2019-01-12T23:33:07Z
2021-09-01T00:11:40Z
2019-01-12T23:54:22Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4936/reactions" }
https://api.github.com/repos/psf/requests/issues/4936/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4936.diff", "html_url": "https://github.com/psf/requests/pull/4936", "merged_at": "2019-01-12T23:54:22Z", "patch_url": "https://github.com/psf/requests/pull/4936.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4936" }
true
[]
https://api.github.com/repos/psf/requests/issues/4935
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4935/labels{/name}
https://api.github.com/repos/psf/requests/issues/4935/comments
https://api.github.com/repos/psf/requests/issues/4935/events
https://github.com/psf/requests/pull/4935
398,476,236
MDExOlB1bGxSZXF1ZXN0MjQ0MTY4MzY3
4,935
Make CA Persistent
{ "avatar_url": "https://avatars.githubusercontent.com/u/11529426?v=4", "events_url": "https://api.github.com/users/AndTheDaysGoBy/events{/privacy}", "followers_url": "https://api.github.com/users/AndTheDaysGoBy/followers", "following_url": "https://api.github.com/users/AndTheDaysGoBy/following{/other_user}", "gists_url": "https://api.github.com/users/AndTheDaysGoBy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AndTheDaysGoBy", "id": 11529426, "login": "AndTheDaysGoBy", "node_id": "MDQ6VXNlcjExNTI5NDI2", "organizations_url": "https://api.github.com/users/AndTheDaysGoBy/orgs", "received_events_url": "https://api.github.com/users/AndTheDaysGoBy/received_events", "repos_url": "https://api.github.com/users/AndTheDaysGoBy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AndTheDaysGoBy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AndTheDaysGoBy/subscriptions", "type": "User", "url": "https://api.github.com/users/AndTheDaysGoBy", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2019-01-11T22:32:42Z
2021-08-30T00:06:42Z
2019-08-21T22:46:13Z
NONE
resolved
Was trying to get docker-py working with a remote host, i.e. using a key.pem, cert.pem, and ca.pem. Had SSL issues. Ultimately figured out that it was due to the APIClient being derived from requests.sessions. In particular, even if verify is set for the session, it will not actually be used since the kwargs for the get() are directly passed into the request() method (which defaults verify to None). As additional info., curling worked when passing the cert.pem, ca.pem, and key.pem, requests worked when merely using requests.get(url, cert=(cert, key), verify=ca), and sessions worked as long as verify was always passed into the get() method, i.e. s.get(url, verify=ca, ...)
{ "avatar_url": "https://avatars.githubusercontent.com/u/11529426?v=4", "events_url": "https://api.github.com/users/AndTheDaysGoBy/events{/privacy}", "followers_url": "https://api.github.com/users/AndTheDaysGoBy/followers", "following_url": "https://api.github.com/users/AndTheDaysGoBy/following{/other_user}", "gists_url": "https://api.github.com/users/AndTheDaysGoBy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AndTheDaysGoBy", "id": 11529426, "login": "AndTheDaysGoBy", "node_id": "MDQ6VXNlcjExNTI5NDI2", "organizations_url": "https://api.github.com/users/AndTheDaysGoBy/orgs", "received_events_url": "https://api.github.com/users/AndTheDaysGoBy/received_events", "repos_url": "https://api.github.com/users/AndTheDaysGoBy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AndTheDaysGoBy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AndTheDaysGoBy/subscriptions", "type": "User", "url": "https://api.github.com/users/AndTheDaysGoBy", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4935/reactions" }
https://api.github.com/repos/psf/requests/issues/4935/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4935.diff", "html_url": "https://github.com/psf/requests/pull/4935", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4935.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4935" }
true
[ "By the looks of it, I think the tests aren't passing because the tests expect verify=None (as it would be set in the requests() method should it not be passed into the kwargs from the get()). However, is this the intended behavior desired? Since it's a session, it should be using the self.verify when it isn't expl...
https://api.github.com/repos/psf/requests/issues/4934
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4934/labels{/name}
https://api.github.com/repos/psf/requests/issues/4934/comments
https://api.github.com/repos/psf/requests/issues/4934/events
https://github.com/psf/requests/issues/4934
398,171,423
MDU6SXNzdWUzOTgxNzE0MjM=
4,934
request memory leak with no session
{ "avatar_url": "https://avatars.githubusercontent.com/u/24888835?v=4", "events_url": "https://api.github.com/users/Flyraty/events{/privacy}", "followers_url": "https://api.github.com/users/Flyraty/followers", "following_url": "https://api.github.com/users/Flyraty/following{/other_user}", "gists_url": "https://api.github.com/users/Flyraty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Flyraty", "id": 24888835, "login": "Flyraty", "node_id": "MDQ6VXNlcjI0ODg4ODM1", "organizations_url": "https://api.github.com/users/Flyraty/orgs", "received_events_url": "https://api.github.com/users/Flyraty/received_events", "repos_url": "https://api.github.com/users/Flyraty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Flyraty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Flyraty/subscriptions", "type": "User", "url": "https://api.github.com/users/Flyraty", "user_view_type": "public" }
[ { "color": "f7c6c7", "default": false, "description": null, "id": 167537670, "name": "Propose Close", "node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=", "url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close" }, { "color": "fef2c0", "default": false, "description": ...
open
false
null
[]
null
2
2019-01-11T07:55:51Z
2019-01-11T16:57:32Z
null
NONE
null
I use requests lib to monitor live room。In the start, i use request.get() and set connection headers closed, it occured memory leak, the memory would increase 10M per 15~20 minutes and dont down. Because of live room, it will created 2000w requests per day. i think maybe there exists some requests dont close, but i set the connection header closed. Why is it still existed produced? In the last, i use request.Session() and keep-alive connection header to solve the problem. i want to know why request.get is bad but session is normal. There is my code demo ``` python while true: headers = {'Connection': 'closed'} requests.get(url, headers=headers): # when the live room is closed if close: break ``` ``` python session =requests.Session() while true: headers = {'Connection': 'keep-alive'} session.get(url, headers=headers): # when the live room is closed if close: session.close() break ```
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/4934/reactions" }
https://api.github.com/repos/psf/requests/issues/4934/timeline
null
null
null
null
false
[ "Please provide us with the output of\r\n\r\n```\r\npython -m requests.help\r\n```\r\n\r\nIf that is unavailable on your version of Requests please provide some basic information about your system (Python version, operating system, etc).", "> Please provide us with the output of\r\n> \r\n> ```\r\n> python -m requ...
https://api.github.com/repos/psf/requests/issues/4933
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4933/labels{/name}
https://api.github.com/repos/psf/requests/issues/4933/comments
https://api.github.com/repos/psf/requests/issues/4933/events
https://github.com/psf/requests/pull/4933
397,548,894
MDExOlB1bGxSZXF1ZXN0MjQzNDcwODI0
4,933
Fallback for decoding malformed Location headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/647359?v=4", "events_url": "https://api.github.com/users/tomchristie/events{/privacy}", "followers_url": "https://api.github.com/users/tomchristie/followers", "following_url": "https://api.github.com/users/tomchristie/following{/other_user}", "gists_url": "https://api.github.com/users/tomchristie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tomchristie", "id": 647359, "login": "tomchristie", "node_id": "MDQ6VXNlcjY0NzM1OQ==", "organizations_url": "https://api.github.com/users/tomchristie/orgs", "received_events_url": "https://api.github.com/users/tomchristie/received_events", "repos_url": "https://api.github.com/users/tomchristie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tomchristie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tomchristie/subscriptions", "type": "User", "url": "https://api.github.com/users/tomchristie", "user_view_type": "public" }
[]
closed
false
null
[]
null
1
2019-01-09T20:26:32Z
2024-08-26T10:17:48Z
2024-08-26T10:17:48Z
CONTRIBUTOR
null
I assume this'd be the most robust way to close off #4926.
{ "avatar_url": "https://avatars.githubusercontent.com/u/647359?v=4", "events_url": "https://api.github.com/users/tomchristie/events{/privacy}", "followers_url": "https://api.github.com/users/tomchristie/followers", "following_url": "https://api.github.com/users/tomchristie/following{/other_user}", "gists_url": "https://api.github.com/users/tomchristie/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tomchristie", "id": 647359, "login": "tomchristie", "node_id": "MDQ6VXNlcjY0NzM1OQ==", "organizations_url": "https://api.github.com/users/tomchristie/orgs", "received_events_url": "https://api.github.com/users/tomchristie/received_events", "repos_url": "https://api.github.com/users/tomchristie/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tomchristie/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tomchristie/subscriptions", "type": "User", "url": "https://api.github.com/users/tomchristie", "user_view_type": "public" }
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/4933/reactions" }
https://api.github.com/repos/psf/requests/issues/4933/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4933.diff", "html_url": "https://github.com/psf/requests/pull/4933", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4933.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4933" }
true
[ "I can confirm this actually solves my current redirect issue." ]
https://api.github.com/repos/psf/requests/issues/4932
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4932/labels{/name}
https://api.github.com/repos/psf/requests/issues/4932/comments
https://api.github.com/repos/psf/requests/issues/4932/events
https://github.com/psf/requests/pull/4932
397,068,939
MDExOlB1bGxSZXF1ZXN0MjQzMTAwOTc2
4,932
Make requests compliant with PEP 476
{ "avatar_url": "https://avatars.githubusercontent.com/u/102495?v=4", "events_url": "https://api.github.com/users/ssbarnea/events{/privacy}", "followers_url": "https://api.github.com/users/ssbarnea/followers", "following_url": "https://api.github.com/users/ssbarnea/following{/other_user}", "gists_url": "https://api.github.com/users/ssbarnea/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ssbarnea", "id": 102495, "login": "ssbarnea", "node_id": "MDQ6VXNlcjEwMjQ5NQ==", "organizations_url": "https://api.github.com/users/ssbarnea/orgs", "received_events_url": "https://api.github.com/users/ssbarnea/received_events", "repos_url": "https://api.github.com/users/ssbarnea/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ssbarnea/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ssbarnea/subscriptions", "type": "User", "url": "https://api.github.com/users/ssbarnea", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2019-01-08T20:16:04Z
2021-08-31T00:07:18Z
2019-01-12T23:52:46Z
CONTRIBUTOR
resolved
Enables loading of certificate bundles from SSL_CERT_FILE or SSL_CERT_DIR as mentioned in https://legacy.python.org/dev/peps/pep-0476/ Current patch keeps backwards compatibility by preferring the more specific options and using the new ones only as fallbacks. Fixes: #2899
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4932/reactions" }
https://api.github.com/repos/psf/requests/issues/4932/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4932.diff", "html_url": "https://github.com/psf/requests/pull/4932", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4932.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4932" }
true
[ "@Lukasa Shouldn't this already have been on master via https://github.com/requests/requests/pull/2903?\r\n\r\nCould it be due to this? https://github.com/requests/requests/commit/85a29f1da0d0ccd79e865a7172ea39a2a7667312", "@ofek this was merged into the Proposed/3.0.0 branch which isn’t merged with master yet. I...
https://api.github.com/repos/psf/requests/issues/4931
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4931/labels{/name}
https://api.github.com/repos/psf/requests/issues/4931/comments
https://api.github.com/repos/psf/requests/issues/4931/events
https://github.com/psf/requests/issues/4931
396,470,558
MDU6SXNzdWUzOTY0NzA1NTg=
4,931
parse_dict_header should return CaseInsensitiveDict
{ "avatar_url": "https://avatars.githubusercontent.com/u/23532559?v=4", "events_url": "https://api.github.com/users/adiba/events{/privacy}", "followers_url": "https://api.github.com/users/adiba/followers", "following_url": "https://api.github.com/users/adiba/following{/other_user}", "gists_url": "https://api.github.com/users/adiba/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/adiba", "id": 23532559, "login": "adiba", "node_id": "MDQ6VXNlcjIzNTMyNTU5", "organizations_url": "https://api.github.com/users/adiba/orgs", "received_events_url": "https://api.github.com/users/adiba/received_events", "repos_url": "https://api.github.com/users/adiba/repos", "site_admin": false, "starred_url": "https://api.github.com/users/adiba/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adiba/subscriptions", "type": "User", "url": "https://api.github.com/users/adiba", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-07T12:35:33Z
2021-09-06T00:06:35Z
2019-01-07T16:50:00Z
NONE
resolved
https://github.com/requests/requests/blob/c501ec986daa4961cd9dee370b5d45ff2e524b37/requests/utils.py#L344-L375 In `parse_dict_header` a regular dict is used, but as stated in the RFC the keys should be case-insensitive.
{ "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/4931/reactions" }
https://api.github.com/repos/psf/requests/issues/4931/timeline
null
completed
null
null
false
[ "This isn't really part of our public API and it's not meant for parsing into a headers dictionary. This is working as intended for the purpose it is supporting." ]
https://api.github.com/repos/psf/requests/issues/4930
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4930/labels{/name}
https://api.github.com/repos/psf/requests/issues/4930/comments
https://api.github.com/repos/psf/requests/issues/4930/events
https://github.com/psf/requests/issues/4930
396,227,123
MDU6SXNzdWUzOTYyMjcxMjM=
4,930
certificate verify failed for developers.google.com & api.github.com
{ "avatar_url": "https://avatars.githubusercontent.com/u/12914499?v=4", "events_url": "https://api.github.com/users/Giri-Chintala/events{/privacy}", "followers_url": "https://api.github.com/users/Giri-Chintala/followers", "following_url": "https://api.github.com/users/Giri-Chintala/following{/other_user}", "gists_url": "https://api.github.com/users/Giri-Chintala/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Giri-Chintala", "id": 12914499, "login": "Giri-Chintala", "node_id": "MDQ6VXNlcjEyOTE0NDk5", "organizations_url": "https://api.github.com/users/Giri-Chintala/orgs", "received_events_url": "https://api.github.com/users/Giri-Chintala/received_events", "repos_url": "https://api.github.com/users/Giri-Chintala/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Giri-Chintala/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Giri-Chintala/subscriptions", "type": "User", "url": "https://api.github.com/users/Giri-Chintala", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2019-01-06T04:32:33Z
2021-09-06T00:06:35Z
2019-01-06T06:11:53Z
NONE
resolved
Summary. I'm seeing certificate verify failed error on calls to developers.google.com & api.github.com, But calls to aws.amazon.com & azure.microsoft.com are working fine. ## Expected Result I'm expecting successful TLS handshake with public domains google and github etc ## Actual Result Got this exception Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 453, in wrap_socket cnx.do_handshake() File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1907, in do_handshake self._raise_ssl_error(self._ssl, result) File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error _raise_current_error() File "/usr/local/lib/python3.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue raise exception_type(errors) OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')] ## Reproduction Steps ```python import requests requests.get('https://aws.amazon.com/') requests.get('https://api.github.com/users/caspyin') ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.4.2" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.2" }, "platform": { "release": "18.2.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "101000af", "version": "18.0.0" }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1000211f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": true } ``` ``` Python 3.7.2 (default, Dec 27 2018, 07:35:06) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> requests.__version__ '2.21.0' >>> import certifi >>> certifi.__version__ '2018.11.29' >>> import ssl >>> ssl.OPENSSL_VERSION 'OpenSSL 1.0.2q 20 Nov 2018' ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/12914499?v=4", "events_url": "https://api.github.com/users/Giri-Chintala/events{/privacy}", "followers_url": "https://api.github.com/users/Giri-Chintala/followers", "following_url": "https://api.github.com/users/Giri-Chintala/following{/other_user}", "gists_url": "https://api.github.com/users/Giri-Chintala/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Giri-Chintala", "id": 12914499, "login": "Giri-Chintala", "node_id": "MDQ6VXNlcjEyOTE0NDk5", "organizations_url": "https://api.github.com/users/Giri-Chintala/orgs", "received_events_url": "https://api.github.com/users/Giri-Chintala/received_events", "repos_url": "https://api.github.com/users/Giri-Chintala/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Giri-Chintala/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Giri-Chintala/subscriptions", "type": "User", "url": "https://api.github.com/users/Giri-Chintala", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4930/reactions" }
https://api.github.com/repos/psf/requests/issues/4930/timeline
null
completed
null
null
false
[ "I figured it out. google is failing because of an internal proxy." ]
https://api.github.com/repos/psf/requests/issues/4929
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4929/labels{/name}
https://api.github.com/repos/psf/requests/issues/4929/comments
https://api.github.com/repos/psf/requests/issues/4929/events
https://github.com/psf/requests/pull/4929
396,218,585
MDExOlB1bGxSZXF1ZXN0MjQyNDcwMzMw
4,929
remove duplicate import
{ "avatar_url": "https://avatars.githubusercontent.com/u/33651666?v=4", "events_url": "https://api.github.com/users/dyq666/events{/privacy}", "followers_url": "https://api.github.com/users/dyq666/followers", "following_url": "https://api.github.com/users/dyq666/following{/other_user}", "gists_url": "https://api.github.com/users/dyq666/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dyq666", "id": 33651666, "login": "dyq666", "node_id": "MDQ6VXNlcjMzNjUxNjY2", "organizations_url": "https://api.github.com/users/dyq666/orgs", "received_events_url": "https://api.github.com/users/dyq666/received_events", "repos_url": "https://api.github.com/users/dyq666/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dyq666/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dyq666/subscriptions", "type": "User", "url": "https://api.github.com/users/dyq666", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2019-01-06T01:32:55Z
2021-08-30T00:06:48Z
2019-08-20T04:37:48Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4929/reactions" }
https://api.github.com/repos/psf/requests/issues/4929/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4929.diff", "html_url": "https://github.com/psf/requests/pull/4929", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4929.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4929" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4929?src=pr&el=h1) Report\n> Merging [#4929](https://codecov.io/gh/requests/requests/pull/4929?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5c1f72e80a7d7ac129631ea5b0c34c7876bc6ed7?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4927
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4927/labels{/name}
https://api.github.com/repos/psf/requests/issues/4927/comments
https://api.github.com/repos/psf/requests/issues/4927/events
https://github.com/psf/requests/issues/4927
395,555,058
MDU6SXNzdWUzOTU1NTUwNTg=
4,927
file named "requests.py" throws AttributeError: module 'requests' has no attribute 'get'
{ "avatar_url": "https://avatars.githubusercontent.com/u/24904209?v=4", "events_url": "https://api.github.com/users/emersxw/events{/privacy}", "followers_url": "https://api.github.com/users/emersxw/followers", "following_url": "https://api.github.com/users/emersxw/following{/other_user}", "gists_url": "https://api.github.com/users/emersxw/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/emersxw", "id": 24904209, "login": "emersxw", "node_id": "MDQ6VXNlcjI0OTA0MjA5", "organizations_url": "https://api.github.com/users/emersxw/orgs", "received_events_url": "https://api.github.com/users/emersxw/received_events", "repos_url": "https://api.github.com/users/emersxw/repos", "site_admin": false, "starred_url": "https://api.github.com/users/emersxw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/emersxw/subscriptions", "type": "User", "url": "https://api.github.com/users/emersxw", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2019-01-03T12:24:30Z
2020-02-04T20:24:23Z
2019-01-03T14:19:56Z
NONE
resolved
I was playing with requests for a while and I was running into issues I had a file named requests.py which I was always getting the error: ``` AttributeError: module 'requests' has no attribute 'get' ``` but as soon as I changed the name of the file the error doesn't happen anymore.
{ "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": 1, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4927/reactions" }
https://api.github.com/repos/psf/requests/issues/4927/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "> Hi there! Thanks for opening this issue. Unfortu...
https://api.github.com/repos/psf/requests/issues/4926
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4926/labels{/name}
https://api.github.com/repos/psf/requests/issues/4926/comments
https://api.github.com/repos/psf/requests/issues/4926/events
https://github.com/psf/requests/issues/4926
395,415,751
MDU6SXNzdWUzOTU0MTU3NTE=
4,926
requests can't properly handle redirects if the response body is encoded in something else than 'utf8'
{ "avatar_url": "https://avatars.githubusercontent.com/u/4257505?v=4", "events_url": "https://api.github.com/users/lukasz-kapica/events{/privacy}", "followers_url": "https://api.github.com/users/lukasz-kapica/followers", "following_url": "https://api.github.com/users/lukasz-kapica/following{/other_user}", "gists_url": "https://api.github.com/users/lukasz-kapica/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukasz-kapica", "id": 4257505, "login": "lukasz-kapica", "node_id": "MDQ6VXNlcjQyNTc1MDU=", "organizations_url": "https://api.github.com/users/lukasz-kapica/orgs", "received_events_url": "https://api.github.com/users/lukasz-kapica/received_events", "repos_url": "https://api.github.com/users/lukasz-kapica/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukasz-kapica/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukasz-kapica/subscriptions", "type": "User", "url": "https://api.github.com/users/lukasz-kapica", "user_view_type": "public" }
[]
open
false
null
[]
null
17
2019-01-02T23:37:23Z
2023-03-03T15:21:44Z
null
NONE
null
Just like in the topic. The response body is encoded in iso-8859-2 and the location happens to contain non-ascii character so that it results in UnicodeDecodeError being thrown. ## Expected Result Flawless execution of the code. ## Actual Result UnicodeDecodeError ## Reproduction Steps ```python import requests requests.get("http://www.biblia.deon.pl/ksiega.php?id=3") ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "2.7.15+" }, "platform": { "release": "4.18.0-13-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010100f", "version": "18.0.0" }, "requests": { "version": "2.19.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.23" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/4257505?v=4", "events_url": "https://api.github.com/users/lukasz-kapica/events{/privacy}", "followers_url": "https://api.github.com/users/lukasz-kapica/followers", "following_url": "https://api.github.com/users/lukasz-kapica/following{/other_user}", "gists_url": "https://api.github.com/users/lukasz-kapica/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukasz-kapica", "id": 4257505, "login": "lukasz-kapica", "node_id": "MDQ6VXNlcjQyNTc1MDU=", "organizations_url": "https://api.github.com/users/lukasz-kapica/orgs", "received_events_url": "https://api.github.com/users/lukasz-kapica/received_events", "repos_url": "https://api.github.com/users/lukasz-kapica/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukasz-kapica/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukasz-kapica/subscriptions", "type": "User", "url": "https://api.github.com/users/lukasz-kapica", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4926/reactions" }
https://api.github.com/repos/psf/requests/issues/4926/timeline
null
null
null
null
false
[ "Hi @loocash, would you mind providing the stacktrace so we can see where exactly this is failing?", "```\r\nTraceback\r\n (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"/usr/lib/python3/dist-packages/requests/api.py\", line 72, in get\r\n return request('get', url, params=para...
https://api.github.com/repos/psf/requests/issues/4925
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4925/labels{/name}
https://api.github.com/repos/psf/requests/issues/4925/comments
https://api.github.com/repos/psf/requests/issues/4925/events
https://github.com/psf/requests/issues/4925
395,075,983
MDU6SXNzdWUzOTUwNzU5ODM=
4,925
return self._store[key.lower()][1] KeyError: 'content-length'
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2019-01-01T11:43:37Z
2021-09-06T00:06:36Z
2019-01-01T13:21:24Z
NONE
resolved
I cannot seem to **constantly** reproduce this bug entirely but, sometimes the header 'content-length' is not present 🤔 whereas, other times it is. Am I doing something wrong myself? ## Expected Result The header 'content-length' to be present. ## Actual Result ``` File "/Users/db/github/Wallie/utils.py", line 18, in download_image total_size = int(resp.headers["content-length"]) File "/Users/db/.local/share/virtualenvs/Wallie-iUwYi7jQ/lib/python3.7/site-packages/requests/structures.py", line 52, in __getitem__ return self._store[key.lower()][1] KeyError: 'content-length' ``` ## Reproduction Steps ```python import requests url = "https://images.unsplash.com/photo-1507608869274-d3177c8bb4c7?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjQ2NTE2fQ" with requests.get(image_url, stream=True) as resp: if ((resp.status_code) == (requests.codes.ok)): total_size = resp.headers["content-length"] ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.1" }, "platform": { "release": "18.2.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1000211f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4925/reactions" }
https://api.github.com/repos/psf/requests/issues/4925/timeline
null
completed
null
null
false
[ "> I cannot seem to constantly reproduce this bug entirely but, sometimes the header 'content-length' is not present \r\n\r\nIt's entirely likely that the content you're retrieving is behind a CDN. In one case, the CDN has it cached and you've hit the cache and so it provides a `Content-Length`, and in the other it...
https://api.github.com/repos/psf/requests/issues/4924
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4924/labels{/name}
https://api.github.com/repos/psf/requests/issues/4924/comments
https://api.github.com/repos/psf/requests/issues/4924/events
https://github.com/psf/requests/pull/4924
395,030,581
MDExOlB1bGxSZXF1ZXN0MjQxNjAwMzcx
4,924
Include Python Information with default User Agent
{ "avatar_url": "https://avatars.githubusercontent.com/u/3005596?v=4", "events_url": "https://api.github.com/users/cooperlees/events{/privacy}", "followers_url": "https://api.github.com/users/cooperlees/followers", "following_url": "https://api.github.com/users/cooperlees/following{/other_user}", "gists_url": "https://api.github.com/users/cooperlees/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cooperlees", "id": 3005596, "login": "cooperlees", "node_id": "MDQ6VXNlcjMwMDU1OTY=", "organizations_url": "https://api.github.com/users/cooperlees/orgs", "received_events_url": "https://api.github.com/users/cooperlees/received_events", "repos_url": "https://api.github.com/users/cooperlees/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cooperlees/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cooperlees/subscriptions", "type": "User", "url": "https://api.github.com/users/cooperlees", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-31T20:52:57Z
2021-09-01T00:11:40Z
2018-12-31T21:05:49Z
NONE
resolved
- A lot of people use default user agent with requests - Lets include Python runtime + version information - Allows servers to know some more useful information about their users e.g. PyPI / Warehouse This will help pypistats.org for example - https://github.com/crflynn/pypistats.org/issues/13 Open to other ideas here. Just throwing this up to start the discussion.
{ "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/4924/reactions" }
https://api.github.com/repos/psf/requests/issues/4924/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4924.diff", "html_url": "https://github.com/psf/requests/pull/4924", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4924.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4924" }
true
[ "- https://github.com/requests/requests/pull/709\r\n- https://github.com/requests/requests/pull/2803\r\n- https://github.com/requests/requests/issues/2785\r\n- https://github.com/requests/requests/issues/3182\r\n\r\nIn short, we used to include that and now don't. And we won't be adding it back in any time soon" ]
https://api.github.com/repos/psf/requests/issues/4923
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4923/labels{/name}
https://api.github.com/repos/psf/requests/issues/4923/comments
https://api.github.com/repos/psf/requests/issues/4923/events
https://github.com/psf/requests/issues/4923
394,975,749
MDU6SXNzdWUzOTQ5NzU3NDk=
4,923
Requests 2.21.0 doesn't recognise unicode filenames for uploads
{ "avatar_url": "https://avatars.githubusercontent.com/u/45915502?v=4", "events_url": "https://api.github.com/users/Shellyber/events{/privacy}", "followers_url": "https://api.github.com/users/Shellyber/followers", "following_url": "https://api.github.com/users/Shellyber/following{/other_user}", "gists_url": "https://api.github.com/users/Shellyber/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Shellyber", "id": 45915502, "login": "Shellyber", "node_id": "MDQ6VXNlcjQ1OTE1NTAy", "organizations_url": "https://api.github.com/users/Shellyber/orgs", "received_events_url": "https://api.github.com/users/Shellyber/received_events", "repos_url": "https://api.github.com/users/Shellyber/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Shellyber/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Shellyber/subscriptions", "type": "User", "url": "https://api.github.com/users/Shellyber", "user_view_type": "public" }
[ { "color": "f7c6c7", "default": false, "description": null, "id": 167537670, "name": "Propose Close", "node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=", "url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close" }, { "color": "fef2c0", "default": false, "description": ...
closed
true
null
[]
null
9
2018-12-31T12:47:17Z
2021-09-06T00:06:36Z
2018-12-31T15:58:24Z
NONE
resolved
In python 2 unicode filenames are not recognized. When trying to send a file with a file name containing unicode chars (e.g. ", Γ etc) the request is sent without the file. ## Expected Result The request is sent containing the file ## Actual Result The request is sent without the file ## Reproduction Steps ```python import requests f= open('/<file-path>/sample-Γ.pdf','rb') r = requests.request('POST',URL, files={'sample': f}) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "2.7.10" }, "platform": { "release": "17.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "20000000" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false }```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4923/reactions" }
https://api.github.com/repos/psf/requests/issues/4923/timeline
null
completed
null
null
false
[ "How did you verify there's no request body?\r\n\r\nEverything you provided works locally for me so it's most likely your server that's misbehaving.", "We tested it via postman prior to opening this issue - when using postman, the server received the file containing the unicode char in its name with no issues, ho...
https://api.github.com/repos/psf/requests/issues/4922
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4922/labels{/name}
https://api.github.com/repos/psf/requests/issues/4922/comments
https://api.github.com/repos/psf/requests/issues/4922/events
https://github.com/psf/requests/pull/4922
394,805,059
MDExOlB1bGxSZXF1ZXN0MjQxNDUyNDE2
4,922
Remove unnecessary compat shim for OrderedDict
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-12-29T15:43:49Z
2021-08-30T00:06:49Z
2019-08-20T04:22:33Z
CONTRIBUTOR
resolved
The shim is the same on both Python 2 & 3. It is always `collections.OrderedDict`. Avoid the indirection and import from Python stdlib instead.
{ "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/4922/reactions" }
https://api.github.com/repos/psf/requests/issues/4922/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4922.diff", "html_url": "https://github.com/psf/requests/pull/4922", "merged_at": "2019-08-20T04:22:33Z", "patch_url": "https://github.com/psf/requests/pull/4922.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4922" }
true
[ "Hey @jdufresne, thanks for putting this together. We originally had this change in the commits to remove Python 2.6, but there are at least a handful of well known projects that use Requests compat imports directly.\r\n\r\nIn order to maintain backwards compatibility, we went ahead and left these intact in Request...
https://api.github.com/repos/psf/requests/issues/4921
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4921/labels{/name}
https://api.github.com/repos/psf/requests/issues/4921/comments
https://api.github.com/repos/psf/requests/issues/4921/events
https://github.com/psf/requests/issues/4921
394,727,088
MDU6SXNzdWUzOTQ3MjcwODg=
4,921
Wrong originating IP address with 2.21
{ "avatar_url": "https://avatars.githubusercontent.com/u/3694634?v=4", "events_url": "https://api.github.com/users/znat/events{/privacy}", "followers_url": "https://api.github.com/users/znat/followers", "following_url": "https://api.github.com/users/znat/following{/other_user}", "gists_url": "https://api.github.com/users/znat/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/znat", "id": 3694634, "login": "znat", "node_id": "MDQ6VXNlcjM2OTQ2MzQ=", "organizations_url": "https://api.github.com/users/znat/orgs", "received_events_url": "https://api.github.com/users/znat/received_events", "repos_url": "https://api.github.com/users/znat/repos", "site_admin": false, "starred_url": "https://api.github.com/users/znat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/znat/subscriptions", "type": "User", "url": "https://api.github.com/users/znat", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-28T21:58:45Z
2021-11-05T03:00:28Z
2021-08-07T02:35:36Z
NONE
resolved
Summary. In a pod running on a Kubernetes cluster, a python app using `requests`. When I look the `nginx-ingress` container logs With requests <= 2.20.1: the originating IP address of the requests belongs to the **cluster IP range** (which I think is correct) With requests == 2.21: requests are coming from the **Node pool IP range** (which I don't think is correct) ## Expected Result Requests should be coming from the cluster IP range ## Actual Result Requests should be coming from the node pool IP range ## Reproduction Steps Set up a K8S cluster, a deployment using `requests` and observe logs in the `nginx-ingress` controller pod ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.6.7" }, "platform": { "release": "4.4.111+", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.0" }, "system_ssl": { "version": "1010006f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4921/reactions" }
https://api.github.com/repos/psf/requests/issues/4921/timeline
null
completed
null
null
false
[ "We don't pick our own source IP. I'm surprised that there's a difference between the versions. I think we need a smaller reproduction case because there's just too many moving pieces here." ]
https://api.github.com/repos/psf/requests/issues/4920
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4920/labels{/name}
https://api.github.com/repos/psf/requests/issues/4920/comments
https://api.github.com/repos/psf/requests/issues/4920/events
https://github.com/psf/requests/pull/4920
394,710,773
MDExOlB1bGxSZXF1ZXN0MjQxMzg5Mjcz
4,920
iter_content() checks for < 1 chunk_size
{ "avatar_url": "https://avatars.githubusercontent.com/u/32204469?v=4", "events_url": "https://api.github.com/users/alex-wenzel/events{/privacy}", "followers_url": "https://api.github.com/users/alex-wenzel/followers", "following_url": "https://api.github.com/users/alex-wenzel/following{/other_user}", "gists_url": "https://api.github.com/users/alex-wenzel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alex-wenzel", "id": 32204469, "login": "alex-wenzel", "node_id": "MDQ6VXNlcjMyMjA0NDY5", "organizations_url": "https://api.github.com/users/alex-wenzel/orgs", "received_events_url": "https://api.github.com/users/alex-wenzel/received_events", "repos_url": "https://api.github.com/users/alex-wenzel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alex-wenzel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alex-wenzel/subscriptions", "type": "User", "url": "https://api.github.com/users/alex-wenzel", "user_view_type": "public" }
[]
open
false
null
[]
null
8
2018-12-28T20:10:50Z
2021-12-29T03:54:39Z
null
NONE
null
With requests v2.20.1, supplying a value of 0 for `chunk_size` causes `iter_content()` to hang. This made debugging code that dynamically computes a value for `chunk_size` difficult. These two lines explicitly enforce `chunk_size` being a positive integer.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4920/reactions" }
https://api.github.com/repos/psf/requests/issues/4920/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4920.diff", "html_url": "https://github.com/psf/requests/pull/4920", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4920.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4920" }
true
[ "Hi @alex-wenzel, thanks for taking a look at this. I believe this is actually a duplicate of #4876. This is a new behaviour introduced with the last release of urllib3 where 0 no longer denotes \"any size\". I believe this is probably a bug since it doesn't make sense to iterate in chunks of 0.\r\n\r\nIn regards t...
https://api.github.com/repos/psf/requests/issues/4919
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4919/labels{/name}
https://api.github.com/repos/psf/requests/issues/4919/comments
https://api.github.com/repos/psf/requests/issues/4919/events
https://github.com/psf/requests/pull/4919
394,658,976
MDExOlB1bGxSZXF1ZXN0MjQxMzUwNDAw
4,919
Updated wording for switch devhelp
{ "avatar_url": "https://avatars.githubusercontent.com/u/10725735?v=4", "events_url": "https://api.github.com/users/blak3irwin/events{/privacy}", "followers_url": "https://api.github.com/users/blak3irwin/followers", "following_url": "https://api.github.com/users/blak3irwin/following{/other_user}", "gists_url": "https://api.github.com/users/blak3irwin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/blak3irwin", "id": 10725735, "login": "blak3irwin", "node_id": "MDQ6VXNlcjEwNzI1NzM1", "organizations_url": "https://api.github.com/users/blak3irwin/orgs", "received_events_url": "https://api.github.com/users/blak3irwin/received_events", "repos_url": "https://api.github.com/users/blak3irwin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/blak3irwin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/blak3irwin/subscriptions", "type": "User", "url": "https://api.github.com/users/blak3irwin", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-28T15:20:18Z
2021-09-01T00:11:41Z
2018-12-28T15:36:09Z
NONE
resolved
Adding file location for devhelp switch in make.bat
{ "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/4919/reactions" }
https://api.github.com/repos/psf/requests/issues/4919/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4919.diff", "html_url": "https://github.com/psf/requests/pull/4919", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4919.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4919" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4919?src=pr&el=h1) Report\n> Merging [#4919](https://codecov.io/gh/requests/requests/pull/4919?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5c1f72e80a7d7ac129631ea5b0c34c7876bc6ed7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4918
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4918/labels{/name}
https://api.github.com/repos/psf/requests/issues/4918/comments
https://api.github.com/repos/psf/requests/issues/4918/events
https://github.com/psf/requests/pull/4918
394,647,254
MDExOlB1bGxSZXF1ZXN0MjQxMzQxMzYx
4,918
Use 'dist: xenial' in Travis to simplify configuration
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-28T14:21:03Z
2021-08-31T00:07:22Z
2019-03-16T23:11:20Z
CONTRIBUTOR
resolved
Allows using Python version 3.7 without sudo declarations. Travis officially added support for Xenial on 2018-11-08. https://blog.travis-ci.com/2018-11-08-xenial-release Can remove unused Python 2.6 check.
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4918/reactions" }
https://api.github.com/repos/psf/requests/issues/4918/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4918.diff", "html_url": "https://github.com/psf/requests/pull/4918", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4918.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4918" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4918?src=pr&el=h1) Report\n> Merging [#4918](https://codecov.io/gh/requests/requests/pull/4918?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5c1f72e80a7d7ac129631ea5b0c34c7876bc6ed7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4917
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4917/labels{/name}
https://api.github.com/repos/psf/requests/issues/4917/comments
https://api.github.com/repos/psf/requests/issues/4917/events
https://github.com/psf/requests/pull/4917
394,644,344
MDExOlB1bGxSZXF1ZXN0MjQxMzM5MDkz
4,917
Remove unnecessary compat shim for bytes
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2018-12-28T14:05:59Z
2021-08-30T00:06:45Z
2019-08-20T04:37:26Z
CONTRIBUTOR
resolved
Both Python 2.7 & Python 3 have the type `bytes`. On Python 2.7, it is an alias of `str`, same as what was defined in `compat.py`.
{ "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/4917/reactions" }
https://api.github.com/repos/psf/requests/issues/4917/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4917.diff", "html_url": "https://github.com/psf/requests/pull/4917", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4917.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4917" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4917?src=pr&el=h1) Report\n> Merging [#4917](https://codecov.io/gh/requests/requests/pull/4917?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5c1f72e80a7d7ac129631ea5b0c34c7876bc6ed7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4916
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4916/labels{/name}
https://api.github.com/repos/psf/requests/issues/4916/comments
https://api.github.com/repos/psf/requests/issues/4916/events
https://github.com/psf/requests/issues/4916
393,816,676
MDU6SXNzdWUzOTM4MTY2NzY=
4,916
possible memory leak
{ "avatar_url": "https://avatars.githubusercontent.com/u/12421352?v=4", "events_url": "https://api.github.com/users/tarjintor/events{/privacy}", "followers_url": "https://api.github.com/users/tarjintor/followers", "following_url": "https://api.github.com/users/tarjintor/following{/other_user}", "gists_url": "https://api.github.com/users/tarjintor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tarjintor", "id": 12421352, "login": "tarjintor", "node_id": "MDQ6VXNlcjEyNDIxMzUy", "organizations_url": "https://api.github.com/users/tarjintor/orgs", "received_events_url": "https://api.github.com/users/tarjintor/received_events", "repos_url": "https://api.github.com/users/tarjintor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tarjintor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tarjintor/subscriptions", "type": "User", "url": "https://api.github.com/users/tarjintor", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-24T06:07:19Z
2021-09-06T00:06:30Z
2019-02-04T11:55:19Z
NONE
resolved
It seems that my code memory used is increase slowly,I find that even the simplest code will lead this. ## Expected Result memory won't slowly increase ## Actual Result memory is slowly increase, running after one hour ![_15456276853678](https://user-images.githubusercontent.com/12421352/50391984-2c7dd680-0785-11e9-9d68-f69823654145.png) ![_15456315045182](https://user-images.githubusercontent.com/12421352/50391986-2e479a00-0785-11e9-8c3d-a6f2792ec8a4.png) ## Reproduction Steps ```python import requests def f(): while 1: s = requests.get('https://www.baidu.com') text = s.text if __name__ == '__main__': f() ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3.1" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.6.6" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010009f", "version": "18.0.0" }, "requests": { "version": "2.19.1" }, "system_ssl": { "version": "100020ff" }, "urllib3": { "version": "1.23" }, "using_pyopenssl": 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" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4916/reactions" }
https://api.github.com/repos/psf/requests/issues/4916/timeline
null
completed
null
null
false
[ "Seems to be a similar issue : https://github.com/requests/requests/issues/4934", "Duplicate of #4934" ]
https://api.github.com/repos/psf/requests/issues/4915
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4915/labels{/name}
https://api.github.com/repos/psf/requests/issues/4915/comments
https://api.github.com/repos/psf/requests/issues/4915/events
https://github.com/psf/requests/pull/4915
393,783,171
MDExOlB1bGxSZXF1ZXN0MjQwNzAyMzgy
4,915
Normalize percent-encoded bytes before comparison
{ "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" }
[]
closed
true
null
[]
null
8
2018-12-23T21:54:59Z
2021-08-31T00:07:21Z
2019-01-21T13:58:33Z
MEMBER
resolved
urllib3 replaced it's URL parser with `rfc3986` for more compliant parsing (urllib3/urllib3#1487). We've also got an effort underway to run downstream tests before releases (urllib3/urllib3#1508) and during that process we've discovered that requests requires percent-encoded bytes to keep their casing. Adding this to the unit tests would allow either version of pre- and post-rfc3986 urllib3 to pass requests unit tests. I don't know if the `Request.url` attribute needs to maintain it's casing in this situation or not, if it does this is not the solution. Just putting this together as a potential solution.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4915/reactions" }
https://api.github.com/repos/psf/requests/issues/4915/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4915.diff", "html_url": "https://github.com/psf/requests/pull/4915", "merged_at": "2019-01-21T13:58:33Z", "patch_url": "https://github.com/psf/requests/pull/4915.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4915" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4915?src=pr&el=h1) Report\n> Merging [#4915](https://codecov.io/gh/requests/requests/pull/4915?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/f37daf25006a4b475b1bea90fecdd035146dbc3b?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4914
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4914/labels{/name}
https://api.github.com/repos/psf/requests/issues/4914/comments
https://api.github.com/repos/psf/requests/issues/4914/events
https://github.com/psf/requests/issues/4914
393,115,557
MDU6SXNzdWUzOTMxMTU1NTc=
4,914
Proxy error when redirect (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))
{ "avatar_url": "https://avatars.githubusercontent.com/u/17624449?v=4", "events_url": "https://api.github.com/users/gjones95/events{/privacy}", "followers_url": "https://api.github.com/users/gjones95/followers", "following_url": "https://api.github.com/users/gjones95/following{/other_user}", "gists_url": "https://api.github.com/users/gjones95/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gjones95", "id": 17624449, "login": "gjones95", "node_id": "MDQ6VXNlcjE3NjI0NDQ5", "organizations_url": "https://api.github.com/users/gjones95/orgs", "received_events_url": "https://api.github.com/users/gjones95/received_events", "repos_url": "https://api.github.com/users/gjones95/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gjones95/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gjones95/subscriptions", "type": "User", "url": "https://api.github.com/users/gjones95", "user_view_type": "public" }
[]
open
false
null
[]
null
0
2018-12-20T16:18:14Z
2018-12-20T16:18:14Z
null
NONE
null
Summary. When accessing a URL using requests, the redirect causes proxy error because the initial web page DOES require the proxy, but the page it redirects to DOES NOT require the proxy. The program succeeds in using the proxy for the first web page, but when redirecting to the next web page it does not recognize the ## Expected Result After my program executes 'requests.get(<url>)', the program should reach the initial website through the proxy, and then redirect to the new website without going through the proxy, and then print the HTTP status code. In short, I expect the program to run and print the HTTP status code (ideally 200). ## Actual Result Instead I get a proxy error when the program tries to access the website it redirects to and the HTTP status code line isn't executed. I traced this down using python debugger and my findings were as follows... The proxy and no proxy are set in my environment and these are first set in the program as a dictionary in 'merge_environment_settings', which calls 'get_environ_proxies' which gets the proxy settings from the environment (which is needed at this point so is correct). NOTE: If the proxy wasn't needed at this point, it would have produced an empty dictionary for 'proxies' as long as the URL domain matched the 'no_proxy' (thanks to the 'should_bypass_proxies' function). All is fine at this point as the first URL requires the proxy, BUT... Further down the line when the redirect occurs, within the 'resolve_redirects' function, 'rebuild_proxies' is called. This functions creates a 'new_proxies' variable which copies the original environment proxy settings. Further along in this function, the 'bypass_proxy' boolean variable is set from the 'should_bypass_proxies' function, this is correctly set to 'True' as the 'no_proxy' matches the new URL (for the redirect website). At this point, I expect the 'new_proxies' variable to be altered as the bypass proxy has been triggered, but it remains unchanged and the 'rebuild_proxies' function just returns the original proxy settings. Another note: within 'rebuild_proxies', the below statement is skipped due to 'not bypass_proxy' but in the 'get_environ_proxies' function mentioned earlier is the only place I discovered to actually return an empty dictionary for 'proxies' when it detects a no proxy. So by skipping the below code, it is skipping the only function I discovered to actually remove the proxy settings. ```python bypass_proxy = should_bypass_proxies(url, no_proxy=no_proxy) if self.trust_env and not bypass_proxy: environ_proxies = get_environ_proxies(url, no_proxy=no_proxy) proxy = environ_proxies.get(scheme, environ_proxies.get('all')) if proxy: new_proxies.setdefault(scheme, proxy) ``` I actually added the following bit of code to the end of 'rebuild_proxies' and it seemed to fix my program, but i think there is an underlying issue worth fixing. ```python if bypass_proxy: new_proxies = OrderedDict() ``` ## Reproduction Steps ```python import requests from requests import Session def test(): session = Session() session.verify = '<SSL-cert>' r = session.get('<url>', timeout=5) print(r.status_code) if __name__ == "__main__": test() ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.4.2" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "4.15.0-29-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "101000af", "version": "18.0.0" }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1010007f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c). Thanks for reading and hope it can be fixed!
null
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/4914/reactions" }
https://api.github.com/repos/psf/requests/issues/4914/timeline
null
null
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4913
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4913/labels{/name}
https://api.github.com/repos/psf/requests/issues/4913/comments
https://api.github.com/repos/psf/requests/issues/4913/events
https://github.com/psf/requests/issues/4913
392,951,773
MDU6SXNzdWUzOTI5NTE3NzM=
4,913
Turning off keep-alive
{ "avatar_url": "https://avatars.githubusercontent.com/u/19627133?v=4", "events_url": "https://api.github.com/users/StKob/events{/privacy}", "followers_url": "https://api.github.com/users/StKob/followers", "following_url": "https://api.github.com/users/StKob/following{/other_user}", "gists_url": "https://api.github.com/users/StKob/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/StKob", "id": 19627133, "login": "StKob", "node_id": "MDQ6VXNlcjE5NjI3MTMz", "organizations_url": "https://api.github.com/users/StKob/orgs", "received_events_url": "https://api.github.com/users/StKob/received_events", "repos_url": "https://api.github.com/users/StKob/repos", "site_admin": false, "starred_url": "https://api.github.com/users/StKob/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/StKob/subscriptions", "type": "User", "url": "https://api.github.com/users/StKob", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2018-12-20T09:09:56Z
2021-08-29T00:06:39Z
2018-12-20T13:32:05Z
NONE
resolved
In older versions of Requests there was option to turn off keep alive. Something like this: ``` s = requests.session() s.config['keep_alive'] = False ``` How to do it in recent versions?
{ "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": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/4913/reactions" }
https://api.github.com/repos/psf/requests/issues/4913/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "The question asked is not answered https://stackov...
https://api.github.com/repos/psf/requests/issues/4912
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4912/labels{/name}
https://api.github.com/repos/psf/requests/issues/4912/comments
https://api.github.com/repos/psf/requests/issues/4912/events
https://github.com/psf/requests/issues/4912
392,685,189
MDU6SXNzdWUzOTI2ODUxODk=
4,912
Issue "Remote end closed connection without response" when create multiple sessions
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2018-12-19T16:40:13Z
2018-12-19T18:22:21Z
2018-12-19T17:56:58Z
NONE
off-topic
Here is my situation: When I use a for loop to login some REST-Web site for about 100 ~500 times, if I use requests.post method to lanch my request, requests freamwork is aways issuing the titled Bug. code as follow: ``` # coding: UTF-8 """ @Author: ITACHY @Contact: zongliangzhu@ecarx.com.cn @CreateTime:2018/12/19 17:26 """ import datetime import uuid import requests def login_test(num): start = datetime.datetime.now() url = XXXXX uid = str(uuid.uuid4()) body = { "type": "login", "clientinfo": { "deviceid": uid, "uid": uid, "timezone": "Asia/Shanghai", "osFamily": "ANDROID", "osVersion": "22", "deviceType": "MOBILE", "deviceModel": "1.0", "appVersion": "1.0.0-SNAPSHOT", "location": { "longitude": 116.407394, "latitude": 39.904211, "type": "GCJ02" } } } header = { 'Content-Type': 'application/json; charset=UTF-8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36' } # response = requests.post(url, json = body, headers = header) response = requests.post(url, json = body, headers = header) if response.status_code == 200: result = response.json() print('Count: {}, Result: {}'.format(num, result)) if result["code"] == 0: due = datetime.datetime.now() - start print('Count: {}, Uid: {}, Token: {}, Time; {}, '.format(str(i), uid, result["data"]["accessToken"], str(due))) else: due = datetime.datetime.now() - start print('Count: {}, Uid: {}, Response: {}, Time: {}, '.format(str(i), uid, result, str(due))) else: print('Count: {}, Login failed. Code: {}, Msg: {}'.format(num, response.status_code, response.text)) if __name__ == '__main__': for i in range(500): login_test(i) ``` But when I change my code to following: ``` # coding: UTF-8 """ @Author: ITACHY @Contact: zongliangzhu@ecarx.com.cn @CreateTime:2018/12/19 17:26 """ import datetime import uuid import requests # import logging def login(count, session): start = datetime.datetime.now() url = XXXXXXX uid = str(uuid.uuid4()) body = { "type": "login", "clientinfo": { "deviceid": uid, "uid": uid, "timezone": "Asia/Shanghai", "osFamily": "ANDROID", "osVersion": "22", "deviceType": "MOBILE", "deviceModel": "1.0", "appVersion": "1.0.0-SNAPSHOT", "location": { "longitude": 116.407394, "latitude": 39.904211, "type": "GCJ02" } } } header = { 'Content-Type': 'application/json; charset=UTF-8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36' } # try: # response = requests.post(url, json = body, headers = header) response = session.post(url, json = body, headers = header) if response.status_code == 200: result = response.json() # print(result) if result["code"] == 0: due = datetime.datetime.now() - start print('Count: {}, Uid: {}, Token: {}, Time; {}, '.format(str(count), uid, result["data"]["accessToken"], str(due))) else: due = datetime.datetime.now() - start print('Count: {}, Uid: {}, Response: {}, Time: {}, '.format(str(count), uid, result, str(due))) else: print('Login failed. Code: {}, Msg: {}'.format(response.status_code, response.text)) # except Exception as e: # print(e) if __name__ == '__main__': with requests.Session() as session: for i in range(5000): login(i, session) ``` There everything goes well, I think the second way just create only ONE session and the First create lots of sessions, please check it. Thanks in advance if anyone could confirm it. BTW: The server is behind an Apache NGINX.
{ "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/4912/reactions" }
https://api.github.com/repos/psf/requests/issues/4912/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "> Hi there! Thanks for opening this issue. Unfortu...
https://api.github.com/repos/psf/requests/issues/4911
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4911/labels{/name}
https://api.github.com/repos/psf/requests/issues/4911/comments
https://api.github.com/repos/psf/requests/issues/4911/events
https://github.com/psf/requests/issues/4911
390,868,284
MDU6SXNzdWUzOTA4NjgyODQ=
4,911
Incorrect claim that params go in the request body
{ "avatar_url": "https://avatars.githubusercontent.com/u/46775?v=4", "events_url": "https://api.github.com/users/mjpieters/events{/privacy}", "followers_url": "https://api.github.com/users/mjpieters/followers", "following_url": "https://api.github.com/users/mjpieters/following{/other_user}", "gists_url": "https://api.github.com/users/mjpieters/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mjpieters", "id": 46775, "login": "mjpieters", "node_id": "MDQ6VXNlcjQ2Nzc1", "organizations_url": "https://api.github.com/users/mjpieters/orgs", "received_events_url": "https://api.github.com/users/mjpieters/received_events", "repos_url": "https://api.github.com/users/mjpieters/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mjpieters/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mjpieters/subscriptions", "type": "User", "url": "https://api.github.com/users/mjpieters", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-13T21:31:26Z
2021-09-06T00:06:38Z
2018-12-13T21:34:58Z
CONTRIBUTOR
resolved
c008bf38836a2b5621ba7b352e9fcecacac4ee93 introduced a factual error in to the documentation for the `params` parameter. The old text was > :param params: (optional) Dictionary or bytes to be sent **in the query string** for the :class:`Request`. which was replaced by > :param params: (optional) Dictionary, list of tuples or bytes to send **in the body** of the :class:`Request`. Bold emphasis mine. Obviously `params` still go in the query parameter, no functionality was changed. This was probably a copy and paste error following 2d1b4482c5916433a642d66c6b3d0cd28058b39e. Please replace *body* with *query string*. Cc: @moy
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4911/reactions" }
https://api.github.com/repos/psf/requests/issues/4911/timeline
null
completed
null
null
false
[ "Hi @mjpieters, #4910 addressed this so it should be resolved shortly. Thanks!", "Bah, should have checked for pull requests too. Sorry!" ]
https://api.github.com/repos/psf/requests/issues/4910
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4910/labels{/name}
https://api.github.com/repos/psf/requests/issues/4910/comments
https://api.github.com/repos/psf/requests/issues/4910/events
https://github.com/psf/requests/pull/4910
390,716,107
MDExOlB1bGxSZXF1ZXN0MjM4NDE5MDUw
4,910
get(), request(): fix documentation of 'params'
{ "avatar_url": "https://avatars.githubusercontent.com/u/14709?v=4", "events_url": "https://api.github.com/users/moy/events{/privacy}", "followers_url": "https://api.github.com/users/moy/followers", "following_url": "https://api.github.com/users/moy/following{/other_user}", "gists_url": "https://api.github.com/users/moy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/moy", "id": 14709, "login": "moy", "node_id": "MDQ6VXNlcjE0NzA5", "organizations_url": "https://api.github.com/users/moy/orgs", "received_events_url": "https://api.github.com/users/moy/received_events", "repos_url": "https://api.github.com/users/moy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/moy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/moy/subscriptions", "type": "User", "url": "https://api.github.com/users/moy", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2018-12-13T14:57:21Z
2021-09-01T00:11:42Z
2018-12-13T21:34:11Z
CONTRIBUTOR
resolved
'params' is sent to the query string, not the body.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4910/reactions" }
https://api.github.com/repos/psf/requests/issues/4910/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4910.diff", "html_url": "https://github.com/psf/requests/pull/4910", "merged_at": "2018-12-13T21:34:11Z", "patch_url": "https://github.com/psf/requests/pull/4910.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4910" }
true
[]
https://api.github.com/repos/psf/requests/issues/4909
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4909/labels{/name}
https://api.github.com/repos/psf/requests/issues/4909/comments
https://api.github.com/repos/psf/requests/issues/4909/events
https://github.com/psf/requests/pull/4909
390,610,904
MDExOlB1bGxSZXF1ZXN0MjM4MzM1NTIy
4,909
#4908 json exception error
{ "avatar_url": "https://avatars.githubusercontent.com/u/8709755?v=4", "events_url": "https://api.github.com/users/SebastianoF/events{/privacy}", "followers_url": "https://api.github.com/users/SebastianoF/followers", "following_url": "https://api.github.com/users/SebastianoF/following{/other_user}", "gists_url": "https://api.github.com/users/SebastianoF/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SebastianoF", "id": 8709755, "login": "SebastianoF", "node_id": "MDQ6VXNlcjg3MDk3NTU=", "organizations_url": "https://api.github.com/users/SebastianoF/orgs", "received_events_url": "https://api.github.com/users/SebastianoF/received_events", "repos_url": "https://api.github.com/users/SebastianoF/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SebastianoF/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SebastianoF/subscriptions", "type": "User", "url": "https://api.github.com/users/SebastianoF", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-13T10:22:36Z
2021-09-01T00:11:43Z
2018-12-13T13:57:09Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4909/reactions" }
https://api.github.com/repos/psf/requests/issues/4909/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4909.diff", "html_url": "https://github.com/psf/requests/pull/4909", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4909.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4909" }
true
[ "`Response.json` is a method so that we do not need to handle the underlying exceptions. You're expected to handle them or only call `.json` when you know the response body has JSON to be decoded. Nowhere else in this library do we print anything either." ]
https://api.github.com/repos/psf/requests/issues/4908
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4908/labels{/name}
https://api.github.com/repos/psf/requests/issues/4908/comments
https://api.github.com/repos/psf/requests/issues/4908/events
https://github.com/psf/requests/issues/4908
390,582,776
MDU6SXNzdWUzOTA1ODI3NzY=
4,908
From `Expecting value: line 1 column 1 (char 0)` to `Response content not in json format`
{ "avatar_url": "https://avatars.githubusercontent.com/u/8709755?v=4", "events_url": "https://api.github.com/users/SebastianoF/events{/privacy}", "followers_url": "https://api.github.com/users/SebastianoF/followers", "following_url": "https://api.github.com/users/SebastianoF/following{/other_user}", "gists_url": "https://api.github.com/users/SebastianoF/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SebastianoF", "id": 8709755, "login": "SebastianoF", "node_id": "MDQ6VXNlcjg3MDk3NTU=", "organizations_url": "https://api.github.com/users/SebastianoF/orgs", "received_events_url": "https://api.github.com/users/SebastianoF/received_events", "repos_url": "https://api.github.com/users/SebastianoF/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SebastianoF/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SebastianoF/subscriptions", "type": "User", "url": "https://api.github.com/users/SebastianoF", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2018-12-13T09:12:07Z
2021-11-30T08:00:44Z
2018-12-13T14:05:27Z
NONE
resolved
Hi! Please run ``` import requests r = requests.get('http://httpbin.org/status/200') r.status_code r.json() ``` The answer is: ``` 200 JSONDecodeError: Expecting value: line 1 column 1 (char 0) ``` I do not think it is informative and maybe it could contain something like: `Json: Response content is not in the json format` Do you think it is a good idea to wrap line 892 of requests/models.py into something like: ``` try: return complexjson.loads(self.text, **kwargs) # current line 892 except JSONDecodeError: print('Response content is not in the json format') ``` ? ## System Information ``` (py3) ~/ $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.6" }, "platform": { "release": "4.15.0-39-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010007f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 9, "-1": 0, "confused": 0, "eyes": 0, "heart": 4, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 13, "url": "https://api.github.com/repos/psf/requests/issues/4908/reactions" }
https://api.github.com/repos/psf/requests/issues/4908/timeline
null
completed
null
null
false
[ "If you inspect the response headers, it's not returning JSON so you shouldn't be unconditionally calling `.json()` on the response.", "Thanks for the quick reply!\r\nYou solved my problem!\r\n\r\nFor future reference, below how to get the JSON content or to get some spam:\r\n```\r\nimport requests\r\n\r\n\r\nurl...
https://api.github.com/repos/psf/requests/issues/4907
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4907/labels{/name}
https://api.github.com/repos/psf/requests/issues/4907/comments
https://api.github.com/repos/psf/requests/issues/4907/events
https://github.com/psf/requests/issues/4907
390,330,768
MDU6SXNzdWUzOTAzMzA3Njg=
4,907
Address CVE-2018-20060
{ "avatar_url": "https://avatars.githubusercontent.com/u/11942927?v=4", "events_url": "https://api.github.com/users/tuck1s/events{/privacy}", "followers_url": "https://api.github.com/users/tuck1s/followers", "following_url": "https://api.github.com/users/tuck1s/following{/other_user}", "gists_url": "https://api.github.com/users/tuck1s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tuck1s", "id": 11942927, "login": "tuck1s", "node_id": "MDQ6VXNlcjExOTQyOTI3", "organizations_url": "https://api.github.com/users/tuck1s/orgs", "received_events_url": "https://api.github.com/users/tuck1s/received_events", "repos_url": "https://api.github.com/users/tuck1s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tuck1s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tuck1s/subscriptions", "type": "User", "url": "https://api.github.com/users/tuck1s", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-12T17:28:00Z
2021-09-06T00:06:38Z
2018-12-12T19:33:41Z
NONE
resolved
Summary. [CVE-2018-20060](https://nvd.nist.gov/vuln/detail/CVE-2018-20060) identifies a vulnerability in `urllib3` before version 1.23. This project `Pipfile` --> `Pipfile.lock` is using version 1.22 currently: [here](https://github.com/requests/requests/blob/c452e3b92d65cb9b5377606488888da0da5db3ad/Pipfile.lock#L56)
{ "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/4907/reactions" }
https://api.github.com/repos/psf/requests/issues/4907/timeline
null
completed
null
null
false
[ "Hi @tuck1s, we reviewed the urllib3 issue when it was disclosed. Requests doesn’t use urllib3’s redirect functionality and we’ve already patched a sinusale vulnerability in #4718.", "Good to know, thanks. This came to my attention because Github are sending out warning notices by email, like this, for transitive...
https://api.github.com/repos/psf/requests/issues/4906
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4906/labels{/name}
https://api.github.com/repos/psf/requests/issues/4906/comments
https://api.github.com/repos/psf/requests/issues/4906/events
https://github.com/psf/requests/issues/4906
389,927,619
MDU6SXNzdWUzODk5Mjc2MTk=
4,906
please help requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/23573179?v=4", "events_url": "https://api.github.com/users/muhommadalmusawi/events{/privacy}", "followers_url": "https://api.github.com/users/muhommadalmusawi/followers", "following_url": "https://api.github.com/users/muhommadalmusawi/following{/other_user}", "gists_url": "https://api.github.com/users/muhommadalmusawi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/muhommadalmusawi", "id": 23573179, "login": "muhommadalmusawi", "node_id": "MDQ6VXNlcjIzNTczMTc5", "organizations_url": "https://api.github.com/users/muhommadalmusawi/orgs", "received_events_url": "https://api.github.com/users/muhommadalmusawi/received_events", "repos_url": "https://api.github.com/users/muhommadalmusawi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/muhommadalmusawi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/muhommadalmusawi/subscriptions", "type": "User", "url": "https://api.github.com/users/muhommadalmusawi", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-11T19:54:26Z
2018-12-11T20:27:51Z
2018-12-11T20:27:34Z
NONE
spam
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance. code: import requests import json import chardet email = ("fdff.aaaaaw2@mail.ru ") payload ={'tk':email,'mk':'2762716611' , 'button': 'submit'} headers = {'user-agent': 'my-app/0.0.1'} cookies = dict(cookies_are='working') urlData = ('https://token-seshu.tk/') webURL = requests.get(urlData, headers=headers,json=payload ,cookies=cookies,allow_redirects=True) data = webURL print(json.loads(data.content.decode('utf-8'))) ================================================ please help error Traceback (most recent call last): File "C:/Users/mayar/Desktop/ghf jf.py", line 14, in <module> print(json.loads(data.content.decode('utf-8'))) File "C:\Python34\lib\json\__init__.py", line 318, in loads return _default_decoder.decode(s) File "C:\Python34\lib\json\decoder.py", line 343, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python34\lib\json\decoder.py", line 361, in raw_decode raise ValueError(errmsg("Expecting value", s, err.value)) from None ValueError: Expecting value: line 1 column 1 (char 0)
{ "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/4906/reactions" }
https://api.github.com/repos/psf/requests/issues/4906/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here." ]
https://api.github.com/repos/psf/requests/issues/4905
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4905/labels{/name}
https://api.github.com/repos/psf/requests/issues/4905/comments
https://api.github.com/repos/psf/requests/issues/4905/events
https://github.com/psf/requests/issues/4905
389,502,056
MDU6SXNzdWUzODk1MDIwNTY=
4,905
@PranayWankhede, the issue being discussed in #3683 was resolved in 2.12.2. As stated in that issue, Requests has no intent to support URIs with underscores in hostnames because those are expressly prohibited in the URI RFC.
{ "avatar_url": "https://avatars.githubusercontent.com/u/21958722?v=4", "events_url": "https://api.github.com/users/PranayWankhede/events{/privacy}", "followers_url": "https://api.github.com/users/PranayWankhede/followers", "following_url": "https://api.github.com/users/PranayWankhede/following{/other_user}", "gists_url": "https://api.github.com/users/PranayWankhede/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PranayWankhede", "id": 21958722, "login": "PranayWankhede", "node_id": "MDQ6VXNlcjIxOTU4NzIy", "organizations_url": "https://api.github.com/users/PranayWankhede/orgs", "received_events_url": "https://api.github.com/users/PranayWankhede/received_events", "repos_url": "https://api.github.com/users/PranayWankhede/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PranayWankhede/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PranayWankhede/subscriptions", "type": "User", "url": "https://api.github.com/users/PranayWankhede", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2018-12-10T21:51:06Z
2021-09-06T00:06:39Z
2018-12-10T22:23:45Z
NONE
resolved
If you’re still experiencing this issue prior to 2.12, it’s likely another issue because we did not use idna to validate hostnames at that point. We’d need a concrete example to do anymore debugging here. I’m going to close this for now since this seems like a usage inquiry for unsupported behavior. If you have a use case that’s causing this with a URI that conforms to spec, please feel free to reopen. Thanks! _Originally posted by @nateprewitt in https://github.com/requests/requests/issues/4904#issuecomment-445982947_
{ "avatar_url": "https://avatars.githubusercontent.com/u/21958722?v=4", "events_url": "https://api.github.com/users/PranayWankhede/events{/privacy}", "followers_url": "https://api.github.com/users/PranayWankhede/followers", "following_url": "https://api.github.com/users/PranayWankhede/following{/other_user}", "gists_url": "https://api.github.com/users/PranayWankhede/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PranayWankhede", "id": 21958722, "login": "PranayWankhede", "node_id": "MDQ6VXNlcjIxOTU4NzIy", "organizations_url": "https://api.github.com/users/PranayWankhede/orgs", "received_events_url": "https://api.github.com/users/PranayWankhede/received_events", "repos_url": "https://api.github.com/users/PranayWankhede/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PranayWankhede/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PranayWankhede/subscriptions", "type": "User", "url": "https://api.github.com/users/PranayWankhede", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4905/reactions" }
https://api.github.com/repos/psf/requests/issues/4905/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4904
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4904/labels{/name}
https://api.github.com/repos/psf/requests/issues/4904/comments
https://api.github.com/repos/psf/requests/issues/4904/events
https://github.com/psf/requests/issues/4904
389,494,192
MDU6SXNzdWUzODk0OTQxOTI=
4,904
InvalidURL: URL has an invalid label.
{ "avatar_url": "https://avatars.githubusercontent.com/u/21958722?v=4", "events_url": "https://api.github.com/users/PranayWankhede/events{/privacy}", "followers_url": "https://api.github.com/users/PranayWankhede/followers", "following_url": "https://api.github.com/users/PranayWankhede/following{/other_user}", "gists_url": "https://api.github.com/users/PranayWankhede/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PranayWankhede", "id": 21958722, "login": "PranayWankhede", "node_id": "MDQ6VXNlcjIxOTU4NzIy", "organizations_url": "https://api.github.com/users/PranayWankhede/orgs", "received_events_url": "https://api.github.com/users/PranayWankhede/received_events", "repos_url": "https://api.github.com/users/PranayWankhede/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PranayWankhede/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PranayWankhede/subscriptions", "type": "User", "url": "https://api.github.com/users/PranayWankhede", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-10T21:29:08Z
2021-09-06T00:06:39Z
2018-12-10T21:36:57Z
NONE
resolved
I am getting the following exception for the URL which has underscore in it. After going through https://github.com/requests/requests/issues/3683 I got to know that this issue is only for the request library version >= 2.12. But i encountered similar issue for 2.11.1. Are there any changes to the older versions? Thanks!
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4904/reactions" }
https://api.github.com/repos/psf/requests/issues/4904/timeline
null
completed
null
null
false
[ "@PranayWankhede, the issue being discussed in #3683 was resolved in 2.12.2. As stated in that issue, Requests has no intent to support URIs with underscores in hostnames because those are expressly prohibited in the URI RFC.\r\n\r\nIf you’re still experiencing this issue prior to 2.12, it’s likely another issue be...
https://api.github.com/repos/psf/requests/issues/4903
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4903/labels{/name}
https://api.github.com/repos/psf/requests/issues/4903/comments
https://api.github.com/repos/psf/requests/issues/4903/events
https://github.com/psf/requests/issues/4903
389,435,061
MDU6SXNzdWUzODk0MzUwNjE=
4,903
SSL handshake Error when using chunked uploads via Proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/6557070?v=4", "events_url": "https://api.github.com/users/dobey/events{/privacy}", "followers_url": "https://api.github.com/users/dobey/followers", "following_url": "https://api.github.com/users/dobey/following{/other_user}", "gists_url": "https://api.github.com/users/dobey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dobey", "id": 6557070, "login": "dobey", "node_id": "MDQ6VXNlcjY1NTcwNzA=", "organizations_url": "https://api.github.com/users/dobey/orgs", "received_events_url": "https://api.github.com/users/dobey/received_events", "repos_url": "https://api.github.com/users/dobey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dobey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dobey/subscriptions", "type": "User", "url": "https://api.github.com/users/dobey", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-12-10T18:44:20Z
2021-09-04T00:06:13Z
2018-12-11T15:28:19Z
NONE
resolved
When attempting to perform a chunked upload by passing a generator to put() as the data argument, while going through a proxy server (either unauthenticated or with basic auth), a ConnectionError is raised with the content of `("bad hanshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",)`. Connecting without proxy, and connecting via proxy with other libraries (pycurl), works as expected. I've verified the failure still occurs with the latest requests release. Proxy server in testing is Squid 3.5.20. ## Expected Result Successful connection. ## Actual Result ConnectionError ## Reproduction Steps ```python import requests def file_read(fileobj): while True: data = fileobj.read(1024 * 1024 * 4) if not data: break yield data proxy_string = 'http://proxy.server:8080' session = requests.Session() session.proxies = {'http': proxy_string, 'https': proxy_string} headers = { 'Content-Type': 'application/octet-stream', 'x-amz-acl': 'bucket-owner-full-control', } with open('/tmp/some-large-file', 'rb') as f: url = 'https://aws.bucket/path/to/some-large-file' requests.put(url, data=file_read(f), headers=headers) ``` ## System Information Python 2.7.13 with requests 2.18.4 (though reproduced with 2.20.1 on same system), in virtualenv, connecting via Squid 3.5.20 proxy server with either basic auth, or no authentication.
{ "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/4903/reactions" }
https://api.github.com/repos/psf/requests/issues/4903/timeline
null
completed
null
null
false
[ "Python 2.7.3 is ancient, and has numerous bugs fixed in 2.7.5 that make it unsuitable for usage with Requests. Please use a later version of 2.7 or even a version of python 3.", "Sorry, that was a typo. It's 2.7.13. Please re-open.", "@sigmavirus24 Can you please re-open this It is with 2.7.13, not .3. Thanks....
https://api.github.com/repos/psf/requests/issues/4902
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4902/labels{/name}
https://api.github.com/repos/psf/requests/issues/4902/comments
https://api.github.com/repos/psf/requests/issues/4902/events
https://github.com/psf/requests/issues/4902
389,391,774
MDU6SXNzdWUzODkzOTE3NzQ=
4,902
Only use urllib3's pyOpenSSL support when SNI isn't available
{ "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" }
[]
closed
true
null
[]
null
2
2018-12-10T16:51:47Z
2021-09-06T00:06:38Z
2018-12-11T15:56:15Z
MEMBER
resolved
I'm floating this idea because currently our native `ssl` module support isn't being utilized by any requests users and I'm planning on making major improvements to SNI within native `ssl` support in urllib3 including leaning on the stdlib for hostname verification. What are the thoughts on only using pyOpenSSL when `urllib3.util.HAS_SNI` is false?
{ "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/4902/reactions" }
https://api.github.com/repos/psf/requests/issues/4902/timeline
null
completed
null
null
false
[ "That would be potentially backwards incompatible. At this point, we inject pyOpenSSL when it's there. It was primarily for SNI support, but I believe this enables other things the stdlib doesn't support and that some users may be relying on \"if pyOpenSSL is installed, requests uses it\" at this point.", "Ah oka...
https://api.github.com/repos/psf/requests/issues/4901
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4901/labels{/name}
https://api.github.com/repos/psf/requests/issues/4901/comments
https://api.github.com/repos/psf/requests/issues/4901/events
https://github.com/psf/requests/pull/4901
389,356,769
MDExOlB1bGxSZXF1ZXN0MjM3MzYzODQ2
4,901
v2.21.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2018-12-10T15:35:42Z
2021-08-31T00:07:22Z
2018-12-10T15:36:34Z
MEMBER
resolved
2.21.0 (2018-12-10) ------------------- **Dependencies** - Requests now supports idna v2.8.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4901/reactions" }
https://api.github.com/repos/psf/requests/issues/4901/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4901.diff", "html_url": "https://github.com/psf/requests/pull/4901", "merged_at": "2018-12-10T15:36:34Z", "patch_url": "https://github.com/psf/requests/pull/4901.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4901" }
true
[]
https://api.github.com/repos/psf/requests/issues/4900
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4900/labels{/name}
https://api.github.com/repos/psf/requests/issues/4900/comments
https://api.github.com/repos/psf/requests/issues/4900/events
https://github.com/psf/requests/issues/4900
389,213,160
MDU6SXNzdWUzODkyMTMxNjA=
4,900
Not clear how to build coverage report
{ "avatar_url": "https://avatars.githubusercontent.com/u/332428?v=4", "events_url": "https://api.github.com/users/boxed/events{/privacy}", "followers_url": "https://api.github.com/users/boxed/followers", "following_url": "https://api.github.com/users/boxed/following{/other_user}", "gists_url": "https://api.github.com/users/boxed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/boxed", "id": 332428, "login": "boxed", "node_id": "MDQ6VXNlcjMzMjQyOA==", "organizations_url": "https://api.github.com/users/boxed/orgs", "received_events_url": "https://api.github.com/users/boxed/received_events", "repos_url": "https://api.github.com/users/boxed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/boxed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/boxed/subscriptions", "type": "User", "url": "https://api.github.com/users/boxed", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2018-12-10T09:35:34Z
2021-09-06T00:06:37Z
2018-12-31T00:09:21Z
NONE
resolved
I was looking into trying out mutation testing (with mutmut) on requests, seeing as this is one of the most critical libraries for python. But to do this effectively I need to get the coverage report and this was non-trivial. ## Expected Result `tox -e coverage` or `make coverage` should run tests with coverage. ## Actual Result It complains about me not having pipenv, so I installed that, then it build some venv and then fails with ``` pipenv run py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests Error: the command py.test could not be found within PATH or Pipfile's [scripts]. make: *** [coverage] Error 1 ``` (aside: py.test? It's pytest nowadays) ## Reproduction Steps Check out requests. Run `make coverage`. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "2.7.15" }, "platform": { "release": "18.0.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "1000210f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4900/reactions" }
https://api.github.com/repos/psf/requests/issues/4900/timeline
null
completed
null
null
false
[ "Hi @boxed,\r\n\r\nThere's a couple options for running coverage.\r\n\r\n1.) You'll need to setup pipenv to run `make coverage`. More info on that [here](https://pipenv.readthedocs.io/en/latest/).\r\n2.) You can call `pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests`...
https://api.github.com/repos/psf/requests/issues/4899
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4899/labels{/name}
https://api.github.com/repos/psf/requests/issues/4899/comments
https://api.github.com/repos/psf/requests/issues/4899/events
https://github.com/psf/requests/issues/4899
389,196,003
MDU6SXNzdWUzODkxOTYwMDM=
4,899
Exceptions occur when nonstandard headers are returned
{ "avatar_url": "https://avatars.githubusercontent.com/u/8945364?v=4", "events_url": "https://api.github.com/users/Lcys/events{/privacy}", "followers_url": "https://api.github.com/users/Lcys/followers", "following_url": "https://api.github.com/users/Lcys/following{/other_user}", "gists_url": "https://api.github.com/users/Lcys/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lcys", "id": 8945364, "login": "Lcys", "node_id": "MDQ6VXNlcjg5NDUzNjQ=", "organizations_url": "https://api.github.com/users/Lcys/orgs", "received_events_url": "https://api.github.com/users/Lcys/received_events", "repos_url": "https://api.github.com/users/Lcys/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lcys/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lcys/subscriptions", "type": "User", "url": "https://api.github.com/users/Lcys", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-10T08:47:31Z
2021-09-06T00:06:41Z
2018-12-10T14:14:26Z
NONE
resolved
requests==2.20.1 python2.7.15 ``` HTTP/1.1 200 OK Content-Type: application/octet-stream Content-Length: 35239 Content-Disposition: attachment; filename="text.txt" ``` Exceptions occur when tabs exist in HTTP return headers Exception information: `Header continuation with no previous header: urllib3.exceptions.InvalidHeader: Header continuation with no previous header: Content-Type: application/octet-stream `
{ "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/4899/reactions" }
https://api.github.com/repos/psf/requests/issues/4899/timeline
null
completed
null
null
false
[ "It's not that these are non-standard headers. It's that the headers are formatted as if they're all part of the line `HTTP/1.1 200 OK`. This is a bug that has been opened in the past. It's not something we can fix. There's only so much we can do to override httplib's behaviour when a server completely and totally ...
https://api.github.com/repos/psf/requests/issues/4898
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4898/labels{/name}
https://api.github.com/repos/psf/requests/issues/4898/comments
https://api.github.com/repos/psf/requests/issues/4898/events
https://github.com/psf/requests/pull/4898
389,134,102
MDExOlB1bGxSZXF1ZXN0MjM3MTk0Njc2
4,898
revert azure pipeline changes
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-10T04:29:49Z
2021-08-31T00:07:20Z
2018-12-10T04:31:10Z
MEMBER
resolved
Since we don't have access to the new testing infrastructure, we're going to revert the Azure changes for now. We can revisit this once the permissions issues are fixed. Reverting commits: fc9dfac bc3eddc d911f27 3da2f10 ce52825 398d110 c15d2b6 086655e
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4898/reactions" }
https://api.github.com/repos/psf/requests/issues/4898/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4898.diff", "html_url": "https://github.com/psf/requests/pull/4898", "merged_at": "2018-12-10T04:31:10Z", "patch_url": "https://github.com/psf/requests/pull/4898.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4898" }
true
[ "For auditing purposes, I missed e4974c7 in this commit and it's been reverted in abe950c." ]
https://api.github.com/repos/psf/requests/issues/4897
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4897/labels{/name}
https://api.github.com/repos/psf/requests/issues/4897/comments
https://api.github.com/repos/psf/requests/issues/4897/events
https://github.com/psf/requests/issues/4897
388,969,273
MDU6SXNzdWUzODg5NjkyNzM=
4,897
Build security (same-origin policy, some protections against CSRF and DNS rebinding) into requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/240344?v=4", "events_url": "https://api.github.com/users/KOLANICH/events{/privacy}", "followers_url": "https://api.github.com/users/KOLANICH/followers", "following_url": "https://api.github.com/users/KOLANICH/following{/other_user}", "gists_url": "https://api.github.com/users/KOLANICH/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/KOLANICH", "id": 240344, "login": "KOLANICH", "node_id": "MDQ6VXNlcjI0MDM0NA==", "organizations_url": "https://api.github.com/users/KOLANICH/orgs", "received_events_url": "https://api.github.com/users/KOLANICH/received_events", "repos_url": "https://api.github.com/users/KOLANICH/repos", "site_admin": false, "starred_url": "https://api.github.com/users/KOLANICH/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/KOLANICH/subscriptions", "type": "User", "url": "https://api.github.com/users/KOLANICH", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-12-08T23:23:59Z
2021-09-06T00:06:40Z
2018-12-10T05:09:24Z
NONE
resolved
`requests` has some security problems. Browsers have same-origin policies, csrf protection headers and security addons like uMatrix and NoScript, preventing CSRF and some XSS attacks. Requests doesn't. So if a user of a browser opens a web page with a malicious script, the page won't access the authenticated admin consoles of user's IoT or local CUPS server: the addons provide the protections against even dns rebinding. But a script crawling the web lacks these protections, so a malicious webpage can trick the script into accessing local rezources. So we need introduce security contexts. 1. a user creates a session 2. a user spawns a security context 3. a user is not allowed to access the URIs non available from the context using that context object. 4. for accessing them a user can redefine the restrictions of a context. 5. user should access the links from the pages loaded from the context using only a contexts, and this should be checkable by taint analysers. 6. spawning a context should be a simple call, and `requests` should do the work automatically 7. requests should by default enable the checks preventing accessing addresses from intranet.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4897/reactions" }
https://api.github.com/repos/psf/requests/issues/4897/timeline
null
completed
null
null
false
[ "Hi @KOLANICH,\r\n\r\nThanks for reaching out. I'm not sure if this makes sense in the scope of Requests. Requests is not a web browser and deals with the web in the context of a single http request. We don't execute any asynchronous scripts or additional asynchronous requests in a single call. If you have a script...
https://api.github.com/repos/psf/requests/issues/4896
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4896/labels{/name}
https://api.github.com/repos/psf/requests/issues/4896/comments
https://api.github.com/repos/psf/requests/issues/4896/events
https://github.com/psf/requests/issues/4896
388,900,753
MDU6SXNzdWUzODg5MDA3NTM=
4,896
python27 post requests fails
{ "avatar_url": "https://avatars.githubusercontent.com/u/45708778?v=4", "events_url": "https://api.github.com/users/GgAaYyAaNn/events{/privacy}", "followers_url": "https://api.github.com/users/GgAaYyAaNn/followers", "following_url": "https://api.github.com/users/GgAaYyAaNn/following{/other_user}", "gists_url": "https://api.github.com/users/GgAaYyAaNn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GgAaYyAaNn", "id": 45708778, "login": "GgAaYyAaNn", "node_id": "MDQ6VXNlcjQ1NzA4Nzc4", "organizations_url": "https://api.github.com/users/GgAaYyAaNn/orgs", "received_events_url": "https://api.github.com/users/GgAaYyAaNn/received_events", "repos_url": "https://api.github.com/users/GgAaYyAaNn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GgAaYyAaNn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GgAaYyAaNn/subscriptions", "type": "User", "url": "https://api.github.com/users/GgAaYyAaNn", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-08T08:31:04Z
2018-12-12T13:36:33Z
2018-12-08T14:48:42Z
NONE
spam
https://stackoverflow.com/questions/53286484/python27-post-requests-fails
{ "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/4896/reactions" }
https://api.github.com/repos/psf/requests/issues/4896/timeline
null
completed
null
null
false
[ "?", "can you fix?" ]
https://api.github.com/repos/psf/requests/issues/4895
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4895/labels{/name}
https://api.github.com/repos/psf/requests/issues/4895/comments
https://api.github.com/repos/psf/requests/issues/4895/events
https://github.com/psf/requests/issues/4895
388,810,405
MDU6SXNzdWUzODg4MTA0MDU=
4,895
Having a space in header element for posting
{ "avatar_url": "https://avatars.githubusercontent.com/u/7781739?v=4", "events_url": "https://api.github.com/users/felleg/events{/privacy}", "followers_url": "https://api.github.com/users/felleg/followers", "following_url": "https://api.github.com/users/felleg/following{/other_user}", "gists_url": "https://api.github.com/users/felleg/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/felleg", "id": 7781739, "login": "felleg", "node_id": "MDQ6VXNlcjc3ODE3Mzk=", "organizations_url": "https://api.github.com/users/felleg/orgs", "received_events_url": "https://api.github.com/users/felleg/received_events", "repos_url": "https://api.github.com/users/felleg/repos", "site_admin": false, "starred_url": "https://api.github.com/users/felleg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/felleg/subscriptions", "type": "User", "url": "https://api.github.com/users/felleg", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-12-07T20:55:07Z
2021-09-06T00:06:40Z
2018-12-07T23:39:33Z
NONE
resolved
I'm trying to post to a server using the following script: ``` import requests data = { 'query': 'GetProcess', 'getFrom': '2018-12-06 10:10:10.000', } response = requests.post('http://localhost/monitor', data=data) ``` I cannot find where exactly, but the space character in the `getFrom` element is being replaced with a `+`: `'2018-12-06+10:10:10.000'` This doesn't match the syntax SQL expects on our server, so the query fails. I read here (https://stackoverflow.com/a/12528097) that setting the Content-type might help. I tried `text/html`, `text/plain`, `application/json`, and nothing seems to change. Interestingly, the following (equivalent?) bash command succeeds: ` curl -d 'query=GetProcess&getFrom=2018-12-06 10:10:10.000' localhost/monitor` I'm looking for a way to make my server receive `"getFrom" : "2018-12-06 10:10:10.000"` in the header. Thank you in advance :)
{ "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/4895/reactions" }
https://api.github.com/repos/psf/requests/issues/4895/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "I looked deeper into this, and I found the culprit...
https://api.github.com/repos/psf/requests/issues/4894
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4894/labels{/name}
https://api.github.com/repos/psf/requests/issues/4894/comments
https://api.github.com/repos/psf/requests/issues/4894/events
https://github.com/psf/requests/issues/4894
388,355,491
MDU6SXNzdWUzODgzNTU0OTE=
4,894
Timeout in session chunked requests lead to subsequent request timeout
{ "avatar_url": "https://avatars.githubusercontent.com/u/47389?v=4", "events_url": "https://api.github.com/users/meddulla/events{/privacy}", "followers_url": "https://api.github.com/users/meddulla/followers", "following_url": "https://api.github.com/users/meddulla/following{/other_user}", "gists_url": "https://api.github.com/users/meddulla/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/meddulla", "id": 47389, "login": "meddulla", "node_id": "MDQ6VXNlcjQ3Mzg5", "organizations_url": "https://api.github.com/users/meddulla/orgs", "received_events_url": "https://api.github.com/users/meddulla/received_events", "repos_url": "https://api.github.com/users/meddulla/repos", "site_admin": false, "starred_url": "https://api.github.com/users/meddulla/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/meddulla/subscriptions", "type": "User", "url": "https://api.github.com/users/meddulla", "user_view_type": "public" }
[]
open
false
null
[]
null
1
2018-12-06T19:10:09Z
2019-11-14T16:29:29Z
null
NONE
null
## Expected Result Requests in same session don't interfere with one another. ## Actual Result A slow response from a chunked request causes the subsequent request to fail with a timeout even if the server responded before the timeout was reached. ## Reproduction Steps Run a test server that accepts GET and POST requests. When responding to POST requests it waits 10 seconds before responding: ```python import time from http.server import BaseHTTPRequestHandler, HTTPServer time_sleep = 10 class HandlerSlowResponse(BaseHTTPRequestHandler): def do_POST(self): # Hangs time.sleep(time_sleep) self.send_response(200) self.end_headers() def do_GET(self): # OK self.send_response(200) self.end_headers() if __name__ == '__main__': print("Time sleep %s" % time_sleep) httpd = HTTPServer(('', 8000), HandlerSlowResponse) print('Listening on :8000') httpd.serve_forever() ``` Then, in another REPL, verify non-session requests don't interfere with one another: ```python import requests import time timeout = 2 def norm(i): print("GET (quick response) %s" % i) try: requests.get('http://localhost:8000', timeout=timeout, data='hello'.encode('utf-8')) except Exception as e: print("-> EXC Norm %s %s" % (i, e)) def chunked(i): print("POST chunked (slow response) %s" % i) # Does not fail if exceeds timeout def gen(): yield 'hello'.encode('utf-8') try: requests.post('http://localhost:8000', timeout=timeout, data=gen()) except Exception as e: print("-> EXC Chunked %s %s" % (i, e)) def cycle(): # requests don't interfere with one another for i in range(1, 10): time.sleep(1) if i % 2 == 0: norm(i) else: chunked(i) if __name__ == "__main__": print("Timeout %s" % timeout) cycle() ``` Output: Note that chunked requests never time out (ticket https://github.com/requests/requests/issues/4402). ``` Timeout 2 POST chunked (slow response) 1 GET (quick response) 2 POST chunked (slow response) 3 GET (quick response) 4 POST chunked (slow response) 5 GET (quick response) 6 POST chunked (slow response) 7 GET (quick response) 8 POST chunked (slow response) 9 ``` Next, do the same thing but now using a `Session`: ```python import requests import time timeout = 2 session = requests.Session() def norm_session(i): print("GET norm session (quick response) %s" % i) try: session.get('http://localhost:8000', timeout=timeout, data='hello'.encode('utf-8')) except Exception as e: print("-> EXC Norm session %s %s" % (i, e)) def chunked_session(i): print("POST chunked session (slow response) %s" % i) def gen(): yield 'hello'.encode('utf-8') try: session.post('http://localhost:8000', timeout=timeout, data=gen()) except Exception as e: print("-> EXC Chunked session %s %s" % (i, e)) def cycle_session(): # A normal request always times out after a chunked timeout request # even if the server responded in time for i in range(1, 10): time.sleep(1) if i % 2 == 0: norm_session(i) else: chunked_session(i) if __name__ == "__main__": print("Timeout %s" % timeout) cycle_session() ``` Output: Note that chunked requests do time out but cause the subsequent GET to fail. ``` Timeout 2 POST chunked session (slow response) 1 GET norm session (quick response) 2 POST chunked session (slow response) 3 -> EXC Chunked session 3 timed out GET norm session (quick response) 4 -> EXC Norm session 4 HTTPConnectionPool(host='localhost', port=8000): Read timed out. (read timeout=2) POST chunked session (slow response) 5 GET norm session (quick response) 6 POST chunked session (slow response) 7 -> EXC Chunked session 7 timed out GET norm session (quick response) 8 -> EXC Norm session 8 HTTPConnectionPool(host='localhost', port=8000): Read timed out. (read timeout=2) POST chunked session (slow response) 9 ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000210f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
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/4894/reactions" }
https://api.github.com/repos/psf/requests/issues/4894/timeline
null
null
null
null
false
[ "It could maybe be fixed by #5128 (see also https://github.com/psf/requests/issues/4402#issuecomment-415748368) ?" ]
https://api.github.com/repos/psf/requests/issues/4893
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4893/labels{/name}
https://api.github.com/repos/psf/requests/issues/4893/comments
https://api.github.com/repos/psf/requests/issues/4893/events
https://github.com/psf/requests/issues/4893
388,222,304
MDU6SXNzdWUzODgyMjIzMDQ=
4,893
Library IDNA 2.7 and 2.8
{ "avatar_url": "https://avatars.githubusercontent.com/u/7862574?v=4", "events_url": "https://api.github.com/users/homerjonathan/events{/privacy}", "followers_url": "https://api.github.com/users/homerjonathan/followers", "following_url": "https://api.github.com/users/homerjonathan/following{/other_user}", "gists_url": "https://api.github.com/users/homerjonathan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/homerjonathan", "id": 7862574, "login": "homerjonathan", "node_id": "MDQ6VXNlcjc4NjI1NzQ=", "organizations_url": "https://api.github.com/users/homerjonathan/orgs", "received_events_url": "https://api.github.com/users/homerjonathan/received_events", "repos_url": "https://api.github.com/users/homerjonathan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/homerjonathan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/homerjonathan/subscriptions", "type": "User", "url": "https://api.github.com/users/homerjonathan", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-12-06T13:50:22Z
2021-09-06T00:06:41Z
2018-12-06T14:01:35Z
NONE
resolved
Summary. Since off the grid I manually installed IDNA 2.8 as a dependant. When installing requests via the .whl file v2.20.1 version. It manually tried to download the IDNA 2.7 version. I manually installed IDNA 2.7 and the install completed correctly. What you expected. To install correctly with IDNA 2.8 What happened instead. When installing Requests version IDNA 2.7 will be downloaded. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.7.1" }, "platform": { "release": "2008ServerR2", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "1010009f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "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/4893/reactions" }
https://api.github.com/repos/psf/requests/issues/4893/timeline
null
completed
null
null
false
[ "Duplicate of #4890 ", "In the future, please search **closed and** open issues before creating new ones that are duplicates." ]
https://api.github.com/repos/psf/requests/issues/4892
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4892/labels{/name}
https://api.github.com/repos/psf/requests/issues/4892/comments
https://api.github.com/repos/psf/requests/issues/4892/events
https://github.com/psf/requests/issues/4892
388,025,990
MDU6SXNzdWUzODgwMjU5OTA=
4,892
Getting SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET'
{ "avatar_url": "https://avatars.githubusercontent.com/u/109864?v=4", "events_url": "https://api.github.com/users/sagarsumant/events{/privacy}", "followers_url": "https://api.github.com/users/sagarsumant/followers", "following_url": "https://api.github.com/users/sagarsumant/following{/other_user}", "gists_url": "https://api.github.com/users/sagarsumant/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sagarsumant", "id": 109864, "login": "sagarsumant", "node_id": "MDQ6VXNlcjEwOTg2NA==", "organizations_url": "https://api.github.com/users/sagarsumant/orgs", "received_events_url": "https://api.github.com/users/sagarsumant/received_events", "repos_url": "https://api.github.com/users/sagarsumant/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sagarsumant/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sagarsumant/subscriptions", "type": "User", "url": "https://api.github.com/users/sagarsumant", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-06T02:09:59Z
2021-09-06T00:06:41Z
2018-12-06T13:57:30Z
NONE
resolved
- I saw that here ssl retry issue is fixed. https://github.com/urllib3/urllib3/pull/1178/files. - I am getting this issue after retry exhaust. This after 30 min plus starting my application. - The code that polls the server to get next data tries every 20 seconds. (each attempt has retry enabled) - But this issue happens after 30-40 minutes. - we are using urllib3==1.24.1 Any pointers/suggestions for this? Stacktrace: ERROR:adal-python:75788bbf-6a33-4890-96bf-9553ed7e1073 - OAuth2Client:Get Token request failed Traceback (most recent call last): File "/databricks/python/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 453, in wrap_socket cnx.do_handshake() File "/databricks/python/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1443, in do_handshake self._raise_ssl_error(self._ssl, result) File "/databricks/python/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1182, in _raise_ssl_error raise SysCallError(errno, errorcode.get(errno)) OpenSSL.SSL.SysCallError: (104, 'ECONNRESET') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/databricks/python/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/databricks/python/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request self._validate_conn(conn) File "/databricks/python/lib/python3.5/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn conn.connect() File "/databricks/python/lib/python3.5/site-packages/urllib3/connection.py", line 344, in connect ssl_context=context) File "/databricks/python/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 344, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/databricks/python/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 459, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/databricks/python/lib/python3.5/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/databricks/python/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/databricks/python/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/databricks/python/lib/python3.5/site-packages/adal/oauth2_client.py", line 268, in get_token timeout=self._call_context.get('timeout', None)) File "/databricks/python/lib/python3.5/site-packages/requests/api.py", line 116, in post return request('post', url, data=data, json=json, **kwargs) File "/databricks/python/lib/python3.5/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/databricks/python/lib/python3.5/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/databricks/python/lib/python3.5/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/databricks/python/lib/python3.5/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),))
{ "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/4892/reactions" }
https://api.github.com/repos/psf/requests/issues/4892/timeline
null
completed
null
null
false
[ "It's likely that a peer between you and `login.microsoftonline.com` is resetting the connection because a packet isn't received in order causing the reset. It's impossible for us to discern why this is just happening for you after 30 minutes. For help debugging this, you must ask on [StackOverflow](https://stackov...
https://api.github.com/repos/psf/requests/issues/4891
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4891/labels{/name}
https://api.github.com/repos/psf/requests/issues/4891/comments
https://api.github.com/repos/psf/requests/issues/4891/events
https://github.com/psf/requests/pull/4891
387,742,730
MDExOlB1bGxSZXF1ZXN0MjM2MTYyNzc3
4,891
chore: Remove unused imports in test
{ "avatar_url": "https://avatars.githubusercontent.com/u/1192122?v=4", "events_url": "https://api.github.com/users/artofhuman/events{/privacy}", "followers_url": "https://api.github.com/users/artofhuman/followers", "following_url": "https://api.github.com/users/artofhuman/following{/other_user}", "gists_url": "https://api.github.com/users/artofhuman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/artofhuman", "id": 1192122, "login": "artofhuman", "node_id": "MDQ6VXNlcjExOTIxMjI=", "organizations_url": "https://api.github.com/users/artofhuman/orgs", "received_events_url": "https://api.github.com/users/artofhuman/received_events", "repos_url": "https://api.github.com/users/artofhuman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/artofhuman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/artofhuman/subscriptions", "type": "User", "url": "https://api.github.com/users/artofhuman", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-05T12:51:22Z
2022-02-26T15:00:31Z
2021-11-28T14:28:13Z
NONE
resolved
{ "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/4891/reactions" }
https://api.github.com/repos/psf/requests/issues/4891/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4891.diff", "html_url": "https://github.com/psf/requests/pull/4891", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4891.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4891" }
true
[ "This will be handled by automated tools once/if introduced. For now doesn't hurt anything." ]
https://api.github.com/repos/psf/requests/issues/4890
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4890/labels{/name}
https://api.github.com/repos/psf/requests/issues/4890/comments
https://api.github.com/repos/psf/requests/issues/4890/events
https://github.com/psf/requests/issues/4890
387,638,509
MDU6SXNzdWUzODc2Mzg1MDk=
4,890
idna 2.8 released
{ "avatar_url": "https://avatars.githubusercontent.com/u/3694534?v=4", "events_url": "https://api.github.com/users/Nothing4You/events{/privacy}", "followers_url": "https://api.github.com/users/Nothing4You/followers", "following_url": "https://api.github.com/users/Nothing4You/following{/other_user}", "gists_url": "https://api.github.com/users/Nothing4You/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Nothing4You", "id": 3694534, "login": "Nothing4You", "node_id": "MDQ6VXNlcjM2OTQ1MzQ=", "organizations_url": "https://api.github.com/users/Nothing4You/orgs", "received_events_url": "https://api.github.com/users/Nothing4You/received_events", "repos_url": "https://api.github.com/users/Nothing4You/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Nothing4You/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Nothing4You/subscriptions", "type": "User", "url": "https://api.github.com/users/Nothing4You", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2018-12-05T08:12:10Z
2021-09-06T00:06:40Z
2018-12-10T15:46:45Z
NONE
resolved
[`idna`](https://pypi.org/project/idna/#history) 2.8 was just released. requests is [pinned to `idna>=2.5,<2.8`](https://github.com/requests/requests/blob/57d7284c1a245cf9fbcecb594f50471d86e879f7/setup.py#L46) Can the pin be updated to allow v2.8?
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 9, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 9, "url": "https://api.github.com/repos/psf/requests/issues/4890/reactions" }
https://api.github.com/repos/psf/requests/issues/4890/timeline
null
completed
null
null
false
[ "By the way, out of curiosity, what's the reason to pin minor version number at all?\r\nIt seems it was first introduced in 1ea27b35649571abb796f7cffbab83938d882a8d, but there is no explanation in the commit metadata.", "@Vlad-Shcherbina why have a lowest version we support? Because that's the lowest version we k...
https://api.github.com/repos/psf/requests/issues/4889
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4889/labels{/name}
https://api.github.com/repos/psf/requests/issues/4889/comments
https://api.github.com/repos/psf/requests/issues/4889/events
https://github.com/psf/requests/pull/4889
387,439,440
MDExOlB1bGxSZXF1ZXN0MjM1OTI3Njg0
4,889
Bumped maximum version of idna
{ "avatar_url": "https://avatars.githubusercontent.com/u/772?v=4", "events_url": "https://api.github.com/users/alex/events{/privacy}", "followers_url": "https://api.github.com/users/alex/followers", "following_url": "https://api.github.com/users/alex/following{/other_user}", "gists_url": "https://api.github.com/users/alex/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alex", "id": 772, "login": "alex", "node_id": "MDQ6VXNlcjc3Mg==", "organizations_url": "https://api.github.com/users/alex/orgs", "received_events_url": "https://api.github.com/users/alex/received_events", "repos_url": "https://api.github.com/users/alex/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alex/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alex/subscriptions", "type": "User", "url": "https://api.github.com/users/alex", "user_view_type": "public" }
[]
closed
true
null
[]
null
12
2018-12-04T19:16:36Z
2021-09-01T00:11:44Z
2018-12-10T05:41:15Z
MEMBER
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/4889/reactions" }
https://api.github.com/repos/psf/requests/issues/4889/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4889.diff", "html_url": "https://github.com/psf/requests/pull/4889", "merged_at": "2018-12-10T05:41:15Z", "patch_url": "https://github.com/psf/requests/pull/4889.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4889" }
true
[ "AppVeyor failures don't seem related to this patch", "Failing vsts build also looks unrelated to this patch.", "@alex The build will fail for Python 3.5 on `idna==2.8` so I think the bump isn't safe. I just saw the same at work", "I'm not sure I understand? Why do you think this will fail with Python 3.5? AF...
https://api.github.com/repos/psf/requests/issues/4888
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4888/labels{/name}
https://api.github.com/repos/psf/requests/issues/4888/comments
https://api.github.com/repos/psf/requests/issues/4888/events
https://github.com/psf/requests/issues/4888
387,215,856
MDU6SXNzdWUzODcyMTU4NTY=
4,888
HTTPS Server certificate custom verification
{ "avatar_url": "https://avatars.githubusercontent.com/u/18055678?v=4", "events_url": "https://api.github.com/users/luc-alquier/events{/privacy}", "followers_url": "https://api.github.com/users/luc-alquier/followers", "following_url": "https://api.github.com/users/luc-alquier/following{/other_user}", "gists_url": "https://api.github.com/users/luc-alquier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/luc-alquier", "id": 18055678, "login": "luc-alquier", "node_id": "MDQ6VXNlcjE4MDU1Njc4", "organizations_url": "https://api.github.com/users/luc-alquier/orgs", "received_events_url": "https://api.github.com/users/luc-alquier/received_events", "repos_url": "https://api.github.com/users/luc-alquier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/luc-alquier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/luc-alquier/subscriptions", "type": "User", "url": "https://api.github.com/users/luc-alquier", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-04T10:24:20Z
2021-09-06T00:06:41Z
2018-12-04T13:54:11Z
NONE
resolved
Like the openssl c api, it would be great if in requests api or urllib3 api user could provide callback or a method to do custom server certificate validation.
{ "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/4888/reactions" }
https://api.github.com/repos/psf/requests/issues/4888/timeline
null
completed
null
null
false
[ "That belongs over in urllib3 since it handles all of this for us." ]
https://api.github.com/repos/psf/requests/issues/4887
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4887/labels{/name}
https://api.github.com/repos/psf/requests/issues/4887/comments
https://api.github.com/repos/psf/requests/issues/4887/events
https://github.com/psf/requests/issues/4887
387,190,760
MDU6SXNzdWUzODcxOTA3NjA=
4,887
windows for ubuntu18.04,data={"id":None},no response
{ "avatar_url": "https://avatars.githubusercontent.com/u/42604280?v=4", "events_url": "https://api.github.com/users/cxdtotsj/events{/privacy}", "followers_url": "https://api.github.com/users/cxdtotsj/followers", "following_url": "https://api.github.com/users/cxdtotsj/following{/other_user}", "gists_url": "https://api.github.com/users/cxdtotsj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cxdtotsj", "id": 42604280, "login": "cxdtotsj", "node_id": "MDQ6VXNlcjQyNjA0Mjgw", "organizations_url": "https://api.github.com/users/cxdtotsj/orgs", "received_events_url": "https://api.github.com/users/cxdtotsj/received_events", "repos_url": "https://api.github.com/users/cxdtotsj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cxdtotsj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cxdtotsj/subscriptions", "type": "User", "url": "https://api.github.com/users/cxdtotsj", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-12-04T09:23:56Z
2021-09-06T00:06:37Z
2018-12-31T13:17:39Z
NONE
resolved
Summary. ## Actual Result No response, no timeout parameter does not work ## Reproduction Steps ```python import requests url = "https://dt-dev.arctron.cn/api/zone/get" (my company progect) data = {"id":None} headers = header reqs = requests.post(url=url,data=data,headers=header) ``` ## the picture ![image](https://user-images.githubusercontent.com/42604280/49431871-5cbb0080-f7e9-11e8-946f-ec1cb82b0982.png)
{ "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/4887/reactions" }
https://api.github.com/repos/psf/requests/issues/4887/timeline
null
completed
null
null
false
[ "Seems to be an issue with the host: `https://dt-dev.arctron.cn/api/zone/get`\r\n\r\n`curl https://dt-dev.arctron.cn/api/zone/get` acts the same." ]
https://api.github.com/repos/psf/requests/issues/4885
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4885/labels{/name}
https://api.github.com/repos/psf/requests/issues/4885/comments
https://api.github.com/repos/psf/requests/issues/4885/events
https://github.com/psf/requests/issues/4885
385,866,414
MDU6SXNzdWUzODU4NjY0MTQ=
4,885
https://docs.python-requests.org certificate's CN is *.readthedocs.org
{ "avatar_url": "https://avatars.githubusercontent.com/u/14002720?v=4", "events_url": "https://api.github.com/users/juga0/events{/privacy}", "followers_url": "https://api.github.com/users/juga0/followers", "following_url": "https://api.github.com/users/juga0/following{/other_user}", "gists_url": "https://api.github.com/users/juga0/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/juga0", "id": 14002720, "login": "juga0", "node_id": "MDQ6VXNlcjE0MDAyNzIw", "organizations_url": "https://api.github.com/users/juga0/orgs", "received_events_url": "https://api.github.com/users/juga0/received_events", "repos_url": "https://api.github.com/users/juga0/repos", "site_admin": false, "starred_url": "https://api.github.com/users/juga0/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/juga0/subscriptions", "type": "User", "url": "https://api.github.com/users/juga0", "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
2018-11-29T18:24:54Z
2021-09-06T00:06:35Z
2019-01-08T01:30:31Z
NONE
resolved
This is not a software bug but a deployment bug. http://docs.python-requests.org does not redirect to HTTPS. In some browsers, visiting https://docs.python-requests.org, will give SSL_ERROR_BAD_CERT_DOMAIN, because the certificate's CN does not match the requested URL. https://readthedocs.org/projects/requests/latest/ redirects http://docs.python-requests.org. ## Expected Result docs.python-requests.org Website via HTTPS ## Actual Result SSL_ERROR_BAD_CERT_DOMAIN: Unable to communicate securely with peer: requested domain name does not match the server’s certificate. ## Reproduction Steps Open https://docs.python-requests.org in a browser, or: ``` curl https://docs.python-requests.org curl: (51) SSL: no alternative certificate subject name matches target host name 'docs.python-requests.org' ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4885/reactions" }
https://api.github.com/repos/psf/requests/issues/4885/timeline
null
completed
null
null
false
[ "currently unsupported" ]
https://api.github.com/repos/psf/requests/issues/4884
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4884/labels{/name}
https://api.github.com/repos/psf/requests/issues/4884/comments
https://api.github.com/repos/psf/requests/issues/4884/events
https://github.com/psf/requests/issues/4884
385,450,724
MDU6SXNzdWUzODU0NTA3MjQ=
4,884
HTTP CONNECT request sent in different packets while using an HTTPS Proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/1035793?v=4", "events_url": "https://api.github.com/users/brad-anton/events{/privacy}", "followers_url": "https://api.github.com/users/brad-anton/followers", "following_url": "https://api.github.com/users/brad-anton/following{/other_user}", "gists_url": "https://api.github.com/users/brad-anton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/brad-anton", "id": 1035793, "login": "brad-anton", "node_id": "MDQ6VXNlcjEwMzU3OTM=", "organizations_url": "https://api.github.com/users/brad-anton/orgs", "received_events_url": "https://api.github.com/users/brad-anton/received_events", "repos_url": "https://api.github.com/users/brad-anton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/brad-anton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brad-anton/subscriptions", "type": "User", "url": "https://api.github.com/users/brad-anton", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2018-11-28T20:49:16Z
2022-02-26T04:00:37Z
2021-11-28T03:16:07Z
NONE
resolved
When using an HTTPS proxy, HTTP headers (and other parts of the request) are sent at different times then the initial HTTP `CONNECT` method, causing _some_ proxy services to abort the connection. ## Expected Result The entire HTTP request should be sent in the same packet as the `CONNECT` method. ## Actual Result HTTP Headers and trailing `\r\n` are sent at a different time. You can see this in the Wireshark Capture: First Packet contains the HTTP CONNECT (from [here](https://github.com/python/cpython/blob/master/Lib/http/client.py#L895-L898)) ![screen shot 2018-11-28 at 15 55 17](https://user-images.githubusercontent.com/1035793/49182352-10bf1600-f328-11e8-8f8b-8b78694ad125.png) Second packet shows the left over `\r\n` (from [here](https://github.com/python/cpython/blob/master/Lib/http/client.py#L903)) ![screen shot 2018-11-28 at 15 56 05](https://user-images.githubusercontent.com/1035793/49182338-06048100-f328-11e8-988b-b3268ec1d0e7.png) This results in _some_ proxy servers aborting the connection. ## Reproduction Steps ``` >>> import requests >>> proxies = { 'https': 'https://someproxy:443' } >>> requests.get('https://www.google.com', proxies=proxies) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/user/Library/Python/2.7/lib/python/site-packages/requests/api.py", line 70, in get return request('get', url, params=params, **kwargs) File "/Users/user/Library/Python/2.7/lib/python/site-packages/requests/api.py", line 56, in request return session.request(method=method, url=url, **kwargs) File "/Users/user/Library/Python/2.7/lib/python/site-packages/requests/sessions.py", line 475, in request resp = self.send(prep, **send_kwargs) File "/Users/user/Library/Python/2.7/lib/python/site-packages/requests/sessions.py", line 596, in send r = adapter.send(request, **kwargs) File "/Users/user/Library/Python/2.7/lib/python/site-packages/requests/adapters.py", line 485, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', error(54, 'Connection reset by peer'))) ``` ## System Information ``` $ python -V Python 2.7.11 ``` (Same behavior on Python 3) MacOSX ## Work Around The following work around sends the entire HTTP `CONNECT` request at the same time: https://gist.github.com/brad-anton/ff517025a86754793b680b3c5cfc9797
{ "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/4884/reactions" }
https://api.github.com/repos/psf/requests/issues/4884/timeline
null
completed
null
null
false
[ "This is an issue with urllib3, maybe we can use that new issue moving feature! :)", "@SethMichaelLarson I gave it a whirl but it looks like we can only move between repos in this org. @brad-anton would you mind making an issue in the urllib3 repo referencing this? Then we can close this out after. Thanks!", "S...
https://api.github.com/repos/psf/requests/issues/4883
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4883/labels{/name}
https://api.github.com/repos/psf/requests/issues/4883/comments
https://api.github.com/repos/psf/requests/issues/4883/events
https://github.com/psf/requests/issues/4883
385,103,742
MDU6SXNzdWUzODUxMDM3NDI=
4,883
requests really long compared to curl
{ "avatar_url": "https://avatars.githubusercontent.com/u/2164118?v=4", "events_url": "https://api.github.com/users/tobiasBora/events{/privacy}", "followers_url": "https://api.github.com/users/tobiasBora/followers", "following_url": "https://api.github.com/users/tobiasBora/following{/other_user}", "gists_url": "https://api.github.com/users/tobiasBora/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tobiasBora", "id": 2164118, "login": "tobiasBora", "node_id": "MDQ6VXNlcjIxNjQxMTg=", "organizations_url": "https://api.github.com/users/tobiasBora/orgs", "received_events_url": "https://api.github.com/users/tobiasBora/received_events", "repos_url": "https://api.github.com/users/tobiasBora/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tobiasBora/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tobiasBora/subscriptions", "type": "User", "url": "https://api.github.com/users/tobiasBora", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2018-11-28T05:06:23Z
2021-11-26T05:00:33Z
2021-08-28T04:05:51Z
NONE
resolved
First thanks for the great job. For some specific requests, requests is very slow (around 8s in average) while curl configured with more or less the same parameters is nearly instantaneous. ## Expected Result I would expect requests to take less than 8s to proceed a request. I tried to change `Connection: close/keep-alive`, and `Accept-Encoding: identify/gzip/gzip, deflate/...` ## Reproduction Steps On one side run: curl -X 'GET' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0' -H 'Accept-Encoding: identity' -H 'Accept: application/json, text/plain, */*' -H 'Connection: close' -H 'Referer: https://www.oui.sncf/bons-plans/tgvmax' -H 'X-CT-Locale: fr' -H 'X-User-Agent: CaptainTrain/1542980776(web) (Ember 3.4.6)' -H 'content-type: application/json' -H 'x-not-a-bot: i-am-human' 'https://www.trainline.fr/api/v5_1/stations?context=search&q=Paris' and on the other side: ```python import requests from collections import OrderedDict ###### Debug tools def pretty_string_request(req): """Pretty string a request""" return '{}\n{}\n{}\n\n{}\n{}'.format( '>>>-----------START-----------', req.method + ' ' + req.url, '\n'.join('{}: {}'.format(k, v) for k, v in req.headers.items()), req.body, '<<<-----------STOP-----------', ) def pretty_string_response(response): return pretty_string_request(response.request) ###### Code # Does not order anything in fact headers = OrderedDict([('Accept', 'application/json, text/plain, */*'), ('Accept-Encoding', 'identity'), ('Connection', 'close'), ('Referer', 'https://www.oui.sncf/bons-plans/tgvmax'), ('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0'), ('X-CT-Locale', 'fr'), ('X-User-Agent', 'CaptainTrain/1542980776(web) (Ember 3.4.6)'), ('content-type', 'application/json'), ('x-not-a-bot', 'i-am-human')]) url = 'https://www.trainline.fr/api/v5_1/stations' payload = {'context':'search', 'q': 'Paris' } print("Before request...") response = requests.get(url, headers=headers, params=payload) print("After request...") print(pretty_string_response(response)) print(response.json()) ``` I also took a wireshark capture (the first packets until N=52 included are from curl, the others are from requests). For me, the server shouldn't even be able to distinguish wether on the other side you have curl or requests as they are supposed to send the same headers... ![screenshot_20181128_060532](https://user-images.githubusercontent.com/2164118/49130323-9e244b00-f2d3-11e8-8026-482449a3ff89.png) EDIT: I also noticed that I can keep only the header `'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0'` and this time requests is as quick as curl. However, problems arrive in two scenari: either I add the header `'Connection': 'close'` or the header `'content-type': 'application/json'`, while both options are fine with curl. Maybe is could be useful to understand why requests does not always behave as curl? ## System Information $ python -m requests.help ``` $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.6.7" }, "platform": { "release": "4.18.0-2-amd64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010008f", "version": "18.0.0" }, "requests": { "version": "2.20.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.24" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4883/reactions" }
https://api.github.com/repos/psf/requests/issues/4883/timeline
null
completed
null
null
false
[ "@kenneth-reitz @timofurrer do you know who can take a look into this?", "Hi guys, i'm facing a similar issue. requests.get() takes ~520s. It used to be <1s. I don't know what changed to cause this huge delay. I can provide you the cProfile output.", "@kenneth-reitz, what could be the issue? Please explain the ...
https://api.github.com/repos/psf/requests/issues/4882
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4882/labels{/name}
https://api.github.com/repos/psf/requests/issues/4882/comments
https://api.github.com/repos/psf/requests/issues/4882/events
https://github.com/psf/requests/pull/4882
384,987,658
MDExOlB1bGxSZXF1ZXN0MjM0MDYxNDc3
4,882
raise requests.exceptions.ReadTimeout for streaming responses
{ "avatar_url": "https://avatars.githubusercontent.com/u/751650?v=4", "events_url": "https://api.github.com/users/bgardiner/events{/privacy}", "followers_url": "https://api.github.com/users/bgardiner/followers", "following_url": "https://api.github.com/users/bgardiner/following{/other_user}", "gists_url": "https://api.github.com/users/bgardiner/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bgardiner", "id": 751650, "login": "bgardiner", "node_id": "MDQ6VXNlcjc1MTY1MA==", "organizations_url": "https://api.github.com/users/bgardiner/orgs", "received_events_url": "https://api.github.com/users/bgardiner/received_events", "repos_url": "https://api.github.com/users/bgardiner/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bgardiner/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bgardiner/subscriptions", "type": "User", "url": "https://api.github.com/users/bgardiner", "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" } ]
closed
false
null
[]
null
3
2018-11-27T21:11:56Z
2024-05-19T18:38:57Z
2024-05-19T18:38:57Z
NONE
null
Currently, if there is a read timeout while streaming a response, a `requests.exceptions.ConnectionError` is raised in lieu of a `requests.exceptions.ReadTimeout`. This is unexpected and [contrary to the documentation](http://docs.python-requests.org/en/latest/user/quickstart/#timeouts). As a user, I am being forced to catch the `ConnectionError` when I only actually care about the `ReadTimeout` situation. This PR revises the streaming response code to properly raise a `requests.exceptions.ReadTimeout`, consistent with [the non-streaming request behavior](https://github.com/requests/requests/blob/57d7284c1a245cf9fbcecb594f50471d86e879f7/requests/adapters.py#L528). I am unable to write a test for this situation since `httpbin` does not support a delay for chunked-encoded responses; see requests/httpbin#479 regarding this lack of functionality.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 4, "-1": 1, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 5, "url": "https://api.github.com/repos/psf/requests/issues/4882/reactions" }
https://api.github.com/repos/psf/requests/issues/4882/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4882.diff", "html_url": "https://github.com/psf/requests/pull/4882", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4882.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4882" }
true
[ "Any thoughts on this? I think this is clearly a bug in the existing implementation...... is there something I am missing?", "ping anyone want to take a look at this?", "I looks like this has been fixed in the 3.0 branch, and the comments on #2392 and #5430 note that a change like this is too much of a breaking...
https://api.github.com/repos/psf/requests/issues/4881
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4881/labels{/name}
https://api.github.com/repos/psf/requests/issues/4881/comments
https://api.github.com/repos/psf/requests/issues/4881/events
https://github.com/psf/requests/issues/4881
384,953,673
MDU6SXNzdWUzODQ5NTM2NzM=
4,881
Cookies from Response don't show up in cookies list
{ "avatar_url": "https://avatars.githubusercontent.com/u/1813375?v=4", "events_url": "https://api.github.com/users/jcrmatos/events{/privacy}", "followers_url": "https://api.github.com/users/jcrmatos/followers", "following_url": "https://api.github.com/users/jcrmatos/following{/other_user}", "gists_url": "https://api.github.com/users/jcrmatos/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jcrmatos", "id": 1813375, "login": "jcrmatos", "node_id": "MDQ6VXNlcjE4MTMzNzU=", "organizations_url": "https://api.github.com/users/jcrmatos/orgs", "received_events_url": "https://api.github.com/users/jcrmatos/received_events", "repos_url": "https://api.github.com/users/jcrmatos/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jcrmatos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jcrmatos/subscriptions", "type": "User", "url": "https://api.github.com/users/jcrmatos", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-11-27T19:37:27Z
2021-09-06T00:06:42Z
2018-11-28T13:02:10Z
NONE
resolved
Hello, I receive a response (checked with Chrome/Firefox inspector) from the post request with the following headers: Cache-control: no-cache, no-store, max-age=0 Connection: Keep-Alive Content-Language: pt Content-Type: text/html Pragma: no-cache Set-cookie: Cookie=sid=46c76f5a656dcb9092e7c2840b0a9747fe248af99bc7e62e372bfcede16c0e63:Language:portuguese:id=1;path=/ Transfer-Encoding: chunked X-Frame-Options: SAMEORIGIN but the cookies don't appear in the response.cookies or the session.cookies. ## Expected Result The cookies should appear in the response cookies list. ## Actual Result Both cookies lists are empty. 200 200 <RequestsCookieJar[]> <RequestsCookieJar[]> ## Reproduction Steps ```python import requests headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', 'Cookie': 'Cookie=sid=254f086ef66799f95c777d1e681ac2b3380a80f4c7faa172163a261eaab2da12:Language:portuguese:id=1', 'Pragma': 'no-cache', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36', } headers_login = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7', 'Cache-Control': 'max-age=0', 'Connection': 'keep-alive', 'Content-Length': '89', 'Content-Type': 'application/x-www-form-urlencoded', 'Cookie': 'Cookie=body:Language:portuguese:id=-1', 'DNT': '1', 'Host': '192.168.255.254', 'Origin': 'http://192.168.255.254', 'Referer': 'http://192.168.255.254/', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36', } with requests.Session() as s: resp = s.get('http://192.168.255.254', headers=headers) print(resp.status_code) resp = s.post('http://192.168.255.254/login.cgi', data={'UserName': 'username', 'PassWord': 'password', 'x.X_HW_Token': 'c95075d23616ccc9c149ec82c651becd'}, headers=headers_login) print(resp.status_code) print(resp.cookies) print(s.cookies) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.7.0" }, "platform": { "release": "7", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.19.1" }, "system_ssl": { "version": "1010008f" }, "urllib3": { "version": "1.23" }, "using_pyopenssl": false } ``` Thanks, JM
{ "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/4881/reactions" }
https://api.github.com/repos/psf/requests/issues/4881/timeline
null
completed
null
null
false
[ "- Are there redirects? Check `resp.history` and those responses' cookie jars.\r\n- Is the cookie header ever present in `resp.headers`?\r\n- Are you expecting the cookie header you're sending to show up in the headers on the response or session? This won't work\r\n- Have you read over the myriad of other closed is...
https://api.github.com/repos/psf/requests/issues/4880
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4880/labels{/name}
https://api.github.com/repos/psf/requests/issues/4880/comments
https://api.github.com/repos/psf/requests/issues/4880/events
https://github.com/psf/requests/issues/4880
384,521,303
MDU6SXNzdWUzODQ1MjEzMDM=
4,880
`requests.utils.guess_json_utf` breaks on Python 3
{ "avatar_url": "https://avatars.githubusercontent.com/u/8718473?v=4", "events_url": "https://api.github.com/users/annakovale/events{/privacy}", "followers_url": "https://api.github.com/users/annakovale/followers", "following_url": "https://api.github.com/users/annakovale/following{/other_user}", "gists_url": "https://api.github.com/users/annakovale/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/annakovale", "id": 8718473, "login": "annakovale", "node_id": "MDQ6VXNlcjg3MTg0NzM=", "organizations_url": "https://api.github.com/users/annakovale/orgs", "received_events_url": "https://api.github.com/users/annakovale/received_events", "repos_url": "https://api.github.com/users/annakovale/repos", "site_admin": false, "starred_url": "https://api.github.com/users/annakovale/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/annakovale/subscriptions", "type": "User", "url": "https://api.github.com/users/annakovale", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-26T21:38:13Z
2021-09-06T00:06:43Z
2018-11-26T21:48:13Z
NONE
resolved
Unable to use `Response.json()`. I notice `requests.utils.guess_json_utf` expects type str but then breaks at `sample.count(_null)`, understandably because `<str>.count(<bytes)` is not valid - [see the function here](https://github.com/requests/requests/blob/57d7284c1a245cf9fbcecb594f50471d86e879f7/requests/utils.py#L851-L886). ## Expected Result ```In [10]: from requests.models import Response In [11]: response_dict = {'foo':'bar'} In [12]: response = Response() In [13]: response.status_code = 200 In [14]: response._content = json.dumps(response_dict) In [15]: response.json() '{'foo': 'bar'}' ``` ## Actual Result ``` In [10]: from requests.models import Response In [11]: response_dict = {'foo':'bar'} In [12]: response = Response() In [13]: response.status_code = 200 In [14]: response._content = json.dumps(response_dict) In [15]: response.json() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-15-670418389d1b> in <module>() ----> 1 response.json() /data/virtualenv/py3default/lib/python3.6/site-packages/requests/models.py in json(self, **kwargs) 882 # decoding fails, fall back to `self.text` (using chardet to make 883 # a best guess). --> 884 encoding = guess_json_utf(self.content) 885 if encoding is not None: 886 try: /data/virtualenv/py3default/lib/python3.6/site-packages/requests/utils.py in guess_json_utf(data) 868 if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE): 869 return 'utf-16' # BOM included --> 870 nullcount = sample.count(_null) 871 if nullcount == 0: 872 return 'utf-8' TypeError: must be str, not bytes ``` ## Reproduction Steps Follow the steps in Actual Result ## System Information ``` (py3default) deploy@lemon:/data/shared/buffet/bokchoy/tests$ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3.1" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.6.6" }, "platform": { "release": "4.4.0-51-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010009f", "version": "18.0.0" }, "requests": { "version": "2.19.1" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.23" }, "using_pyopenssl": true } (py3default) deploy@lemon:/data/shared/buffet/bokchoy/tests$ python --version Python 3.6.6 ``` Possibly related to: https://github.com/requests/requests/issues/4879
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4880/reactions" }
https://api.github.com/repos/psf/requests/issues/4880/timeline
null
completed
null
null
false
[ "Yep, this is a dupe of #4879. We’ll track there." ]
https://api.github.com/repos/psf/requests/issues/4879
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4879/labels{/name}
https://api.github.com/repos/psf/requests/issues/4879/comments
https://api.github.com/repos/psf/requests/issues/4879/events
https://github.com/psf/requests/issues/4879
384,447,145
MDU6SXNzdWUzODQ0NDcxNDU=
4,879
cannot use json() on request in python 3.7 (TypeError: must be str, not bytes)
{ "avatar_url": "https://avatars.githubusercontent.com/u/825210?v=4", "events_url": "https://api.github.com/users/uvwild/events{/privacy}", "followers_url": "https://api.github.com/users/uvwild/followers", "following_url": "https://api.github.com/users/uvwild/following{/other_user}", "gists_url": "https://api.github.com/users/uvwild/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/uvwild", "id": 825210, "login": "uvwild", "node_id": "MDQ6VXNlcjgyNTIxMA==", "organizations_url": "https://api.github.com/users/uvwild/orgs", "received_events_url": "https://api.github.com/users/uvwild/received_events", "repos_url": "https://api.github.com/users/uvwild/repos", "site_admin": false, "starred_url": "https://api.github.com/users/uvwild/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/uvwild/subscriptions", "type": "User", "url": "https://api.github.com/users/uvwild", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2018-11-26T18:02:51Z
2021-08-30T00:06:17Z
2018-12-10T15:51:29Z
NONE
resolved
Summary. Calling this code is not working in python 3.6 on ubuntu. There is a change adding .encode('ascii') to the _null constant which causes the type error. Removing the encoding call fixes the problem! I am confused! ## Expected Result no exception ## Actual Result TypeError: must be str, not bytes ## Reproduction Steps ```python import requests jsonstr="{ 'bla' : 'blub'}" resp = requests.Response() resp._content = jsonstr resp.json() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/requests/models.py", line 880, in json encoding = guess_json_utf(self.content) File "/usr/lib/python3/dist-packages/requests/utils.py", line 798, in guess_json_utf nullcount = sample.count(_null) TypeError: must be str, not bytes ``` ## System Information $ python3 -m requests.help ``` "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.6.7" }, "platform": { "release": "4.15.0-39-lowlatency", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010007f" }, "urllib3": { "version": "1.21.1" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c). ubuntu 18.04 (ubuntustudio)
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4879/reactions" }
https://api.github.com/repos/psf/requests/issues/4879/timeline
null
completed
null
null
false
[ "OK I found the remark elsewhere to require requests.content to be bytes.\r\nI just migrated to python3 and this was a hidden magic functional change from python 2.\r\nWhen I added the byte conversion it worked.\r\n\r\nHow can we avoid such intransparent changes in the API?\r\nHow am I supposed to know this?\r\n\r\...
https://api.github.com/repos/psf/requests/issues/4878
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4878/labels{/name}
https://api.github.com/repos/psf/requests/issues/4878/comments
https://api.github.com/repos/psf/requests/issues/4878/events
https://github.com/psf/requests/issues/4878
383,192,808
MDU6SXNzdWUzODMxOTI4MDg=
4,878
Use a certificate
{ "avatar_url": "https://avatars.githubusercontent.com/u/764040?v=4", "events_url": "https://api.github.com/users/metropt/events{/privacy}", "followers_url": "https://api.github.com/users/metropt/followers", "following_url": "https://api.github.com/users/metropt/following{/other_user}", "gists_url": "https://api.github.com/users/metropt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/metropt", "id": 764040, "login": "metropt", "node_id": "MDQ6VXNlcjc2NDA0MA==", "organizations_url": "https://api.github.com/users/metropt/orgs", "received_events_url": "https://api.github.com/users/metropt/received_events", "repos_url": "https://api.github.com/users/metropt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/metropt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/metropt/subscriptions", "type": "User", "url": "https://api.github.com/users/metropt", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-11-21T16:16:24Z
2021-09-06T00:06:43Z
2018-11-22T12:41:36Z
NONE
resolved
I'm trying to use a certificate with requests. I need to use a certificate to access internal services at work. I have installed it on chrome per example to access some internal sites. With curl I can use it that way: `curl -s --cacert /home/path/certificate.crt -u USER:PASSWORD https://server:8443/teste` With requests I can't make it work. I have already read some old closed issues without success. I also created a post on stack-overflow but I couldn't understand the answers I got on comments. https://stackoverflow.com/questions/53340465/cant-use-a-crt-certificate I use the command `r = requests.get('https://server:8443/teste', auth=HTTPBasicAuth('USER', 'PASSWORD'), verify='/home/path/certificate.crt')` with result: `requests.exceptions.SSLError: HTTPSConnectionPool(host='server', port=8443): Max retries exceeded with url: /teste (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),))` Thank you
{ "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/4878/reactions" }
https://api.github.com/repos/psf/requests/issues/4878/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "Hi, thank you. I tried to get help there without s...
https://api.github.com/repos/psf/requests/issues/4877
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4877/labels{/name}
https://api.github.com/repos/psf/requests/issues/4877/comments
https://api.github.com/repos/psf/requests/issues/4877/events
https://github.com/psf/requests/issues/4877
382,676,665
MDU6SXNzdWUzODI2NzY2NjU=
4,877
Make a seperate repo for requests3.
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "color": "fef2c0", "default": false, "description": null, "id": 298537994, "name": "Needs More Information", "node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=", "url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information" }, { "color": "1cff91", "default": false,...
closed
true
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}...
null
6
2018-11-20T14:01:36Z
2021-02-20T14:42:15Z
2019-04-27T11:38:30Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 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/4877/reactions" }
https://api.github.com/repos/psf/requests/issues/4877/timeline
null
completed
null
null
false
[ "Why?", "Indeed, why? I thought it would be easier to keep things in a single place (at least from a user PoV).", "Is it https://github.com/kennethreitz/requests3?", "it is indeed! It's a different namespace, and a different package.", "https://github.com/kennethreitz/requests3", "It would be better to cr...
https://api.github.com/repos/psf/requests/issues/4876
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4876/labels{/name}
https://api.github.com/repos/psf/requests/issues/4876/comments
https://api.github.com/repos/psf/requests/issues/4876/events
https://github.com/psf/requests/issues/4876
381,779,381
MDU6SXNzdWUzODE3NzkzODE=
4,876
chunk_size=None does not work as expected when streaming a response
{ "avatar_url": "https://avatars.githubusercontent.com/u/2375201?v=4", "events_url": "https://api.github.com/users/hiranya911/events{/privacy}", "followers_url": "https://api.github.com/users/hiranya911/followers", "following_url": "https://api.github.com/users/hiranya911/following{/other_user}", "gists_url": "https://api.github.com/users/hiranya911/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hiranya911", "id": 2375201, "login": "hiranya911", "node_id": "MDQ6VXNlcjIzNzUyMDE=", "organizations_url": "https://api.github.com/users/hiranya911/orgs", "received_events_url": "https://api.github.com/users/hiranya911/received_events", "repos_url": "https://api.github.com/users/hiranya911/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hiranya911/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hiranya911/subscriptions", "type": "User", "url": "https://api.github.com/users/hiranya911", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-11-16T22:14:17Z
2021-08-31T00:06:48Z
2018-12-30T23:50:30Z
NONE
resolved
Summary. I have the following code to stream an SSE response. ``` resp = session.get(self.url, stream=True) resp_iterator = resp.iter_content(decode_unicode=True, chunk_size=None) while _some_condition(): nextchar = next(resp_iterator) _add_to_buffer(nextchar) ``` ## Expected Result According to the [documentation](http://docs.python-requests.org/en/master/api/#requests.Response.iter_content), when chunk_size is None, it should stream the content as it is received. ## Actual Result No content is received by the consumer. It simply hangs. If I simply remove the chunk_size argument, I can see the consumer receiving 1 byte at a time. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "2.7.13" }, "platform": { "release": "4.17.0-3rodete2-amd64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "1010008f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4876/reactions" }
https://api.github.com/repos/psf/requests/issues/4876/timeline
null
completed
null
null
false
[ "I suspect that this is an issue with urllib3's stream method that wasn't caught when it was changed.\r\n\r\nhttps://github.com/requests/requests/blob/57d7284c1a245cf9fbcecb594f50471d86e879f7/requests/models.py#L750", "The two modes within `HTTPResponse.stream()` (being `HTTPResponse.read()` and `HTTPResponse.rea...
https://api.github.com/repos/psf/requests/issues/4875
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4875/labels{/name}
https://api.github.com/repos/psf/requests/issues/4875/comments
https://api.github.com/repos/psf/requests/issues/4875/events
https://github.com/psf/requests/issues/4875
381,273,610
MDU6SXNzdWUzODEyNzM2MTA=
4,875
Cryptiles dependency vulnerability: Update to >4.1.2
{ "avatar_url": "https://avatars.githubusercontent.com/u/21318528?v=4", "events_url": "https://api.github.com/users/carlosscastro/events{/privacy}", "followers_url": "https://api.github.com/users/carlosscastro/followers", "following_url": "https://api.github.com/users/carlosscastro/following{/other_user}", "gists_url": "https://api.github.com/users/carlosscastro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/carlosscastro", "id": 21318528, "login": "carlosscastro", "node_id": "MDQ6VXNlcjIxMzE4NTI4", "organizations_url": "https://api.github.com/users/carlosscastro/orgs", "received_events_url": "https://api.github.com/users/carlosscastro/received_events", "repos_url": "https://api.github.com/users/carlosscastro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/carlosscastro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/carlosscastro/subscriptions", "type": "User", "url": "https://api.github.com/users/carlosscastro", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-11-15T17:52:12Z
2021-09-06T00:06:44Z
2018-11-15T18:41:17Z
NONE
resolved
Hello! In some of the Microsoft Bot Framework repos have a dependency on request which has an indirect dependency on Cryptiles. We are getting a warning from a security vulnerability that would be solved upgrading cryptyles to >4.1.2. It seems like it is an indirect dependency of yours. Any idea how I can fix this vulnerability or plans to somehow upgrade cryptiles dependency? Thanks!
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4875/reactions" }
https://api.github.com/repos/psf/requests/issues/4875/timeline
null
completed
null
null
false
[ "Hi @carlosscastro, we shouldn’t have any dependencies on that package. Can you tell us how you determined this was tied back to Requests?", "I took a look and that is a JavaScript package. Requests only contains python code, so I think this may be filed in the wrong repository. Perhaps you were looking for the r...
https://api.github.com/repos/psf/requests/issues/4874
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4874/labels{/name}
https://api.github.com/repos/psf/requests/issues/4874/comments
https://api.github.com/repos/psf/requests/issues/4874/events
https://github.com/psf/requests/pull/4874
380,750,779
MDExOlB1bGxSZXF1ZXN0MjMwODc2Mjc5
4,874
Add build badge for Azure Pipelines
{ "avatar_url": "https://avatars.githubusercontent.com/u/20052233?v=4", "events_url": "https://api.github.com/users/kaylangan/events{/privacy}", "followers_url": "https://api.github.com/users/kaylangan/followers", "following_url": "https://api.github.com/users/kaylangan/following{/other_user}", "gists_url": "https://api.github.com/users/kaylangan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kaylangan", "id": 20052233, "login": "kaylangan", "node_id": "MDQ6VXNlcjIwMDUyMjMz", "organizations_url": "https://api.github.com/users/kaylangan/orgs", "received_events_url": "https://api.github.com/users/kaylangan/received_events", "repos_url": "https://api.github.com/users/kaylangan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kaylangan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kaylangan/subscriptions", "type": "User", "url": "https://api.github.com/users/kaylangan", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2018-11-14T15:27:39Z
2021-09-01T00:11:45Z
2018-11-14T15:33:07Z
CONTRIBUTOR
resolved
Not sure if you want to add a build badge since you didn't have one before. But if you do, here's yours for Azure Pipelines.
{ "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/4874/reactions" }
https://api.github.com/repos/psf/requests/issues/4874/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4874.diff", "html_url": "https://github.com/psf/requests/pull/4874", "merged_at": "2018-11-14T15:33:07Z", "patch_url": "https://github.com/psf/requests/pull/4874.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4874" }
true
[]
https://api.github.com/repos/psf/requests/issues/4873
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4873/labels{/name}
https://api.github.com/repos/psf/requests/issues/4873/comments
https://api.github.com/repos/psf/requests/issues/4873/events
https://github.com/psf/requests/issues/4873
380,460,732
MDU6SXNzdWUzODA0NjA3MzI=
4,873
SSLError(SSLError(0, 'unknown error (_ssl.c:3517)
{ "avatar_url": "https://avatars.githubusercontent.com/u/34018539?v=4", "events_url": "https://api.github.com/users/JeetBhattachariya/events{/privacy}", "followers_url": "https://api.github.com/users/JeetBhattachariya/followers", "following_url": "https://api.github.com/users/JeetBhattachariya/following{/other_user}", "gists_url": "https://api.github.com/users/JeetBhattachariya/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JeetBhattachariya", "id": 34018539, "login": "JeetBhattachariya", "node_id": "MDQ6VXNlcjM0MDE4NTM5", "organizations_url": "https://api.github.com/users/JeetBhattachariya/orgs", "received_events_url": "https://api.github.com/users/JeetBhattachariya/received_events", "repos_url": "https://api.github.com/users/JeetBhattachariya/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JeetBhattachariya/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JeetBhattachariya/subscriptions", "type": "User", "url": "https://api.github.com/users/JeetBhattachariya", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-13T22:54:37Z
2021-09-06T00:06:37Z
2018-12-31T00:00:58Z
NONE
resolved
I am trying to invoke a api which is sitting in a load balancer server. The server uses certificate chain which i downloaded from browser in .p7b file and passing in my code `r=request.get(uri,headers=header,verify='certificate.p7b').` Even I tried generating .pem file through openssl commands, but it didn't work. I also tried using "verify=False" sttement. But getting the same error: Please help.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4873/reactions" }
https://api.github.com/repos/psf/requests/issues/4873/timeline
null
completed
null
null
false
[ "Hi @JeetBhattachariya, this is an exception in _ssl.c on line 3517. That's code within CPython, so without an exact version of your interpreter and likely a dummy cert that we can reproduce this with, it's going to be very difficult to debug.\r\n\r\nWe can take a closer look if you can provide all of the informati...
https://api.github.com/repos/psf/requests/issues/4872
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4872/labels{/name}
https://api.github.com/repos/psf/requests/issues/4872/comments
https://api.github.com/repos/psf/requests/issues/4872/events
https://github.com/psf/requests/issues/4872
380,394,221
MDU6SXNzdWUzODAzOTQyMjE=
4,872
Connect and Trace methods not supported
{ "avatar_url": "https://avatars.githubusercontent.com/u/12761574?v=4", "events_url": "https://api.github.com/users/javixeneize/events{/privacy}", "followers_url": "https://api.github.com/users/javixeneize/followers", "following_url": "https://api.github.com/users/javixeneize/following{/other_user}", "gists_url": "https://api.github.com/users/javixeneize/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/javixeneize", "id": 12761574, "login": "javixeneize", "node_id": "MDQ6VXNlcjEyNzYxNTc0", "organizations_url": "https://api.github.com/users/javixeneize/orgs", "received_events_url": "https://api.github.com/users/javixeneize/received_events", "repos_url": "https://api.github.com/users/javixeneize/repos", "site_admin": false, "starred_url": "https://api.github.com/users/javixeneize/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/javixeneize/subscriptions", "type": "User", "url": "https://api.github.com/users/javixeneize", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-13T19:49:15Z
2021-09-05T00:06:59Z
2019-02-14T15:02:19Z
NONE
resolved
Hi There are some http methods, as connect and trace, that apparently are not supported by request library. Is there any way of sending a request using those methods with requests library? Thanks
{ "avatar_url": "https://avatars.githubusercontent.com/u/6740665?v=4", "events_url": "https://api.github.com/users/lmiguelvargasf/events{/privacy}", "followers_url": "https://api.github.com/users/lmiguelvargasf/followers", "following_url": "https://api.github.com/users/lmiguelvargasf/following{/other_user}", "gists_url": "https://api.github.com/users/lmiguelvargasf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lmiguelvargasf", "id": 6740665, "login": "lmiguelvargasf", "node_id": "MDQ6VXNlcjY3NDA2NjU=", "organizations_url": "https://api.github.com/users/lmiguelvargasf/orgs", "received_events_url": "https://api.github.com/users/lmiguelvargasf/received_events", "repos_url": "https://api.github.com/users/lmiguelvargasf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lmiguelvargasf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lmiguelvargasf/subscriptions", "type": "User", "url": "https://api.github.com/users/lmiguelvargasf", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4872/reactions" }
https://api.github.com/repos/psf/requests/issues/4872/timeline
null
completed
null
null
false
[ "Closed since it is seems not relevant." ]
https://api.github.com/repos/psf/requests/issues/4871
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4871/labels{/name}
https://api.github.com/repos/psf/requests/issues/4871/comments
https://api.github.com/repos/psf/requests/issues/4871/events
https://github.com/psf/requests/issues/4871
380,254,230
MDU6SXNzdWUzODAyNTQyMzA=
4,871
respect no_proxy environment variable and proxies['no'] parameter
{ "avatar_url": "https://avatars.githubusercontent.com/u/12958815?v=4", "events_url": "https://api.github.com/users/milahu/events{/privacy}", "followers_url": "https://api.github.com/users/milahu/followers", "following_url": "https://api.github.com/users/milahu/following{/other_user}", "gists_url": "https://api.github.com/users/milahu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/milahu", "id": 12958815, "login": "milahu", "node_id": "MDQ6VXNlcjEyOTU4ODE1", "organizations_url": "https://api.github.com/users/milahu/orgs", "received_events_url": "https://api.github.com/users/milahu/received_events", "repos_url": "https://api.github.com/users/milahu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/milahu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/milahu/subscriptions", "type": "User", "url": "https://api.github.com/users/milahu", "user_view_type": "public" }
[]
open
false
null
[]
null
13
2018-11-13T14:33:10Z
2024-02-23T11:46:37Z
null
NONE
null
make requests respect no_proxy settings bugfix attached ## Expected Result http requests to 'white listed urls' should bypass all proxies white listed urls, as defined in the no_proxy env var ## Actual Result proxies are not bypassed the sample script will raise requests.exceptions.ConnectionError: SOCKSHTTPConnectionPool ....: Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.contrib.socks.SOCKSConnection object at ....>: Failed to establish a new connection: 0x01: General SOCKS server failure',)) ## Reproduction Steps use case: torify python requests, but also allow requests to localhost etc. <details> <summary>sample script</summary> ```python #!/usr/bin/python2 # license = public domain import os import random import time import requests import BaseHTTPServer import thread import bs4 tor_host = '127.0.0.1' #tor_port = 9050 # system-wide tor tor_port = 9150 # torbrowser tor # do not use tor to connect to local or private hosts # see https://en.wikipedia.org/wiki/Reserved_IP_addresses no_proxy_list = [ # hostnames are not resolved locally with socks5h proxy 'localhost', 'localhost.localdomain', # IPv4 '127.0.0.0/8', # localhost # subnets '169.254.0.0/16', '255.255.255.255', # LAN aka private networks '10.0.0.0/8', '100.64.0.0/10', '172.16.0.0/12', '192.0.0.0/24', '192.168.0.0/16', '198.18.0.0/15', # IPv6 '::1/128', # localhost 'fc00::/7', # LAN 'fe80::/10', # link-local ] # variant 1 os.environ['no_proxy'] = ','.join(no_proxy_list) def get_tor_session(tor_host='127.0.0.1', tor_port=9050, torbrowser_headers=[], no_proxy_list=[]): session = requests.session() # variant 1 session.trust_env = True #session.trust_env = False # ignore environment variables # socks5h scheme = remote DNS = no DNS leaks p = 'socks5h://{0}:{1}'.format(tor_host, tor_port) session.proxies = { 'http' : p, 'https': p, # variant 2 'no': ','.join(no_proxy_list) } if torbrowser_headers == []: print('warning. got no torbrowser_headers') # at least imitate torbrowser from year 2018 torbrowser_headers = [ ('accept-language', 'en-US,en;q=0.5'), ('accept', 'text/html,application/xhtml+xml,' \ + 'application/xml;q=0.9,*/*;q=0.8'), ('user-agent', 'Mozilla/5.0 (Windows NT 6.1; rv:60.0) ' \ + 'Gecko/20100101 Firefox/60.0'), ('upgrade-insecure-requests', '1'), ] for k, v in torbrowser_headers: # header 'host' is dynamic # header 'connection' = 'keep-alive' is set internally if k not in ['host', 'connection']: session.headers[k] = v return session tor = get_tor_session(tor_host, tor_port, [], no_proxy_list) test_host = '127.0.0.1' test_port = random.randint(8000, 16000) test_url = 'http://{0}:{1}/'.format(test_host, test_port) def test_tor_get(test_url): time.sleep(2) # wait for http server to start tor.get(test_url) thread.start_new_thread(test_tor_get, (test_url,)) test_headers = [] # global class test_handler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): # handle GET request global test_headers test_headers = self.headers.items() self.send_response(204, 'No Content') self.end_headers() serv = BaseHTTPServer.HTTPServer((test_host, test_port), test_handler) serv.handle_request() # handle one request del serv print('tor.get headers') for k, v in test_headers: print('header %s: %s' % (k, v)) #print('tor ip '+tor.get("http://httpbin.org/ip").text) print('tor check ' + \ bs4.BeautifulSoup( tor.get("https://check.torproject.org/").text, 'html.parser' ).title.string.strip()) ``` </details> ## System Information * python2 * current git-version of requests ## ~~Bugfix~~ Quickfix the bug is in sessions.py proxies = merge_setting(proxies, self.proxies) where [request_]proxies was set to {} by utils.get_environ_proxies * but proxies is set to session_proxies \* with os.environ['no_proxy'] = '127.0.0.1' this bugfix will respect both * no_proxy environment variable aka os.environ['no_proxy'] * proxies['no'] parameter for requests.get and requests.session <details> <summary>patch</summary> ```diff --- a/utils.py +++ b/utils.py @@ -757,7 +757,7 @@ :rtype: dict """ if should_bypass_proxies(url, no_proxy=no_proxy): - return {} + return {'__bypass_proxies': True} else: return getproxies() --- a/sessions.py +++ b/sessions.py @@ -698,8 +698,15 @@ verify = (os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE')) + if 'no' in self.proxies: + if should_bypass_proxies(url, no_proxy=self.proxies['no']): + proxies = {'__bypass_proxies': True} + # Merge all the kwargs. - proxies = merge_setting(proxies, self.proxies) + if '__bypass_proxies' in proxies: + proxies = {} # bypass proxies for this request + else: + proxies = merge_setting(proxies, self.proxies) stream = merge_setting(stream, self.stream) verify = merge_setting(verify, self.verify) cert = merge_setting(cert, self.cert) ``` </details>
null
{ "+1": 14, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 14, "url": "https://api.github.com/repos/psf/requests/issues/4871/reactions" }
https://api.github.com/repos/psf/requests/issues/4871/timeline
null
null
null
null
false
[ "no interest in fixing this bug?\r\n", "heloo?\r\n", "Any update on this topic?", "I am unsure how contributing to Python has changed over the years, but there is an issue for this matter documented here from 2017:\r\nhttps://bugs.python.org/issue29142", "*Note: I've stumbled upon this issue as part of debu...
https://api.github.com/repos/psf/requests/issues/4870
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4870/labels{/name}
https://api.github.com/repos/psf/requests/issues/4870/comments
https://api.github.com/repos/psf/requests/issues/4870/events
https://github.com/psf/requests/pull/4870
380,202,451
MDExOlB1bGxSZXF1ZXN0MjMwNDU3MTU5
4,870
Delete appveyor.yml
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2018-11-13T12:27:45Z
2021-09-01T00:11:43Z
2018-11-13T12:51:26Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4870/reactions" }
https://api.github.com/repos/psf/requests/issues/4870/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4870.diff", "html_url": "https://github.com/psf/requests/pull/4870", "merged_at": "2018-11-13T12:51:25Z", "patch_url": "https://github.com/psf/requests/pull/4870.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4870" }
true
[]
https://api.github.com/repos/psf/requests/issues/4869
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4869/labels{/name}
https://api.github.com/repos/psf/requests/issues/4869/comments
https://api.github.com/repos/psf/requests/issues/4869/events
https://github.com/psf/requests/pull/4869
379,919,635
MDExOlB1bGxSZXF1ZXN0MjMwMjQzMTg1
4,869
Set up CI with Azure Pipelines
{ "avatar_url": "https://avatars.githubusercontent.com/u/20052233?v=4", "events_url": "https://api.github.com/users/kaylangan/events{/privacy}", "followers_url": "https://api.github.com/users/kaylangan/followers", "following_url": "https://api.github.com/users/kaylangan/following{/other_user}", "gists_url": "https://api.github.com/users/kaylangan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kaylangan", "id": 20052233, "login": "kaylangan", "node_id": "MDQ6VXNlcjIwMDUyMjMz", "organizations_url": "https://api.github.com/users/kaylangan/orgs", "received_events_url": "https://api.github.com/users/kaylangan/received_events", "repos_url": "https://api.github.com/users/kaylangan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kaylangan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kaylangan/subscriptions", "type": "User", "url": "https://api.github.com/users/kaylangan", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2018-11-12T19:27:56Z
2021-09-01T00:11:44Z
2018-11-13T12:11:50Z
CONTRIBUTOR
resolved
Currently, CI and PR validation are run on AppVeyor and Travis using pretty different configurations. This PR shows how [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) could be used to unify the pipeline configuration and run CI and PR checks more quickly. Azure Pipelines offers unlimited minutes with 10 parallel jobs. The first commit attempts to match the AppVeyor and Travis builds apples to apples. You can see in the [build results](https://dev.azure.com/kaylangan-github/kangantest-requests/_build/results?buildId=229&view=logs) that Azure Pipelines typically runs the Linux jobs in <2 minutes and the Windows jobs in ~5 minutes. The Linux jobs are slightly faster than on Travis; the Windows jobs, though individually slower than on AppVeyor, are faster because of the additional parallelism. The second commit unifies the build using a single configuration. CI is run only on Linux and coverage only on Windows. Here's an example of the [build results](https://dev.azure.com/kaylangan-github/kangantest-requests/_build/results?buildId=245&view=logs). I also hooked up test reporting for the Linux builds which you can see [here](https://dev.azure.com/kaylangan-github/kangantest-requests/_build/results?buildId=245&view=ms.vss-test-web.test-result-details): ![image](https://user-images.githubusercontent.com/20052233/48370045-25dc4980-e686-11e8-9d05-ec50571a5d75.png) I was a little concerned that the Windows builds appear to fail intermittently, but I noticed that AppVeyor seems to have the same flakiness? Would you consider trying out Azure Pipelines and adding it as additional validation for PR/CI? Disclaimer: I'm a Program Manager on Azure Pipelines.
{ "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/4869/reactions" }
https://api.github.com/repos/psf/requests/issues/4869/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4869.diff", "html_url": "https://github.com/psf/requests/pull/4869", "merged_at": "2018-11-13T12:11:50Z", "patch_url": "https://github.com/psf/requests/pull/4869.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4869" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4869?src=pr&el=h1) Report\n> Merging [#4869](https://codecov.io/gh/requests/requests/pull/4869?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/bedd9284c9646e50c10b3defdf519d4ba479e2c7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4868
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4868/labels{/name}
https://api.github.com/repos/psf/requests/issues/4868/comments
https://api.github.com/repos/psf/requests/issues/4868/events
https://github.com/psf/requests/pull/4868
379,557,508
MDExOlB1bGxSZXF1ZXN0MjI5OTc0NDUz
4,868
Add Python 3.7 to tox test matrix
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-11T20:02:36Z
2021-09-01T00:11:47Z
2018-11-13T12:51:37Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4868/reactions" }
https://api.github.com/repos/psf/requests/issues/4868/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4868.diff", "html_url": "https://github.com/psf/requests/pull/4868", "merged_at": "2018-11-13T12:51:37Z", "patch_url": "https://github.com/psf/requests/pull/4868.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4868" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4868?src=pr&el=h1) Report\n> Merging [#4868](https://codecov.io/gh/requests/requests/pull/4868?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/bedd9284c9646e50c10b3defdf519d4ba479e2c7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4867
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4867/labels{/name}
https://api.github.com/repos/psf/requests/issues/4867/comments
https://api.github.com/repos/psf/requests/issues/4867/events
https://github.com/psf/requests/pull/4867
379,556,883
MDExOlB1bGxSZXF1ZXN0MjI5OTc0MDQ3
4,867
Simplify tox.ini
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-11T19:55:31Z
2021-09-01T00:11:47Z
2018-11-13T12:52:07Z
CONTRIBUTOR
resolved
Tox installs the package to the virtualenv by default. PySocks is already included in test_requirements. Don't need to install these explicitly.
{ "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/4867/reactions" }
https://api.github.com/repos/psf/requests/issues/4867/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4867.diff", "html_url": "https://github.com/psf/requests/pull/4867", "merged_at": "2018-11-13T12:52:07Z", "patch_url": "https://github.com/psf/requests/pull/4867.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4867" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4867?src=pr&el=h1) Report\n> Merging [#4867](https://codecov.io/gh/requests/requests/pull/4867?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/bedd9284c9646e50c10b3defdf519d4ba479e2c7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4866
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4866/labels{/name}
https://api.github.com/repos/psf/requests/issues/4866/comments
https://api.github.com/repos/psf/requests/issues/4866/events
https://github.com/psf/requests/issues/4866
379,199,811
MDU6SXNzdWUzNzkxOTk4MTE=
4,866
Unexpected exception: InvalidURL: No host specified.
{ "avatar_url": "https://avatars.githubusercontent.com/u/193463?v=4", "events_url": "https://api.github.com/users/stratosgear/events{/privacy}", "followers_url": "https://api.github.com/users/stratosgear/followers", "following_url": "https://api.github.com/users/stratosgear/following{/other_user}", "gists_url": "https://api.github.com/users/stratosgear/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stratosgear", "id": 193463, "login": "stratosgear", "node_id": "MDQ6VXNlcjE5MzQ2Mw==", "organizations_url": "https://api.github.com/users/stratosgear/orgs", "received_events_url": "https://api.github.com/users/stratosgear/received_events", "repos_url": "https://api.github.com/users/stratosgear/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stratosgear/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stratosgear/subscriptions", "type": "User", "url": "https://api.github.com/users/stratosgear", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2018-11-09T15:11:45Z
2021-09-06T00:06:44Z
2018-11-12T14:29:28Z
NONE
resolved
I have some legacy code that calls requests like this: ``` response = requests.get(file_resource['url'], stream=True) ``` Through debug statements right before that statement I see that the passed url is like: ``` http://xxxxxx.xxxx.xxx.int/xxx-sl-int/data-action?ProductType=MAP&MAP.MAP_OID=12655 ``` That url, btw, correctly resolves into a 200MB file, in the browser or through a curl/wget download. ## Expected Result I'd expect my file to be downloaded (when I later try to: ``` for block in response.iter_content(100 * 1024): handle.write(block) ``` ## Actual Result I get the following stack trace: ``` Failed with: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/rq/worker.py", line 710, in perform_job rv = job.perform() File "/usr/local/lib/python2.7/dist-packages/rq/job.py", line 560, in perform self._result = self._execute() File "/usr/local/lib/python2.7/dist-packages/rq/job.py", line 566, in _execute return self.func(*self.args, **self.kwargs) File "/plaavi/components/file_cache/worker.py", line 1131, in download return worker.download(fileResource) File "/plaavi/components/file_cache/worker.py", line 112, in download response = requests.get(file_resource['url'], stream=True) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 668, in send history = [resp for resp in gen] if allow_redirects else [] File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 247, in resolve_redirects **adapter_kwargs File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 414, in send raise InvalidURL(e, request=request) InvalidURL: No host specified. ``` ## Reproduction Steps ```python >>> import requests >>> response = requests.get("http://xxxxxx.xxxx.xxx.int/xxx-sl-int/data-action?ProductType=MAP&MAP.MAP_OID=12655", stream=True) >>> response <Response [200]> ``` Apparently trying the request from the same-ish machine that cause the exception, is working. What is different in the actual exception case, is that the request to download happens inside an RQ (http://python-rq.org/) worker running inside a docker container, that I do not know how to further debug. Mind you that kind of download infrastructure, was working correctly the last two years and only now it starts to have these downloading issues. ## System Information The docker container is setup like this: $ python -m requests.help ``` root@9dd4bc57a320:/tmp# python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.2.1" }, "idna": { "version": "" }, "implementation": { "name": "CPython", "version": "2.7.6" }, "platform": { "release": "3.10.0-862.11.6.el7.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "18.0.0" }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "1000106f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c). Thanks!
{ "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/4866/reactions" }
https://api.github.com/repos/psf/requests/issues/4866/timeline
null
completed
null
null
false
[ "I double checked all the python requirements and the only outdated, from the ones mentioned above, is the `cryptography` one from 2.2.1 to 2.3.1.\r\n\r\nI will try to upgrade that one, and report if it makes any difference.", "OK, that didn't help, although upgrading `cryptography` now leads to:\r\n\r\n```\r\nro...
https://api.github.com/repos/psf/requests/issues/4865
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4865/labels{/name}
https://api.github.com/repos/psf/requests/issues/4865/comments
https://api.github.com/repos/psf/requests/issues/4865/events
https://github.com/psf/requests/pull/4865
379,137,121
MDExOlB1bGxSZXF1ZXN0MjI5Njc0Mzgy
4,865
Changes to improve intelligibility
{ "avatar_url": "https://avatars.githubusercontent.com/u/40767897?v=4", "events_url": "https://api.github.com/users/spitGlued/events{/privacy}", "followers_url": "https://api.github.com/users/spitGlued/followers", "following_url": "https://api.github.com/users/spitGlued/following{/other_user}", "gists_url": "https://api.github.com/users/spitGlued/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/spitGlued", "id": 40767897, "login": "spitGlued", "node_id": "MDQ6VXNlcjQwNzY3ODk3", "organizations_url": "https://api.github.com/users/spitGlued/orgs", "received_events_url": "https://api.github.com/users/spitGlued/received_events", "repos_url": "https://api.github.com/users/spitGlued/repos", "site_admin": false, "starred_url": "https://api.github.com/users/spitGlued/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/spitGlued/subscriptions", "type": "User", "url": "https://api.github.com/users/spitGlued", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-09T12:06:49Z
2021-09-01T00:11:46Z
2018-11-13T12:52:27Z
NONE
resolved
I believe that it was not cleat, what the modified snippet referred to
{ "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/4865/reactions" }
https://api.github.com/repos/psf/requests/issues/4865/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4865.diff", "html_url": "https://github.com/psf/requests/pull/4865", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4865.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4865" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4865?src=pr&el=h1) Report\n> Merging [#4865](https://codecov.io/gh/requests/requests/pull/4865?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/6cfbe1aedd56f8c2f9ff8b968efe65b22669795b?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4864
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4864/labels{/name}
https://api.github.com/repos/psf/requests/issues/4864/comments
https://api.github.com/repos/psf/requests/issues/4864/events
https://github.com/psf/requests/issues/4864
378,721,446
MDU6SXNzdWUzNzg3MjE0NDY=
4,864
why use Session post a data contain a empty tuple,the status_code always 400
{ "avatar_url": "https://avatars.githubusercontent.com/u/14889037?v=4", "events_url": "https://api.github.com/users/yanchunhuo/events{/privacy}", "followers_url": "https://api.github.com/users/yanchunhuo/followers", "following_url": "https://api.github.com/users/yanchunhuo/following{/other_user}", "gists_url": "https://api.github.com/users/yanchunhuo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yanchunhuo", "id": 14889037, "login": "yanchunhuo", "node_id": "MDQ6VXNlcjE0ODg5MDM3", "organizations_url": "https://api.github.com/users/yanchunhuo/orgs", "received_events_url": "https://api.github.com/users/yanchunhuo/received_events", "repos_url": "https://api.github.com/users/yanchunhuo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yanchunhuo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yanchunhuo/subscriptions", "type": "User", "url": "https://api.github.com/users/yanchunhuo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-08T13:01:25Z
2021-09-06T00:06:45Z
2018-11-08T13:58:06Z
NONE
resolved
Summary. why use Session post a data contain a empty tuple,the status_code always 400 ## Expected Result 200 200 ## Actual Result 200 400 What happened instead. ## Reproduction Steps ```python #-*- coding:utf8 -*- import requests if __name__=='__main__': session = requests.session() params={} a=() params.update({'id':a}) httpresult = session.get('http://www.baidu.com/',data=params) print httpresult.status_code httpresult = session.get('http://www.baidu.com/') print httpresult.status_code ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.12" }, "platform": { "release": "4.15.0-29-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.20.0" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "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/4864/reactions" }
https://api.github.com/repos/psf/requests/issues/4864/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here." ]
https://api.github.com/repos/psf/requests/issues/4863
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4863/labels{/name}
https://api.github.com/repos/psf/requests/issues/4863/comments
https://api.github.com/repos/psf/requests/issues/4863/events
https://github.com/psf/requests/pull/4863
378,580,843
MDExOlB1bGxSZXF1ZXN0MjI5MjUxNTEy
4,863
Redirect double encoding
{ "avatar_url": "https://avatars.githubusercontent.com/u/2091481?v=4", "events_url": "https://api.github.com/users/behanna/events{/privacy}", "followers_url": "https://api.github.com/users/behanna/followers", "following_url": "https://api.github.com/users/behanna/following{/other_user}", "gists_url": "https://api.github.com/users/behanna/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/behanna", "id": 2091481, "login": "behanna", "node_id": "MDQ6VXNlcjIwOTE0ODE=", "organizations_url": "https://api.github.com/users/behanna/orgs", "received_events_url": "https://api.github.com/users/behanna/received_events", "repos_url": "https://api.github.com/users/behanna/repos", "site_admin": false, "starred_url": "https://api.github.com/users/behanna/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/behanna/subscriptions", "type": "User", "url": "https://api.github.com/users/behanna", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-11-08T05:06:11Z
2021-09-01T00:11:48Z
2018-11-08T17:27:52Z
NONE
resolved
This change makes requests more tolerant of a misconfigured Apache server that escapes percent signs in its redirects. The change includes tests that fail without the change and pass with the change.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4863/reactions" }
https://api.github.com/repos/psf/requests/issues/4863/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4863.diff", "html_url": "https://github.com/psf/requests/pull/4863", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4863.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4863" }
true
[ "Hi @behanna, thanks for putting the time and effort into creating this patch! While we want Requests to be tolerant of common server misbehaviors, this seems be a pretty niche case. We provide the option in Requests to disable redirects with the `allow_redirects` flag for cases when users need to handle special re...