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/5497
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5497/labels{/name}
https://api.github.com/repos/psf/requests/issues/5497/comments
https://api.github.com/repos/psf/requests/issues/5497/events
https://github.com/psf/requests/pull/5497
639,576,052
MDExOlB1bGxSZXF1ZXN0NDM1MTQwNjkz
5,497
Call url.lower() once inside get_adapter
{ "avatar_url": "https://avatars.githubusercontent.com/u/1684354?v=4", "events_url": "https://api.github.com/users/dbaxa/events{/privacy}", "followers_url": "https://api.github.com/users/dbaxa/followers", "following_url": "https://api.github.com/users/dbaxa/following{/other_user}", "gists_url": "https://api.github.com/users/dbaxa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dbaxa", "id": 1684354, "login": "dbaxa", "node_id": "MDQ6VXNlcjE2ODQzNTQ=", "organizations_url": "https://api.github.com/users/dbaxa/orgs", "received_events_url": "https://api.github.com/users/dbaxa/received_events", "repos_url": "https://api.github.com/users/dbaxa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dbaxa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dbaxa/subscriptions", "type": "User", "url": "https://api.github.com/users/dbaxa", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-16T11:05:54Z
2021-09-09T05:36:16Z
2020-06-16T20:16:41Z
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/5497/reactions" }
https://api.github.com/repos/psf/requests/issues/5497/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5497.diff", "html_url": "https://github.com/psf/requests/pull/5497", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5497.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5497" }
true
[ "Hi @dbaxa,\r\n\r\nedit: Redacting my first statement, I read over the PR too quickly. I think this is a semi-reasonable optimization, but it's probably not entirely necessary given the number of adapters typically loaded. Given this isn't a high touch point, I'm not sure it's necessary right now. Thanks for the su...
https://api.github.com/repos/psf/requests/issues/5496
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5496/labels{/name}
https://api.github.com/repos/psf/requests/issues/5496/comments
https://api.github.com/repos/psf/requests/issues/5496/events
https://github.com/psf/requests/pull/5496
639,569,876
MDExOlB1bGxSZXF1ZXN0NDM1MTM1NDUz
5,496
Avoid an unnecessary computation of the length of data for non-stream requests (which determine content-length based upon body content).
{ "avatar_url": "https://avatars.githubusercontent.com/u/1684354?v=4", "events_url": "https://api.github.com/users/dbaxa/events{/privacy}", "followers_url": "https://api.github.com/users/dbaxa/followers", "following_url": "https://api.github.com/users/dbaxa/following{/other_user}", "gists_url": "https://api.github.com/users/dbaxa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dbaxa", "id": 1684354, "login": "dbaxa", "node_id": "MDQ6VXNlcjE2ODQzNTQ=", "organizations_url": "https://api.github.com/users/dbaxa/orgs", "received_events_url": "https://api.github.com/users/dbaxa/received_events", "repos_url": "https://api.github.com/users/dbaxa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dbaxa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dbaxa/subscriptions", "type": "User", "url": "https://api.github.com/users/dbaxa", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-06-16T10:55:28Z
2021-08-28T00:06:28Z
2020-06-17T15:21:38Z
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/5496/reactions" }
https://api.github.com/repos/psf/requests/issues/5496/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5496.diff", "html_url": "https://github.com/psf/requests/pull/5496", "merged_at": "2020-06-17T15:21:38Z", "patch_url": "https://github.com/psf/requests/pull/5496.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5496" }
true
[ "@nateprewitt when profiling requests, it resulted in a reduction in execution time & it makes more sense to me.", "@dbaxa the net gain of the change is pretty minor and we're just swapping memory usage for speed. Since it's not really part of what the PR was raised for let's consolidate this to just the super_le...
https://api.github.com/repos/psf/requests/issues/5495
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5495/labels{/name}
https://api.github.com/repos/psf/requests/issues/5495/comments
https://api.github.com/repos/psf/requests/issues/5495/events
https://github.com/psf/requests/pull/5495
639,013,166
MDExOlB1bGxSZXF1ZXN0NDM0NjcwODg2
5,495
Update number of dependents on requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/13381361?v=4", "events_url": "https://api.github.com/users/bharatr21/events{/privacy}", "followers_url": "https://api.github.com/users/bharatr21/followers", "following_url": "https://api.github.com/users/bharatr21/following{/other_user}", "gists_url": "https://api.github.com/users/bharatr21/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bharatr21", "id": 13381361, "login": "bharatr21", "node_id": "MDQ6VXNlcjEzMzgxMzYx", "organizations_url": "https://api.github.com/users/bharatr21/orgs", "received_events_url": "https://api.github.com/users/bharatr21/received_events", "repos_url": "https://api.github.com/users/bharatr21/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bharatr21/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bharatr21/subscriptions", "type": "User", "url": "https://api.github.com/users/bharatr21", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-06-15T17:19:00Z
2021-08-28T00:06:29Z
2020-06-15T19:56:08Z
CONTRIBUTOR
resolved
Update number of repositories depending on requests
{ "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/5495/reactions" }
https://api.github.com/repos/psf/requests/issues/5495/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5495.diff", "html_url": "https://github.com/psf/requests/pull/5495", "merged_at": "2020-06-15T19:56:08Z", "patch_url": "https://github.com/psf/requests/pull/5495.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5495" }
true
[]
https://api.github.com/repos/psf/requests/issues/5494
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5494/labels{/name}
https://api.github.com/repos/psf/requests/issues/5494/comments
https://api.github.com/repos/psf/requests/issues/5494/events
https://github.com/psf/requests/issues/5494
638,884,478
MDU6SXNzdWU2Mzg4ODQ0Nzg=
5,494
POST request to a http:// which receives a HTTP 301 response redirecting to https:// is retried as GET instead
{ "avatar_url": "https://avatars.githubusercontent.com/u/48946947?v=4", "events_url": "https://api.github.com/users/sanderland/events{/privacy}", "followers_url": "https://api.github.com/users/sanderland/followers", "following_url": "https://api.github.com/users/sanderland/following{/other_user}", "gists_url": "https://api.github.com/users/sanderland/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanderland", "id": 48946947, "login": "sanderland", "node_id": "MDQ6VXNlcjQ4OTQ2OTQ3", "organizations_url": "https://api.github.com/users/sanderland/orgs", "received_events_url": "https://api.github.com/users/sanderland/received_events", "repos_url": "https://api.github.com/users/sanderland/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanderland/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanderland/subscriptions", "type": "User", "url": "https://api.github.com/users/sanderland", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-15T14:08:52Z
2021-08-30T00:06:24Z
2020-07-21T05:55:04Z
NONE
resolved
Summary. When making a request to our API using POST to http, it responds with HTTP 301, which is considered best practice for upgrading users to https. However, the requests library responds to this by ignoring the 'location' header and instead retries it using get, resulting in the user getting a very unexpected HTTP 405 invalid method. ## Expected Result Either return the error 301 directly, or retry to the location specified. ## Actual Result The HTTP 405 error from the (invalid) GET method is retured. ## Reproduction Steps ```python from requests import Response, Session from requests.adapters import HTTPAdapter key = <api key from https://openindustrialdata.com> session = Session() adapter = HTTPAdapter() session.mount("http://", adapter) session.mount("https://", adapter) res = session.request(method='POST', url='http://api.cognitedata.com/api/v1/projects/publicdata/assets/list', data='{"limit":25}', headers={'api-key':key,"content-type":"application/json"}) print(res.request.method, res.status_code) ``` The result of running this is GET 405 ## Source of the error The relevant code is in sessions.py refering to issue #1704 is: ``` # Second, if a POST is responded to with a 301, turn it into a GET. # This bizarre behaviour is explained in Issue 1704. if response.status_code == codes.moved and method == 'POST': method = 'GET' ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.6.1" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "5.3.0-59-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010102f", "version": "19.0.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010102f" }, "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": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5494/reactions" }
https://api.github.com/repos/psf/requests/issues/5494/timeline
null
completed
null
null
false
[ "This is not a bug. All guidance around this is to not resend data or authentication (or the same method) when being redirected to a different scheme and authority. This is the correct and secure behaviour for this case.", "> This is not a bug. All guidance around this is to not resend data or authentication (or ...
https://api.github.com/repos/psf/requests/issues/5493
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5493/labels{/name}
https://api.github.com/repos/psf/requests/issues/5493/comments
https://api.github.com/repos/psf/requests/issues/5493/events
https://github.com/psf/requests/issues/5493
638,736,030
MDU6SXNzdWU2Mzg3MzYwMzA=
5,493
Instacrack termux bruteforce
{ "avatar_url": "https://avatars.githubusercontent.com/u/66874656?v=4", "events_url": "https://api.github.com/users/gehanshanaka/events{/privacy}", "followers_url": "https://api.github.com/users/gehanshanaka/followers", "following_url": "https://api.github.com/users/gehanshanaka/following{/other_user}", "gists_url": "https://api.github.com/users/gehanshanaka/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gehanshanaka", "id": 66874656, "login": "gehanshanaka", "node_id": "MDQ6VXNlcjY2ODc0NjU2", "organizations_url": "https://api.github.com/users/gehanshanaka/orgs", "received_events_url": "https://api.github.com/users/gehanshanaka/received_events", "repos_url": "https://api.github.com/users/gehanshanaka/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gehanshanaka/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gehanshanaka/subscriptions", "type": "User", "url": "https://api.github.com/users/gehanshanaka", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-15T10:27:04Z
2021-08-31T00:06:52Z
2020-06-15T14:47:46Z
NONE
resolved
Traceback (most recent call last): File "crack.py", line 108, in <module> sess = instabrute.Login(password) File "crack.py", line 83, in Login sess.headers.update({'X-CSRFToken' : r.cookies.get_dict()['csrftoken']}) KeyError: 'csrftoken'
{ "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/5493/reactions" }
https://api.github.com/repos/psf/requests/issues/5493/timeline
null
completed
null
null
false
[ "Any solution to fix this error", "Don't access a key that isn't in the dictionary? There's no bug in this library based off of what very little information you've provided", "> Don't access a key that isn't in the dictionary? There's no bug in this library based off of what very little information you've provi...
https://api.github.com/repos/psf/requests/issues/5492
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5492/labels{/name}
https://api.github.com/repos/psf/requests/issues/5492/comments
https://api.github.com/repos/psf/requests/issues/5492/events
https://github.com/psf/requests/pull/5492
638,727,503
MDExOlB1bGxSZXF1ZXN0NDM0NDM1OTgy
5,492
Remove what appears to be an un-needed call to self.resolve_redirects when not following redirects as part of creating a request's history.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1684354?v=4", "events_url": "https://api.github.com/users/dbaxa/events{/privacy}", "followers_url": "https://api.github.com/users/dbaxa/followers", "following_url": "https://api.github.com/users/dbaxa/following{/other_user}", "gists_url": "https://api.github.com/users/dbaxa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dbaxa", "id": 1684354, "login": "dbaxa", "node_id": "MDQ6VXNlcjE2ODQzNTQ=", "organizations_url": "https://api.github.com/users/dbaxa/orgs", "received_events_url": "https://api.github.com/users/dbaxa/received_events", "repos_url": "https://api.github.com/users/dbaxa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dbaxa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dbaxa/subscriptions", "type": "User", "url": "https://api.github.com/users/dbaxa", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-15T10:15:28Z
2021-08-28T00:06:30Z
2020-06-15T14:44:38Z
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/5492/reactions" }
https://api.github.com/repos/psf/requests/issues/5492/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5492.diff", "html_url": "https://github.com/psf/requests/pull/5492", "merged_at": "2020-06-15T14:44:38Z", "patch_url": "https://github.com/psf/requests/pull/5492.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5492" }
true
[ "At one point, `resolve_redirects` used to bail early if we weren't following redirects but I guess that changed. Now if there's a redirect to follow, we make the request but we don't use that response which is pretty bad.\r\n\r\nGood catch. @nateprewitt @sethmlarson this PR looks good", "@sigmavirus24 let me kno...
https://api.github.com/repos/psf/requests/issues/5491
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5491/labels{/name}
https://api.github.com/repos/psf/requests/issues/5491/comments
https://api.github.com/repos/psf/requests/issues/5491/events
https://github.com/psf/requests/pull/5491
638,164,915
MDExOlB1bGxSZXF1ZXN0NDM0MDA4Mzk2
5,491
Prefer Transfer-Encoding=chunked even if both Transfer-Encoding and Content-Length are set
{ "avatar_url": "https://avatars.githubusercontent.com/u/166626?v=4", "events_url": "https://api.github.com/users/ikalnytskyi/events{/privacy}", "followers_url": "https://api.github.com/users/ikalnytskyi/followers", "following_url": "https://api.github.com/users/ikalnytskyi/following{/other_user}", "gists_url": "https://api.github.com/users/ikalnytskyi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ikalnytskyi", "id": 166626, "login": "ikalnytskyi", "node_id": "MDQ6VXNlcjE2NjYyNg==", "organizations_url": "https://api.github.com/users/ikalnytskyi/orgs", "received_events_url": "https://api.github.com/users/ikalnytskyi/received_events", "repos_url": "https://api.github.com/users/ikalnytskyi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ikalnytskyi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ikalnytskyi/subscriptions", "type": "User", "url": "https://api.github.com/users/ikalnytskyi", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-13T13:46:25Z
2021-08-28T00:06:20Z
2020-09-16T00:38:51Z
NONE
resolved
RFC 7230 says (see section [3.3.3 Message Body Length](https://tools.ietf.org/html/rfc7230#page-32)): > If a message is received with both a `Transfer-Encoding` and a `Content-Length` header field, the `Transfer-Encoding` overrides the `Content-Length`. Since HTTP servers MUST ignore `Content-Length` if `Transfer-Encoding` is sent, **python-requests** MUST follow the same logic and send payload using `chunked` approach if both are detected in among request headers. Normally, `Content-Length` MUST NOT be sent in the same request with `Trasnfer-Encoding`, however, it may happened both intentionally (e.g. malicious intent) and accidentally (e.g. proxying a request downstream).
{ "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/5491/reactions" }
https://api.github.com/repos/psf/requests/issues/5491/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5491.diff", "html_url": "https://github.com/psf/requests/pull/5491", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5491.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5491" }
true
[ "Hi @ikalnytskyi, this was actually addressed in our 3.0.0 proposal branch with #3897. Instead of guessing, we would have explicitly prohibited the user from sending both. They need to make an explicit decision before the client will perform the request.\r\n\r\nThat said, it's unlikely this code will end up release...
https://api.github.com/repos/psf/requests/issues/5490
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5490/labels{/name}
https://api.github.com/repos/psf/requests/issues/5490/comments
https://api.github.com/repos/psf/requests/issues/5490/events
https://github.com/psf/requests/issues/5490
637,670,824
MDU6SXNzdWU2Mzc2NzA4MjQ=
5,490
Open a stream from POST request
{ "avatar_url": "https://avatars.githubusercontent.com/u/34455993?v=4", "events_url": "https://api.github.com/users/andreafresa/events{/privacy}", "followers_url": "https://api.github.com/users/andreafresa/followers", "following_url": "https://api.github.com/users/andreafresa/following{/other_user}", "gists_url": "https://api.github.com/users/andreafresa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andreafresa", "id": 34455993, "login": "andreafresa", "node_id": "MDQ6VXNlcjM0NDU1OTkz", "organizations_url": "https://api.github.com/users/andreafresa/orgs", "received_events_url": "https://api.github.com/users/andreafresa/received_events", "repos_url": "https://api.github.com/users/andreafresa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andreafresa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andreafresa/subscriptions", "type": "User", "url": "https://api.github.com/users/andreafresa", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-06-12T11:00:28Z
2021-08-31T00:06:52Z
2020-06-15T14:47:56Z
NONE
resolved
Hello, I am trying to open a stream from a POST request. The idea is to open the stream and to attach the response to an SSE client. is this the correct way to do it? `response= requests.post(url_request , stream= True)` If it is true, why it seems like the client is closing the socket at a certain point?
{ "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/5490/reactions" }
https://api.github.com/repos/psf/requests/issues/5490/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/5489
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5489/labels{/name}
https://api.github.com/repos/psf/requests/issues/5489/comments
https://api.github.com/repos/psf/requests/issues/5489/events
https://github.com/psf/requests/issues/5489
637,324,721
MDU6SXNzdWU2MzczMjQ3MjE=
5,489
When redirected request header dictionary contains previous value of cookie
{ "avatar_url": "https://avatars.githubusercontent.com/u/4713622?v=4", "events_url": "https://api.github.com/users/asifmallik/events{/privacy}", "followers_url": "https://api.github.com/users/asifmallik/followers", "following_url": "https://api.github.com/users/asifmallik/following{/other_user}", "gists_url": "https://api.github.com/users/asifmallik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/asifmallik", "id": 4713622, "login": "asifmallik", "node_id": "MDQ6VXNlcjQ3MTM2MjI=", "organizations_url": "https://api.github.com/users/asifmallik/orgs", "received_events_url": "https://api.github.com/users/asifmallik/received_events", "repos_url": "https://api.github.com/users/asifmallik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/asifmallik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/asifmallik/subscriptions", "type": "User", "url": "https://api.github.com/users/asifmallik", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-06-11T21:17:32Z
2021-08-31T00:06:52Z
2020-06-12T12:09:15Z
NONE
resolved
When you send a request which replaces an existing cookie value with a new one and also returns a redirect response, when the new request is made, its request header from `r.request.headers['Cookies']` shows both the old and the new cookie value. However, the actual request header only contains the new cookie value. ## Expected Result What would be expected is that `r.request.headers['Cookies']` would only have the new replaced cookie value rather than the old ## Actual Result Its request header from `r.request.headers['Cookies']` shows both the old and the new cookie value ## Reproduction Steps ``` python import requests r = requests.get('http://httpbin.org/cookies/set?FOO=BAZ', cookies={'FOO': 'BAR'}) print(r.json()) #{'cookies': {'FOO': 'BAZ'}} print(r.request.headers['Cookie']) # FOO=BAR; FOO=BAZ ``` From what I understand, the latter should be just `FOO=BAZ` as I believe it should only reflect the request headers from the final request. I think what is going on is that the cookies from the previous requests are merged into this. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.9" }, "platform": { "release": "5.3.0-59-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/4713622?v=4", "events_url": "https://api.github.com/users/asifmallik/events{/privacy}", "followers_url": "https://api.github.com/users/asifmallik/followers", "following_url": "https://api.github.com/users/asifmallik/following{/other_user}", "gists_url": "https://api.github.com/users/asifmallik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/asifmallik", "id": 4713622, "login": "asifmallik", "node_id": "MDQ6VXNlcjQ3MTM2MjI=", "organizations_url": "https://api.github.com/users/asifmallik/orgs", "received_events_url": "https://api.github.com/users/asifmallik/received_events", "repos_url": "https://api.github.com/users/asifmallik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/asifmallik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/asifmallik/subscriptions", "type": "User", "url": "https://api.github.com/users/asifmallik", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5489/reactions" }
https://api.github.com/repos/psf/requests/issues/5489/timeline
null
completed
null
null
false
[ "The bug was originally found in [issue 662 from httpie](https://github.com/jakubroztocil/httpie/issues/662)", "> When you send a request which replaces an existing cookie value with a new one and also returns a redirect response, when the new request is made, its request header from r.request.headers['Cookies'] ...
https://api.github.com/repos/psf/requests/issues/5488
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5488/labels{/name}
https://api.github.com/repos/psf/requests/issues/5488/comments
https://api.github.com/repos/psf/requests/issues/5488/events
https://github.com/psf/requests/pull/5488
637,020,419
MDExOlB1bGxSZXF1ZXN0NDMzMDgyOTI0
5,488
Allow further configuration of HTTPAdapter's PoolManager by passing pool_kwargs dict
{ "avatar_url": "https://avatars.githubusercontent.com/u/1549648?v=4", "events_url": "https://api.github.com/users/dtheodor/events{/privacy}", "followers_url": "https://api.github.com/users/dtheodor/followers", "following_url": "https://api.github.com/users/dtheodor/following{/other_user}", "gists_url": "https://api.github.com/users/dtheodor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dtheodor", "id": 1549648, "login": "dtheodor", "node_id": "MDQ6VXNlcjE1NDk2NDg=", "organizations_url": "https://api.github.com/users/dtheodor/orgs", "received_events_url": "https://api.github.com/users/dtheodor/received_events", "repos_url": "https://api.github.com/users/dtheodor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dtheodor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dtheodor/subscriptions", "type": "User", "url": "https://api.github.com/users/dtheodor", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-11T13:34:20Z
2021-08-28T00:06:26Z
2020-07-21T06:18:59Z
NONE
resolved
There are various useful configurations of underlying urllib3 PoolManager not supported by the existing HTTPAdapter, such as a global timeout, source_address, and many more https://github.com/urllib3/urllib3/blob/29b214a129883301f91ae4a74fd7ef2958cbf7b0/src/urllib3/poolmanager.py#L49-L75 It is trivial to support them directly. The construction of the HTTPAdapter's poolmanager at `HTTPAdapter.init_poolmanager(..., **pool_kwargs)` already contains this provision as the arbitrary `pool_kwargs` dict that is passed to the PoolManager constructor. All it takes is to also add this to the HTTPAdapter constructor, and pass it. It also appears that this was the original intention that was somehow forgotten; this `**pool_kwargs` argument is not being passed by any caller of `init_poolmanager()`.
{ "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/5488/reactions" }
https://api.github.com/repos/psf/requests/issues/5488/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5488.diff", "html_url": "https://github.com/psf/requests/pull/5488", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5488.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5488" }
true
[ "This project isn't accepting new features. You can easily accomplish this by calling `init_poolmanager()` after creating your `HTTPAdapter` instance. It will replace the previous poolmanger with your newly configured poolmanager. Is it extra work? Yes. Does it get you where you need this pull request to merge to a...
https://api.github.com/repos/psf/requests/issues/5487
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5487/labels{/name}
https://api.github.com/repos/psf/requests/issues/5487/comments
https://api.github.com/repos/psf/requests/issues/5487/events
https://github.com/psf/requests/issues/5487
636,938,063
MDU6SXNzdWU2MzY5MzgwNjM=
5,487
I need execute : curl -d "a=A&b=B&c=C1,C2",what should i do if use requests?
{ "avatar_url": "https://avatars.githubusercontent.com/u/14362799?v=4", "events_url": "https://api.github.com/users/Hanfee/events{/privacy}", "followers_url": "https://api.github.com/users/Hanfee/followers", "following_url": "https://api.github.com/users/Hanfee/following{/other_user}", "gists_url": "https://api.github.com/users/Hanfee/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Hanfee", "id": 14362799, "login": "Hanfee", "node_id": "MDQ6VXNlcjE0MzYyNzk5", "organizations_url": "https://api.github.com/users/Hanfee/orgs", "received_events_url": "https://api.github.com/users/Hanfee/received_events", "repos_url": "https://api.github.com/users/Hanfee/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Hanfee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Hanfee/subscriptions", "type": "User", "url": "https://api.github.com/users/Hanfee", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-06-11T11:28:21Z
2021-08-31T00:06:51Z
2020-06-15T14:48:05Z
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/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/5487/reactions" }
https://api.github.com/repos/psf/requests/issues/5487/timeline
null
completed
null
null
false
[ "Read your own issue description to find out how" ]
https://api.github.com/repos/psf/requests/issues/5486
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5486/labels{/name}
https://api.github.com/repos/psf/requests/issues/5486/comments
https://api.github.com/repos/psf/requests/issues/5486/events
https://github.com/psf/requests/pull/5486
636,196,928
MDExOlB1bGxSZXF1ZXN0NDMyNDE0NzA3
5,486
Allow for autodection of encoding for scalar values
{ "avatar_url": "https://avatars.githubusercontent.com/u/22727090?v=4", "events_url": "https://api.github.com/users/blenq/events{/privacy}", "followers_url": "https://api.github.com/users/blenq/followers", "following_url": "https://api.github.com/users/blenq/following{/other_user}", "gists_url": "https://api.github.com/users/blenq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/blenq", "id": 22727090, "login": "blenq", "node_id": "MDQ6VXNlcjIyNzI3MDkw", "organizations_url": "https://api.github.com/users/blenq/orgs", "received_events_url": "https://api.github.com/users/blenq/received_events", "repos_url": "https://api.github.com/users/blenq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/blenq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/blenq/subscriptions", "type": "User", "url": "https://api.github.com/users/blenq", "user_view_type": "public" }
[]
open
false
null
[]
null
0
2020-06-10T12:15:13Z
2022-01-03T15:26:36Z
null
NONE
null
Since JSON RFC 7158 (and also in 7159 and 8259) scalar values are also valid JSON texts. The json decoder from the Python standard libs also accepts such scalar values. The JSON Unicode detection algorithm in "requests" assumes that the first two characters are always ASCII. That is not true anymore. Therefore the current detection fails in at least these two edge cases - A single digit in UTF-16 encoding - A quoted string with the first character having a Unicode value higher than 255 in UTF-16 encoding Also autodetection by chardet returns the wrong encoding. This change detects the encoding in case of those two edge cases.
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/5486/reactions" }
https://api.github.com/repos/psf/requests/issues/5486/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5486.diff", "html_url": "https://github.com/psf/requests/pull/5486", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5486.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5486" }
true
[]
https://api.github.com/repos/psf/requests/issues/5485
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5485/labels{/name}
https://api.github.com/repos/psf/requests/issues/5485/comments
https://api.github.com/repos/psf/requests/issues/5485/events
https://github.com/psf/requests/issues/5485
635,379,859
MDU6SXNzdWU2MzUzNzk4NTk=
5,485
Newly created Response object fails on boolean test
{ "avatar_url": "https://avatars.githubusercontent.com/u/2500830?v=4", "events_url": "https://api.github.com/users/rtatishvili/events{/privacy}", "followers_url": "https://api.github.com/users/rtatishvili/followers", "following_url": "https://api.github.com/users/rtatishvili/following{/other_user}", "gists_url": "https://api.github.com/users/rtatishvili/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rtatishvili", "id": 2500830, "login": "rtatishvili", "node_id": "MDQ6VXNlcjI1MDA4MzA=", "organizations_url": "https://api.github.com/users/rtatishvili/orgs", "received_events_url": "https://api.github.com/users/rtatishvili/received_events", "repos_url": "https://api.github.com/users/rtatishvili/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rtatishvili/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rtatishvili/subscriptions", "type": "User", "url": "https://api.github.com/users/rtatishvili", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-09T12:17:47Z
2021-08-31T00:06:49Z
2020-06-15T15:03:10Z
NONE
resolved
A newly created `Response` object fails boolean test in if statement (when under the hood `__bool__` method is called). Based on conventions used in Python, I expect an empty response object to be resolved to `False`. Although it is a design decision to which value to resolve, throwing an exception in this trivial case is unexpected behavior. ## Expected Result ``` 2.23.0 Response is empty ``` ## Actual Result ``` 2.23.0 Traceback (most recent call last): File ".../local/reqeusts_error.py", line 6, in <module> if not response: File "/opt/miniconda/lib/python3.6/site-packages/requests/models.py", line 677, in __bool__ return self.ok File "/opt/miniconda/lib/python3.6/site-packages/requests/models.py", line 703, in ok self.raise_for_status() File "/opt/miniconda/lib/python3.6/site-packages/requests/models.py", line 934, in raise_for_status if 400 <= self.status_code < 500: TypeError: '<=' not supported between instances of 'int' and 'NoneType' Process finished with exit code 1 ``` ## Reproduction Steps ```python import requests print(requests.__version__) response = requests.Response() if not response: print('Response is empty') ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3.1" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.0" }, "platform": { "release": "3.10.0-957.21.3.el7.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1000210f", "version": "18.0.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1000215f" }, "urllib3": { "version": "1.25.8" }, "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": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5485/reactions" }
https://api.github.com/repos/psf/requests/issues/5485/timeline
null
completed
null
null
false
[ "No one uses the library this way in reality, so there's no harm in this behaviour", "I agree with @sigmavirus24. Status code, headers, and some representation of a body (empty or otherwise) are all required parameters to successfully generate a Response in Requests. I don't think it's worth the time or verbosity...
https://api.github.com/repos/psf/requests/issues/5484
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5484/labels{/name}
https://api.github.com/repos/psf/requests/issues/5484/comments
https://api.github.com/repos/psf/requests/issues/5484/events
https://github.com/psf/requests/issues/5484
634,700,106
MDU6SXNzdWU2MzQ3MDAxMDY=
5,484
"407 Proxy Authentication Required" although it was provided in the request
{ "avatar_url": "https://avatars.githubusercontent.com/u/54762742?v=4", "events_url": "https://api.github.com/users/raffaem/events{/privacy}", "followers_url": "https://api.github.com/users/raffaem/followers", "following_url": "https://api.github.com/users/raffaem/following{/other_user}", "gists_url": "https://api.github.com/users/raffaem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/raffaem", "id": 54762742, "login": "raffaem", "node_id": "MDQ6VXNlcjU0NzYyNzQy", "organizations_url": "https://api.github.com/users/raffaem/orgs", "received_events_url": "https://api.github.com/users/raffaem/received_events", "repos_url": "https://api.github.com/users/raffaem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/raffaem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/raffaem/subscriptions", "type": "User", "url": "https://api.github.com/users/raffaem", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-08T15:02:33Z
2021-08-31T00:06:51Z
2020-06-15T14:48:17Z
NONE
resolved
I tried to run the following code import requests ``` s = requests.Session() s.trust_env = False url="https://api.elsevier.com/content/abstract/scopus_id/85082366258" headers={'X-ELS-APIKey': 'MY_API_KEY', 'Accept': 'application/json', 'User-Agent': 'pybliometrics-v2.5.0'} proxies={'https': 'https://USERNAME:PASSWORD@proxy.thing.com:8080/'} params={'view': 'META_ABS'} resp = s.get(url, headers=headers, proxies=proxies, params=params) print(resp.text) ``` But I get the following error message: `requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.elsevier.com', port=443): Max retries exceeded with url: /content/abstract/scopus_id/85082366258?view=META_ABS (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))` My username and password are correct and don't contain any special characters, only alphanumeric ones. What is going wrong?
{ "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/5484/reactions" }
https://api.github.com/repos/psf/requests/issues/5484/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.", "Hello\r\n\r\n@sigmavirus24 There was a button whic...
https://api.github.com/repos/psf/requests/issues/5483
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5483/labels{/name}
https://api.github.com/repos/psf/requests/issues/5483/comments
https://api.github.com/repos/psf/requests/issues/5483/events
https://github.com/psf/requests/issues/5483
634,524,019
MDU6SXNzdWU2MzQ1MjQwMTk=
5,483
One server fails ping -Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(\"bad handshake: SysCallError(104, 'ECONNRESET')
{ "avatar_url": "https://avatars.githubusercontent.com/u/66622032?v=4", "events_url": "https://api.github.com/users/ruttrow/events{/privacy}", "followers_url": "https://api.github.com/users/ruttrow/followers", "following_url": "https://api.github.com/users/ruttrow/following{/other_user}", "gists_url": "https://api.github.com/users/ruttrow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ruttrow", "id": 66622032, "login": "ruttrow", "node_id": "MDQ6VXNlcjY2NjIyMDMy", "organizations_url": "https://api.github.com/users/ruttrow/orgs", "received_events_url": "https://api.github.com/users/ruttrow/received_events", "repos_url": "https://api.github.com/users/ruttrow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ruttrow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ruttrow/subscriptions", "type": "User", "url": "https://api.github.com/users/ruttrow", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-08T11:22:58Z
2021-08-31T00:06:50Z
2020-06-15T14:48:53Z
NONE
resolved
New to Ansible, having trouble with one server failing ping: "msg": "kerberos: HTTPSConnectionPool(host='xxxxxl', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(\"bad handshake: SysCallError(104, 'ECONNRESET')\",),)), ssl: HTTPSConnectionPool(host='xxxx', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(\"bad handshake: SysCallError(104, 'ECONNRESET')\",),))", "unreachable": true, "changed": false, "skip_reason": "Host xxxx is unreachable" } I replaced host name with xxxx We have several hundred servers, this is the only one giving this error. I tried running the ConfigureRemotingForAnsible.ps1 Verified network settings I can telnet to the host on port 5986 from another server Verified IIScrypto has not disabled SSL's or TLS. ran command - winrm e winrm/config/listener which shows listener running on 5986 I am unable to open the URL of the server on port 5986
{ "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/5483/reactions" }
https://api.github.com/repos/psf/requests/issues/5483/timeline
null
completed
null
null
false
[ "There is no bug here. The server or an intermediary is resetting the connection during the TLS handshake.\r\n\r\n> I am unable to open the URL of the server on port 5986\r\n\r\nThis is unclear if you mean you're generally unable to open it (i.e., in a browser, curl, or requests) or if you're only unable to open i...
https://api.github.com/repos/psf/requests/issues/5482
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5482/labels{/name}
https://api.github.com/repos/psf/requests/issues/5482/comments
https://api.github.com/repos/psf/requests/issues/5482/events
https://github.com/psf/requests/issues/5482
634,282,483
MDU6SXNzdWU2MzQyODI0ODM=
5,482
response.status_code==200 when Bean is not found and status=404
{ "avatar_url": "https://avatars.githubusercontent.com/u/45629047?v=4", "events_url": "https://api.github.com/users/ovierlinck/events{/privacy}", "followers_url": "https://api.github.com/users/ovierlinck/followers", "following_url": "https://api.github.com/users/ovierlinck/following{/other_user}", "gists_url": "https://api.github.com/users/ovierlinck/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ovierlinck", "id": 45629047, "login": "ovierlinck", "node_id": "MDQ6VXNlcjQ1NjI5MDQ3", "organizations_url": "https://api.github.com/users/ovierlinck/orgs", "received_events_url": "https://api.github.com/users/ovierlinck/received_events", "repos_url": "https://api.github.com/users/ovierlinck/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ovierlinck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ovierlinck/subscriptions", "type": "User", "url": "https://api.github.com/users/ovierlinck", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-06-08T07:21:26Z
2021-08-31T00:06:53Z
2020-06-11T07:45:03Z
NONE
resolved
I experience some strange behavior about response.status_code. If I do an invalid request (in this sample case, I put on purpose an incorrect Bean name), I still get response.status_code=200 while I expect some error code (such as 404) Even more strange, in the JSON, there is indeed a status:404 (see sample code and outputs below) ## Expected Result status should be 404 in such case ## Actual Result I got a status==200, meaning 'no error' ## Reproduction Steps How is it that this JSON info does not get to the response.status_code? Here is the sample code: req = baseUrl + "/exec/bean:name=AnInvalidBean/send([D,boolean,boolean)/1,2,3,4,0.5,0.6,13,10/True/True” response = self.GET(req, 10) test.log(" RESPONSE = " + str(response)) test.log(" JSON: " + str(response.json())) test.log(" response.status_code: " + str(response.status_code)) test.log(" response.json().get(\"status\"): " + str(response.json().get("status"))) test.log(" response.ok: " + str(response.ok)) test.log(" response as a boolean: " + str(True if response else False)) And the corresponding log (re-formatted for readability): REQUEST : http://127.0.0.1:5555/jolokia/exec/bean:name=NONExistingBean/send([D,boolean,boolean)/1,2,3,4,0.5,0.6,13,10/True/True RESPONSE = <Response [200]> JSON: { 'request': { 'mbean': 'bean:name=NONExistingBean', 'arguments': ['1,2,3,4,0.5,0.6,13,10', 'True', 'True'], 'type': 'exec', 'operation': 'send([D,boolean,boolean)' }, 'stacktrace': 'javax.management.InstanceNotFoundException: bean:name=NONExistingBean\r\n\tat […TRUNCATED…] at java.base/java.lang.Thread.run(Thread.java:834)\r\n', 'error_type': 'javax.management.InstanceNotFoundException', 'error': 'javax.management.InstanceNotFoundException : bean:name=UsddderPositionSenderPanelTestFacade', 'status': 404 } response.status_code: 200 response.json().get("status"): 404 response.ok: True response as a boolean: True How can we get these 2 ‘conflicting’ lines: response.status_code: 200 response.json().get("status"): 404 How is it that despite the 'status': 404, the ‘stacktrace’ and ‘error’, I still get status_code: 200? I’m using requests 2.22.0 ## System Information python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.4" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010103f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": false }
{ "avatar_url": "https://avatars.githubusercontent.com/u/45629047?v=4", "events_url": "https://api.github.com/users/ovierlinck/events{/privacy}", "followers_url": "https://api.github.com/users/ovierlinck/followers", "following_url": "https://api.github.com/users/ovierlinck/following{/other_user}", "gists_url": "https://api.github.com/users/ovierlinck/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ovierlinck", "id": 45629047, "login": "ovierlinck", "node_id": "MDQ6VXNlcjQ1NjI5MDQ3", "organizations_url": "https://api.github.com/users/ovierlinck/orgs", "received_events_url": "https://api.github.com/users/ovierlinck/received_events", "repos_url": "https://api.github.com/users/ovierlinck/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ovierlinck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ovierlinck/subscriptions", "type": "User", "url": "https://api.github.com/users/ovierlinck", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5482/reactions" }
https://api.github.com/repos/psf/requests/issues/5482/timeline
null
completed
null
null
false
[ "> How is it that despite the 'status': 404, the ‘stacktrace’ and ‘error’, I still get status_code: 200?\r\n\r\nYou're not actually setting the status of the response in the server but returning the 404 as part of the data. You need to read something that explains how HTTP works because there is no bug in this pro...
https://api.github.com/repos/psf/requests/issues/5481
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5481/labels{/name}
https://api.github.com/repos/psf/requests/issues/5481/comments
https://api.github.com/repos/psf/requests/issues/5481/events
https://github.com/psf/requests/pull/5481
633,604,612
MDExOlB1bGxSZXF1ZXN0NDMwMjM4MjQ3
5,481
Replace deprecated `setup.py test` with tox entry point
{ "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" }
[ { "color": "e102d8", "default": false, "description": null, "id": 117745, "name": "Planned", "node_id": "MDU6TGFiZWwxMTc3NDU=", "url": "https://api.github.com/repos/psf/requests/labels/Planned" }, { "color": "eb6420", "default": false, "description": null, "id": 44501...
closed
true
null
[]
null
0
2020-06-07T17:35:17Z
2021-12-18T14:00:18Z
2021-09-19T13:43:56Z
CONTRIBUTOR
resolved
The seuptools test command has been formally deprecated since version 41.5.0 (27 Oct 2019). The project recommends replacing its use with tox as a project level testing entrypoint. Fixes the warning when running tests: > WARNING: Testing via this command is deprecated and will be removed in > a future version. Users looking for a generic test entry point > independent of test runner are encouraged to use tox. For more details, see the setuptools history: https://setuptools.readthedocs.io/en/latest/history.html#v41-5-0 And the command's documentation: https://setuptools.readthedocs.io/en/latest/setuptools.html#test-build-package-and-run-a-unittest-suite
{ "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/5481/reactions" }
https://api.github.com/repos/psf/requests/issues/5481/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5481.diff", "html_url": "https://github.com/psf/requests/pull/5481", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5481.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5481" }
true
[]
https://api.github.com/repos/psf/requests/issues/5480
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5480/labels{/name}
https://api.github.com/repos/psf/requests/issues/5480/comments
https://api.github.com/repos/psf/requests/issues/5480/events
https://github.com/psf/requests/pull/5480
632,219,289
MDExOlB1bGxSZXF1ZXN0NDI4OTkxNjYy
5,480
Using range method to check status code
{ "avatar_url": "https://avatars.githubusercontent.com/u/12211926?v=4", "events_url": "https://api.github.com/users/nikolasvargas/events{/privacy}", "followers_url": "https://api.github.com/users/nikolasvargas/followers", "following_url": "https://api.github.com/users/nikolasvargas/following{/other_user}", "gists_url": "https://api.github.com/users/nikolasvargas/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nikolasvargas", "id": 12211926, "login": "nikolasvargas", "node_id": "MDQ6VXNlcjEyMjExOTI2", "organizations_url": "https://api.github.com/users/nikolasvargas/orgs", "received_events_url": "https://api.github.com/users/nikolasvargas/received_events", "repos_url": "https://api.github.com/users/nikolasvargas/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nikolasvargas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nikolasvargas/subscriptions", "type": "User", "url": "https://api.github.com/users/nikolasvargas", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-06T05:23:35Z
2021-08-28T00:06:27Z
2020-06-15T15:06:41Z
NONE
resolved
More readable
{ "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/5480/reactions" }
https://api.github.com/repos/psf/requests/issues/5480/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5480.diff", "html_url": "https://github.com/psf/requests/pull/5480", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5480.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5480" }
true
[ "But it's not", "ok", "Hi @nikolasvargas,\r\n\r\nThanks for the contribution! I don't know if I agree this is more readable though. It has the additional negative that we generate a bunch of additional numbers in the range we have to iterate but will never possibly use. The current implementation is pretty dire...
https://api.github.com/repos/psf/requests/issues/5479
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5479/labels{/name}
https://api.github.com/repos/psf/requests/issues/5479/comments
https://api.github.com/repos/psf/requests/issues/5479/events
https://github.com/psf/requests/issues/5479
630,807,796
MDU6SXNzdWU2MzA4MDc3OTY=
5,479
module 'requests' has no attribute 'settings'
{ "avatar_url": "https://avatars.githubusercontent.com/u/7999692?v=4", "events_url": "https://api.github.com/users/OscarVanL/events{/privacy}", "followers_url": "https://api.github.com/users/OscarVanL/followers", "following_url": "https://api.github.com/users/OscarVanL/following{/other_user}", "gists_url": "https://api.github.com/users/OscarVanL/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/OscarVanL", "id": 7999692, "login": "OscarVanL", "node_id": "MDQ6VXNlcjc5OTk2OTI=", "organizations_url": "https://api.github.com/users/OscarVanL/orgs", "received_events_url": "https://api.github.com/users/OscarVanL/received_events", "repos_url": "https://api.github.com/users/OscarVanL/repos", "site_admin": false, "starred_url": "https://api.github.com/users/OscarVanL/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/OscarVanL/subscriptions", "type": "User", "url": "https://api.github.com/users/OscarVanL", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-04T13:12:26Z
2021-01-20T19:57:28Z
2020-06-05T15:38:48Z
NONE
resolved
I want to print verbose logs from requests to see the headers and cookies in each request. I followed [this page](https://requests.readthedocs.io/en/v0.6.6/user/advanced/), which says to run: ``` requests.settings.verbose = sys.stderr ```` I suspect this may be a case of outdated documentation, but I can't find anything more up to date. ## Expected Result Verbose logging should be enabled. ## Actual Result My IDE gives a warning about `settings not being a reference in __init__.pyi`. Running the program throws the exception `AttributeError: module 'requests' has no attribute 'settings'` ## Reproduction Steps ```python import requests requests.settings.verbose = sys.stderr ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.9.2" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/7999692?v=4", "events_url": "https://api.github.com/users/OscarVanL/events{/privacy}", "followers_url": "https://api.github.com/users/OscarVanL/followers", "following_url": "https://api.github.com/users/OscarVanL/following{/other_user}", "gists_url": "https://api.github.com/users/OscarVanL/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/OscarVanL", "id": 7999692, "login": "OscarVanL", "node_id": "MDQ6VXNlcjc5OTk2OTI=", "organizations_url": "https://api.github.com/users/OscarVanL/orgs", "received_events_url": "https://api.github.com/users/OscarVanL/received_events", "repos_url": "https://api.github.com/users/OscarVanL/repos", "site_admin": false, "starred_url": "https://api.github.com/users/OscarVanL/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/OscarVanL/subscriptions", "type": "User", "url": "https://api.github.com/users/OscarVanL", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5479/reactions" }
https://api.github.com/repos/psf/requests/issues/5479/timeline
null
completed
null
null
false
[ "The page you followed is for requests version 0.6 and you're using 2.23. Please read the correct documentation", "Oh my bad - I just googled requests verbose logging. I can't seem to find the same documentation for the new version. Do you know where I can find this?\r\n\r\nI just want to see the full HTTP POST/G...
https://api.github.com/repos/psf/requests/issues/5478
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5478/labels{/name}
https://api.github.com/repos/psf/requests/issues/5478/comments
https://api.github.com/repos/psf/requests/issues/5478/events
https://github.com/psf/requests/issues/5478
630,172,597
MDU6SXNzdWU2MzAxNzI1OTc=
5,478
Implicit JSON Content-Type is missing charset
{ "avatar_url": "https://avatars.githubusercontent.com/u/1236420?v=4", "events_url": "https://api.github.com/users/reinderien/events{/privacy}", "followers_url": "https://api.github.com/users/reinderien/followers", "following_url": "https://api.github.com/users/reinderien/following{/other_user}", "gists_url": "https://api.github.com/users/reinderien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/reinderien", "id": 1236420, "login": "reinderien", "node_id": "MDQ6VXNlcjEyMzY0MjA=", "organizations_url": "https://api.github.com/users/reinderien/orgs", "received_events_url": "https://api.github.com/users/reinderien/received_events", "repos_url": "https://api.github.com/users/reinderien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/reinderien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/reinderien/subscriptions", "type": "User", "url": "https://api.github.com/users/reinderien", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-03T17:11:15Z
2021-08-31T00:06:54Z
2020-06-03T19:03:03Z
NONE
resolved
This code in `requests/models.py`: ```python content_type = 'application/json' body = complexjson.dumps(json) if not isinstance(body, bytes): body = body.encode('utf-8') # ... # Add content-type if it wasn't explicitly provided. if content_type and ('content-type' not in self.headers): self.headers['Content-Type'] = content_type ``` has an incomplete `Content-Type`. ## Expected Result That `Content-Type` be `application/json; charset=utf-8` ## Actual Result `Content-Type` is only `application/json` ## Reproduction Steps Make any request passing `json={}` and without explicitly setting any headers. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/1236420?v=4", "events_url": "https://api.github.com/users/reinderien/events{/privacy}", "followers_url": "https://api.github.com/users/reinderien/followers", "following_url": "https://api.github.com/users/reinderien/following{/other_user}", "gists_url": "https://api.github.com/users/reinderien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/reinderien", "id": 1236420, "login": "reinderien", "node_id": "MDQ6VXNlcjEyMzY0MjA=", "organizations_url": "https://api.github.com/users/reinderien/orgs", "received_events_url": "https://api.github.com/users/reinderien/received_events", "repos_url": "https://api.github.com/users/reinderien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/reinderien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/reinderien/subscriptions", "type": "User", "url": "https://api.github.com/users/reinderien", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5478/reactions" }
https://api.github.com/repos/psf/requests/issues/5478/timeline
null
completed
null
null
false
[ "To the best of my knowledge the charset is optional and not required when handling utf-8 thus this is perfectly fine.", "Of course it's optional; the concern is that this leaves ambiguity that the far end needs to resolve. Requests even says that\r\n\r\n```\r\n # No encoding set. JSON RFC 4627 section...
https://api.github.com/repos/psf/requests/issues/5477
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5477/labels{/name}
https://api.github.com/repos/psf/requests/issues/5477/comments
https://api.github.com/repos/psf/requests/issues/5477/events
https://github.com/psf/requests/pull/5477
627,575,380
MDExOlB1bGxSZXF1ZXN0NDI1MzU3Nzgx
5,477
Drop monkeypatching with pyopenssl
{ "avatar_url": "https://avatars.githubusercontent.com/u/730811?v=4", "events_url": "https://api.github.com/users/WhyNotHugo/events{/privacy}", "followers_url": "https://api.github.com/users/WhyNotHugo/followers", "following_url": "https://api.github.com/users/WhyNotHugo/following{/other_user}", "gists_url": "https://api.github.com/users/WhyNotHugo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WhyNotHugo", "id": 730811, "login": "WhyNotHugo", "node_id": "MDQ6VXNlcjczMDgxMQ==", "organizations_url": "https://api.github.com/users/WhyNotHugo/orgs", "received_events_url": "https://api.github.com/users/WhyNotHugo/received_events", "repos_url": "https://api.github.com/users/WhyNotHugo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WhyNotHugo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WhyNotHugo/subscriptions", "type": "User", "url": "https://api.github.com/users/WhyNotHugo", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-29T22:19:22Z
2021-08-28T00:06:29Z
2020-06-15T15:11:07Z
CONTRIBUTOR
resolved
Monkey patching url3 with pyopenssl 3 is no longer a good idea nor even necessary, and actually has security drawbacks, as described in #5267. This also undoes the changes I initially made in #1347, so I guess it means my previous contribution has completed its life cycle.
{ "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": 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/5477/reactions" }
https://api.github.com/repos/psf/requests/issues/5477/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5477.diff", "html_url": "https://github.com/psf/requests/pull/5477", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5477.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5477" }
true
[ "Hi @WhyNotHugo,\r\n\r\nThis was already addressed in #5443 and left patching as a potential fallback for now for older versions of Python 2.7. This patch has some additional removals from our debugging helper function that I don't think we want to remove. I think we'll pass on this for now.", "Oh, I was under th...
https://api.github.com/repos/psf/requests/issues/5476
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5476/labels{/name}
https://api.github.com/repos/psf/requests/issues/5476/comments
https://api.github.com/repos/psf/requests/issues/5476/events
https://github.com/psf/requests/issues/5476
627,300,152
MDU6SXNzdWU2MjczMDAxNTI=
5,476
urllib3.exceptions.LocationParseError: Failed to parse
{ "avatar_url": "https://avatars.githubusercontent.com/u/1606679?v=4", "events_url": "https://api.github.com/users/nickwebha/events{/privacy}", "followers_url": "https://api.github.com/users/nickwebha/followers", "following_url": "https://api.github.com/users/nickwebha/following{/other_user}", "gists_url": "https://api.github.com/users/nickwebha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nickwebha", "id": 1606679, "login": "nickwebha", "node_id": "MDQ6VXNlcjE2MDY2Nzk=", "organizations_url": "https://api.github.com/users/nickwebha/orgs", "received_events_url": "https://api.github.com/users/nickwebha/received_events", "repos_url": "https://api.github.com/users/nickwebha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nickwebha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nickwebha/subscriptions", "type": "User", "url": "https://api.github.com/users/nickwebha", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-29T14:11:30Z
2021-08-31T00:06:43Z
2020-06-11T16:21:23Z
NONE
resolved
`python3 -c "import requests; requests.get('https://google.com');"` produces error. ## Expected Result `requests.get()` gets the URL in question. ## Actual Result ``` Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/models.py", line 379, in prepare_url scheme, auth, host, port, path, query, fragment = parse_url(url) File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, in parse_url return six.raise_from(LocationParseError(source_url), None) File "<string>", line 3, in raise_from urllib3.exceptions.LocationParseError: Failed to parse: https://google.com During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 519, in request prep = self.prepare_request(req) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 452, in prepare_request p.prepare( File "/usr/lib/python3/dist-packages/requests/models.py", line 313, in prepare self.prepare_url(url, params) File "/usr/lib/python3/dist-packages/requests/models.py", line 381, in prepare_url raise InvalidURL(*e.args) requests.exceptions.InvalidURL: Failed to parse: https://google.com ``` ## Reproduction Steps `python3 -c "import requests; requests.get('https://google.com');"` on CLI. ## System Information $ python3 -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.4.0-33-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.0.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": true } ``` ## Other Information When I try to hit that URL in my browser it works fine. I am seeing the same thing with [Certbot](https://github.com/certbot/certbot) and [Emscripten](https://github.com/emscripten-core/emscripten).
{ "avatar_url": "https://avatars.githubusercontent.com/u/1606679?v=4", "events_url": "https://api.github.com/users/nickwebha/events{/privacy}", "followers_url": "https://api.github.com/users/nickwebha/followers", "following_url": "https://api.github.com/users/nickwebha/following{/other_user}", "gists_url": "https://api.github.com/users/nickwebha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nickwebha", "id": 1606679, "login": "nickwebha", "node_id": "MDQ6VXNlcjE2MDY2Nzk=", "organizations_url": "https://api.github.com/users/nickwebha/orgs", "received_events_url": "https://api.github.com/users/nickwebha/received_events", "repos_url": "https://api.github.com/users/nickwebha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nickwebha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nickwebha/subscriptions", "type": "User", "url": "https://api.github.com/users/nickwebha", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5476/reactions" }
https://api.github.com/repos/psf/requests/issues/5476/timeline
null
completed
null
null
false
[ "> Reproduction Steps\r\n> ```python3 -c \"import requests; requests.get('https://google.com');\" on CLI.```\r\n\r\nI can't reproduce this on Linux (Debian), Mac (OS X Catalina), or Windows (10). Likely something wrong on your side.", "I can reproduce this error.\r\nThis error ocurred in my installation because u...
https://api.github.com/repos/psf/requests/issues/5475
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5475/labels{/name}
https://api.github.com/repos/psf/requests/issues/5475/comments
https://api.github.com/repos/psf/requests/issues/5475/events
https://github.com/psf/requests/pull/5475
626,950,934
MDExOlB1bGxSZXF1ZXN0NDI0ODQ3NTk0
5,475
Google App Engine
{ "avatar_url": "https://avatars.githubusercontent.com/u/6678748?v=4", "events_url": "https://api.github.com/users/KartikChugh/events{/privacy}", "followers_url": "https://api.github.com/users/KartikChugh/followers", "following_url": "https://api.github.com/users/KartikChugh/following{/other_user}", "gists_url": "https://api.github.com/users/KartikChugh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/KartikChugh", "id": 6678748, "login": "KartikChugh", "node_id": "MDQ6VXNlcjY2Nzg3NDg=", "organizations_url": "https://api.github.com/users/KartikChugh/orgs", "received_events_url": "https://api.github.com/users/KartikChugh/received_events", "repos_url": "https://api.github.com/users/KartikChugh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/KartikChugh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/KartikChugh/subscriptions", "type": "User", "url": "https://api.github.com/users/KartikChugh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-29T02:23:52Z
2021-08-28T00:06:28Z
2020-06-17T20:09:35Z
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/5475/reactions" }
https://api.github.com/repos/psf/requests/issues/5475/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5475.diff", "html_url": "https://github.com/psf/requests/pull/5475", "merged_at": "2020-06-17T20:09:35Z", "patch_url": "https://github.com/psf/requests/pull/5475.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5475" }
true
[ "Would you mind squashing and rebasing onto the current master branch?" ]
https://api.github.com/repos/psf/requests/issues/5474
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5474/labels{/name}
https://api.github.com/repos/psf/requests/issues/5474/comments
https://api.github.com/repos/psf/requests/issues/5474/events
https://github.com/psf/requests/issues/5474
625,758,756
MDU6SXNzdWU2MjU3NTg3NTY=
5,474
Malformed URL leads to unexpected UnicodeError
{ "avatar_url": "https://avatars.githubusercontent.com/u/502876?v=4", "events_url": "https://api.github.com/users/musically-ut/events{/privacy}", "followers_url": "https://api.github.com/users/musically-ut/followers", "following_url": "https://api.github.com/users/musically-ut/following{/other_user}", "gists_url": "https://api.github.com/users/musically-ut/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/musically-ut", "id": 502876, "login": "musically-ut", "node_id": "MDQ6VXNlcjUwMjg3Ng==", "organizations_url": "https://api.github.com/users/musically-ut/orgs", "received_events_url": "https://api.github.com/users/musically-ut/received_events", "repos_url": "https://api.github.com/users/musically-ut/repos", "site_admin": false, "starred_url": "https://api.github.com/users/musically-ut/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/musically-ut/subscriptions", "type": "User", "url": "https://api.github.com/users/musically-ut", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-05-27T14:43:26Z
2021-08-31T00:06:50Z
2020-06-15T14:49:40Z
NONE
resolved
Giving the malformed URL `http://.com` should lead to `InvalidURL` but results in a misleading `UnicodeError`. ## Expected Result Should raise `InvalidURL`. ## Actual Result Raises `UnicodeError`. ## Reproduction Steps ```python import requests requests.get("https://.com") ``` results in: ``` --------------------------------------------------------------------------- UnicodeError Traceback (most recent call last) ~/miniconda3/lib/python3.7/encodings/idna.py in encode(self, input, errors) 164 if not (0 < len(label) < 64): --> 165 raise UnicodeError("label empty or too long") 166 if len(labels[-1]) >= 64: UnicodeError: label empty or too long The above exception was the direct cause of the following exception: UnicodeError Traceback (most recent call last) <ipython-input-33-45504cf090ae> in <module> ----> 1 requests.get('http://.com') ~/miniconda3/lib/python3.7/site-packages/requests/api.py in get(url, params, **kwargs) 73 74 kwargs.setdefault('allow_redirects', True) ---> 75 return request('get', url, params=params, **kwargs) 76 77 ~/miniconda3/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs) 58 # cases, and look like a memory leak in others. 59 with sessions.Session() as session: ---> 60 return session.request(method=method, url=url, **kwargs) 61 62 ~/miniconda3/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 531 } 532 send_kwargs.update(settings) --> 533 resp = self.send(prep, **send_kwargs) 534 535 return resp ~/miniconda3/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs) 644 645 # Send the request --> 646 r = adapter.send(request, **kwargs) 647 648 # Total elapsed time of the request (approximately) ~/miniconda3/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 447 decode_content=False, 448 retries=self.max_retries, --> 449 timeout=timeout 450 ) 451 ~/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 598 timeout=timeout_obj, 599 body=body, headers=headers, --> 600 chunked=chunked) 601 602 # If we're going to release the connection in ``finally:``, then ~/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 352 conn.request_chunked(method, url, **httplib_request_kw) 353 else: --> 354 conn.request(method, url, **httplib_request_kw) 355 356 # Reset the timeout for the recv() on the socket ~/miniconda3/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked) 1227 encode_chunked=False): 1228 """Send a complete request to the server.""" -> 1229 self._send_request(method, url, body, headers, encode_chunked) 1230 1231 def _send_request(self, method, url, body, headers, encode_chunked): ~/miniconda3/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked) 1273 # default charset of iso-8859-1. 1274 body = _encode(body, 'body') -> 1275 self.endheaders(body, encode_chunked=encode_chunked) 1276 1277 def getresponse(self): ~/miniconda3/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked) 1222 else: 1223 raise CannotSendHeader() -> 1224 self._send_output(message_body, encode_chunked=encode_chunked) 1225 1226 def request(self, method, url, body=None, headers={}, *, ~/miniconda3/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked) 1014 msg = b"\r\n".join(self._buffer) 1015 del self._buffer[:] -> 1016 self.send(msg) 1017 1018 if message_body is not None: ~/miniconda3/lib/python3.7/http/client.py in send(self, data) 954 if self.sock is None: 955 if self.auto_open: --> 956 self.connect() 957 else: 958 raise NotConnected() ~/miniconda3/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 179 180 def connect(self): --> 181 conn = self._new_conn() 182 self._prepare_conn(conn) 183 ~/miniconda3/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 157 try: 158 conn = connection.create_connection( --> 159 (self._dns_host, self.port), self.timeout, **extra_kw) 160 161 except SocketTimeout: ~/miniconda3/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 55 family = allowed_gai_family() 56 ---> 57 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 58 af, socktype, proto, canonname, sa = res 59 sock = None ~/miniconda3/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags) 746 # and socket type values to enum constants. 747 addrlist = [] --> 748 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 749 af, socktype, proto, canonname, sa = res 750 addrlist.append((_intenum_converter(af, AddressFamily), UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long) ``` ## System Information $ python -m requests.help ``` ➔ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.7" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "19.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010103f", "version": "19.0.0" }, "requests": { "version": "2.20.1" }, "system_ssl": { "version": "1010103f" }, "urllib3": { "version": "1.24.3" }, "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": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5474/reactions" }
https://api.github.com/repos/psf/requests/issues/5474/timeline
null
completed
null
null
false
[ "Try requests 2.23", "I see the same error.\r\n\r\n```\r\nIn [3]: requests.__version__\r\nOut[3]: '2.23.0'\r\n\r\nIn [4]: requests.get('http://.com')\r\n---------------------------------------------------------------------------\r\nUnicodeError Traceback (most recent call last)\r\n~/m...
https://api.github.com/repos/psf/requests/issues/5473
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5473/labels{/name}
https://api.github.com/repos/psf/requests/issues/5473/comments
https://api.github.com/repos/psf/requests/issues/5473/events
https://github.com/psf/requests/pull/5473
624,474,328
MDExOlB1bGxSZXF1ZXN0NDIyODg4MzM3
5,473
Make chardet encoding auto-detect run once
{ "avatar_url": "https://avatars.githubusercontent.com/u/2045724?v=4", "events_url": "https://api.github.com/users/tomer70/events{/privacy}", "followers_url": "https://api.github.com/users/tomer70/followers", "following_url": "https://api.github.com/users/tomer70/following{/other_user}", "gists_url": "https://api.github.com/users/tomer70/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tomer70", "id": 2045724, "login": "tomer70", "node_id": "MDQ6VXNlcjIwNDU3MjQ=", "organizations_url": "https://api.github.com/users/tomer70/orgs", "received_events_url": "https://api.github.com/users/tomer70/received_events", "repos_url": "https://api.github.com/users/tomer70/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tomer70/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tomer70/subscriptions", "type": "User", "url": "https://api.github.com/users/tomer70", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-05-25T20:32:35Z
2021-08-27T00:08:46Z
2021-02-20T14:48:20Z
NONE
resolved
When you are using reuqest.request to get large non-text files and you are trying to call r.text, it tries to auto-detect using chardet because there is no header defining the charset. When chardet is running on large EXE/PDF files (and maybe other file types) it takes quite some time to get the answer, which is None. Once None returns, self.encoding receives the None value. Therefore the next time you call r.text on the same content, it will try to auto-detect again as if you never tried to auto-detect it. I know it doesn't make much sense to use r.text when requesting PDF/EXE files but sometimes websites do return EXE/PDF content and not HTML as you would expect. I think it can also improve performance when doing multiple calls to r.text on text content that needs to be auto-detected as well.
{ "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/5473/reactions" }
https://api.github.com/repos/psf/requests/issues/5473/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5473.diff", "html_url": "https://github.com/psf/requests/pull/5473", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5473.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5473" }
true
[ "Why prefer `r.text` over `r.content`? Why do you want binary data (exe, pdf) as unicode?", "> Why prefer `r.text` over `r.content`? Why do you want binary data (exe, pdf) as unicode?\r\n\r\nThanks for the comment.\r\n\r\nIt is not a matter of preference as need. \r\nfor example I build a crawler and at some poin...
https://api.github.com/repos/psf/requests/issues/5472
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5472/labels{/name}
https://api.github.com/repos/psf/requests/issues/5472/comments
https://api.github.com/repos/psf/requests/issues/5472/events
https://github.com/psf/requests/issues/5472
623,660,010
MDU6SXNzdWU2MjM2NjAwMTA=
5,472
Problem with python3.6
{ "avatar_url": "https://avatars.githubusercontent.com/u/25548515?v=4", "events_url": "https://api.github.com/users/FathiHamed/events{/privacy}", "followers_url": "https://api.github.com/users/FathiHamed/followers", "following_url": "https://api.github.com/users/FathiHamed/following{/other_user}", "gists_url": "https://api.github.com/users/FathiHamed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/FathiHamed", "id": 25548515, "login": "FathiHamed", "node_id": "MDQ6VXNlcjI1NTQ4NTE1", "organizations_url": "https://api.github.com/users/FathiHamed/orgs", "received_events_url": "https://api.github.com/users/FathiHamed/received_events", "repos_url": "https://api.github.com/users/FathiHamed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/FathiHamed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FathiHamed/subscriptions", "type": "User", "url": "https://api.github.com/users/FathiHamed", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-23T13:23:00Z
2021-08-31T00:06:56Z
2020-05-23T13:32:45Z
NONE
resolved
When I try to send a request via python3.6 to this url: "https://www.khaneyeshoma.ir/", it waits until Timeout exception is raised. But when I try the same request via python2.7 it is successfully completed with status code: 200. Can you help me? Thanks!
{ "avatar_url": "https://avatars.githubusercontent.com/u/25548515?v=4", "events_url": "https://api.github.com/users/FathiHamed/events{/privacy}", "followers_url": "https://api.github.com/users/FathiHamed/followers", "following_url": "https://api.github.com/users/FathiHamed/following{/other_user}", "gists_url": "https://api.github.com/users/FathiHamed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/FathiHamed", "id": 25548515, "login": "FathiHamed", "node_id": "MDQ6VXNlcjI1NTQ4NTE1", "organizations_url": "https://api.github.com/users/FathiHamed/orgs", "received_events_url": "https://api.github.com/users/FathiHamed/received_events", "repos_url": "https://api.github.com/users/FathiHamed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/FathiHamed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FathiHamed/subscriptions", "type": "User", "url": "https://api.github.com/users/FathiHamed", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5472/reactions" }
https://api.github.com/repos/psf/requests/issues/5472/timeline
null
completed
null
null
false
[ "No. This is not a support forum. Go to stackoverflow.com. Provide the exact versions of python, your system dependencies, requests, etc. and the exact results you get." ]
https://api.github.com/repos/psf/requests/issues/5471
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5471/labels{/name}
https://api.github.com/repos/psf/requests/issues/5471/comments
https://api.github.com/repos/psf/requests/issues/5471/events
https://github.com/psf/requests/issues/5471
623,634,261
MDU6SXNzdWU2MjM2MzQyNjE=
5,471
about session?
{ "avatar_url": "https://avatars.githubusercontent.com/u/15169452?v=4", "events_url": "https://api.github.com/users/sjm1992st/events{/privacy}", "followers_url": "https://api.github.com/users/sjm1992st/followers", "following_url": "https://api.github.com/users/sjm1992st/following{/other_user}", "gists_url": "https://api.github.com/users/sjm1992st/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sjm1992st", "id": 15169452, "login": "sjm1992st", "node_id": "MDQ6VXNlcjE1MTY5NDUy", "organizations_url": "https://api.github.com/users/sjm1992st/orgs", "received_events_url": "https://api.github.com/users/sjm1992st/received_events", "repos_url": "https://api.github.com/users/sjm1992st/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sjm1992st/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sjm1992st/subscriptions", "type": "User", "url": "https://api.github.com/users/sjm1992st", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-05-23T10:57:54Z
2021-08-31T00:06:49Z
2020-06-17T20:18:30Z
NONE
resolved
If I generate a seesion for different domain names in the same program, for example : url1: session1 = requests.session () url2: session2 = requests.session () What's the difference with me only generating a session for url1 and url2? Will there be any difference in performance? 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/5471/reactions" }
https://api.github.com/repos/psf/requests/issues/5471/timeline
null
completed
null
null
false
[ "### From the source code of request.sessions:\r\n>This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies).\r\n\r\nAn example of this is any cookies a request returns will be there whenever you call a request from that session you call the request from (if you m...
https://api.github.com/repos/psf/requests/issues/5470
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5470/labels{/name}
https://api.github.com/repos/psf/requests/issues/5470/comments
https://api.github.com/repos/psf/requests/issues/5470/events
https://github.com/psf/requests/issues/5470
623,616,111
MDU6SXNzdWU2MjM2MTYxMTE=
5,470
for non-english response, may add apparent_text for convenient
{ "avatar_url": "https://avatars.githubusercontent.com/u/32261870?v=4", "events_url": "https://api.github.com/users/NewUserHa/events{/privacy}", "followers_url": "https://api.github.com/users/NewUserHa/followers", "following_url": "https://api.github.com/users/NewUserHa/following{/other_user}", "gists_url": "https://api.github.com/users/NewUserHa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/NewUserHa", "id": 32261870, "login": "NewUserHa", "node_id": "MDQ6VXNlcjMyMjYxODcw", "organizations_url": "https://api.github.com/users/NewUserHa/orgs", "received_events_url": "https://api.github.com/users/NewUserHa/received_events", "repos_url": "https://api.github.com/users/NewUserHa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/NewUserHa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NewUserHa/subscriptions", "type": "User", "url": "https://api.github.com/users/NewUserHa", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-05-23T09:11:18Z
2021-08-30T00:06:24Z
2020-07-21T06:01:01Z
NONE
resolved
most non-English response has incorrect r.encoding so it need: ``` r.encoding = r.apparent_encoding r.text ``` what about a new attribute like `r.apparent_text` or `r.text(chardect=True)`for the result? 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/5470/reactions" }
https://api.github.com/repos/psf/requests/issues/5470/timeline
null
completed
null
null
false
[ "https://github.com/psf/requests/issues/5084\r\nhttps://github.com/psf/requests/issues/2086", "New features are not being added", "I have read that and I don't think this can count as a feature.", "Adding new API surface area is a new feature. Further, if `r.encoding` is incorrect but `r.apparent_encoding` is...
https://api.github.com/repos/psf/requests/issues/5469
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5469/labels{/name}
https://api.github.com/repos/psf/requests/issues/5469/comments
https://api.github.com/repos/psf/requests/issues/5469/events
https://github.com/psf/requests/issues/5469
622,730,139
MDU6SXNzdWU2MjI3MzAxMzk=
5,469
Does `Response.content` decode the unicode character in JSON implictly?
{ "avatar_url": "https://avatars.githubusercontent.com/u/13658574?v=4", "events_url": "https://api.github.com/users/Phi-Li/events{/privacy}", "followers_url": "https://api.github.com/users/Phi-Li/followers", "following_url": "https://api.github.com/users/Phi-Li/following{/other_user}", "gists_url": "https://api.github.com/users/Phi-Li/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Phi-Li", "id": 13658574, "login": "Phi-Li", "node_id": "MDQ6VXNlcjEzNjU4NTc0", "organizations_url": "https://api.github.com/users/Phi-Li/orgs", "received_events_url": "https://api.github.com/users/Phi-Li/received_events", "repos_url": "https://api.github.com/users/Phi-Li/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Phi-Li/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Phi-Li/subscriptions", "type": "User", "url": "https://api.github.com/users/Phi-Li", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-21T19:29:42Z
2021-08-31T00:06:56Z
2020-05-21T20:37:24Z
NONE
resolved
Python 3.8.2, requests 2.23.0 Code for reproduce: ```python headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0' } resp = requests.get('https://api.bgm.tv/subject/12', headers=headers) print(resp.content) ``` Expect `resp.content` to be bytes containing the original payload bytes (https://requests.readthedocs.io/en/master/user/quickstart/#binary-response-content), but unicode character in the JSON is decoded as unicode representation with a prefix `\u`.
{ "avatar_url": "https://avatars.githubusercontent.com/u/13658574?v=4", "events_url": "https://api.github.com/users/Phi-Li/events{/privacy}", "followers_url": "https://api.github.com/users/Phi-Li/followers", "following_url": "https://api.github.com/users/Phi-Li/following{/other_user}", "gists_url": "https://api.github.com/users/Phi-Li/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Phi-Li", "id": 13658574, "login": "Phi-Li", "node_id": "MDQ6VXNlcjEzNjU4NTc0", "organizations_url": "https://api.github.com/users/Phi-Li/orgs", "received_events_url": "https://api.github.com/users/Phi-Li/received_events", "repos_url": "https://api.github.com/users/Phi-Li/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Phi-Li/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Phi-Li/subscriptions", "type": "User", "url": "https://api.github.com/users/Phi-Li", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5469/reactions" }
https://api.github.com/repos/psf/requests/issues/5469/timeline
null
completed
null
null
false
[ "No, resp.content is bytes and resp.text is the decoded unicode text.", "> No, resp.content is bytes and resp.text is the decoded unicode text.\r\n\r\nThanks for the reply. I decompressed the raw response body and figured out the `\\uxxxx` transformation was made on the server side, so the issue has nothing to do...
https://api.github.com/repos/psf/requests/issues/5468
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5468/labels{/name}
https://api.github.com/repos/psf/requests/issues/5468/comments
https://api.github.com/repos/psf/requests/issues/5468/events
https://github.com/psf/requests/pull/5468
622,508,933
MDExOlB1bGxSZXF1ZXN0NDIxMzYwMDQ4
5,468
Fix typo in README
{ "avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4", "events_url": "https://api.github.com/users/kkirsche/events{/privacy}", "followers_url": "https://api.github.com/users/kkirsche/followers", "following_url": "https://api.github.com/users/kkirsche/following{/other_user}", "gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kkirsche", "id": 947110, "login": "kkirsche", "node_id": "MDQ6VXNlcjk0NzExMA==", "organizations_url": "https://api.github.com/users/kkirsche/orgs", "received_events_url": "https://api.github.com/users/kkirsche/received_events", "repos_url": "https://api.github.com/users/kkirsche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions", "type": "User", "url": "https://api.github.com/users/kkirsche", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-05-21T13:44:07Z
2021-08-28T00:06:29Z
2020-06-15T15:23:17Z
CONTRIBUTOR
resolved
Fix typo in README related to installation guidelines
{ "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/5468/reactions" }
https://api.github.com/repos/psf/requests/issues/5468/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5468.diff", "html_url": "https://github.com/psf/requests/pull/5468", "merged_at": "2020-06-15T15:23:17Z", "patch_url": "https://github.com/psf/requests/pull/5468.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5468" }
true
[]
https://api.github.com/repos/psf/requests/issues/5467
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5467/labels{/name}
https://api.github.com/repos/psf/requests/issues/5467/comments
https://api.github.com/repos/psf/requests/issues/5467/events
https://github.com/psf/requests/issues/5467
622,152,527
MDU6SXNzdWU2MjIxNTI1Mjc=
5,467
Stale requests2 package on pypi
{ "avatar_url": "https://avatars.githubusercontent.com/u/412019?v=4", "events_url": "https://api.github.com/users/ccope/events{/privacy}", "followers_url": "https://api.github.com/users/ccope/followers", "following_url": "https://api.github.com/users/ccope/following{/other_user}", "gists_url": "https://api.github.com/users/ccope/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ccope", "id": 412019, "login": "ccope", "node_id": "MDQ6VXNlcjQxMjAxOQ==", "organizations_url": "https://api.github.com/users/ccope/orgs", "received_events_url": "https://api.github.com/users/ccope/received_events", "repos_url": "https://api.github.com/users/ccope/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ccope/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ccope/subscriptions", "type": "User", "url": "https://api.github.com/users/ccope", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-05-20T23:48:15Z
2021-08-30T00:06:23Z
2020-07-21T06:02:47Z
NONE
resolved
I'm not totally sure where the right place to report this is, but there is a confusing stale copy of requests on pypi, called requests2: https://pypi.org/project/requests2/ It is: * 3 years old * uploaded by the original maintainer * showing a README with some healthy-looking badges * listed as Development Status: 5 - Production/Stable in pypi * getting used accidentally in new projects: https://libraries.io/pypi/requests2/usage * easy to find when searching for requests: ![Selection_142](https://user-images.githubusercontent.com/412019/82508158-12027680-9ab9-11ea-9c41-45f7ee47d0d3.png) I believe it should be [yanked](https://www.python.org/dev/peps/pep-0592/) and/or [replaced with a redirect](https://www.dampfkraft.com/code/how-to-deprecate-a-pypi-package.html#provide-a-redirect).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5467/reactions" }
https://api.github.com/repos/psf/requests/issues/5467/timeline
null
completed
null
null
false
[ "The pepole who own that project don't work on this project. You'll need to report this to PyPI", "I'm not sure what you mean. I am not very familiar with the history of ownership/maintenance of requests, but it seems that over time it has been transferred from kennethreitz to the Python Software Foundation. If n...
https://api.github.com/repos/psf/requests/issues/5466
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5466/labels{/name}
https://api.github.com/repos/psf/requests/issues/5466/comments
https://api.github.com/repos/psf/requests/issues/5466/events
https://github.com/psf/requests/issues/5466
622,074,757
MDU6SXNzdWU2MjIwNzQ3NTc=
5,466
`.json()` degrades `stream=True`
{ "avatar_url": "https://avatars.githubusercontent.com/u/1236420?v=4", "events_url": "https://api.github.com/users/reinderien/events{/privacy}", "followers_url": "https://api.github.com/users/reinderien/followers", "following_url": "https://api.github.com/users/reinderien/following{/other_user}", "gists_url": "https://api.github.com/users/reinderien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/reinderien", "id": 1236420, "login": "reinderien", "node_id": "MDQ6VXNlcjEyMzY0MjA=", "organizations_url": "https://api.github.com/users/reinderien/orgs", "received_events_url": "https://api.github.com/users/reinderien/received_events", "repos_url": "https://api.github.com/users/reinderien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/reinderien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/reinderien/subscriptions", "type": "User", "url": "https://api.github.com/users/reinderien", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-20T20:48:01Z
2021-08-28T00:06:01Z
2020-12-22T13:39:41Z
NONE
resolved
The current logic in `.json()` forces a load of `self.content`, removing any advantage from `stream=True`. For large JSON payloads this creates memory problems. The memory footprint could be halved(ish) by: - Using `Content-Length` instead of `len(self.content)` - Using `json.load(raw)` rather than `loads`, also avoiding `content.decode()` ## Expected Result That the memory footprint of `.json()` be O(1) against input length, not counting the output object. ## Actual Result The memory footprint is O(n) in input length due to reliance on `.content`. ## Reproduction Steps Call `requests.get('something-large.json', stream=True).json()` ## System Information $ python -m requests.help ```json { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.2" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "101000af" }, "urllib3": { "version": "1.25.9" }, "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/5466/reactions" }
https://api.github.com/repos/psf/requests/issues/5466/timeline
null
completed
null
null
false
[ "> * Using `Content-Length` instead of `len(self.content)`\r\n\r\n`Content-Length` only works if the content hasn't been encoded and had to be decoded, e.g., gzip compressed. It's not an accurate representation of what the JSON content length might be\r\n\r\n> Using `json.load(raw)` rather than `loads`, also av...
https://api.github.com/repos/psf/requests/issues/5465
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5465/labels{/name}
https://api.github.com/repos/psf/requests/issues/5465/comments
https://api.github.com/repos/psf/requests/issues/5465/events
https://github.com/psf/requests/pull/5465
622,014,991
MDExOlB1bGxSZXF1ZXN0NDIwOTYyMTc0
5,465
Handle space-separated values in NO_PROXY
{ "avatar_url": "https://avatars.githubusercontent.com/u/573017?v=4", "events_url": "https://api.github.com/users/michael-o/events{/privacy}", "followers_url": "https://api.github.com/users/michael-o/followers", "following_url": "https://api.github.com/users/michael-o/following{/other_user}", "gists_url": "https://api.github.com/users/michael-o/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/michael-o", "id": 573017, "login": "michael-o", "node_id": "MDQ6VXNlcjU3MzAxNw==", "organizations_url": "https://api.github.com/users/michael-o/orgs", "received_events_url": "https://api.github.com/users/michael-o/received_events", "repos_url": "https://api.github.com/users/michael-o/repos", "site_admin": false, "starred_url": "https://api.github.com/users/michael-o/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/michael-o/subscriptions", "type": "User", "url": "https://api.github.com/users/michael-o", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-05-20T19:01:12Z
2021-08-27T00:08:53Z
2021-01-04T23:47:23Z
NONE
resolved
Since there is no standard for the NO_PROXY environment variable allow values to be comma- and space-separated values.
{ "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/5465/reactions" }
https://api.github.com/repos/psf/requests/issues/5465/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5465.diff", "html_url": "https://github.com/psf/requests/pull/5465", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5465.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5465" }
true
[ "Hi @michael-o, I did a bit of digging. While `NO_PROXY` has no formal spec, the majority of tools seem to be in agreement on its usage. I've been unable to find documentation for any common web tool that uses space-delimited lists for NO_PROXY. Curl, which we usually use as our model in situations like this, [call...
https://api.github.com/repos/psf/requests/issues/5464
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5464/labels{/name}
https://api.github.com/repos/psf/requests/issues/5464/comments
https://api.github.com/repos/psf/requests/issues/5464/events
https://github.com/psf/requests/pull/5464
621,354,329
MDExOlB1bGxSZXF1ZXN0NDIwNDIzMTI5
5,464
Allow semicolon in the href of Link header
{ "avatar_url": "https://avatars.githubusercontent.com/u/65147?v=4", "events_url": "https://api.github.com/users/ibnesayeed/events{/privacy}", "followers_url": "https://api.github.com/users/ibnesayeed/followers", "following_url": "https://api.github.com/users/ibnesayeed/following{/other_user}", "gists_url": "https://api.github.com/users/ibnesayeed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ibnesayeed", "id": 65147, "login": "ibnesayeed", "node_id": "MDQ6VXNlcjY1MTQ3", "organizations_url": "https://api.github.com/users/ibnesayeed/orgs", "received_events_url": "https://api.github.com/users/ibnesayeed/received_events", "repos_url": "https://api.github.com/users/ibnesayeed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ibnesayeed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ibnesayeed/subscriptions", "type": "User", "url": "https://api.github.com/users/ibnesayeed", "user_view_type": "public" }
[]
open
false
null
[]
null
1
2020-05-19T23:41:45Z
2022-01-03T15:26:44Z
null
NONE
null
Semicolons are valid characters in URIs, splitting them while parsing the `Link` header results in unexpected token and wrong `url` attribute (notice `;oldid=934259284` portion the below example). ``` <https://en.wikipedia.org/w/index.php?title=COVID-19_pandemic&amp;oldid=934259284>; rel="original", <https://web.archive.org/web/timemap/link/https://en.wikipedia.org/w/index.php?title=COVID-19_pandemic&amp;oldid=934259284>; rel="timemap"; type="application/link-format" ``` This PR attempts to fix current parsing issue and also renames a variable to better reflect the purpose of it. I would note here that this parser still is far from perfect and can be better implemented using state machine.
null
{ "+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/5464/reactions" }
https://api.github.com/repos/psf/requests/issues/5464/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5464.diff", "html_url": "https://github.com/psf/requests/pull/5464", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5464.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5464" }
true
[ "@nateprewitt is there anything we can to do to get it merged?" ]
https://api.github.com/repos/psf/requests/issues/5463
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5463/labels{/name}
https://api.github.com/repos/psf/requests/issues/5463/comments
https://api.github.com/repos/psf/requests/issues/5463/events
https://github.com/psf/requests/issues/5463
620,984,402
MDU6SXNzdWU2MjA5ODQ0MDI=
5,463
response header has encoding error
{ "avatar_url": "https://avatars.githubusercontent.com/u/25432800?v=4", "events_url": "https://api.github.com/users/MineEric64/events{/privacy}", "followers_url": "https://api.github.com/users/MineEric64/followers", "following_url": "https://api.github.com/users/MineEric64/following{/other_user}", "gists_url": "https://api.github.com/users/MineEric64/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MineEric64", "id": 25432800, "login": "MineEric64", "node_id": "MDQ6VXNlcjI1NDMyODAw", "organizations_url": "https://api.github.com/users/MineEric64/orgs", "received_events_url": "https://api.github.com/users/MineEric64/received_events", "repos_url": "https://api.github.com/users/MineEric64/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MineEric64/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MineEric64/subscriptions", "type": "User", "url": "https://api.github.com/users/MineEric64", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-19T13:37:23Z
2021-08-31T00:06:58Z
2020-05-20T05:22:54Z
NONE
resolved
Summary. some http response header without English (using utf-8) has encoding error. original text (2. 핵심정보를 담은 발표 형성평가 5월 19일) I uploaded this text on server. and I responded to server with get function. (`requests.get()`) but I got this text (2. 핵심정보를 담은 발표 형성평가 5월 19일) from http response header. I converted the text has encoding error to ascii to utf8 converter. It converts successfully. maybe requests package gets http response header with ascii encoding. **EDIT** I tried this code `req.encoding = 'utf-8'` but this code didn't work. code: ``` headers = { 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7', 'Content-type': 'text/plain; charset=utf-8' } req = requests.get(link, headers=headers, allow_redirects=True) req.encoding = 'utf-8' print(req.headers['Content-Disposition']) # this code prints the text has encoding error ``` ## Expected Result 핵심정보를 담은 발표 형성평가 5월 19일 ## Actual Result 핵심정보를 담은 발표 형성평가 5월 19일 ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help I am using python 3.7.3, requests latest version (v2.23.0) ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "101000af" }, "urllib3": { "version": "1.25.9" }, "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). thank you.
{ "avatar_url": "https://avatars.githubusercontent.com/u/25432800?v=4", "events_url": "https://api.github.com/users/MineEric64/events{/privacy}", "followers_url": "https://api.github.com/users/MineEric64/followers", "following_url": "https://api.github.com/users/MineEric64/following{/other_user}", "gists_url": "https://api.github.com/users/MineEric64/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MineEric64", "id": 25432800, "login": "MineEric64", "node_id": "MDQ6VXNlcjI1NDMyODAw", "organizations_url": "https://api.github.com/users/MineEric64/orgs", "received_events_url": "https://api.github.com/users/MineEric64/received_events", "repos_url": "https://api.github.com/users/MineEric64/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MineEric64/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MineEric64/subscriptions", "type": "User", "url": "https://api.github.com/users/MineEric64", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5463/reactions" }
https://api.github.com/repos/psf/requests/issues/5463/timeline
null
completed
null
null
false
[ "I fixed with code `req.headers['Content-Disposition'].encode(\"ISO-8859-1\").decode(\"utf-8\")`." ]
https://api.github.com/repos/psf/requests/issues/5462
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5462/labels{/name}
https://api.github.com/repos/psf/requests/issues/5462/comments
https://api.github.com/repos/psf/requests/issues/5462/events
https://github.com/psf/requests/issues/5462
620,276,105
MDU6SXNzdWU2MjAyNzYxMDU=
5,462
Python Requests normalizes the URL
{ "avatar_url": "https://avatars.githubusercontent.com/u/2718385?v=4", "events_url": "https://api.github.com/users/hopkinskong/events{/privacy}", "followers_url": "https://api.github.com/users/hopkinskong/followers", "following_url": "https://api.github.com/users/hopkinskong/following{/other_user}", "gists_url": "https://api.github.com/users/hopkinskong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hopkinskong", "id": 2718385, "login": "hopkinskong", "node_id": "MDQ6VXNlcjI3MTgzODU=", "organizations_url": "https://api.github.com/users/hopkinskong/orgs", "received_events_url": "https://api.github.com/users/hopkinskong/received_events", "repos_url": "https://api.github.com/users/hopkinskong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hopkinskong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hopkinskong/subscriptions", "type": "User", "url": "https://api.github.com/users/hopkinskong", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-18T14:54:33Z
2021-08-31T00:06:57Z
2020-05-20T16:31:15Z
NONE
resolved
When requesting a URL (get/post), Requests normalizes the URL. For example: ``` r = requests.get("http://123.123.123.123/../../../../../../test") print(str(r.status_code)) ``` ## Expected Result ``` GET /../../../../../../test HTTP/1.1 Host: 123.123.123.123 Connection: close Accept-Encoding: gzip, deflate Accept: */* User-Agent: python-requests/2.22.0 ``` ## Actual Result ``` GET /test HTTP/1.1 Host: 123.123.123.123 Connection: close Accept-Encoding: gzip, deflate Accept: */* User-Agent: python-requests/2.22.0 ``` ## Reproduction Steps ```python import requests r = requests.get("http://123.123.123.123/../../../../../../test") print(str(r.status_code)) ``` ## System Information ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "2.7.17" }, "platform": { "release": "5.3.0-51-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "17.5.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.25.6" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/2718385?v=4", "events_url": "https://api.github.com/users/hopkinskong/events{/privacy}", "followers_url": "https://api.github.com/users/hopkinskong/followers", "following_url": "https://api.github.com/users/hopkinskong/following{/other_user}", "gists_url": "https://api.github.com/users/hopkinskong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hopkinskong", "id": 2718385, "login": "hopkinskong", "node_id": "MDQ6VXNlcjI3MTgzODU=", "organizations_url": "https://api.github.com/users/hopkinskong/orgs", "received_events_url": "https://api.github.com/users/hopkinskong/received_events", "repos_url": "https://api.github.com/users/hopkinskong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hopkinskong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hopkinskong/subscriptions", "type": "User", "url": "https://api.github.com/users/hopkinskong", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5462/reactions" }
https://api.github.com/repos/psf/requests/issues/5462/timeline
null
completed
null
null
false
[ "Duplicate of #5289", "Thanks." ]
https://api.github.com/repos/psf/requests/issues/5461
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5461/labels{/name}
https://api.github.com/repos/psf/requests/issues/5461/comments
https://api.github.com/repos/psf/requests/issues/5461/events
https://github.com/psf/requests/issues/5461
619,752,546
MDU6SXNzdWU2MTk3NTI1NDY=
5,461
Treat invalid percent encoding consistently
{ "avatar_url": "https://avatars.githubusercontent.com/u/30379553?v=4", "events_url": "https://api.github.com/users/openandclose/events{/privacy}", "followers_url": "https://api.github.com/users/openandclose/followers", "following_url": "https://api.github.com/users/openandclose/following{/other_user}", "gists_url": "https://api.github.com/users/openandclose/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/openandclose", "id": 30379553, "login": "openandclose", "node_id": "MDQ6VXNlcjMwMzc5NTUz", "organizations_url": "https://api.github.com/users/openandclose/orgs", "received_events_url": "https://api.github.com/users/openandclose/received_events", "repos_url": "https://api.github.com/users/openandclose/repos", "site_admin": false, "starred_url": "https://api.github.com/users/openandclose/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/openandclose/subscriptions", "type": "User", "url": "https://api.github.com/users/openandclose", "user_view_type": "public" }
[]
open
false
null
[]
null
10
2020-05-17T17:02:35Z
2020-05-21T17:01:48Z
null
NONE
null
The present form of ``requote_uri`` unnecessarily divides invalid cases. When alpha-numeric, '%' is quoted to '%25'. E.g. ``%pp`` to ``%25pp``. When not alpha-numeric, '%' is kept as is. E.g. ``%--`` to ``%--``. (Note these two examples are in the tests, and the latter is for ``unquote_unreserved``, but the result is the same.) Or ``%<<`` to ``%%3C%3C``. but I think '%' should be quoted in all invalid cases. (Or to put it differently, isolated '%' must be quoted.)
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/5461/reactions" }
https://api.github.com/repos/psf/requests/issues/5461/timeline
null
null
null
null
false
[ "I can not find the rational in the code history.\r\n\r\n(0) The original implementation\r\n(1) Added 'isalnum'\r\n(2) Added try clause and error message.\r\n(3) Added more try clause and one of the present test.\r\n(4) Added another of the present test.\r\n\r\n(0)\r\n**URI cleanup of non-path components**\r\nhttps...
https://api.github.com/repos/psf/requests/issues/5460
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5460/labels{/name}
https://api.github.com/repos/psf/requests/issues/5460/comments
https://api.github.com/repos/psf/requests/issues/5460/events
https://github.com/psf/requests/issues/5460
619,681,679
MDU6SXNzdWU2MTk2ODE2Nzk=
5,460
Make content-type be multi-part without being given files
{ "avatar_url": "https://avatars.githubusercontent.com/u/19555626?v=4", "events_url": "https://api.github.com/users/dasyad00/events{/privacy}", "followers_url": "https://api.github.com/users/dasyad00/followers", "following_url": "https://api.github.com/users/dasyad00/following{/other_user}", "gists_url": "https://api.github.com/users/dasyad00/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dasyad00", "id": 19555626, "login": "dasyad00", "node_id": "MDQ6VXNlcjE5NTU1NjI2", "organizations_url": "https://api.github.com/users/dasyad00/orgs", "received_events_url": "https://api.github.com/users/dasyad00/received_events", "repos_url": "https://api.github.com/users/dasyad00/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dasyad00/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dasyad00/subscriptions", "type": "User", "url": "https://api.github.com/users/dasyad00", "user_view_type": "public" }
[]
closed
true
null
[]
null
12
2020-05-17T11:47:05Z
2021-08-31T00:06:59Z
2020-05-17T12:49:46Z
NONE
resolved
Currently, to post a multipart/form-data with boundaries, you either need to give a File or make the data File-like. This feature aims to allow uploading of data without uploading files. I am working on a fix with @Marti2203
{ "avatar_url": "https://avatars.githubusercontent.com/u/19555626?v=4", "events_url": "https://api.github.com/users/dasyad00/events{/privacy}", "followers_url": "https://api.github.com/users/dasyad00/followers", "following_url": "https://api.github.com/users/dasyad00/following{/other_user}", "gists_url": "https://api.github.com/users/dasyad00/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dasyad00", "id": 19555626, "login": "dasyad00", "node_id": "MDQ6VXNlcjE5NTU1NjI2", "organizations_url": "https://api.github.com/users/dasyad00/orgs", "received_events_url": "https://api.github.com/users/dasyad00/received_events", "repos_url": "https://api.github.com/users/dasyad00/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dasyad00/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dasyad00/subscriptions", "type": "User", "url": "https://api.github.com/users/dasyad00", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5460/reactions" }
https://api.github.com/repos/psf/requests/issues/5460/timeline
null
completed
null
null
false
[ "When you want to send a form without a file but the form has to be of type 'multipart/form-data' we need to write down the explicit boundary in the content-type header, but this is generated by urllib3 and we cannot predict it or pregenerate it as it is supposed to be random, so we have to \"spoof\" the API by sen...
https://api.github.com/repos/psf/requests/issues/5459
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5459/labels{/name}
https://api.github.com/repos/psf/requests/issues/5459/comments
https://api.github.com/repos/psf/requests/issues/5459/events
https://github.com/psf/requests/pull/5459
618,941,243
MDExOlB1bGxSZXF1ZXN0NDE4NTcxNDcx
5,459
Revert PR 1440, do not modify cookie value
{ "avatar_url": "https://avatars.githubusercontent.com/u/12461110?v=4", "events_url": "https://api.github.com/users/yanxurui/events{/privacy}", "followers_url": "https://api.github.com/users/yanxurui/followers", "following_url": "https://api.github.com/users/yanxurui/following{/other_user}", "gists_url": "https://api.github.com/users/yanxurui/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yanxurui", "id": 12461110, "login": "yanxurui", "node_id": "MDQ6VXNlcjEyNDYxMTEw", "organizations_url": "https://api.github.com/users/yanxurui/orgs", "received_events_url": "https://api.github.com/users/yanxurui/received_events", "repos_url": "https://api.github.com/users/yanxurui/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yanxurui/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yanxurui/subscriptions", "type": "User", "url": "https://api.github.com/users/yanxurui", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-15T12:45:27Z
2021-08-28T00:06:25Z
2020-07-21T06:29:19Z
NONE
resolved
Revert PR #1440 as discussed in issue #3759 It does not make sense to modify the cookie value arbitrarily.
{ "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/5459/reactions" }
https://api.github.com/repos/psf/requests/issues/5459/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5459.diff", "html_url": "https://github.com/psf/requests/pull/5459", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5459.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5459" }
true
[ "At this point the behaviour is too ingrained to be reverted arbitrarily and would need to wait for a major version release which is not planned to the best of my knowledge", "This functionality has been in the library for 7 years now, so we can't pull it out without breaking users. If we were to ever put another...
https://api.github.com/repos/psf/requests/issues/5458
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5458/labels{/name}
https://api.github.com/repos/psf/requests/issues/5458/comments
https://api.github.com/repos/psf/requests/issues/5458/events
https://github.com/psf/requests/issues/5458
617,604,293
MDU6SXNzdWU2MTc2MDQyOTM=
5,458
All requests to www.scoutbook.com result in 404s
{ "avatar_url": "https://avatars.githubusercontent.com/u/46465633?v=4", "events_url": "https://api.github.com/users/thatcomputerguy0101/events{/privacy}", "followers_url": "https://api.github.com/users/thatcomputerguy0101/followers", "following_url": "https://api.github.com/users/thatcomputerguy0101/following{/other_user}", "gists_url": "https://api.github.com/users/thatcomputerguy0101/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/thatcomputerguy0101", "id": 46465633, "login": "thatcomputerguy0101", "node_id": "MDQ6VXNlcjQ2NDY1NjMz", "organizations_url": "https://api.github.com/users/thatcomputerguy0101/orgs", "received_events_url": "https://api.github.com/users/thatcomputerguy0101/received_events", "repos_url": "https://api.github.com/users/thatcomputerguy0101/repos", "site_admin": false, "starred_url": "https://api.github.com/users/thatcomputerguy0101/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/thatcomputerguy0101/subscriptions", "type": "User", "url": "https://api.github.com/users/thatcomputerguy0101", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-13T16:53:08Z
2021-08-31T00:07:00Z
2020-05-13T18:02:44Z
NONE
resolved
Any requests to https://www.scoutbook.com and subdirectories result in 404 Not Found errors. Requests using the http library, the urllib library, curl, the Node.JS https library, and a web browser all work and return a 200 status code for the exact same URL. ## Reproduction Steps ```python import requests requests.get("https://www.scoutbook.com/") # returns a Response object with 404 status code ``` ## Expected Result A 200 response with the body returned by the following code: ```python import urllib urllib.request.urlopen("https://www.scoutbook.com/").read() ``` ## Actual Result A 404 response with the following body: ```html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Requested URL cannot be found</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> td { font-family: verdana, arial, sans-serif; } td { font-size: 12px; } table { margin-left: 50px; } a.al:link {color: #0000ff; text-decoration: none;} a.al:visited {color: #0000ff;text-decoration: none;} a.al:hover {color: #0000ff;text-decoration: underline;} p {line-height: 20px; margin-bottom: 15px;} p.ec {color: red;} p.lid {} </style> <script type="text/javascript"> function timed_redirect(seconds, url) { document.getElementById('countdown').innerHTML = seconds; if (seconds <= 0) window.location = url; else setTimeout('timed_redirect(' + --seconds + ', "' + url + '")', 1000); } </script> </head> <body> <table align="left" width="50%" cellpadding="0" cellspacing="0"> <tr> <td align="left"> <p>&nbsp;</p> <h2>Requested URL cannot be found</h2> <p>We are sorry, but the page you are looking for cannot be found. The page has either been removed, renamed or is temporarily unavailable.</p> <p class="ec">404 Not Found</p><p class="lid">Reference ID: f0106a6c-9538-11ea-af75-126f438b3e33</p> <hr> <p><a href="javascript:history.back(1)">Back to previous page</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/">Proceed to homepage</a></p> </td> </tr> <tr> <td> <p>&nbsp;</p> </td> </tr> </table> </body> </html> ``` ## System Information $ python -m requests.help ```json { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.2" }, "platform": { "release": "19.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "101000af" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ``` Python 3.7.2, requests installed through pip
{ "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/5458/reactions" }
https://api.github.com/repos/psf/requests/issues/5458/timeline
null
completed
null
null
false
[ "Doing some more testing, it appears as if Scoutbook has just blocked the requests user-agent. When I changed it to something else (even just removing the s from the end of requests), it worked as expected. What confuses me is why they would block the user-agent for this library but not the one for the built-in pyt...
https://api.github.com/repos/psf/requests/issues/5457
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5457/labels{/name}
https://api.github.com/repos/psf/requests/issues/5457/comments
https://api.github.com/repos/psf/requests/issues/5457/events
https://github.com/psf/requests/issues/5457
617,592,048
MDU6SXNzdWU2MTc1OTIwNDg=
5,457
Possible bug or incorrect usage (on my end)
{ "avatar_url": "https://avatars.githubusercontent.com/u/12190639?v=4", "events_url": "https://api.github.com/users/liquidoshin/events{/privacy}", "followers_url": "https://api.github.com/users/liquidoshin/followers", "following_url": "https://api.github.com/users/liquidoshin/following{/other_user}", "gists_url": "https://api.github.com/users/liquidoshin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/liquidoshin", "id": 12190639, "login": "liquidoshin", "node_id": "MDQ6VXNlcjEyMTkwNjM5", "organizations_url": "https://api.github.com/users/liquidoshin/orgs", "received_events_url": "https://api.github.com/users/liquidoshin/received_events", "repos_url": "https://api.github.com/users/liquidoshin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/liquidoshin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/liquidoshin/subscriptions", "type": "User", "url": "https://api.github.com/users/liquidoshin", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-05-13T16:34:19Z
2021-08-31T00:06:50Z
2020-06-15T14:56:34Z
NONE
resolved
Hi so I'm using your requests module and everything was working fine when I was using it with python2. However, now that I'm on Mac OS Catalina and there's only python3 I've had to revise my code a little and now I'm getting some errors. So I have a little bit of code as follows: response = requests.get(resource, headers={ "Authorization": "Basic " + base64.b64encode( self.username + ":" + self.passwd ), "Accept": datatype }, proxies={"https": None, "http": None}) And when I run my script it gives me an error: File "/Users/dwalker/Documents/workspace/jamfapi/jamfapi_src/jamfapi/jss/JSSRestIface.py", line 48, in jamfApiCall self.username + ":" + self.passwd File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str' Now I had issues similar to this in another project when we converted from py2 to py3 and we resolved it by running .decode("utf-8") with the output object we were getting back from a command being run. However, I'm not sure if this is the same issue. Any ideas on what I'm doing wrong here or how I'm using requests incorrectly? Thank you.
{ "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/5457/reactions" }
https://api.github.com/repos/psf/requests/issues/5457/timeline
null
completed
null
null
false
[ "In Python3, the default encoding for strings changed. I believe if you want a Python2 style string, you need to prefix it with b as in `b\"Byte text\"`. Your issue is probably related to the distinction between string objects and bytes objects. Using decode, you can convert from bytes to string, and encode will co...
https://api.github.com/repos/psf/requests/issues/5456
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5456/labels{/name}
https://api.github.com/repos/psf/requests/issues/5456/comments
https://api.github.com/repos/psf/requests/issues/5456/events
https://github.com/psf/requests/issues/5456
617,424,468
MDU6SXNzdWU2MTc0MjQ0Njg=
5,456
ValueError: Timeout value connect was Timeout
{ "avatar_url": "https://avatars.githubusercontent.com/u/3234964?v=4", "events_url": "https://api.github.com/users/sithara/events{/privacy}", "followers_url": "https://api.github.com/users/sithara/followers", "following_url": "https://api.github.com/users/sithara/following{/other_user}", "gists_url": "https://api.github.com/users/sithara/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sithara", "id": 3234964, "login": "sithara", "node_id": "MDQ6VXNlcjMyMzQ5NjQ=", "organizations_url": "https://api.github.com/users/sithara/orgs", "received_events_url": "https://api.github.com/users/sithara/received_events", "repos_url": "https://api.github.com/users/sithara/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sithara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sithara/subscriptions", "type": "User", "url": "https://api.github.com/users/sithara", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-13T12:54:47Z
2021-08-31T00:06:59Z
2020-05-14T13:34:05Z
NONE
resolved
We have been using docker-compose for running multiple containers. All of a sudden started receiving the below error. There were no updates performed on the server box: ``` [app]# docker-compose ps Traceback (most recent call last): File "/bin/docker-compose", line 11, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 68, in main command() File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 118, in perf orm_command handler(command, command_options) File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 601, in ps self.project.containers(service_names=options['SERVICE'], stopped=True) + File "/usr/lib/python2.7/site-packages/compose/project.py", line 498, in conta iners containers = self._labeled_containers(stopped, one_off) File "/usr/lib/python2.7/site-packages/compose/project.py", line 489, in _labe led_containers filters={'label': self.labels(one_off=one_off)})]) File "/usr/lib/python2.7/site-packages/docker/api/container.py", line 189, in containers res = self._result(self._get(u, params=params), True) File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 47, i n inner return f(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 183, in _ge t return self.get(url, **self._set_request_timeout(kwargs)) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 498, in get return self.request('GET', url, **kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 486, in req uest resp = self.send(prep, **send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 598, in sen d r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in sen d timeout=timeout File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpoo l.py", line 582, in urlopen timeout_obj = self._get_timeout(timeout) File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpoo l.py", line 309, in _get_timeout return Timeout.from_float(timeout) File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout. py", line 154, in from_float return Timeout(read=timeout, connect=timeout) File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout. py", line 97, in __init__ self._connect = self._validate_timeout(connect, 'connect') File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout. py", line 127, in _validate_timeout "int or float." % (name, value)) ValueError: Timeout value connect was Timeout(connect=60, read=60, total=None), but it must be an int or float. ``` Here's my `pip list` ``` pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. awscli (1.11.92) backports.ssl-match-hostname (3.5.0.1) botocore (1.5.55) cached-property (1.3.0) cffi (1.6.0) chardet (2.2.1) colorama (0.3.7) configobj (4.7.2) configshell-fb (1.1.25) cryptography (1.7.2) custodia (0.3.1) decorator (3.4.0) dnspython (1.12.0) docker (2.3.0) docker-compose (1.13.0) docker-pycreds (0.2.1) dockerpty (0.4.1) docopt (0.6.2) docutils (0.13.1) enum34 (1.0.4) ethtool (0.8) functools32 (3.2.3-2) futures (3.1.1) gssapi (1.2.0) idna (2.4) iniparse (0.4) iotop (0.6) ipaclient (4.6.5) ipaddress (1.0.16) ipalib (4.6.5) ipaplatform (4.6.5) ipapython (4.6.5) IPy (0.75) javapackages (1.0.0) jmespath (0.9.2) jsonschema (2.6.0) jwcrypto (0.4.2) kitchen (1.1.1) kmod (0.1) langtable (0.0.31) lxml (3.2.1) Magic-file-extensions (0.2) MySQL-python (1.2.5) netaddr (0.7.5) netifaces (0.10.4) nose (1.3.7) numpy (1.7.1) pcp (4.1) perf (0.1) pip (9.0.1) ply (3.4) policycoreutils-default-encoding (0.1) psycopg2 (2.5.1) pyasn1 (0.1.9) pyasn1-modules (0.0.8) pycparser (2.14) pycurl (7.19.0) pygobject (3.22.0) pygpgme (0.3) pyinotify (0.9.4) pyliblzma (0.5.3) pyOpenSSL (0.13.1) pyparsing (1.5.6) python-augeas (0.5.0) python-dateutil (2.6.0) python-dmidecode (3.10.13) python-ldap (2.4.15) python-linux-procfs (0.4.9) python-nss (0.16.0) python-yubico (1.2.3) pyudev (0.15) pyusb (1.0.0b1) pyxattr (0.5.1) PyYAML (3.12) qrcode (5.0.1) requests (2.11.1) rsa (3.4.2) rtslib-fb (2.1.69) s3transfer (0.1.10) schedutils (0.4) seobject (0.1) sepolicy (1.1) setuptools (0.9.8) six (1.9.0) slip (0.4.0) slip.dbus (0.4.0) SSSDConfig (1.16.4) subscription-manager (1.24.13) syspurpose (1.24.13) targetcli-fb (2.1.fb49) texttable (0.8.8) urlgrabber (3.10) urllib3 (1.10.2) urwid (1.1.1) virtualenv (15.1.0) websocket-client (0.40.0) wheel (0.29.0) yum-langpacks (0.4.2) yum-metadata-parser (1.1.4) You are using pip version 9.0.1, however version 20.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ``` Kindly request help on fixing this
{ "avatar_url": "https://avatars.githubusercontent.com/u/3234964?v=4", "events_url": "https://api.github.com/users/sithara/events{/privacy}", "followers_url": "https://api.github.com/users/sithara/followers", "following_url": "https://api.github.com/users/sithara/following{/other_user}", "gists_url": "https://api.github.com/users/sithara/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sithara", "id": 3234964, "login": "sithara", "node_id": "MDQ6VXNlcjMyMzQ5NjQ=", "organizations_url": "https://api.github.com/users/sithara/orgs", "received_events_url": "https://api.github.com/users/sithara/received_events", "repos_url": "https://api.github.com/users/sithara/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sithara/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sithara/subscriptions", "type": "User", "url": "https://api.github.com/users/sithara", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5456/reactions" }
https://api.github.com/repos/psf/requests/issues/5456/timeline
null
completed
null
null
false
[ "This project don't maintain docker compose where the bug is actually originating and you have Request 2.11.1 installed which is _ancient_ and unsupported. You're also using a vulnerable version of urllib3 in your project so you really need to reconsider your dependency versions. This is not a bug here.", "Will c...
https://api.github.com/repos/psf/requests/issues/5455
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5455/labels{/name}
https://api.github.com/repos/psf/requests/issues/5455/comments
https://api.github.com/repos/psf/requests/issues/5455/events
https://github.com/psf/requests/issues/5455
617,307,432
MDU6SXNzdWU2MTczMDc0MzI=
5,455
please support HTTP/2 and HTTP/3
{ "avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4", "events_url": "https://api.github.com/users/hktalent/events{/privacy}", "followers_url": "https://api.github.com/users/hktalent/followers", "following_url": "https://api.github.com/users/hktalent/following{/other_user}", "gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hktalent", "id": 18223385, "login": "hktalent", "node_id": "MDQ6VXNlcjE4MjIzMzg1", "organizations_url": "https://api.github.com/users/hktalent/orgs", "received_events_url": "https://api.github.com/users/hktalent/received_events", "repos_url": "https://api.github.com/users/hktalent/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hktalent/subscriptions", "type": "User", "url": "https://api.github.com/users/hktalent", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-13T09:49:04Z
2021-08-31T00:07:00Z
2020-05-13T18:05:43Z
NONE
resolved
please support HTTP/2 and HTTP/3
{ "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/5455/reactions" }
https://api.github.com/repos/psf/requests/issues/5455/timeline
null
completed
null
null
false
[ "Hi @hktalent, we don’t have immediate plans to support http/2 or http/3. You can find alternatives for http/2 in the python-hyper project which *I believe* should allow you to use the Requests API as a wrapper around that library." ]
https://api.github.com/repos/psf/requests/issues/5454
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5454/labels{/name}
https://api.github.com/repos/psf/requests/issues/5454/comments
https://api.github.com/repos/psf/requests/issues/5454/events
https://github.com/psf/requests/pull/5454
617,006,435
MDExOlB1bGxSZXF1ZXN0NDE3MDA4MTc5
5,454
doc: Include rmax github username
{ "avatar_url": "https://avatars.githubusercontent.com/u/26015?v=4", "events_url": "https://api.github.com/users/rmax/events{/privacy}", "followers_url": "https://api.github.com/users/rmax/followers", "following_url": "https://api.github.com/users/rmax/following{/other_user}", "gists_url": "https://api.github.com/users/rmax/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rmax", "id": 26015, "login": "rmax", "node_id": "MDQ6VXNlcjI2MDE1", "organizations_url": "https://api.github.com/users/rmax/orgs", "received_events_url": "https://api.github.com/users/rmax/received_events", "repos_url": "https://api.github.com/users/rmax/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rmax/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rmax/subscriptions", "type": "User", "url": "https://api.github.com/users/rmax", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-05-12T22:33:05Z
2021-11-26T05:00:36Z
2021-08-28T04:23:46Z
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/5454/reactions" }
https://api.github.com/repos/psf/requests/issues/5454/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5454.diff", "html_url": "https://github.com/psf/requests/pull/5454", "merged_at": "2021-08-28T04:23:46Z", "patch_url": "https://github.com/psf/requests/pull/5454.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5454" }
true
[]
https://api.github.com/repos/psf/requests/issues/5453
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5453/labels{/name}
https://api.github.com/repos/psf/requests/issues/5453/comments
https://api.github.com/repos/psf/requests/issues/5453/events
https://github.com/psf/requests/pull/5453
616,485,897
MDExOlB1bGxSZXF1ZXN0NDE2NTg3MjA0
5,453
Update Travis syntax
{ "avatar_url": "https://avatars.githubusercontent.com/u/21086024?v=4", "events_url": "https://api.github.com/users/edumco/events{/privacy}", "followers_url": "https://api.github.com/users/edumco/followers", "following_url": "https://api.github.com/users/edumco/following{/other_user}", "gists_url": "https://api.github.com/users/edumco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/edumco", "id": 21086024, "login": "edumco", "node_id": "MDQ6VXNlcjIxMDg2MDI0", "organizations_url": "https://api.github.com/users/edumco/orgs", "received_events_url": "https://api.github.com/users/edumco/received_events", "repos_url": "https://api.github.com/users/edumco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/edumco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edumco/subscriptions", "type": "User", "url": "https://api.github.com/users/edumco", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-05-12T09:01:04Z
2021-08-28T00:06:30Z
2020-05-14T17:37:05Z
NONE
resolved
### This pull request brings the following changes: - Ordered the commands to follow Travis CI execution order: <https://docs.travis-ci.com/user/job-lifecycle/#the-job-lifecycle> - Adds explicit os and dist commands protecting from changes on Travis default distro - Forces the build to use the latest minor version of each python release so build become fully reproducible
{ "avatar_url": "https://avatars.githubusercontent.com/u/21086024?v=4", "events_url": "https://api.github.com/users/edumco/events{/privacy}", "followers_url": "https://api.github.com/users/edumco/followers", "following_url": "https://api.github.com/users/edumco/following{/other_user}", "gists_url": "https://api.github.com/users/edumco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/edumco", "id": 21086024, "login": "edumco", "node_id": "MDQ6VXNlcjIxMDg2MDI0", "organizations_url": "https://api.github.com/users/edumco/orgs", "received_events_url": "https://api.github.com/users/edumco/received_events", "repos_url": "https://api.github.com/users/edumco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/edumco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edumco/subscriptions", "type": "User", "url": "https://api.github.com/users/edumco", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5453/reactions" }
https://api.github.com/repos/psf/requests/issues/5453/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5453.diff", "html_url": "https://github.com/psf/requests/pull/5453", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5453.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5453" }
true
[ "We don't want to pin to a minor version. Travis is supposed to auto-upgrade those for us", "> supposed to auto-upgrade those for us\r\n\r\nI cant revert that, what do you think about the other changes?", "They're churn, functionally unnecessary, and in some cases useless (see apt caching)" ]
https://api.github.com/repos/psf/requests/issues/5452
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5452/labels{/name}
https://api.github.com/repos/psf/requests/issues/5452/comments
https://api.github.com/repos/psf/requests/issues/5452/events
https://github.com/psf/requests/pull/5452
615,306,209
MDExOlB1bGxSZXF1ZXN0NDE1NjYxODI5
5,452
add a dot in end of doc
{ "avatar_url": "https://avatars.githubusercontent.com/u/36840497?v=4", "events_url": "https://api.github.com/users/bestgopher/events{/privacy}", "followers_url": "https://api.github.com/users/bestgopher/followers", "following_url": "https://api.github.com/users/bestgopher/following{/other_user}", "gists_url": "https://api.github.com/users/bestgopher/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bestgopher", "id": 36840497, "login": "bestgopher", "node_id": "MDQ6VXNlcjM2ODQwNDk3", "organizations_url": "https://api.github.com/users/bestgopher/orgs", "received_events_url": "https://api.github.com/users/bestgopher/received_events", "repos_url": "https://api.github.com/users/bestgopher/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bestgopher/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bestgopher/subscriptions", "type": "User", "url": "https://api.github.com/users/bestgopher", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-10T03:16:48Z
2022-02-26T15:00:32Z
2021-11-28T14:11:45Z
NONE
resolved
add a dot.
{ "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/5452/reactions" }
https://api.github.com/repos/psf/requests/issues/5452/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5452.diff", "html_url": "https://github.com/psf/requests/pull/5452", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5452.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5452" }
true
[ "Closing this PR, in the future please only open a PR if there is something \"wrong\" with a docstring." ]
https://api.github.com/repos/psf/requests/issues/5451
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5451/labels{/name}
https://api.github.com/repos/psf/requests/issues/5451/comments
https://api.github.com/repos/psf/requests/issues/5451/events
https://github.com/psf/requests/pull/5451
615,260,969
MDExOlB1bGxSZXF1ZXN0NDE1NjMxMjEx
5,451
Update supported python version in doc
{ "avatar_url": "https://avatars.githubusercontent.com/u/4190959?v=4", "events_url": "https://api.github.com/users/jacty/events{/privacy}", "followers_url": "https://api.github.com/users/jacty/followers", "following_url": "https://api.github.com/users/jacty/following{/other_user}", "gists_url": "https://api.github.com/users/jacty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jacty", "id": 4190959, "login": "jacty", "node_id": "MDQ6VXNlcjQxOTA5NTk=", "organizations_url": "https://api.github.com/users/jacty/orgs", "received_events_url": "https://api.github.com/users/jacty/received_events", "repos_url": "https://api.github.com/users/jacty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jacty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jacty/subscriptions", "type": "User", "url": "https://api.github.com/users/jacty", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-05-09T21:12:38Z
2021-08-28T00:06:15Z
2020-11-17T01:49:54Z
NONE
resolved
I think python 3.8 is supported now after I checked some other places in this rep.
{ "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/5451/reactions" }
https://api.github.com/repos/psf/requests/issues/5451/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5451.diff", "html_url": "https://github.com/psf/requests/pull/5451", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5451.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5451" }
true
[ "I think this ended up getting resolved in a more generic way with #5567. Resolving since the issue is addressed. Thanks for the PR @jacty!" ]
https://api.github.com/repos/psf/requests/issues/5450
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5450/labels{/name}
https://api.github.com/repos/psf/requests/issues/5450/comments
https://api.github.com/repos/psf/requests/issues/5450/events
https://github.com/psf/requests/issues/5450
615,249,244
MDU6SXNzdWU2MTUyNDkyNDQ=
5,450
timeout 2x as long as parameter
{ "avatar_url": "https://avatars.githubusercontent.com/u/3632883?v=4", "events_url": "https://api.github.com/users/minusf/events{/privacy}", "followers_url": "https://api.github.com/users/minusf/followers", "following_url": "https://api.github.com/users/minusf/following{/other_user}", "gists_url": "https://api.github.com/users/minusf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/minusf", "id": 3632883, "login": "minusf", "node_id": "MDQ6VXNlcjM2MzI4ODM=", "organizations_url": "https://api.github.com/users/minusf/orgs", "received_events_url": "https://api.github.com/users/minusf/received_events", "repos_url": "https://api.github.com/users/minusf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/minusf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/minusf/subscriptions", "type": "User", "url": "https://api.github.com/users/minusf", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2020-05-09T19:58:06Z
2021-09-01T00:11:20Z
2020-05-10T14:51:52Z
NONE
resolved
It seems that when I set a `timeout`, the exception is raised after `2 * timeout` seconds. ## Expected Result log message shows up after `timout` seconds. ## Actual Result ``` 2020-05-09 21:53:10,148 DEBUG: before get 2020-05-09 21:53:30,167 ERROR: timeout ``` ## Reproduction Steps ```python import requests logger.debug("before get") try: resp = requests.get(some_url, headers=some_headers, timeout=10) except requests.Timeout: logger.error("timeout") ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.7" }, "platform": { "release": "19.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/3632883?v=4", "events_url": "https://api.github.com/users/minusf/events{/privacy}", "followers_url": "https://api.github.com/users/minusf/followers", "following_url": "https://api.github.com/users/minusf/following{/other_user}", "gists_url": "https://api.github.com/users/minusf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/minusf", "id": 3632883, "login": "minusf", "node_id": "MDQ6VXNlcjM2MzI4ODM=", "organizations_url": "https://api.github.com/users/minusf/orgs", "received_events_url": "https://api.github.com/users/minusf/received_events", "repos_url": "https://api.github.com/users/minusf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/minusf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/minusf/subscriptions", "type": "User", "url": "https://api.github.com/users/minusf", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5450/reactions" }
https://api.github.com/repos/psf/requests/issues/5450/timeline
null
completed
null
null
false
[ "Search past issues. Timeout is not a wall clock timeout. It could be that it took 9.9s for the connection to be made and another 10+s for the read to timeout. Also timeouts are never exact to the nanosecond in any programming language ever.", "i had a quick look at past issues before posting but nothing jumped o...
https://api.github.com/repos/psf/requests/issues/5449
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5449/labels{/name}
https://api.github.com/repos/psf/requests/issues/5449/comments
https://api.github.com/repos/psf/requests/issues/5449/events
https://github.com/psf/requests/issues/5449
614,907,671
MDU6SXNzdWU2MTQ5MDc2NzE=
5,449
How to propagate cookie policies through posts?
{ "avatar_url": "https://avatars.githubusercontent.com/u/51006466?v=4", "events_url": "https://api.github.com/users/karres-illinois/events{/privacy}", "followers_url": "https://api.github.com/users/karres-illinois/followers", "following_url": "https://api.github.com/users/karres-illinois/following{/other_user}", "gists_url": "https://api.github.com/users/karres-illinois/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/karres-illinois", "id": 51006466, "login": "karres-illinois", "node_id": "MDQ6VXNlcjUxMDA2NDY2", "organizations_url": "https://api.github.com/users/karres-illinois/orgs", "received_events_url": "https://api.github.com/users/karres-illinois/received_events", "repos_url": "https://api.github.com/users/karres-illinois/repos", "site_admin": false, "starred_url": "https://api.github.com/users/karres-illinois/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/karres-illinois/subscriptions", "type": "User", "url": "https://api.github.com/users/karres-illinois", "user_view_type": "public" }
[]
open
false
null
[]
null
5
2020-05-08T18:29:00Z
2020-05-11T14:25:09Z
null
NONE
null
Hi, I am using Python 3.8 and the latest pip updates of everything mentioned below. I am trying to consume a very old, but active SOAP resource. I am using Zeep for the SOAP part. The SOAP service is so old that I need to set a special cookie policy to handle the fact that the old SOAP service returns obsolete `set-cookie2` headers. I am new to this so there could be better ways but the first few executable lines of my code sample (at the bottom) create a dummy cookie to establish a cookie policy that *should* pull in the obsolete cookies. THe dummy cookie is attached to the session and the SOAP "login" method is called. I have stepped through the execution path (most recent on top). Everything above the "transports" lines is in the your domain I think. ``` merge_cookies, cookies.py:549 prepare_request, sessions.py:441 request, sessions.py:516 post, sessions.py:578 post, transports.py:61 post_xml, transports.py:107 send, soap.py:122 __call__, proxy.py:40 <module>, zeep_test.py:31 ``` I have modified Zeep's code to send the session cookies to your "post" method in the "kwargs". ``` response = self.session.post( address, data=message, headers=headers, timeout=self.operation_timeout, cookies=self.session.cookies ) ``` "post" calls "request" calls "prepare_request" calls "merge_cookies". That code is: ``` # Merge with session cookies merged_cookies = merge_cookies( merge_cookies(RequestsCookieJar(), self.cookies), cookies) ``` In my case the passed in cookie is a "cookielib.CookieJar". The line: ``` try: cookiejar.update(cookies) ``` is executed but the "cookielib.CookieJar" policies are NOT copied over. I don't know what to do about that. Is there a better way to set a global cookie policy? A relevant portion of my code is: ``` import requests from requests import Session, cookies from zeep import Client, Settings from zeep.cache import SqliteCache from zeep.transports import Transport from http.cookiejar import CookieJar, DefaultCookiePolicy policy = DefaultCookiePolicy(rfc2965=True) cj = CookieJar(policy) cj.set_cookie(requests.cookies.create_cookie(name="dummy", value="dummy")) my_session = Session() my_session.cookies = cj my_settings = Settings(strict=False) my_cache = SqliteCache() my_url = 'https://lists.mycompany.com/lists/wsdl' client = Client( my_url, transport=Transport( session=my_session, cache=my_cache ), settings=my_settings ) response = client.service.login(email="Me", password="mememe") ```
null
{ "+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/5449/reactions" }
https://api.github.com/repos/psf/requests/issues/5449/timeline
null
null
null
null
false
[ "Hi @karres-illinois,\r\n\r\nThanks for bringing this up! We've known about this issue for a good while now and there's been a lot of debate about whether people actually use the Python cookie policies in their code. There's a PR from some time ago #3463 that was intended to address this that never got merged.\r\n\...
https://api.github.com/repos/psf/requests/issues/5448
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5448/labels{/name}
https://api.github.com/repos/psf/requests/issues/5448/comments
https://api.github.com/repos/psf/requests/issues/5448/events
https://github.com/psf/requests/issues/5448
613,383,513
MDU6SXNzdWU2MTMzODM1MTM=
5,448
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
{ "avatar_url": "https://avatars.githubusercontent.com/u/64898062?v=4", "events_url": "https://api.github.com/users/ShunTono/events{/privacy}", "followers_url": "https://api.github.com/users/ShunTono/followers", "following_url": "https://api.github.com/users/ShunTono/following{/other_user}", "gists_url": "https://api.github.com/users/ShunTono/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ShunTono", "id": 64898062, "login": "ShunTono", "node_id": "MDQ6VXNlcjY0ODk4MDYy", "organizations_url": "https://api.github.com/users/ShunTono/orgs", "received_events_url": "https://api.github.com/users/ShunTono/received_events", "repos_url": "https://api.github.com/users/ShunTono/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ShunTono/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShunTono/subscriptions", "type": "User", "url": "https://api.github.com/users/ShunTono", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-05-06T14:52:45Z
2021-09-01T00:11:22Z
2020-05-06T22:41:58Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/64898062?v=4", "events_url": "https://api.github.com/users/ShunTono/events{/privacy}", "followers_url": "https://api.github.com/users/ShunTono/followers", "following_url": "https://api.github.com/users/ShunTono/following{/other_user}", "gists_url": "https://api.github.com/users/ShunTono/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ShunTono", "id": 64898062, "login": "ShunTono", "node_id": "MDQ6VXNlcjY0ODk4MDYy", "organizations_url": "https://api.github.com/users/ShunTono/orgs", "received_events_url": "https://api.github.com/users/ShunTono/received_events", "repos_url": "https://api.github.com/users/ShunTono/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ShunTono/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShunTono/subscriptions", "type": "User", "url": "https://api.github.com/users/ShunTono", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5448/reactions" }
https://api.github.com/repos/psf/requests/issues/5448/timeline
null
completed
null
null
false
[ "What do your proxy settings look like? I suspect this is an error in how you're configuring them just like the issue you commented on and referenced", "Yes. I have no clue what the right values would be for you though. This is not a bug in requests. Please close it. ", "Then ask on StackOverflow for help learn...
https://api.github.com/repos/psf/requests/issues/5447
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5447/labels{/name}
https://api.github.com/repos/psf/requests/issues/5447/comments
https://api.github.com/repos/psf/requests/issues/5447/events
https://github.com/psf/requests/issues/5447
612,483,449
MDU6SXNzdWU2MTI0ODM0NDk=
5,447
How to set an effective useragent for Session?
{ "avatar_url": "https://avatars.githubusercontent.com/u/58616477?v=4", "events_url": "https://api.github.com/users/raisoon/events{/privacy}", "followers_url": "https://api.github.com/users/raisoon/followers", "following_url": "https://api.github.com/users/raisoon/following{/other_user}", "gists_url": "https://api.github.com/users/raisoon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/raisoon", "id": 58616477, "login": "raisoon", "node_id": "MDQ6VXNlcjU4NjE2NDc3", "organizations_url": "https://api.github.com/users/raisoon/orgs", "received_events_url": "https://api.github.com/users/raisoon/received_events", "repos_url": "https://api.github.com/users/raisoon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/raisoon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/raisoon/subscriptions", "type": "User", "url": "https://api.github.com/users/raisoon", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-05-05T10:02:24Z
2021-08-31T00:06:48Z
2020-06-17T20:21:02Z
NONE
resolved
I have set a useragent for the requests session: session = requests.session() headers = {} headers['user-agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36' resp = session.get('http://www.gov.cn',headers=headers) print(session.headers) but in the result, the user-agent is 'python-requests/2.22.0'. {'User-Agent': 'python-requests/2.22.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} how can i set an effective useragent?
{ "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/5447/reactions" }
https://api.github.com/repos/psf/requests/issues/5447/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.", "@raisoon the `headers=headers` is only passed onto...
https://api.github.com/repos/psf/requests/issues/5446
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5446/labels{/name}
https://api.github.com/repos/psf/requests/issues/5446/comments
https://api.github.com/repos/psf/requests/issues/5446/events
https://github.com/psf/requests/issues/5446
612,397,162
MDU6SXNzdWU2MTIzOTcxNjI=
5,446
Modified file content after upload
{ "avatar_url": "https://avatars.githubusercontent.com/u/54662729?v=4", "events_url": "https://api.github.com/users/ssy-lehmann/events{/privacy}", "followers_url": "https://api.github.com/users/ssy-lehmann/followers", "following_url": "https://api.github.com/users/ssy-lehmann/following{/other_user}", "gists_url": "https://api.github.com/users/ssy-lehmann/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ssy-lehmann", "id": 54662729, "login": "ssy-lehmann", "node_id": "MDQ6VXNlcjU0NjYyNzI5", "organizations_url": "https://api.github.com/users/ssy-lehmann/orgs", "received_events_url": "https://api.github.com/users/ssy-lehmann/received_events", "repos_url": "https://api.github.com/users/ssy-lehmann/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ssy-lehmann/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ssy-lehmann/subscriptions", "type": "User", "url": "https://api.github.com/users/ssy-lehmann", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-05-05T07:30:16Z
2021-09-01T00:11:22Z
2020-05-08T04:36:36Z
NONE
resolved
Also I have been looking into documentation I didn't found the problem/explanation. ## Szenario: - The server does use WebDav and I can use a PUT request for uploading - In addition it must be digest authentication - it works with curl using --digest and --user "xxxxxxx:yyyyyy" The difference between curl and the Python script after here is that the script seems to modify the content of the file while uploading. If I look at http://internal-demo-url/uploads/demo.properties the content looks like following: ## The uploaded file ``` --6cb2e8363c8d7f9191d2068b62828985 Content-Disposition: form-data; name="file"; filename="demo.properties" Content-Type: text/plain title=demo context=upload message=hello world 3! --6cb2e8363c8d7f9191d2068b62828985-- ```` Of course I just would like to have the three lines in the middle. **What did I wrong?** ## The Python code (upload.py) ```python from requests import put from requests.auth import HTTPDigestAuth url = 'http://internal-demo-url/uploads' with open('demo.properties', 'rb') as handle: headers = {} files = {'file':('demo.properties', handle, 'text/plain')} response = put(url, auth=HTTPDigestAuth('xxxxxx', 'yyyyyy'), files=files, headers=headers) print(response.status_code) ```
{ "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/5446/reactions" }
https://api.github.com/repos/psf/requests/issues/5446/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'm cautious to say \"it is a bug\" however I see ...
https://api.github.com/repos/psf/requests/issues/5445
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5445/labels{/name}
https://api.github.com/repos/psf/requests/issues/5445/comments
https://api.github.com/repos/psf/requests/issues/5445/events
https://github.com/psf/requests/issues/5445
611,401,340
MDU6SXNzdWU2MTE0MDEzNDA=
5,445
utf-8 page wrongly detected as ISO-8859-1
{ "avatar_url": "https://avatars.githubusercontent.com/u/3165583?v=4", "events_url": "https://api.github.com/users/klartext/events{/privacy}", "followers_url": "https://api.github.com/users/klartext/followers", "following_url": "https://api.github.com/users/klartext/following{/other_user}", "gists_url": "https://api.github.com/users/klartext/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/klartext", "id": 3165583, "login": "klartext", "node_id": "MDQ6VXNlcjMxNjU1ODM=", "organizations_url": "https://api.github.com/users/klartext/orgs", "received_events_url": "https://api.github.com/users/klartext/received_events", "repos_url": "https://api.github.com/users/klartext/repos", "site_admin": false, "starred_url": "https://api.github.com/users/klartext/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/klartext/subscriptions", "type": "User", "url": "https://api.github.com/users/klartext", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-05-03T12:21:41Z
2021-08-30T00:06:23Z
2020-07-21T06:06:03Z
NONE
resolved
A webpage has been detcected as being ISO-8859-1 encoded, even though it is encoded in utf-8. ## Expected Result Correct classification as utf-8. ## Actual Result utf-8 page detected as ISO-8859-1. ## Reproduction Steps ``` #!/usr/bin/python import requests # example url url = "https://digitalezivilgesellschaft.org/" # get the page and print the supposed encoding response = requests.get(url) print(response.encoding) ``` Compare that with ``` rm -f index.html; wget -nv https://digitalezivilgesellschaft.org/ 2>/dev/null&& file index.html | grep index | tail -1 ``` ## System Information $ python -m requests.help ``` explore_requests_bug$ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.6.8-arch1-1", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ``` This concrete problem seems to be related to the more general issue https://github.com/psf/requests/issues/2086
{ "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/5445/reactions" }
https://api.github.com/repos/psf/requests/issues/5445/timeline
null
completed
null
null
false
[ "you can gei it like this:\r\n```python\r\nresponse.content.decode(\"utf8\")\r\n```\r\nnot\r\n```python\r\nresponse.text\r\n```", "Hi @klartext, if a webpage fails to specify its encoding, we'll default to ISO-8859-1 which has been the spec since RFC 7230. This is starting to change, but we're in an inconsistent ...
https://api.github.com/repos/psf/requests/issues/5444
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5444/labels{/name}
https://api.github.com/repos/psf/requests/issues/5444/comments
https://api.github.com/repos/psf/requests/issues/5444/events
https://github.com/psf/requests/issues/5444
610,673,102
MDU6SXNzdWU2MTA2NzMxMDI=
5,444
requests.get() with both a query string in URL and params defined does not adhere to HTML5 specifications for form interaction
{ "avatar_url": "https://avatars.githubusercontent.com/u/64635888?v=4", "events_url": "https://api.github.com/users/snorpdorp/events{/privacy}", "followers_url": "https://api.github.com/users/snorpdorp/followers", "following_url": "https://api.github.com/users/snorpdorp/following{/other_user}", "gists_url": "https://api.github.com/users/snorpdorp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/snorpdorp", "id": 64635888, "login": "snorpdorp", "node_id": "MDQ6VXNlcjY0NjM1ODg4", "organizations_url": "https://api.github.com/users/snorpdorp/orgs", "received_events_url": "https://api.github.com/users/snorpdorp/received_events", "repos_url": "https://api.github.com/users/snorpdorp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/snorpdorp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/snorpdorp/subscriptions", "type": "User", "url": "https://api.github.com/users/snorpdorp", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-05-01T09:57:47Z
2021-09-01T00:11:21Z
2020-05-08T14:49:17Z
NONE
resolved
[As per HTML5 specifications section "4.10.22.3 Form submission algorithm"](https://www.w3.org/TR/2011/WD-html5-20110525/association-of-controls-and-forms.html#form-submission-algorithm) , when a form with an action which contains a query string, and has a method of GET is executed, the query string in the action should be completely ignored and overwritten by the query string generated by the form. However, in requests, when a request is formed with an URL including a query string, as well as a params parameter, the 2 query strings are merged, with both being used. (I have no idea why any website would ever produce such a form, but this is explicitly mentioned in the specifications.) There may be some debate over whether this is to be intended behavior or not: there is no strict implication that a GET with param data is meant specifically to emulate behavior of an HTML form, although that would seem to be the most common case to me. Some HTTP APIs may have some endpoint which includes a query string and also request additional data to be sent as part of the query string. However, [OpenAPI](https://swagger.io/docs/specification/describing-parameters/) does not mention anything about what to do if an endpoint itself contains a query string, only stating to "Query parameters are the most common type of parameters. They appear at the end of the request URL after a question mark (?), with different name=value pairs separated by ampersands (&). Query parameters can be required and optional." This also makes it sound like explicitly mentioned "params" parameter should refer to everything after the question-mark delimiter, but I do not think they meant to be so specific as to talk about this strange edge-case. So it seems that regardless of RESTful APIs, or sending GET forms, the parameters sent to the server should be the ones explicitly mentioned in params, and the parameters given to requests in the url should be ignored. ``` import requests request = requests.Request(method="GET", url="https://somewebsite.com?pointless+key=pointless+value", params={"actual key": "actual value"}) session = requests.Session() prepared_request = session.prepare_request(request) print(request.url) ``` ## Expected Result ``` https://somewebsite.com/?actual+key=actual+value ``` ## Actual Result ``` https://somewebsite.com/?pointless+key=pointless+value&actual+key=actual+value ``` ## Reproduction Steps ``` import requests request = requests.Request(method="GET", url="https://somewebsite.com?pointless+key=pointless+value", params={"actual key": "actual value"}) session = requests.Session() prepared_request = session.prepare_request(request) print(request.url) ``` ## System Information ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "19.4.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/5444/reactions" }
https://api.github.com/repos/psf/requests/issues/5444/timeline
null
completed
null
null
false
[ "Requests' behaviour is defined by RFC 7230, 7231, 7232, 7233, 7234, and 7235 none of which indicate your expectations as required behaviour. This behaviour has also been present for nearly a decade. Finally, Requests is in a feature freeze and the maintainers are (more-or-less) only fixing security issues. You can...
https://api.github.com/repos/psf/requests/issues/5443
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5443/labels{/name}
https://api.github.com/repos/psf/requests/issues/5443/comments
https://api.github.com/repos/psf/requests/issues/5443/events
https://github.com/psf/requests/pull/5443
610,027,008
MDExOlB1bGxSZXF1ZXN0NDExNTI4NDQ3
5,443
Don't use pyOpenSSL unless no SNI is detected
{ "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
18
2020-04-30T13:57:50Z
2021-08-28T00:06:28Z
2020-05-01T23:33:52Z
MEMBER
resolved
This is part 1 on removing `requests[security]` extra, for now we can still support SNI-less installations of Python but instead of unconditional monkey-patching we only patch if we detect either no `ssl` module or no `SNI` support. Related: https://github.com/psf/requests/issues/5267 cc @tiran An additional thought I had was if we wanted to warn users about the complete removal of `requests[security]` I don't think there's a way to detect if you were installed via `requests pyopenssl` or `requests[security]` beyond registering a name on PyPI like `requests-security-extra`, trying to import it, and if we do then we know we were installed via `requests[security]` so throw a deprecation warning? Otherwise our "end-goal" could be to have `requests[security]` be empty?
{ "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": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/psf/requests/issues/5443/reactions" }
https://api.github.com/repos/psf/requests/issues/5443/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5443.diff", "html_url": "https://github.com/psf/requests/pull/5443", "merged_at": "2020-05-01T23:33:52Z", "patch_url": "https://github.com/psf/requests/pull/5443.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5443" }
true
[ "I think this looks pretty straight forward and I agree we want to start moving away from PyOpenSSL by default. The only Python versions we'd expect to still be using pyopenssl after this would be <2.7.9, right? I'm think I'm fine approving but would like a second peek from Tiran or @sigmavirus24 if possible.\r\n\r...
https://api.github.com/repos/psf/requests/issues/5442
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5442/labels{/name}
https://api.github.com/repos/psf/requests/issues/5442/comments
https://api.github.com/repos/psf/requests/issues/5442/events
https://github.com/psf/requests/issues/5442
608,105,258
MDU6SXNzdWU2MDgxMDUyNTg=
5,442
How to access token based API using requests in python?
{ "avatar_url": "https://avatars.githubusercontent.com/u/56999733?v=4", "events_url": "https://api.github.com/users/vvksahoo/events{/privacy}", "followers_url": "https://api.github.com/users/vvksahoo/followers", "following_url": "https://api.github.com/users/vvksahoo/following{/other_user}", "gists_url": "https://api.github.com/users/vvksahoo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vvksahoo", "id": 56999733, "login": "vvksahoo", "node_id": "MDQ6VXNlcjU2OTk5NzMz", "organizations_url": "https://api.github.com/users/vvksahoo/orgs", "received_events_url": "https://api.github.com/users/vvksahoo/received_events", "repos_url": "https://api.github.com/users/vvksahoo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vvksahoo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vvksahoo/subscriptions", "type": "User", "url": "https://api.github.com/users/vvksahoo", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-04-28T07:55:30Z
2021-09-01T00:11:25Z
2020-04-30T15:53:00Z
NONE
resolved
I want to call one API from another API. So external API is having jwt token based authentication . ``` import requests response = requests.get('http://host:port/api/users', auth= ("username","password")) ```` I am getting error : ``` {"error":"authentication failed: jwt parse error: token contains an invalid number of segments","code":16,"message":"authentication failed: jwt parse error: token contains an invalid number of segments","details":[]} ``` Or , First i need to call login API ,get the token and while calling another API apply that token in header. Please suggest here.
{ "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/5442/reactions" }
https://api.github.com/repos/psf/requests/issues/5442/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.", "Please find the StackOverflow link for the same is...
https://api.github.com/repos/psf/requests/issues/5441
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5441/labels{/name}
https://api.github.com/repos/psf/requests/issues/5441/comments
https://api.github.com/repos/psf/requests/issues/5441/events
https://github.com/psf/requests/pull/5441
607,860,646
MDExOlB1bGxSZXF1ZXN0NDA5NzUzMTQw
5,441
Strip double-quotes on proxy environment variables and add test (issue #4613)
{ "avatar_url": "https://avatars.githubusercontent.com/u/216653?v=4", "events_url": "https://api.github.com/users/bluebird75/events{/privacy}", "followers_url": "https://api.github.com/users/bluebird75/followers", "following_url": "https://api.github.com/users/bluebird75/following{/other_user}", "gists_url": "https://api.github.com/users/bluebird75/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bluebird75", "id": 216653, "login": "bluebird75", "node_id": "MDQ6VXNlcjIxNjY1Mw==", "organizations_url": "https://api.github.com/users/bluebird75/orgs", "received_events_url": "https://api.github.com/users/bluebird75/received_events", "repos_url": "https://api.github.com/users/bluebird75/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bluebird75/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bluebird75/subscriptions", "type": "User", "url": "https://api.github.com/users/bluebird75", "user_view_type": "public" }
[]
open
false
null
[]
null
0
2020-04-27T21:19:20Z
2022-01-03T15:27:10Z
null
NONE
null
Issue #4613 details two problems : * proxy may contain white-space accidentally * proxy may be contain extra double-quotes on Windows A fix already exists for the white-space problem, this addresses the second problem.
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/5441/reactions" }
https://api.github.com/repos/psf/requests/issues/5441/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5441.diff", "html_url": "https://github.com/psf/requests/pull/5441", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5441.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5441" }
true
[]
https://api.github.com/repos/psf/requests/issues/5440
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5440/labels{/name}
https://api.github.com/repos/psf/requests/issues/5440/comments
https://api.github.com/repos/psf/requests/issues/5440/events
https://github.com/psf/requests/pull/5440
607,016,357
MDExOlB1bGxSZXF1ZXN0NDA5MDg2NDc1
5,440
fix failed testcase in test_requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/12765401?v=4", "events_url": "https://api.github.com/users/sgy123456/events{/privacy}", "followers_url": "https://api.github.com/users/sgy123456/followers", "following_url": "https://api.github.com/users/sgy123456/following{/other_user}", "gists_url": "https://api.github.com/users/sgy123456/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sgy123456", "id": 12765401, "login": "sgy123456", "node_id": "MDQ6VXNlcjEyNzY1NDAx", "organizations_url": "https://api.github.com/users/sgy123456/orgs", "received_events_url": "https://api.github.com/users/sgy123456/received_events", "repos_url": "https://api.github.com/users/sgy123456/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sgy123456/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sgy123456/subscriptions", "type": "User", "url": "https://api.github.com/users/sgy123456", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-26T13:46:47Z
2021-08-29T00:06:55Z
2020-05-09T04:52:02Z
NONE
resolved
when I run pytest in test_requests, an error occurred: def test_conflicting_post_params(self, httpbin): url = httpbin('post') with open('Pipfile') as f: > pytest.raises(ValueError, "requests.post(url, data='[{\"some\": \"data\"}]', files={'some': f})") E TypeError: 'requests.post(url, data=\'[{"some": "data"}]\', files={\'some\': f})' object (type: <class 'str'>) must be callable tests/test_requests.py:777: TypeError
{ "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/5440/reactions" }
https://api.github.com/repos/psf/requests/issues/5440/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5440.diff", "html_url": "https://github.com/psf/requests/pull/5440", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5440.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5440" }
true
[ "This looks like a dupe of #5305. I'm going to resolve in favor of that. Thanks for the contribution though @sgy123456!" ]
https://api.github.com/repos/psf/requests/issues/5439
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5439/labels{/name}
https://api.github.com/repos/psf/requests/issues/5439/comments
https://api.github.com/repos/psf/requests/issues/5439/events
https://github.com/psf/requests/issues/5439
606,952,999
MDU6SXNzdWU2MDY5NTI5OTk=
5,439
should the shebang be removed?
{ "avatar_url": "https://avatars.githubusercontent.com/u/39258624?v=4", "events_url": "https://api.github.com/users/sandy-lcq/events{/privacy}", "followers_url": "https://api.github.com/users/sandy-lcq/followers", "following_url": "https://api.github.com/users/sandy-lcq/following{/other_user}", "gists_url": "https://api.github.com/users/sandy-lcq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sandy-lcq", "id": 39258624, "login": "sandy-lcq", "node_id": "MDQ6VXNlcjM5MjU4NjI0", "organizations_url": "https://api.github.com/users/sandy-lcq/orgs", "received_events_url": "https://api.github.com/users/sandy-lcq/received_events", "repos_url": "https://api.github.com/users/sandy-lcq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sandy-lcq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sandy-lcq/subscriptions", "type": "User", "url": "https://api.github.com/users/sandy-lcq", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-26T08:20:31Z
2021-09-01T00:11:26Z
2020-04-26T08:32:21Z
NONE
resolved
certs.py have shebang "#!/usr/bin/env python", on some host, like fedora31 docker image, only python3 installed, and no python link to python3, in this case, maybe error like "python: command not found" will repored when run certs.py .
{ "avatar_url": "https://avatars.githubusercontent.com/u/39258624?v=4", "events_url": "https://api.github.com/users/sandy-lcq/events{/privacy}", "followers_url": "https://api.github.com/users/sandy-lcq/followers", "following_url": "https://api.github.com/users/sandy-lcq/following{/other_user}", "gists_url": "https://api.github.com/users/sandy-lcq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sandy-lcq", "id": 39258624, "login": "sandy-lcq", "node_id": "MDQ6VXNlcjM5MjU4NjI0", "organizations_url": "https://api.github.com/users/sandy-lcq/orgs", "received_events_url": "https://api.github.com/users/sandy-lcq/received_events", "repos_url": "https://api.github.com/users/sandy-lcq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sandy-lcq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sandy-lcq/subscriptions", "type": "User", "url": "https://api.github.com/users/sandy-lcq", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5439/reactions" }
https://api.github.com/repos/psf/requests/issues/5439/timeline
null
completed
null
null
false
[ "duplicate https://github.com/pypa/pip/pull/7959" ]
https://api.github.com/repos/psf/requests/issues/5438
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5438/labels{/name}
https://api.github.com/repos/psf/requests/issues/5438/comments
https://api.github.com/repos/psf/requests/issues/5438/events
https://github.com/psf/requests/issues/5438
606,939,270
MDU6SXNzdWU2MDY5MzkyNzA=
5,438
Unexpected Prepared Request behavior
{ "avatar_url": "https://avatars.githubusercontent.com/u/36673811?v=4", "events_url": "https://api.github.com/users/chanyshv/events{/privacy}", "followers_url": "https://api.github.com/users/chanyshv/followers", "following_url": "https://api.github.com/users/chanyshv/following{/other_user}", "gists_url": "https://api.github.com/users/chanyshv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chanyshv", "id": 36673811, "login": "chanyshv", "node_id": "MDQ6VXNlcjM2NjczODEx", "organizations_url": "https://api.github.com/users/chanyshv/orgs", "received_events_url": "https://api.github.com/users/chanyshv/received_events", "repos_url": "https://api.github.com/users/chanyshv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chanyshv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chanyshv/subscriptions", "type": "User", "url": "https://api.github.com/users/chanyshv", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-04-26T06:59:29Z
2021-09-01T00:11:21Z
2020-05-08T14:55:04Z
NONE
resolved
`requests.Session.send` raises random error if you change `headers` in Prepared Request and send a `POST` request with `json` parameter. ## Reproduction Steps ```python import requests as rq s = rq.Session() r = rq.Request('POST', 'https://google.com', json={'foo':'bar'}) p = r.prepare() p.headers = {} s.send(p) ``` **Error:** ``` Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/hairygeek/.local/share/virtualenvs/slink-9m8Vdza8/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/home/hairygeek/.local/share/virtualenvs/slink-9m8Vdza8/lib/python3.8/site-packages/requests/adapters.py", line 470, in send low_conn.send(hex(len(i))[2:].encode('utf-8')) TypeError: object of type 'int' has no len() ``` However this works: ```python r = rq.Request('POST', 'https://google.com') p = r.prepare() p.headers = {} s.send(p) <Response [405]> ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.5.10-arch1-1", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010105f" }, "urllib3": { "version": "1.25.9" }, "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/5438/reactions" }
https://api.github.com/repos/psf/requests/issues/5438/timeline
null
completed
null
null
false
[ "Also this works too:\r\n```python \r\nr = rq.Request('POST', 'https://google.com', json={'foo':'bar'})\r\np = r.prepare()\r\np.headers.update({'bar':'baz'})\r\ns.send(p)\r\n<Response [405]>\r\n```", "Calling `prepare` generates all the headers that Requests has to pass to urllib3 including content-length and con...
https://api.github.com/repos/psf/requests/issues/5437
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5437/labels{/name}
https://api.github.com/repos/psf/requests/issues/5437/comments
https://api.github.com/repos/psf/requests/issues/5437/events
https://github.com/psf/requests/pull/5437
606,835,338
MDExOlB1bGxSZXF1ZXN0NDA4OTU1NjQ2
5,437
docs: make danger of verify=False clearer
{ "avatar_url": "https://avatars.githubusercontent.com/u/18544?v=4", "events_url": "https://api.github.com/users/elithrar/events{/privacy}", "followers_url": "https://api.github.com/users/elithrar/followers", "following_url": "https://api.github.com/users/elithrar/following{/other_user}", "gists_url": "https://api.github.com/users/elithrar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/elithrar", "id": 18544, "login": "elithrar", "node_id": "MDQ6VXNlcjE4NTQ0", "organizations_url": "https://api.github.com/users/elithrar/orgs", "received_events_url": "https://api.github.com/users/elithrar/received_events", "repos_url": "https://api.github.com/users/elithrar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/elithrar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/elithrar/subscriptions", "type": "User", "url": "https://api.github.com/users/elithrar", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-25T19:07:50Z
2021-08-28T00:06:23Z
2020-08-17T02:31:06Z
CONTRIBUTOR
resolved
This PR makes the danger of setting `verify=False` clearer to users of requests. In many cases, users may set this to `False` when running into problems locally with self-signed certificates, but not realize the risk they are opening themselves up to. As an example of how the dangers of not verifying TLS (SSL) certificates is communicated, see Go's `InsecureSkipVerify` docs: https://golang.org/pkg/crypto/tls/ ``` // InsecureSkipVerify controls whether a client verifies the // server's certificate chain and host name. // If InsecureSkipVerify is true, TLS accepts any certificate // presented by the server and any host name in that certificate. // In this mode, TLS is susceptible to man-in-the-middle attacks. // This should be used only for testing. ``` Happy to take feedback on the wording / doc-style - this is my first PR to requests but I care a lot about 'safe defaults' in OSS!
{ "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/5437/reactions" }
https://api.github.com/repos/psf/requests/issues/5437/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5437.diff", "html_url": "https://github.com/psf/requests/pull/5437", "merged_at": "2020-08-17T02:31:06Z", "patch_url": "https://github.com/psf/requests/pull/5437.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5437" }
true
[ "Fixed some RST formatting / consistency.", "Gentle ping - does this need anything else to be merged?" ]
https://api.github.com/repos/psf/requests/issues/5436
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5436/labels{/name}
https://api.github.com/repos/psf/requests/issues/5436/comments
https://api.github.com/repos/psf/requests/issues/5436/events
https://github.com/psf/requests/issues/5436
606,483,070
MDU6SXNzdWU2MDY0ODMwNzA=
5,436
Add response.future_requests_uri, deprecate response.is_permanent_redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/1779619?v=4", "events_url": "https://api.github.com/users/SoniEx2/events{/privacy}", "followers_url": "https://api.github.com/users/SoniEx2/followers", "following_url": "https://api.github.com/users/SoniEx2/following{/other_user}", "gists_url": "https://api.github.com/users/SoniEx2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SoniEx2", "id": 1779619, "login": "SoniEx2", "node_id": "MDQ6VXNlcjE3Nzk2MTk=", "organizations_url": "https://api.github.com/users/SoniEx2/orgs", "received_events_url": "https://api.github.com/users/SoniEx2/received_events", "repos_url": "https://api.github.com/users/SoniEx2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SoniEx2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SoniEx2/subscriptions", "type": "User", "url": "https://api.github.com/users/SoniEx2", "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" } ]
open
false
null
[]
null
6
2020-04-24T17:50:35Z
2020-06-17T20:23:42Z
null
NONE
null
`response.is_permanent_redirect` is unreliable/useless/dangerous for chains of redirects, just give the user the correct URI instead. example use-case: `foo` redirects temporarily to `bar`, which in turn redirects permanently to `baz`. future requests should still be made to `foo`, but using `is_permanent_redirect` would lead to them being made to `baz` instead.
null
{ "+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/5436/reactions" }
https://api.github.com/repos/psf/requests/issues/5436/timeline
null
null
null
null
false
[ "That method was not introduced for users to use and was part of internal machinery that was ripped out", "https://requests.readthedocs.io/en/master/api/#requests.Response.is_permanent_redirect ?", "I think an alternative check for the first history item being a permanent redirect would be a more accurate way t...
https://api.github.com/repos/psf/requests/issues/5435
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5435/labels{/name}
https://api.github.com/repos/psf/requests/issues/5435/comments
https://api.github.com/repos/psf/requests/issues/5435/events
https://github.com/psf/requests/issues/5435
605,677,935
MDU6SXNzdWU2MDU2Nzc5MzU=
5,435
QUES: Default port for Dockerfile
{ "avatar_url": "https://avatars.githubusercontent.com/u/5199900?v=4", "events_url": "https://api.github.com/users/daddydrac/events{/privacy}", "followers_url": "https://api.github.com/users/daddydrac/followers", "following_url": "https://api.github.com/users/daddydrac/following{/other_user}", "gists_url": "https://api.github.com/users/daddydrac/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/daddydrac", "id": 5199900, "login": "daddydrac", "node_id": "MDQ6VXNlcjUxOTk5MDA=", "organizations_url": "https://api.github.com/users/daddydrac/orgs", "received_events_url": "https://api.github.com/users/daddydrac/received_events", "repos_url": "https://api.github.com/users/daddydrac/repos", "site_admin": false, "starred_url": "https://api.github.com/users/daddydrac/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/daddydrac/subscriptions", "type": "User", "url": "https://api.github.com/users/daddydrac", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-04-23T16:33:04Z
2021-09-01T00:11:25Z
2020-04-30T15:57:33Z
NONE
resolved
What port do I need to map to in Dockerfile so requests can make a request out?
{ "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/5435/reactions" }
https://api.github.com/repos/psf/requests/issues/5435/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.", "Thanks for your Shitty developer pedantry — I tri...
https://api.github.com/repos/psf/requests/issues/5434
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5434/labels{/name}
https://api.github.com/repos/psf/requests/issues/5434/comments
https://api.github.com/repos/psf/requests/issues/5434/events
https://github.com/psf/requests/pull/5434
604,768,818
MDExOlB1bGxSZXF1ZXN0NDA3Mjk5ODg1
5,434
Warn user once about missing timeouts
{ "avatar_url": "https://avatars.githubusercontent.com/u/50769?v=4", "events_url": "https://api.github.com/users/earonesty/events{/privacy}", "followers_url": "https://api.github.com/users/earonesty/followers", "following_url": "https://api.github.com/users/earonesty/following{/other_user}", "gists_url": "https://api.github.com/users/earonesty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/earonesty", "id": 50769, "login": "earonesty", "node_id": "MDQ6VXNlcjUwNzY5", "organizations_url": "https://api.github.com/users/earonesty/orgs", "received_events_url": "https://api.github.com/users/earonesty/received_events", "repos_url": "https://api.github.com/users/earonesty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/earonesty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/earonesty/subscriptions", "type": "User", "url": "https://api.github.com/users/earonesty", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-04-22T13:43:00Z
2023-05-12T00:03:08Z
2022-05-11T01:01:58Z
NONE
resolved
Not sure if this is the best way to do it, but some sort of warning that "hanging forever" is a possibility is probably important - given that this lib is for "humans".
{ "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/5434/reactions" }
https://api.github.com/repos/psf/requests/issues/5434/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5434.diff", "html_url": "https://github.com/psf/requests/pull/5434", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5434.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5434" }
true
[ "A) OK, I made a warning.\r\nB) Well, it's either that or severe intermittent bugs bubbling up. I'll take the former\r\nC) ? An instance variable wouldn't work, but as a class var, you get warned once and that's it.\r\nD) Valid? Under what circumstances should a request wait longer for a packet more than, say,...
https://api.github.com/repos/psf/requests/issues/5433
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5433/labels{/name}
https://api.github.com/repos/psf/requests/issues/5433/comments
https://api.github.com/repos/psf/requests/issues/5433/events
https://github.com/psf/requests/issues/5433
604,190,015
MDU6SXNzdWU2MDQxOTAwMTU=
5,433
Requests library can hang indefinitely on windows, even if a timeout is set
{ "avatar_url": "https://avatars.githubusercontent.com/u/50769?v=4", "events_url": "https://api.github.com/users/earonesty/events{/privacy}", "followers_url": "https://api.github.com/users/earonesty/followers", "following_url": "https://api.github.com/users/earonesty/following{/other_user}", "gists_url": "https://api.github.com/users/earonesty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/earonesty", "id": 50769, "login": "earonesty", "node_id": "MDQ6VXNlcjUwNzY5", "organizations_url": "https://api.github.com/users/earonesty/orgs", "received_events_url": "https://api.github.com/users/earonesty/received_events", "repos_url": "https://api.github.com/users/earonesty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/earonesty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/earonesty/subscriptions", "type": "User", "url": "https://api.github.com/users/earonesty", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-21T18:23:32Z
2021-09-01T00:11:27Z
2020-04-22T01:55:42Z
NONE
resolved
Summary. Assume you have a website that listens for and accepts connections, but never responds. `requests.get('https://sitethatneverresponds.com', timeout=1)` I expect this should *always* raise a timeout error. Instead, if you put Windows into "sleep" mode during an openssl handshake, then wake it up a few minute later, socket events are silently dropped and the socket hangs forever. ## Reproduction Steps On a laptop run do this a bunch of times: `requests.get('https://sitethatneverresponds.com', timeout=1)` Then close the laptop lid, and lift it up 5 minutes later (or whatever the tcp discard window is). The get request never times out, and never returns. If someone knows a better way of making a socket "disappear" and not time out, let me know. It's possible to get a call stack by turning on python's tracing system and killing the process: ## Call stack of hung thread: ``` Thread 0x000070000823a000 (most recent call first): File "site-packages/OpenSSL/SSL.py", line 1813 in recv_into File "site-packages/urllib3/contrib/pyopenssl.py", line 313 in recv_into File "socket.py", line 586 in readinto File "http/client.py", line 258 in _read_status File "http/client.py", line 297 in begin File "http/client.py", line 1331 in getresponse File "site-packages/urllib3/connectionpool.py", line 421 in _make_request File "site-packages/urllib3/connectionpool.py", line 677 in urlopen File "site-packages/requests/adapters.py", line 449 in send File "site-packages/requests/sessions.py", line 643 in send ``` ## Related Issue with pyopenssl: pyopnessl, by not doing it themselves, has essentially decided that the caller must handle this by putting the socket into non-blocking mode, and calling select in a loop: See: https://github.com/pyca/pyopenssl/issues/168 for potential solutions. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.8" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.1.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1000211f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": true ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/50769?v=4", "events_url": "https://api.github.com/users/earonesty/events{/privacy}", "followers_url": "https://api.github.com/users/earonesty/followers", "following_url": "https://api.github.com/users/earonesty/following{/other_user}", "gists_url": "https://api.github.com/users/earonesty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/earonesty", "id": 50769, "login": "earonesty", "node_id": "MDQ6VXNlcjUwNzY5", "organizations_url": "https://api.github.com/users/earonesty/orgs", "received_events_url": "https://api.github.com/users/earonesty/received_events", "repos_url": "https://api.github.com/users/earonesty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/earonesty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/earonesty/subscriptions", "type": "User", "url": "https://api.github.com/users/earonesty", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5433/reactions" }
https://api.github.com/repos/psf/requests/issues/5433/timeline
null
completed
null
null
false
[ "I'm going to write a program that makes this easy to reproduce, then reopen if I can figure it out.", "@earonesty I belive you're confused about what functionality `timeout` provides in `requests`. Please search open and closed issues and read those, or read the docs" ]
https://api.github.com/repos/psf/requests/issues/5432
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5432/labels{/name}
https://api.github.com/repos/psf/requests/issues/5432/comments
https://api.github.com/repos/psf/requests/issues/5432/events
https://github.com/psf/requests/issues/5432
603,610,585
MDU6SXNzdWU2MDM2MTA1ODU=
5,432
Timeout exception not being raised
{ "avatar_url": "https://avatars.githubusercontent.com/u/25521899?v=4", "events_url": "https://api.github.com/users/alexbode/events{/privacy}", "followers_url": "https://api.github.com/users/alexbode/followers", "following_url": "https://api.github.com/users/alexbode/following{/other_user}", "gists_url": "https://api.github.com/users/alexbode/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexbode", "id": 25521899, "login": "alexbode", "node_id": "MDQ6VXNlcjI1NTIxODk5", "organizations_url": "https://api.github.com/users/alexbode/orgs", "received_events_url": "https://api.github.com/users/alexbode/received_events", "repos_url": "https://api.github.com/users/alexbode/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexbode/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexbode/subscriptions", "type": "User", "url": "https://api.github.com/users/alexbode", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-21T00:01:17Z
2021-09-01T00:11:27Z
2020-04-21T01:32:12Z
NONE
resolved
I am testing a backend api and expect an exception to be raised when the request takes longer than specified timeout. I am running a flask app behind nginx behind an aws elb. The app is running in a private subnet and the elb is in the public subnet. Don't know if this is an issue related to the backend architecture or a requests bug. When I go to the url in a browser flask returns the json response immediately. Interestingly, using the requests library, the response is returned at a time about double the specified timeout (see screenshots). ## Expected Result Raised exception ## Actual Result Returns response after specified (2 * timeout) ## Reproduction Steps <img width="510" alt="image" src="https://user-images.githubusercontent.com/25521899/79810594-3fc49600-8328-11ea-96d4-c067679433a4.png"> <img width="497" alt="image" src="https://user-images.githubusercontent.com/25521899/79810605-45ba7700-8328-11ea-9fb5-fbcc32a12c52.png"> ```python import time start = time.time() print(requests.get("https://******.com/test", timeout=2).json()) print(time.time() - start) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.4" }, "platform": { "release": "19.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1000213f" }, "urllib3": { "version": "1.25.6" }, "using_pyopenssl": false } Python 3.7.4 requests==2.22.0 ``` 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/25521899?v=4", "events_url": "https://api.github.com/users/alexbode/events{/privacy}", "followers_url": "https://api.github.com/users/alexbode/followers", "following_url": "https://api.github.com/users/alexbode/following{/other_user}", "gists_url": "https://api.github.com/users/alexbode/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexbode", "id": 25521899, "login": "alexbode", "node_id": "MDQ6VXNlcjI1NTIxODk5", "organizations_url": "https://api.github.com/users/alexbode/orgs", "received_events_url": "https://api.github.com/users/alexbode/received_events", "repos_url": "https://api.github.com/users/alexbode/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexbode/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexbode/subscriptions", "type": "User", "url": "https://api.github.com/users/alexbode", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5432/reactions" }
https://api.github.com/repos/psf/requests/issues/5432/timeline
null
completed
null
null
false
[ "Hi @alexbode,\n\nIf you look at the [docs](https://requests.readthedocs.io/en/master/user/quickstart/#timeouts) or source code on timeouts, we’ve got a couple call outs on this. The timeout you’re specifying here is a Read Timeout, not a Total Timeout.\n\n> timeout is not a time limit on the entire response downlo...
https://api.github.com/repos/psf/requests/issues/5431
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5431/labels{/name}
https://api.github.com/repos/psf/requests/issues/5431/comments
https://api.github.com/repos/psf/requests/issues/5431/events
https://github.com/psf/requests/pull/5431
602,771,602
MDExOlB1bGxSZXF1ZXN0NDA1NzAwNzg3
5,431
Add more details in error reponse of "Bad Request"
{ "avatar_url": "https://avatars.githubusercontent.com/u/3462960?v=4", "events_url": "https://api.github.com/users/bitsapien/events{/privacy}", "followers_url": "https://api.github.com/users/bitsapien/followers", "following_url": "https://api.github.com/users/bitsapien/following{/other_user}", "gists_url": "https://api.github.com/users/bitsapien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bitsapien", "id": 3462960, "login": "bitsapien", "node_id": "MDQ6VXNlcjM0NjI5NjA=", "organizations_url": "https://api.github.com/users/bitsapien/orgs", "received_events_url": "https://api.github.com/users/bitsapien/received_events", "repos_url": "https://api.github.com/users/bitsapien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bitsapien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bitsapien/subscriptions", "type": "User", "url": "https://api.github.com/users/bitsapien", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-04-19T17:18:37Z
2021-08-29T00:06:56Z
2020-04-30T15:49:01Z
NONE
resolved
**The problem**: When there is an exception raised on a 400 "Bad Request" from the server. The information provided on the exception is not enough to debug problems. **Resolution**: Adding "content" attribute from the response to understand the error from the server's perspective.
{ "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/5431/reactions" }
https://api.github.com/repos/psf/requests/issues/5431/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5431.diff", "html_url": "https://github.com/psf/requests/pull/5431", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5431.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5431" }
true
[ "This doesn't scale. `response.content` isn't guaranteed to be pre-populated and in the event of a malicious server, this causes us to hang before we even raise the exception because a server could send an endless stream of bytes and requests has no mechanism to stop it.", "Also, there's already a response attrib...
https://api.github.com/repos/psf/requests/issues/5430
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5430/labels{/name}
https://api.github.com/repos/psf/requests/issues/5430/comments
https://api.github.com/repos/psf/requests/issues/5430/events
https://github.com/psf/requests/issues/5430
602,744,441
MDU6SXNzdWU2MDI3NDQ0NDE=
5,430
A `ConnectionError` ("Read timed out.") is raised instead of `ReadTimeout`, when using `timeout` keyword argument of `Session.get()`
{ "avatar_url": "https://avatars.githubusercontent.com/u/14088508?v=4", "events_url": "https://api.github.com/users/nlykkei/events{/privacy}", "followers_url": "https://api.github.com/users/nlykkei/followers", "following_url": "https://api.github.com/users/nlykkei/following{/other_user}", "gists_url": "https://api.github.com/users/nlykkei/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nlykkei", "id": 14088508, "login": "nlykkei", "node_id": "MDQ6VXNlcjE0MDg4NTA4", "organizations_url": "https://api.github.com/users/nlykkei/orgs", "received_events_url": "https://api.github.com/users/nlykkei/received_events", "repos_url": "https://api.github.com/users/nlykkei/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nlykkei/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nlykkei/subscriptions", "type": "User", "url": "https://api.github.com/users/nlykkei", "user_view_type": "public" }
[]
open
false
null
[]
null
11
2020-04-19T15:29:31Z
2024-08-29T10:13:59Z
null
NONE
null
Consider the code below (**main.py**). When a temporary network disconnect occurs without the `timeout` keyword argument to `Session.get()`, the client may hang indefinitely and no exception is raised. However, if I use the `timeout` keyword argument, the application will raise a `ConnectionError` from **models.py** corresponding to the `urllib3.exceptions.ReadTimeoutError`: `requests.exceptions.ConnectionError: HTTPSConnectionPool(host='confluence.example.net', port=443): Read timed out.` Given that the exception is only raised, when using the `timeout` keyword argument, why isn't Requests raising `ReadTimeout` exception instead? In particular, the `ConnectionError`'s exception message "Read timed out." suggests that it should be a `ReadTimeout` exception? To mitigate the issue I'm currently performing a regular expression match on the exception message, which is a bad practice: ``` except ConnectionError as e: if re.search('Read timed out', str(e), re.IGNORECASE): ``` **main.py**: ``` try: with requests.Session() as rs: rs.mount('https://', HTTPAdapter(max_retries=Retry(total=10, connect=10, read=10, backoff_factor=1))) with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r: r.raise_for_status() page_set = r.json() except ReadTimeout as e: logging.exception('Request for page set timed out: {}'.format(url)) continue except ConnectionError as e: if re.search('Read timed out', str(e), re.IGNORECASE): logging.exception('Request for page set timed out (network problem): {}'.format(url)) continue else: raise ``` **models.py**: https://github.com/psf/requests/blob/master/requests/models.py ``` def generate(): # Special case for urllib3. if hasattr(self.raw, 'stream'): try: for chunk in self.raw.stream(chunk_size, decode_content=True): yield chunk except ProtocolError as e: raise ChunkedEncodingError(e) except DecodeError as e: raise ContentDecodingError(e) except ReadTimeoutError as e: raise ConnectionError(e) ``` **Exception**: ``` ERROR -- 04/19/2020 04:51:32 PM -- root -- ThreadPoolExecutor-0_0 -- Request for page set timed out (network problem): https://confluence.example.net/rest/api/content/search?expand=version,history,space,body.storage,children.attachment.version,children.attachment.history,children.attachment.space&limit=50&start=1900&cql=(type=page) Traceback (most recent call last): File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 425, in _error_catcher yield File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 755, in read_chunked chunk = self._handle_chunk(amt) File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 708, in _handle_chunk returned_chunk = self._fp._safe_read(self.chunk_left) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 620, in _safe_read chunk = self.fp.read(min(amt, MAXAMOUNT)) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into return self.read(nbytes, buffer) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 929, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 751, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 560, in stream for line in self.read_chunked(amt, decode_content=decode_content): File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 781, in read_chunked self._original_response.close() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 430, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='confluence.example.net', port=443): Read timed out. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/nlykkei/projects/atlassian-watchdog/confluence/confluence.py", line 112, in __producer with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r: File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 543, in get return self.request('GET', url, **kwargs) File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 683, in send r.content File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 829, in content self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b'' File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 758, in generate raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='confluence.example.net', port=443): Read timed out. ``` ## Expected Result I would expect a `requests.exceptions.ReadTimeout` to be raised. ## Actual Result A `requests.exceptions.ConnectError` was raised instead, with the error message: `Read timed out.` ## System Information $ python -m requests.help ``` nlykkei:~$ python3 -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.7" }, "implementation": { "name": "CPython", "version": "3.7.7" }, "platform": { "release": "19.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.24.3" }, "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": 10, "-1": 0, "confused": 0, "eyes": 2, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 12, "url": "https://api.github.com/repos/psf/requests/issues/5430/reactions" }
https://api.github.com/repos/psf/requests/issues/5430/timeline
null
null
null
null
false
[ "This is behaving exactly as it unfortunately must until a breaking API change can be introduced. The behaviour was likely (I don't remember this specifically) introduced to raise the same exception as it used to raise before urllib3 introduced finer-grained exceptions. Is that great? No. Is it what will happen unt...
https://api.github.com/repos/psf/requests/issues/5429
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5429/labels{/name}
https://api.github.com/repos/psf/requests/issues/5429/comments
https://api.github.com/repos/psf/requests/issues/5429/events
https://github.com/psf/requests/issues/5429
602,573,158
MDU6SXNzdWU2MDI1NzMxNTg=
5,429
Not able to import requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/56107942?v=4", "events_url": "https://api.github.com/users/DutchviewSumit/events{/privacy}", "followers_url": "https://api.github.com/users/DutchviewSumit/followers", "following_url": "https://api.github.com/users/DutchviewSumit/following{/other_user}", "gists_url": "https://api.github.com/users/DutchviewSumit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/DutchviewSumit", "id": 56107942, "login": "DutchviewSumit", "node_id": "MDQ6VXNlcjU2MTA3OTQy", "organizations_url": "https://api.github.com/users/DutchviewSumit/orgs", "received_events_url": "https://api.github.com/users/DutchviewSumit/received_events", "repos_url": "https://api.github.com/users/DutchviewSumit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/DutchviewSumit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DutchviewSumit/subscriptions", "type": "User", "url": "https://api.github.com/users/DutchviewSumit", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-18T23:15:23Z
2021-09-01T00:11:25Z
2020-04-30T15:57:57Z
NONE
resolved
If I am trying to install requests it is showing requirement already satisfied but If I am trying to import then it is throwing error. Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'requests'. I am running the command pip3 list then it is showing requests 2.23.0. but not able to import.
{ "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/5429/reactions" }
https://api.github.com/repos/psf/requests/issues/5429/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/5428
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5428/labels{/name}
https://api.github.com/repos/psf/requests/issues/5428/comments
https://api.github.com/repos/psf/requests/issues/5428/events
https://github.com/psf/requests/issues/5428
602,436,746
MDU6SXNzdWU2MDI0MzY3NDY=
5,428
Received response with content-encoding: gzip, but failed to decode it.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1636393?v=4", "events_url": "https://api.github.com/users/petasis/events{/privacy}", "followers_url": "https://api.github.com/users/petasis/followers", "following_url": "https://api.github.com/users/petasis/following{/other_user}", "gists_url": "https://api.github.com/users/petasis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/petasis", "id": 1636393, "login": "petasis", "node_id": "MDQ6VXNlcjE2MzYzOTM=", "organizations_url": "https://api.github.com/users/petasis/orgs", "received_events_url": "https://api.github.com/users/petasis/received_events", "repos_url": "https://api.github.com/users/petasis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/petasis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/petasis/subscriptions", "type": "User", "url": "https://api.github.com/users/petasis", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-04-18T11:19:28Z
2021-09-01T00:11:23Z
2020-04-30T15:59:15Z
NONE
resolved
I get an error while trying to download from https://www.huffingtonpost.gr/feeds/index.xml. ## Expected Result To download the data. ## Actual Result I get an exception. ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check')) ## Reproduction Steps ```python import requests requests.get('https://www.huffingtonpost.gr/feeds/index.xml', timeout=5.0, allow_redirects=True) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.6.1" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.6" }, "platform": { "release": "5.5.15-200.fc31.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.0.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.7" }, "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/5428/reactions" }
https://api.github.com/repos/psf/requests/issues/5428/timeline
null
completed
null
null
false
[ "This isn't a bug in Requests. The server your talking to (or an intermediary) is mucking with the compression of the response.", "Going to resolve since there's nothing we can do here. This would need to be resolved with the server in the network chain.", "On the other hand, other libraries (wget, firefox), se...
https://api.github.com/repos/psf/requests/issues/5427
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5427/labels{/name}
https://api.github.com/repos/psf/requests/issues/5427/comments
https://api.github.com/repos/psf/requests/issues/5427/events
https://github.com/psf/requests/issues/5427
602,242,935
MDU6SXNzdWU2MDIyNDI5MzU=
5,427
Cannot download files larger than 124MB
{ "avatar_url": "https://avatars.githubusercontent.com/u/61763378?v=4", "events_url": "https://api.github.com/users/stefanosporiazis/events{/privacy}", "followers_url": "https://api.github.com/users/stefanosporiazis/followers", "following_url": "https://api.github.com/users/stefanosporiazis/following{/other_user}", "gists_url": "https://api.github.com/users/stefanosporiazis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stefanosporiazis", "id": 61763378, "login": "stefanosporiazis", "node_id": "MDQ6VXNlcjYxNzYzMzc4", "organizations_url": "https://api.github.com/users/stefanosporiazis/orgs", "received_events_url": "https://api.github.com/users/stefanosporiazis/received_events", "repos_url": "https://api.github.com/users/stefanosporiazis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stefanosporiazis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stefanosporiazis/subscriptions", "type": "User", "url": "https://api.github.com/users/stefanosporiazis", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2020-04-17T21:26:53Z
2021-08-31T00:07:01Z
2020-05-12T17:00:24Z
NONE
resolved
I'm using requests to download files from my remote server. All files under 124MB are downloaded and saved properly. Files larger than that are only downloaded up to 124MB and the rest of the data is skipped. Originally I hadn't set **stream** to **True** and I was simply saving the data using **r.content**. I thought setting **stream** to **True** and iterating over chunks with **iter_content()** would fix my problem but it persists. Am I doing something wrong? Here's my code ```python for file in files_list: url = "http://server:8080/path/" + file r = requests.get(url, stream=True) with open(file, 'wb') as f: for chunk in r.iter_content(chunk_size=1024): if chunk: f.write(chunk) f.flush() ``` **Edit:** I previously stated that it downloaded up to 130MB, but it's actually 124MB. **Edit 2:** Solution that worked for me: https://serverfault.com/questions/470403/apache-2-4-on-windows-2008-large-file-downloads-are-corrupt
{ "avatar_url": "https://avatars.githubusercontent.com/u/61763378?v=4", "events_url": "https://api.github.com/users/stefanosporiazis/events{/privacy}", "followers_url": "https://api.github.com/users/stefanosporiazis/followers", "following_url": "https://api.github.com/users/stefanosporiazis/following{/other_user}", "gists_url": "https://api.github.com/users/stefanosporiazis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stefanosporiazis", "id": 61763378, "login": "stefanosporiazis", "node_id": "MDQ6VXNlcjYxNzYzMzc4", "organizations_url": "https://api.github.com/users/stefanosporiazis/orgs", "received_events_url": "https://api.github.com/users/stefanosporiazis/received_events", "repos_url": "https://api.github.com/users/stefanosporiazis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stefanosporiazis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stefanosporiazis/subscriptions", "type": "User", "url": "https://api.github.com/users/stefanosporiazis", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5427/reactions" }
https://api.github.com/repos/psf/requests/issues/5427/timeline
null
completed
null
null
false
[ "What file type were you trying to download and what type of webserver are you running? (If you don't know what type you might be able to find it in the \"X-Powered-By\" or \"Server\" response headers) I think I have a solution but still trying to debug. ", "Webserver is: **Apache/2.4.37 (Win64) PHP/7.3.1**\r\nT...
https://api.github.com/repos/psf/requests/issues/5426
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5426/labels{/name}
https://api.github.com/repos/psf/requests/issues/5426/comments
https://api.github.com/repos/psf/requests/issues/5426/events
https://github.com/psf/requests/pull/5426
600,933,308
MDExOlB1bGxSZXF1ZXN0NDA0MjY4ODU5
5,426
word correction
{ "avatar_url": "https://avatars.githubusercontent.com/u/24846146?v=4", "events_url": "https://api.github.com/users/cciprian5/events{/privacy}", "followers_url": "https://api.github.com/users/cciprian5/followers", "following_url": "https://api.github.com/users/cciprian5/following{/other_user}", "gists_url": "https://api.github.com/users/cciprian5/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cciprian5", "id": 24846146, "login": "cciprian5", "node_id": "MDQ6VXNlcjI0ODQ2MTQ2", "organizations_url": "https://api.github.com/users/cciprian5/orgs", "received_events_url": "https://api.github.com/users/cciprian5/received_events", "repos_url": "https://api.github.com/users/cciprian5/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cciprian5/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cciprian5/subscriptions", "type": "User", "url": "https://api.github.com/users/cciprian5", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-04-16T10:35:24Z
2021-08-29T00:06:56Z
2020-04-30T15:51:52Z
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/5426/reactions" }
https://api.github.com/repos/psf/requests/issues/5426/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5426.diff", "html_url": "https://github.com/psf/requests/pull/5426", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5426.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5426" }
true
[ "This isn't a correction. `sans` means `without`.", "Mea culpa... I did not know that this word exists in english. Thought that\r\nit's a leftover from french translation.\r\n\r\n\r\n\r\n\r\nOn Thu, Apr 16, 2020 at 5:34 PM Ian Stapleton Cordasco <\r\nnotifications@github.com> wrote:\r\n\r\n> This isn't a correcti...
https://api.github.com/repos/psf/requests/issues/5425
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5425/labels{/name}
https://api.github.com/repos/psf/requests/issues/5425/comments
https://api.github.com/repos/psf/requests/issues/5425/events
https://github.com/psf/requests/issues/5425
600,500,899
MDU6SXNzdWU2MDA1MDA4OTk=
5,425
Requests does not terminate sending data if a response is received
{ "avatar_url": "https://avatars.githubusercontent.com/u/44279559?v=4", "events_url": "https://api.github.com/users/crabtreej/events{/privacy}", "followers_url": "https://api.github.com/users/crabtreej/followers", "following_url": "https://api.github.com/users/crabtreej/following{/other_user}", "gists_url": "https://api.github.com/users/crabtreej/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/crabtreej", "id": 44279559, "login": "crabtreej", "node_id": "MDQ6VXNlcjQ0Mjc5NTU5", "organizations_url": "https://api.github.com/users/crabtreej/orgs", "received_events_url": "https://api.github.com/users/crabtreej/received_events", "repos_url": "https://api.github.com/users/crabtreej/repos", "site_admin": false, "starred_url": "https://api.github.com/users/crabtreej/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/crabtreej/subscriptions", "type": "User", "url": "https://api.github.com/users/crabtreej", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-04-15T18:26:23Z
2021-09-01T00:11:27Z
2020-04-16T17:56:34Z
NONE
resolved
**Summary** A request.post() will continue sending the entirety of the provided data after the receiver has already attempted to terminate the request. Specifically, this problem is occurring with requests 2.23.0, and the request is being sent to a Django server running Django 3.0.5. I was unsure if this should be a bug or a feature, but since it deviates from other standard tools (e.g. curl), I figured it should be a bug. **Expected Result** 1. I send a POST request to a Django server's endpoint containing some large (>200 mb) multi-part encoded file. 2. The Django server quickly returns an HTTP 400 response to the sender. 3. I expect that the sender would then stop sending data over the socket, collect Django's response, and return from the POST without sending the rest of the data, which will never be read. This is Curl's response to handling receiving an early response. **Actual Result** Step 1 and 2 proceed as normal. In step 3, requests will instead continue sending all of the data to the server even though a response has already been received. My use case is sending files on the order of several GB (which I know is not typical), and request's behavior will kill the receiving server because Django will attempt to read all the 'leftover' data (which is a huge amount) in one run. **Reproduction Steps** **Request's Side** ```python import requests file_name = 'test.txt' f_handle = open(file_name, 'rb') res = requests.post('http://localhost:8000/upload', files={'file': (file_name, f_handle, 'raw')}) res.raise_for_status() ``` The error can be difficult to see here because at a certain file size there will be a memory error from requests, so it's hard to tell if it's stuck sending. Using requests-toolbelt allows arbitrarily large multipart files by streaming them, and I originally posted the error there - [Requests-Toolbelt error](https://github.com/requests/toolbelt/issues/292). If it makes the hang when requests sends the entire file easier to see, here's code using a MultipartEncoder as well, toolbelt version 0.9.1. **Alt Request's Side**: ```python import requests from requests_toolbelt.multipart.encoder import MultipartEncoder file_name = 'test.txt' f_handle = open(file_name, 'rb') m = MultipartEncoder({'file': (file_name, f_handle, 'raw')}) res = requests.post('http://localhost:8000/upload', data=m, headers={'Content-Type': m.content_type}) res.raise_for_status() ``` **Django views.py**: Just kicks back an error ```python from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST @csrf_exempt @require_POST def upload(request): return HttpResponse("Done!", status=400) ``` **Curl's Behavior**: Sending an ~800mb file, stops immediately (147 bytes in) and shows Django's response. `curl -F file=test.txt -k http://localhost:8000/upload` ``` % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 152 100 5 100 147 333 9800 --:--:-- --:--:-- --:--:-- 10133 Done! ``` **System Information** ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.6" }, "platform": { "release": "7", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "100020ff" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/44279559?v=4", "events_url": "https://api.github.com/users/crabtreej/events{/privacy}", "followers_url": "https://api.github.com/users/crabtreej/followers", "following_url": "https://api.github.com/users/crabtreej/following{/other_user}", "gists_url": "https://api.github.com/users/crabtreej/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/crabtreej", "id": 44279559, "login": "crabtreej", "node_id": "MDQ6VXNlcjQ0Mjc5NTU5", "organizations_url": "https://api.github.com/users/crabtreej/orgs", "received_events_url": "https://api.github.com/users/crabtreej/received_events", "repos_url": "https://api.github.com/users/crabtreej/repos", "site_admin": false, "starred_url": "https://api.github.com/users/crabtreej/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/crabtreej/subscriptions", "type": "User", "url": "https://api.github.com/users/crabtreej", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5425/reactions" }
https://api.github.com/repos/psf/requests/issues/5425/timeline
null
completed
null
null
false
[ "Early responses aren't supported by Python's standard `httplib`/`http.client` and so Requests and urllib3 cannot support them.", "Thank you for the quick response. Do you know if httplib2 supports early responses, or is requests already based on httplib2?", "I would expect a client built on something like Twis...
https://api.github.com/repos/psf/requests/issues/5424
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5424/labels{/name}
https://api.github.com/repos/psf/requests/issues/5424/comments
https://api.github.com/repos/psf/requests/issues/5424/events
https://github.com/psf/requests/pull/5424
599,780,380
MDExOlB1bGxSZXF1ZXN0NDAzMzUwNzYw
5,424
WIP: Allow use of system CA certs
{ "avatar_url": "https://avatars.githubusercontent.com/u/1520812?v=4", "events_url": "https://api.github.com/users/jflemer-ndp/events{/privacy}", "followers_url": "https://api.github.com/users/jflemer-ndp/followers", "following_url": "https://api.github.com/users/jflemer-ndp/following{/other_user}", "gists_url": "https://api.github.com/users/jflemer-ndp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jflemer-ndp", "id": 1520812, "login": "jflemer-ndp", "node_id": "MDQ6VXNlcjE1MjA4MTI=", "organizations_url": "https://api.github.com/users/jflemer-ndp/orgs", "received_events_url": "https://api.github.com/users/jflemer-ndp/received_events", "repos_url": "https://api.github.com/users/jflemer-ndp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jflemer-ndp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jflemer-ndp/subscriptions", "type": "User", "url": "https://api.github.com/users/jflemer-ndp", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-04-14T18:41:02Z
2021-08-29T00:06:57Z
2020-04-15T21:49:40Z
NONE
resolved
This allows setting `REQUESTS_CA_BUNDLE=SYSTEM` to make Requests behaves like the base python standard library with respect to CA cert trust.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1520812?v=4", "events_url": "https://api.github.com/users/jflemer-ndp/events{/privacy}", "followers_url": "https://api.github.com/users/jflemer-ndp/followers", "following_url": "https://api.github.com/users/jflemer-ndp/following{/other_user}", "gists_url": "https://api.github.com/users/jflemer-ndp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jflemer-ndp", "id": 1520812, "login": "jflemer-ndp", "node_id": "MDQ6VXNlcjE1MjA4MTI=", "organizations_url": "https://api.github.com/users/jflemer-ndp/orgs", "received_events_url": "https://api.github.com/users/jflemer-ndp/received_events", "repos_url": "https://api.github.com/users/jflemer-ndp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jflemer-ndp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jflemer-ndp/subscriptions", "type": "User", "url": "https://api.github.com/users/jflemer-ndp", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5424/reactions" }
https://api.github.com/repos/psf/requests/issues/5424/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5424.diff", "html_url": "https://github.com/psf/requests/pull/5424", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5424.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5424" }
true
[ "Based on a comment on the original issue (https://github.com/psf/requests/issues/2966#issuecomment-613577111) this is not trustworthy (i.e., we can't guarantee that the systems will remotely do the right thing) enough of a fix to accept.", "This commit doesn't change default behavior.", "I don't see what your ...
https://api.github.com/repos/psf/requests/issues/5423
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5423/labels{/name}
https://api.github.com/repos/psf/requests/issues/5423/comments
https://api.github.com/repos/psf/requests/issues/5423/events
https://github.com/psf/requests/issues/5423
599,509,923
MDU6SXNzdWU1OTk1MDk5MjM=
5,423
HTTPS under Jython 2.7.2 failes
{ "avatar_url": "https://avatars.githubusercontent.com/u/23736716?v=4", "events_url": "https://api.github.com/users/lukicsl/events{/privacy}", "followers_url": "https://api.github.com/users/lukicsl/followers", "following_url": "https://api.github.com/users/lukicsl/following{/other_user}", "gists_url": "https://api.github.com/users/lukicsl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukicsl", "id": 23736716, "login": "lukicsl", "node_id": "MDQ6VXNlcjIzNzM2NzE2", "organizations_url": "https://api.github.com/users/lukicsl/orgs", "received_events_url": "https://api.github.com/users/lukicsl/received_events", "repos_url": "https://api.github.com/users/lukicsl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukicsl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukicsl/subscriptions", "type": "User", "url": "https://api.github.com/users/lukicsl", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-04-14T11:45:47Z
2021-09-01T00:11:28Z
2020-04-14T15:49:12Z
NONE
resolved
I am not able to use request for https site, without SSL things run fine Jython 2.7.2 running in a docker container. ``` root@5ddd8c24f29b:/# python Jython 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58) [OpenJDK Server VM (AdoptOpenJDK)] on java14 Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> import json >>> r =requests.get('http://api.eiswarnung.de/') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/jython/Lib/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/local/jython/Lib/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/jython/Lib/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/local/jython/Lib/site-packages/requests/sessions.py", line 665, in send history = [resp for resp in gen] if allow_redirects else [] File "/usr/local/jython/Lib/site-packages/requests/sessions.py", line 237, in resolve_redirects resp = self.send( File "/usr/local/jython/Lib/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/local/jython/Lib/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='www.eiswarnung.de', port=443): Max retries exceeded with url: /api/public/ (Caused by SSLError(SSLError(1, u'Received fatal alert: internal_error'),)) >>> ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/23736716?v=4", "events_url": "https://api.github.com/users/lukicsl/events{/privacy}", "followers_url": "https://api.github.com/users/lukicsl/followers", "following_url": "https://api.github.com/users/lukicsl/following{/other_user}", "gists_url": "https://api.github.com/users/lukicsl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukicsl", "id": 23736716, "login": "lukicsl", "node_id": "MDQ6VXNlcjIzNzM2NzE2", "organizations_url": "https://api.github.com/users/lukicsl/orgs", "received_events_url": "https://api.github.com/users/lukicsl/received_events", "repos_url": "https://api.github.com/users/lukicsl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukicsl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukicsl/subscriptions", "type": "User", "url": "https://api.github.com/users/lukicsl", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5423/reactions" }
https://api.github.com/repos/psf/requests/issues/5423/timeline
null
completed
null
null
false
[ "This is unsurprising since Jython isn't part of the CI for this project and no one tests it.", "> This is unsurprising since Jython isn't part of the CI for this project and no one tests it.\r\n\r\nDoes this mean that actually nobody will followup with anything as a suggestion/solution?\r\nI am not that experien...
https://api.github.com/repos/psf/requests/issues/5422
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5422/labels{/name}
https://api.github.com/repos/psf/requests/issues/5422/comments
https://api.github.com/repos/psf/requests/issues/5422/events
https://github.com/psf/requests/issues/5422
599,413,579
MDU6SXNzdWU1OTk0MTM1Nzk=
5,422
Usage of SourceAddressAdapter to create multiple source ip
{ "avatar_url": "https://avatars.githubusercontent.com/u/10762524?v=4", "events_url": "https://api.github.com/users/kaushik853/events{/privacy}", "followers_url": "https://api.github.com/users/kaushik853/followers", "following_url": "https://api.github.com/users/kaushik853/following{/other_user}", "gists_url": "https://api.github.com/users/kaushik853/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kaushik853", "id": 10762524, "login": "kaushik853", "node_id": "MDQ6VXNlcjEwNzYyNTI0", "organizations_url": "https://api.github.com/users/kaushik853/orgs", "received_events_url": "https://api.github.com/users/kaushik853/received_events", "repos_url": "https://api.github.com/users/kaushik853/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kaushik853/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kaushik853/subscriptions", "type": "User", "url": "https://api.github.com/users/kaushik853", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-14T09:06:44Z
2021-09-01T00:11:29Z
2020-04-14T13:12:47Z
NONE
resolved
Hi, Can you tell how can i test it with multiple source ip address . Something i tried like ```python from requests_toolbelt.adapters import source session = PACSession(pac) list_source_ip_and_url = [("10.129.xx.yy", "https://google.com"), ("10.189.yy.xx", "https://random.com/Surveyor.Web/")] responses = [] try: for source_ip, url in list_source_ip_and_url: new_source = source.SourceAddressAdapter(source_ip) session.mount('http://', new_source) session.mount('https://', new_source) responses.append(session.get(url)) print(responses) except Exception as e: print(e) ``` I am getting error like: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x033D5547>: Failed to establish a new connection: [WinError 10049] The requested address is not valid in its context')) Looks like im hitting some requests module error. Is it because i can't assign source ip to my interface?
{ "avatar_url": "https://avatars.githubusercontent.com/u/10762524?v=4", "events_url": "https://api.github.com/users/kaushik853/events{/privacy}", "followers_url": "https://api.github.com/users/kaushik853/followers", "following_url": "https://api.github.com/users/kaushik853/following{/other_user}", "gists_url": "https://api.github.com/users/kaushik853/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kaushik853", "id": 10762524, "login": "kaushik853", "node_id": "MDQ6VXNlcjEwNzYyNTI0", "organizations_url": "https://api.github.com/users/kaushik853/orgs", "received_events_url": "https://api.github.com/users/kaushik853/received_events", "repos_url": "https://api.github.com/users/kaushik853/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kaushik853/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kaushik853/subscriptions", "type": "User", "url": "https://api.github.com/users/kaushik853", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5422/reactions" }
https://api.github.com/repos/psf/requests/issues/5422/timeline
null
completed
null
null
false
[ "This isn't appropriate for this project. `requests_toolbelt` is a separate third-party project.", "ok, i will open it there, thanks" ]
https://api.github.com/repos/psf/requests/issues/5421
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5421/labels{/name}
https://api.github.com/repos/psf/requests/issues/5421/comments
https://api.github.com/repos/psf/requests/issues/5421/events
https://github.com/psf/requests/issues/5421
598,734,110
MDU6SXNzdWU1OTg3MzQxMTA=
5,421
How can I use sendfile?
{ "avatar_url": "https://avatars.githubusercontent.com/u/11208082?v=4", "events_url": "https://api.github.com/users/ImSingee/events{/privacy}", "followers_url": "https://api.github.com/users/ImSingee/followers", "following_url": "https://api.github.com/users/ImSingee/following{/other_user}", "gists_url": "https://api.github.com/users/ImSingee/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ImSingee", "id": 11208082, "login": "ImSingee", "node_id": "MDQ6VXNlcjExMjA4MDgy", "organizations_url": "https://api.github.com/users/ImSingee/orgs", "received_events_url": "https://api.github.com/users/ImSingee/received_events", "repos_url": "https://api.github.com/users/ImSingee/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ImSingee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ImSingee/subscriptions", "type": "User", "url": "https://api.github.com/users/ImSingee", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-13T07:49:52Z
2021-09-01T00:11:24Z
2020-04-30T16:03:16Z
NONE
resolved
I tried ``` r = requests.get(SOME_URL, stream=True, verify=False) with open('/path/to/dest', 'wb') as f: socket.fromfd(r.raw.fileno(), socket.AF_INET, socket.SOCK_STREAM).sendfile(f) ``` but it doesn't work.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5421/reactions" }
https://api.github.com/repos/psf/requests/issues/5421/timeline
null
completed
null
null
false
[ "You can't use sendfile.", "Hi @ImSingee,\r\n\r\nThis isn't something Requests supports and I don't think we can provide help on it. You'd need to do some more digging with the socket library." ]
https://api.github.com/repos/psf/requests/issues/5420
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5420/labels{/name}
https://api.github.com/repos/psf/requests/issues/5420/comments
https://api.github.com/repos/psf/requests/issues/5420/events
https://github.com/psf/requests/issues/5420
598,384,959
MDU6SXNzdWU1OTgzODQ5NTk=
5,420
json parameter should transform booleans
{ "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
4
2020-04-12T01:15:38Z
2021-09-01T00:11:29Z
2020-04-13T23:13:55Z
NONE
resolved
Summary. `json=` parameter should correctly transform booleans. ## Expected Result Given this: ``` resp = req.post('https://example.com/endPoint', json={ "foo": false } ) ``` I'd expect this to work, and python to correctly transform `false` to `False`. ## Actual Result Instead, I get `"foo": false, NameError: name 'false' is not defined` This works: ``` resp = req.post('https://example.com/endPoint', json={ "foo": False } ) ``` And this works: ``` payload = json.loads("{ "foo": false }") resp = req.post('https://example.com/endPoint', json=payload ) ``` Therefore this is an request for enhancement that the `requests` library handle this for us, so that it "just works".
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/5420/reactions" }
https://api.github.com/repos/psf/requests/issues/5420/timeline
null
completed
null
null
false
[ "The requests library can not change the actual syntax of Python", "Yes, but you can include some rudimentary transformation inside the `post` method?", "I don't think you understand what is happening here, @Dynatrace-Adam-Gardner .\r\n\r\nTry just doing:\r\n\r\n```py\r\njson={ \"foo\": False }\r\n```\r\n\r\nYo...
https://api.github.com/repos/psf/requests/issues/5419
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5419/labels{/name}
https://api.github.com/repos/psf/requests/issues/5419/comments
https://api.github.com/repos/psf/requests/issues/5419/events
https://github.com/psf/requests/issues/5419
598,354,716
MDU6SXNzdWU1OTgzNTQ3MTY=
5,419
"Authorization" header is rewritten for HTTP Basic Auth, even when it is explicitly set in the headers kwarg
{ "avatar_url": "https://avatars.githubusercontent.com/u/328598?v=4", "events_url": "https://api.github.com/users/terminalmage/events{/privacy}", "followers_url": "https://api.github.com/users/terminalmage/followers", "following_url": "https://api.github.com/users/terminalmage/following{/other_user}", "gists_url": "https://api.github.com/users/terminalmage/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/terminalmage", "id": 328598, "login": "terminalmage", "node_id": "MDQ6VXNlcjMyODU5OA==", "organizations_url": "https://api.github.com/users/terminalmage/orgs", "received_events_url": "https://api.github.com/users/terminalmage/received_events", "repos_url": "https://api.github.com/users/terminalmage/repos", "site_admin": false, "starred_url": "https://api.github.com/users/terminalmage/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/terminalmage/subscriptions", "type": "User", "url": "https://api.github.com/users/terminalmage", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-04-11T21:28:37Z
2021-09-01T00:11:29Z
2020-04-12T15:49:05Z
NONE
resolved
I tried setting the `Authorization` header manually to make a request to the Github API, but authentication failed despite the same token working fine when making the request using cURL, `urllib.request.Request()`, and other methods. ## Expected Result Successful auth and a `200 OK` response. ## Actual Result Authentication fails with a `401 Bad Credentials` response. Upon inspecting the response's `request` attribute, I found that the `Authorization` header had been overwritten (looks like this happens [here](https://github.com/psf/requests/blob/9cdf294/requests/auth.py#L95-L97)). I've since worked around this, but in my opinion, one should expect that if they are setting the `Authorization` header manually (rather than using the `auth` param), the header should not be overwritten. I can draft a PR to address this if the project maintainers agree to such a change. ## Reproduction Steps Create an [access token](https://github.com/settings/tokens) and then try to auth to the API like so: ```python requests.get( 'https://api.github.com/notifications', headers={'Authorization': 'token MY_TOKEN_HERE'} ) ``` ## System Information ```python { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.6.3-arch1-1", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/328598?v=4", "events_url": "https://api.github.com/users/terminalmage/events{/privacy}", "followers_url": "https://api.github.com/users/terminalmage/followers", "following_url": "https://api.github.com/users/terminalmage/following{/other_user}", "gists_url": "https://api.github.com/users/terminalmage/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/terminalmage", "id": 328598, "login": "terminalmage", "node_id": "MDQ6VXNlcjMyODU5OA==", "organizations_url": "https://api.github.com/users/terminalmage/orgs", "received_events_url": "https://api.github.com/users/terminalmage/received_events", "repos_url": "https://api.github.com/users/terminalmage/repos", "site_admin": false, "starred_url": "https://api.github.com/users/terminalmage/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/terminalmage/subscriptions", "type": "User", "url": "https://api.github.com/users/terminalmage", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5419/reactions" }
https://api.github.com/repos/psf/requests/issues/5419/timeline
null
completed
null
null
false
[ "> Upon inspecting the response's `request` attribute, I found that the `Authorization` header had been overwritten (looks like this happens [here](https://github.com/psf/requests/blob/9cdf294/requests/auth.py#L95-L97)).\r\n\r\nI believe your diagnosis is wrong. You likely have a `.netrc` file with basic credential...
https://api.github.com/repos/psf/requests/issues/5418
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5418/labels{/name}
https://api.github.com/repos/psf/requests/issues/5418/comments
https://api.github.com/repos/psf/requests/issues/5418/events
https://github.com/psf/requests/pull/5418
598,024,924
MDExOlB1bGxSZXF1ZXN0NDAyMDE0MTQ2
5,418
Remove extraneous paramater from doctring for put() method
{ "avatar_url": "https://avatars.githubusercontent.com/u/418738?v=4", "events_url": "https://api.github.com/users/gregpoulos/events{/privacy}", "followers_url": "https://api.github.com/users/gregpoulos/followers", "following_url": "https://api.github.com/users/gregpoulos/following{/other_user}", "gists_url": "https://api.github.com/users/gregpoulos/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gregpoulos", "id": 418738, "login": "gregpoulos", "node_id": "MDQ6VXNlcjQxODczOA==", "organizations_url": "https://api.github.com/users/gregpoulos/orgs", "received_events_url": "https://api.github.com/users/gregpoulos/received_events", "repos_url": "https://api.github.com/users/gregpoulos/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gregpoulos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gregpoulos/subscriptions", "type": "User", "url": "https://api.github.com/users/gregpoulos", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-04-10T18:21:51Z
2021-08-29T00:06:57Z
2020-04-10T18:52:20Z
NONE
resolved
There's an unused `json` parameter in the docstring from the put() method.
{ "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/5418/reactions" }
https://api.github.com/repos/psf/requests/issues/5418/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5418.diff", "html_url": "https://github.com/psf/requests/pull/5418", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5418.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5418" }
true
[ "Hi @gregpoulos, thanks for the contribution! This was added in #3666 because there was some confusion on whether verbs other than POST supported the json argument. The documentation change is intended to make it clear despite it not being an explicit arg. I think we'll probably leave this in place for now.", "@n...
https://api.github.com/repos/psf/requests/issues/5417
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5417/labels{/name}
https://api.github.com/repos/psf/requests/issues/5417/comments
https://api.github.com/repos/psf/requests/issues/5417/events
https://github.com/psf/requests/issues/5417
596,550,777
MDU6SXNzdWU1OTY1NTA3Nzc=
5,417
Downloading corrupted files with Python
{ "avatar_url": "https://avatars.githubusercontent.com/u/62334013?v=4", "events_url": "https://api.github.com/users/Pablo-Marina/events{/privacy}", "followers_url": "https://api.github.com/users/Pablo-Marina/followers", "following_url": "https://api.github.com/users/Pablo-Marina/following{/other_user}", "gists_url": "https://api.github.com/users/Pablo-Marina/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Pablo-Marina", "id": 62334013, "login": "Pablo-Marina", "node_id": "MDQ6VXNlcjYyMzM0MDEz", "organizations_url": "https://api.github.com/users/Pablo-Marina/orgs", "received_events_url": "https://api.github.com/users/Pablo-Marina/received_events", "repos_url": "https://api.github.com/users/Pablo-Marina/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Pablo-Marina/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Pablo-Marina/subscriptions", "type": "User", "url": "https://api.github.com/users/Pablo-Marina", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-08T12:46:07Z
2021-09-01T00:11:31Z
2020-04-10T18:37:55Z
NONE
resolved
Hello, I have a XAMPP Server on Windows, from which I aim to download remotely a pdf file located in C:/xampp/htdocs/ using requests library from python to generate it in the very same folder but with another name (later I'll change the direction to downloads folder once it works) The server is running in IP address 192.168.1.134 port 8081. This is the part of the code: ``` url="http://192.168.1.134:8081/c:/xampp/htdocs/informe.pdf" response=requests.get(url) tofile=open('informelocal.pdf','wb') tofile.write(response.content) tofile.close() ``` The thing is, once I try to open the local file, I can't open it, because it's corrupted. I think something is matter with that URL, but I don't know how to put it right. Thanks for your time
{ "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": 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/5417/reactions" }
https://api.github.com/repos/psf/requests/issues/5417/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/5416
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5416/labels{/name}
https://api.github.com/repos/psf/requests/issues/5416/comments
https://api.github.com/repos/psf/requests/issues/5416/events
https://github.com/psf/requests/issues/5416
596,240,232
MDU6SXNzdWU1OTYyNDAyMzI=
5,416
Add a Pull request template
{ "avatar_url": "https://avatars.githubusercontent.com/u/45192178?v=4", "events_url": "https://api.github.com/users/to09/events{/privacy}", "followers_url": "https://api.github.com/users/to09/followers", "following_url": "https://api.github.com/users/to09/following{/other_user}", "gists_url": "https://api.github.com/users/to09/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/to09", "id": 45192178, "login": "to09", "node_id": "MDQ6VXNlcjQ1MTkyMTc4", "organizations_url": "https://api.github.com/users/to09/orgs", "received_events_url": "https://api.github.com/users/to09/received_events", "repos_url": "https://api.github.com/users/to09/repos", "site_admin": false, "starred_url": "https://api.github.com/users/to09/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/to09/subscriptions", "type": "User", "url": "https://api.github.com/users/to09", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-08T01:06:05Z
2021-09-01T00:11:24Z
2020-04-30T16:12:18Z
NONE
resolved
To make easier for the contributors and guide them in the right way to contribute with the deploy preview check.
{ "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": 1, "-1": 0, "confused": 2, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/5416/reactions" }
https://api.github.com/repos/psf/requests/issues/5416/timeline
null
completed
null
null
false
[ "Hi @to09,\r\n\r\nThanks for the interest! You can find the full contribution guide [here](https://requests.readthedocs.io/en/master/dev/contributing/) which would be the best place to get that information.\r\n\r\nThat said, Requests is both on a semi-permanent feature freeze and under limited support. We're only a...
https://api.github.com/repos/psf/requests/issues/5415
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5415/labels{/name}
https://api.github.com/repos/psf/requests/issues/5415/comments
https://api.github.com/repos/psf/requests/issues/5415/events
https://github.com/psf/requests/issues/5415
595,860,962
MDU6SXNzdWU1OTU4NjA5NjI=
5,415
Specifying number of retries in requests.get
{ "avatar_url": "https://avatars.githubusercontent.com/u/845175?v=4", "events_url": "https://api.github.com/users/ndvbd/events{/privacy}", "followers_url": "https://api.github.com/users/ndvbd/followers", "following_url": "https://api.github.com/users/ndvbd/following{/other_user}", "gists_url": "https://api.github.com/users/ndvbd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ndvbd", "id": 845175, "login": "ndvbd", "node_id": "MDQ6VXNlcjg0NTE3NQ==", "organizations_url": "https://api.github.com/users/ndvbd/orgs", "received_events_url": "https://api.github.com/users/ndvbd/received_events", "repos_url": "https://api.github.com/users/ndvbd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ndvbd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ndvbd/subscriptions", "type": "User", "url": "https://api.github.com/users/ndvbd", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-04-07T13:17:56Z
2021-09-01T00:11:30Z
2020-04-10T18:43:01Z
NONE
resolved
Is it possible to specify number of retries in requests.get?
{ "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/5415/reactions" }
https://api.github.com/repos/psf/requests/issues/5415/timeline
null
completed
null
null
false
[ "No", "Is this a feature that would be considered for a feature addition? I'd be happy to write if so.", "No. The project's been under a feature freeze for years - most especially when it comes to the API", "Sigmavirus24 is right, we're currently under a feature freeze for Requests. There are a handful of gui...
https://api.github.com/repos/psf/requests/issues/5414
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5414/labels{/name}
https://api.github.com/repos/psf/requests/issues/5414/comments
https://api.github.com/repos/psf/requests/issues/5414/events
https://github.com/psf/requests/pull/5414
594,552,691
MDExOlB1bGxSZXF1ZXN0Mzk5MTY1Njc0
5,414
Raise InvalidUrl if host starts with '.' character.
{ "avatar_url": "https://avatars.githubusercontent.com/u/23049315?v=4", "events_url": "https://api.github.com/users/mondeja/events{/privacy}", "followers_url": "https://api.github.com/users/mondeja/followers", "following_url": "https://api.github.com/users/mondeja/following{/other_user}", "gists_url": "https://api.github.com/users/mondeja/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mondeja", "id": 23049315, "login": "mondeja", "node_id": "MDQ6VXNlcjIzMDQ5MzE1", "organizations_url": "https://api.github.com/users/mondeja/orgs", "received_events_url": "https://api.github.com/users/mondeja/received_events", "repos_url": "https://api.github.com/users/mondeja/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mondeja/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mondeja/subscriptions", "type": "User", "url": "https://api.github.com/users/mondeja", "user_view_type": "public" }
[]
closed
true
null
[]
{ "closed_at": "2021-12-30T21:48:07Z", "closed_issues": 11, "created_at": "2021-09-02T07:23:33Z", "creator": { "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" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/29", "id": 7115399, "labels_url": "https://api.github.com/repos/psf/requests/milestones/29/labels", "node_id": "MI_kwDOABTKOs4AbJKH", "number": 29, "open_issues": 0, "state": "closed", "title": "2.27.0", "updated_at": "2021-12-30T21:48:07Z", "url": "https://api.github.com/repos/psf/requests/milestones/29" }
0
2020-04-05T16:52:04Z
2022-03-29T08:05:38Z
2021-12-29T01:39:37Z
CONTRIBUTOR
resolved
Closes #5367 Attempting to get `http://.example.com` results in a `UnicodeError` but should be raise `InvalidUrl` as attempting to get `http://*example.com`. I've added `InvalidUrl` tests for `http://.example.com` and `http://*example.com`.
{ "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/5414/reactions" }
https://api.github.com/repos/psf/requests/issues/5414/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5414.diff", "html_url": "https://github.com/psf/requests/pull/5414", "merged_at": "2021-12-29T01:39:36Z", "patch_url": "https://github.com/psf/requests/pull/5414.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5414" }
true
[]
https://api.github.com/repos/psf/requests/issues/5413
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5413/labels{/name}
https://api.github.com/repos/psf/requests/issues/5413/comments
https://api.github.com/repos/psf/requests/issues/5413/events
https://github.com/psf/requests/pull/5413
594,539,672
MDExOlB1bGxSZXF1ZXN0Mzk5MTU0NDAy
5,413
Add text_with_headers to Response model
{ "avatar_url": "https://avatars.githubusercontent.com/u/45501389?v=4", "events_url": "https://api.github.com/users/JonPizza/events{/privacy}", "followers_url": "https://api.github.com/users/JonPizza/followers", "following_url": "https://api.github.com/users/JonPizza/following{/other_user}", "gists_url": "https://api.github.com/users/JonPizza/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JonPizza", "id": 45501389, "login": "JonPizza", "node_id": "MDQ6VXNlcjQ1NTAxMzg5", "organizations_url": "https://api.github.com/users/JonPizza/orgs", "received_events_url": "https://api.github.com/users/JonPizza/received_events", "repos_url": "https://api.github.com/users/JonPizza/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JonPizza/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JonPizza/subscriptions", "type": "User", "url": "https://api.github.com/users/JonPizza", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-04-05T16:22:25Z
2021-08-29T00:06:54Z
2020-05-09T05:11:01Z
NONE
resolved
This property will return the entire HTTP response including the headers. There doesn't seem to be a `test_models.py` file in the tests folder so I'm not sure if I should make a test for this, but if so where would I make it?
{ "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/5413/reactions" }
https://api.github.com/repos/psf/requests/issues/5413/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5413.diff", "html_url": "https://github.com/psf/requests/pull/5413", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5413.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5413" }
true
[ "Hi @JonPizza,\r\n\r\nRequests is currently under a feature freeze. This will probably be useful to a subset of users but is pretty straight forward to implement if needed. I think we'll pass on this for now. Thanks!" ]
https://api.github.com/repos/psf/requests/issues/5412
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5412/labels{/name}
https://api.github.com/repos/psf/requests/issues/5412/comments
https://api.github.com/repos/psf/requests/issues/5412/events
https://github.com/psf/requests/issues/5412
593,519,559
MDU6SXNzdWU1OTM1MTk1NTk=
5,412
Expecting property name enclosed in double quotes
{ "avatar_url": "https://avatars.githubusercontent.com/u/1139228?v=4", "events_url": "https://api.github.com/users/jeffreyscottgraham/events{/privacy}", "followers_url": "https://api.github.com/users/jeffreyscottgraham/followers", "following_url": "https://api.github.com/users/jeffreyscottgraham/following{/other_user}", "gists_url": "https://api.github.com/users/jeffreyscottgraham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jeffreyscottgraham", "id": 1139228, "login": "jeffreyscottgraham", "node_id": "MDQ6VXNlcjExMzkyMjg=", "organizations_url": "https://api.github.com/users/jeffreyscottgraham/orgs", "received_events_url": "https://api.github.com/users/jeffreyscottgraham/received_events", "repos_url": "https://api.github.com/users/jeffreyscottgraham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jeffreyscottgraham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jeffreyscottgraham/subscriptions", "type": "User", "url": "https://api.github.com/users/jeffreyscottgraham", "user_view_type": "public" }
[ { "color": "777777", "default": false, "description": null, "id": 162780722, "name": "Question/Not a bug", "node_id": "MDU6TGFiZWwxNjI3ODA3MjI=", "url": "https://api.github.com/repos/psf/requests/labels/Question/Not%20a%20bug" }, { "color": "f7c6c7", "default": false, "de...
closed
true
null
[]
null
9
2020-04-03T17:03:09Z
2021-12-25T23:00:34Z
2020-04-10T18:43:44Z
NONE
resolved
Summary. Cant parse json result because property names are in single quotes instead of double ## Expected Result A proper parse of course. ## Actual Result Caught exception Expecting property name enclosed in double quotes: line 1 column 2 (char 1) ## Reproduction Steps res=requests.get(...) s=str(res.json()) j=json.loads(s) ## System Information python3 -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "5.0.0-38-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010100f", "version": "19.0.0" }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1010102f" }, "urllib3": { "version": "1.24.1" }, "using_pyopenssl": true } This is running on up-to-date Ubuntu 19.04 and python 3.7.3
{ "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": 1, "-1": 1, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5412/reactions" }
https://api.github.com/repos/psf/requests/issues/5412/timeline
null
completed
null
null
false
[ "Hi @jeffreyscottgraham,\r\n\r\nThis looks like a bit of confusion about data types. You're attempting to cast a Python dictionary into a string which will use single quotes by convention.\r\n\r\nPython dictionaries aren't directly equivalent with JSON. If you need a string representation of the data, you can eithe...
https://api.github.com/repos/psf/requests/issues/5411
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5411/labels{/name}
https://api.github.com/repos/psf/requests/issues/5411/comments
https://api.github.com/repos/psf/requests/issues/5411/events
https://github.com/psf/requests/issues/5411
592,523,068
MDU6SXNzdWU1OTI1MjMwNjg=
5,411
Incorrect cookie handling: third level domain incorrectly uses second level domain cookies
{ "avatar_url": "https://avatars.githubusercontent.com/u/5113916?v=4", "events_url": "https://api.github.com/users/dvorapa/events{/privacy}", "followers_url": "https://api.github.com/users/dvorapa/followers", "following_url": "https://api.github.com/users/dvorapa/following{/other_user}", "gists_url": "https://api.github.com/users/dvorapa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dvorapa", "id": 5113916, "login": "dvorapa", "node_id": "MDQ6VXNlcjUxMTM5MTY=", "organizations_url": "https://api.github.com/users/dvorapa/orgs", "received_events_url": "https://api.github.com/users/dvorapa/received_events", "repos_url": "https://api.github.com/users/dvorapa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dvorapa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dvorapa/subscriptions", "type": "User", "url": "https://api.github.com/users/dvorapa", "user_view_type": "public" }
[]
open
false
null
[]
null
1
2020-04-02T10:27:12Z
2020-05-14T08:44:28Z
null
NONE
null
When visiting (logging in to) zh.wikisource.org, cookies for the following domain are set: - .wikisource.org If one visits wikisource.org afterwards, cookies for the following domain are set: - wikisource.org After i.e. logout from zh.wikisource.org, zh.wikisource.org sends cookie invalidation request for .wikisource.org. Requests invalidates them correctly, leaves wikisource.org cookies untouched correctly. But for further communication with zh.wikisource.org, requests incorrectly use remaining wikisource.org cookie. Which is rejected by zh.wikisource.org and followed by cookie invalidation request for .wikisource.org. ## Expected Result It looks like the cookie handling library used by requests is doing something wrong (at least according to the RFCs), as it should not send the host-only cookie for wikisource.org to zh.wikisource.org. If it's using RFC 2109, "zh.wikisource.org" does not domain-match the cookie for "wikisource.org" because "wikisource.org" doesn't begin with a dot. If it's using RFC 6265, the domainless cookie for "wikisource.org" should have had the host-only-flag set meaning it should not be sent to "zh.wikisource.org". OTOH, it's possible it's being bug-compatible with browsers (RFC 6265 even notes that such a bug exists/existed in some agents in § 4.1.2.3). ## Actual Result As written above, requests use wikisource.org cookie for zh.wikisource.org. Which is rejected by zh.wikisource.org and followed by cookie invalidation request for .wikisource.org". That is fulfilled (no cookies for .wikisource.org are set), but requests still tries to push cookies for wikisource.org to zh.wikisource.org. So the actual result is endless loop (https://travis-ci.org/github/wikimedia/pywikibot/jobs/669558038#L13763). ## Reproduction Steps Simple: ```python import pywikibot s=pywikibot.Site('zh', 'wikisource') print(s.hostname()) # zh.wikisource.org s.login() s2=pywikibot.Site('mul', 'wikisource') print(s2.hostname()) # wikisource.org s2.login() s.logout() s.login() # endless loop here ``` Elaborate: ```python import requests s=requests.Session() def login(url): while True: # login token r1=s.post(url=url, data={'action':'query','meta':'tokens','type':'login','format':'json'}) logintoken = r1.json()['query']['tokens']['logintoken'] # login (test account) r2=s.post(url=url, data={'action':'clientlogin','loginreturnurl':'https://example.com','logintoken':logintoken,'username':'Test20200402','password':'popokatepetl','format':'json'}) print(r2.json()) if r2.json().get('error') and r2.json()['error'].get('code') == 'badtoken': continue else: break #print(s.cookies) def logout(url): # logout token r1=s.post(url=url, data={'action':'query','meta':'tokens','type':'csrf','format':'json'}) logouttoken = r1.json()['query']['tokens']['csrftoken'] # logout r2=s.post(url=url, data={'action':'logout','token':logouttoken,'format':'json'}) print(r2.json()) #print(s.cookies) url1 = 'https://zh.wikisource.org/w/api.php' url2='https://wikisource.org/w/api.php' login(url1) login(url2) logout(url1) login(url1) # endless loop here ``` ## System Information $ python -m requests.help Reproduced on many PCs with many configurations and also on Travis-CI. Here is one: ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.9" }, "platform": { "release": "5.4.18", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` Links: Reported and described in more detail in: https://phabricator.wikimedia.org/T224712 Reproducible immediately in: https://repl.it/repls/HarmfulBiodegradableExperiments Pastebin (just in case): https://pastebin.com/7d7Dn9p1
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/5411/reactions" }
https://api.github.com/repos/psf/requests/issues/5411/timeline
null
null
null
null
false
[ "Is this a Python issue?" ]
https://api.github.com/repos/psf/requests/issues/5410
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5410/labels{/name}
https://api.github.com/repos/psf/requests/issues/5410/comments
https://api.github.com/repos/psf/requests/issues/5410/events
https://github.com/psf/requests/pull/5410
592,464,391
MDExOlB1bGxSZXF1ZXN0Mzk3NDQxNjQy
5,410
Remove shebang from nonexecutable script
{ "avatar_url": "https://avatars.githubusercontent.com/u/13086088?v=4", "events_url": "https://api.github.com/users/hrnciar/events{/privacy}", "followers_url": "https://api.github.com/users/hrnciar/followers", "following_url": "https://api.github.com/users/hrnciar/following{/other_user}", "gists_url": "https://api.github.com/users/hrnciar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hrnciar", "id": 13086088, "login": "hrnciar", "node_id": "MDQ6VXNlcjEzMDg2MDg4", "organizations_url": "https://api.github.com/users/hrnciar/orgs", "received_events_url": "https://api.github.com/users/hrnciar/received_events", "repos_url": "https://api.github.com/users/hrnciar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hrnciar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hrnciar/subscriptions", "type": "User", "url": "https://api.github.com/users/hrnciar", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-04-02T08:50:39Z
2022-02-26T15:00:31Z
2021-11-28T14:32:29Z
NONE
resolved
When packaging requests and pip (which bundles it) in Fedora, we have realised that there is a nonexecutable file with a shebang line. It seems that the primary purpose of this file is to be imported from Python code and hence the shebang appears to be unnecessary. Shebangs are hard to handle when doing downstream packaging, because it makes sense for upstream to use `#!/usr/bin/env python` while in the RPM package, we need to avoid that and use a more specific interpreter. Since the shebang was unused, I propose to remove it to avoid the problems.
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/5410/reactions" }
https://api.github.com/repos/psf/requests/issues/5410/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5410.diff", "html_url": "https://github.com/psf/requests/pull/5410", "merged_at": "2021-11-28T14:32:29Z", "patch_url": "https://github.com/psf/requests/pull/5410.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5410" }
true
[]
https://api.github.com/repos/psf/requests/issues/5409
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5409/labels{/name}
https://api.github.com/repos/psf/requests/issues/5409/comments
https://api.github.com/repos/psf/requests/issues/5409/events
https://github.com/psf/requests/issues/5409
591,214,341
MDU6SXNzdWU1OTEyMTQzNDE=
5,409
missing implementation of "json" argument in "put" method
{ "avatar_url": "https://avatars.githubusercontent.com/u/7370334?v=4", "events_url": "https://api.github.com/users/liyakun/events{/privacy}", "followers_url": "https://api.github.com/users/liyakun/followers", "following_url": "https://api.github.com/users/liyakun/following{/other_user}", "gists_url": "https://api.github.com/users/liyakun/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/liyakun", "id": 7370334, "login": "liyakun", "node_id": "MDQ6VXNlcjczNzAzMzQ=", "organizations_url": "https://api.github.com/users/liyakun/orgs", "received_events_url": "https://api.github.com/users/liyakun/received_events", "repos_url": "https://api.github.com/users/liyakun/repos", "site_admin": false, "starred_url": "https://api.github.com/users/liyakun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/liyakun/subscriptions", "type": "User", "url": "https://api.github.com/users/liyakun", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-03-31T15:43:20Z
2021-09-01T00:11:34Z
2020-03-31T17:16:44Z
NONE
resolved
It seems that the implementation of "json" argument was forgot, see [1]. [1] https://github.com/psf/requests/blob/bebf5250b0df1b922ff534e987a4481cc4dde99d/requests/api.py#L128
{ "avatar_url": "https://avatars.githubusercontent.com/u/7370334?v=4", "events_url": "https://api.github.com/users/liyakun/events{/privacy}", "followers_url": "https://api.github.com/users/liyakun/followers", "following_url": "https://api.github.com/users/liyakun/following{/other_user}", "gists_url": "https://api.github.com/users/liyakun/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/liyakun", "id": 7370334, "login": "liyakun", "node_id": "MDQ6VXNlcjczNzAzMzQ=", "organizations_url": "https://api.github.com/users/liyakun/orgs", "received_events_url": "https://api.github.com/users/liyakun/received_events", "repos_url": "https://api.github.com/users/liyakun/repos", "site_admin": false, "starred_url": "https://api.github.com/users/liyakun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/liyakun/subscriptions", "type": "User", "url": "https://api.github.com/users/liyakun", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5409/reactions" }
https://api.github.com/repos/psf/requests/issues/5409/timeline
null
completed
null
null
false
[ "Nope. It's accepted via `**kwargs*`.", "@sigmavirus24 thanks, you are right.\r\n\r\nIt would be great to keep it in similar format as `post` method as they both accept this argument. Is there any specific reason why they are written in different ways?", "Maintenance overhead is much higher if you have to keep ...
https://api.github.com/repos/psf/requests/issues/5408
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5408/labels{/name}
https://api.github.com/repos/psf/requests/issues/5408/comments
https://api.github.com/repos/psf/requests/issues/5408/events
https://github.com/psf/requests/issues/5408
590,886,333
MDU6SXNzdWU1OTA4ODYzMzM=
5,408
Commercial Usage Rights
{ "avatar_url": "https://avatars.githubusercontent.com/u/10250923?v=4", "events_url": "https://api.github.com/users/hi2rashid/events{/privacy}", "followers_url": "https://api.github.com/users/hi2rashid/followers", "following_url": "https://api.github.com/users/hi2rashid/following{/other_user}", "gists_url": "https://api.github.com/users/hi2rashid/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hi2rashid", "id": 10250923, "login": "hi2rashid", "node_id": "MDQ6VXNlcjEwMjUwOTIz", "organizations_url": "https://api.github.com/users/hi2rashid/orgs", "received_events_url": "https://api.github.com/users/hi2rashid/received_events", "repos_url": "https://api.github.com/users/hi2rashid/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hi2rashid/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hi2rashid/subscriptions", "type": "User", "url": "https://api.github.com/users/hi2rashid", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-31T08:02:43Z
2021-09-01T00:11:33Z
2020-04-03T17:41:11Z
NONE
resolved
We are using this module in our application with Django. Can you please confirm if its okay to be used commercially. Thank you in advance
{ "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/5408/reactions" }
https://api.github.com/repos/psf/requests/issues/5408/timeline
null
completed
null
null
false
[ "Hi @hi2rashid, this project is released under the Apache-2.0 license as noted [here](https://github.com/psf/requests/blob/master/LICENSE). You can use it freely within the constraints of that licensing agreement.\r\n\r\nHere's a quick explanation of expectations: https://tldrlegal.com/license/apache-license-2.0-(a...
https://api.github.com/repos/psf/requests/issues/5407
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5407/labels{/name}
https://api.github.com/repos/psf/requests/issues/5407/comments
https://api.github.com/repos/psf/requests/issues/5407/events
https://github.com/psf/requests/pull/5407
590,548,206
MDExOlB1bGxSZXF1ZXN0Mzk1ODYyMTIw
5,407
Bump bleach from 3.1.1 to 3.1.4
{ "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}", "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers", "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/apps/dependabot", "id": 49699333, "login": "dependabot[bot]", "node_id": "MDM6Qm90NDk2OTkzMzM=", "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs", "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events", "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions", "type": "Bot", "url": "https://api.github.com/users/dependabot%5Bbot%5D", "user_view_type": "public" }
[ { "color": "0366d6", "default": false, "description": "Pull requests that update a dependency file", "id": 1868210094, "name": "dependencies", "node_id": "MDU6TGFiZWwxODY4MjEwMDk0", "url": "https://api.github.com/repos/psf/requests/labels/dependencies" } ]
closed
true
null
[]
null
1
2020-03-30T19:49:56Z
2021-08-29T00:06:58Z
2020-04-03T21:45:07Z
CONTRIBUTOR
resolved
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.1 to 3.1.4. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mozilla/bleach/blob/master/CHANGES">bleach's changelog</a>.</em></p> <blockquote> <h2>Version 3.1.4 (March 24th, 2020)</h2> <p><strong>Security fixes</strong></p> <ul> <li> <p><code>bleach.clean</code> behavior parsing style attributes could result in a regular expression denial of service (ReDoS).</p> <p>Calls to <code>bleach.clean</code> with an allowed tag with an allowed <code>style</code> attribute were vulnerable to ReDoS. For example, <code>bleach.clean(..., attributes={'a': ['style']})</code>.</p> <p>This issue was confirmed in Bleach versions v3.1.3, v3.1.2, v3.1.1, v3.1.0, v3.0.0, v2.1.4, and v2.1.3. Earlier versions used a similar regular expression and should be considered vulnerable too.</p> <p>Anyone using Bleach &lt;=v3.1.3 is encouraged to upgrade.</p> <p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1623633">https://bugzilla.mozilla.org/show_bug.cgi?id=1623633</a></p> </li> </ul> <p><strong>Backwards incompatible changes</strong></p> <ul> <li>Style attributes with dashes, or single or double quoted values are cleaned instead of passed through.</li> </ul> <p><strong>Features</strong></p> <p>None</p> <p><strong>Bug fixes</strong></p> <p>None</p> <h2>Version 3.1.3 (March 17th, 2020)</h2> <p><strong>Security fixes</strong></p> <p>None</p> <p><strong>Backwards incompatible changes</strong></p> <p>None</p> <p><strong>Features</strong></p> <ul> <li> <p>Add relative link to code of conduct. (<a href="https://github-redirect.dependabot.com/mozilla/bleach/issues/442">#442</a>)</p> </li> <li> <p>Drop deprecated 'setup.py test' support. (<a href="https://github-redirect.dependabot.com/mozilla/bleach/issues/507">#507</a>)</p> </li> </ul> </tr></table> ... (truncated) </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mozilla/bleach/commit/6e74a5027b57055cdaeb040343d32934121392a7"><code>6e74a50</code></a> Update for v3.1.4 release</li> <li><a href="https://github.com/mozilla/bleach/commit/d6018f2539d271963c3e7f54f36ef11900363c69"><code>d6018f2</code></a> fix bug 1623633</li> <li><a href="https://github.com/mozilla/bleach/commit/fc77027e67cc04aff6f4d4885358705f98ad20f4"><code>fc77027</code></a> Merge branch 'v3.1.0-branch'</li> <li><a href="https://github.com/mozilla/bleach/commit/e4b1c50e098c33f82c862a34bb2a40f9c4458f46"><code>e4b1c50</code></a> Update for v3.1.3 release</li> <li><a href="https://github.com/mozilla/bleach/commit/59cc502cee44bd18adc78619e6baed7a108c3ba1"><code>59cc502</code></a> Update for v3.1.2 release</li> <li><a href="https://github.com/mozilla/bleach/commit/3f39d489ab7a1b38df8c245e9bd66217c1698369"><code>3f39d48</code></a> add wheel to requirements-dev</li> <li><a href="https://github.com/mozilla/bleach/commit/175f67740e7951e1d80cefb7831e6c3e4efeb986"><code>175f677</code></a> fix bug 1621692</li> <li><a href="https://github.com/mozilla/bleach/commit/78a06726dd6c72a42c90c1f7a8fa5d21ebcfa587"><code>78a0672</code></a> Update for v3.1.2 release</li> <li><a href="https://github.com/mozilla/bleach/commit/7b625ff9f6888a08037700269fb23e3ef863b8a7"><code>7b625ff</code></a> add wheel to requirements-dev</li> <li><a href="https://github.com/mozilla/bleach/commit/e4e9e21e7aebff40c88fafa4319bba4636a602d9"><code>e4e9e21</code></a> fix bug 1621692</li> <li>Additional commits viewable in <a href="https://github.com/mozilla/bleach/compare/v3.1.1...v3.1.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bleach&package-manager=pip&previous-version=3.1.1&new-version=3.1.4)](https://help.github.com/articles/configuring-automated-security-fixes) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/psf/requests/network/alerts). </details>
{ "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}", "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers", "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/apps/dependabot", "id": 49699333, "login": "dependabot[bot]", "node_id": "MDM6Qm90NDk2OTkzMzM=", "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs", "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events", "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions", "type": "Bot", "url": "https://api.github.com/users/dependabot%5Bbot%5D", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5407/reactions" }
https://api.github.com/repos/psf/requests/issues/5407/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5407.diff", "html_url": "https://github.com/psf/requests/pull/5407", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5407.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5407" }
true
[ "Looks like bleach is up-to-date now, so this is no longer needed." ]
https://api.github.com/repos/psf/requests/issues/5406
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5406/labels{/name}
https://api.github.com/repos/psf/requests/issues/5406/comments
https://api.github.com/repos/psf/requests/issues/5406/events
https://github.com/psf/requests/pull/5406
589,833,775
MDExOlB1bGxSZXF1ZXN0Mzk1MjgyNDAx
5,406
Port of PR #4173 from v3 to v2 to fix issue #4391
{ "avatar_url": "https://avatars.githubusercontent.com/u/1581907?v=4", "events_url": "https://api.github.com/users/atzannes/events{/privacy}", "followers_url": "https://api.github.com/users/atzannes/followers", "following_url": "https://api.github.com/users/atzannes/following{/other_user}", "gists_url": "https://api.github.com/users/atzannes/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/atzannes", "id": 1581907, "login": "atzannes", "node_id": "MDQ6VXNlcjE1ODE5MDc=", "organizations_url": "https://api.github.com/users/atzannes/orgs", "received_events_url": "https://api.github.com/users/atzannes/received_events", "repos_url": "https://api.github.com/users/atzannes/repos", "site_admin": false, "starred_url": "https://api.github.com/users/atzannes/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/atzannes/subscriptions", "type": "User", "url": "https://api.github.com/users/atzannes", "user_view_type": "public" }
[]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 29, "created_at": "2024-05-19T18:29:04Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/34", "id": 11073254, "labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels", "node_id": "MI_kwDOABTKOs4AqPbm", "number": 34, "open_issues": 0, "state": "open", "title": "Bankruptcy", "updated_at": "2024-05-20T14:37:16Z", "url": "https://api.github.com/repos/psf/requests/milestones/34" }
9
2020-03-29T16:49:46Z
2024-05-20T14:36:48Z
2024-05-20T14:36:48Z
NONE
null
Fixes #4391 # Problem This code was failing to verify the SSL: ```python def test_session_verify_not_stateful(self): insecure_url = "https://expired.badssl.com/" s = requests.Session() assert s.verify is True with pytest.raises(Exception): s.get(insecure_url, verify=True) s.get(insecure_url, verify=False) assert s.verify is True with pytest.raises(Exception): s.get(insecure_url, verify=True) # <- This line was not raising bc we got a cached unverfied connection ``` The problem was that we were modifying the connection object returned to us by the poolmanager, which is illegal, causing us to get unverified connections when requesting verified ones. # Approach I had come up with the same solution as PR #4173 independently, not having found the issue before trying to fix it, but my unit-tests were not as thurough, so I added those from PR #4173 The issue was closed in 2018 because it was fixed in v3 (which is still not released), and presumably because it was not fixable in v2, but perhaps this fix works for v2 (new urllib3 perhaps that allows it?)
{ "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/5406/reactions" }
https://api.github.com/repos/psf/requests/issues/5406/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5406.diff", "html_url": "https://github.com/psf/requests/pull/5406", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5406.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5406" }
true
[ "The issue was that fixing it involved breaking an API in v2. I suppose a feature flag could be added, something like ``really_actually_do_verify`` which defaults to False but is documented as something you _probably_ want, and the old behavior and API are available with that flag set to False. That'd make it easi...
https://api.github.com/repos/psf/requests/issues/5405
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5405/labels{/name}
https://api.github.com/repos/psf/requests/issues/5405/comments
https://api.github.com/repos/psf/requests/issues/5405/events
https://github.com/psf/requests/issues/5405
589,818,769
MDU6SXNzdWU1ODk4MTg3Njk=
5,405
JSON with Umlaut (äüö) not ok on Python 2.7
{ "avatar_url": "https://avatars.githubusercontent.com/u/23736716?v=4", "events_url": "https://api.github.com/users/lukicsl/events{/privacy}", "followers_url": "https://api.github.com/users/lukicsl/followers", "following_url": "https://api.github.com/users/lukicsl/following{/other_user}", "gists_url": "https://api.github.com/users/lukicsl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukicsl", "id": 23736716, "login": "lukicsl", "node_id": "MDQ6VXNlcjIzNzM2NzE2", "organizations_url": "https://api.github.com/users/lukicsl/orgs", "received_events_url": "https://api.github.com/users/lukicsl/received_events", "repos_url": "https://api.github.com/users/lukicsl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukicsl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukicsl/subscriptions", "type": "User", "url": "https://api.github.com/users/lukicsl", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-03-29T15:35:57Z
2021-09-01T00:11:35Z
2020-03-30T10:27:51Z
NONE
resolved
I am having the following code: ``` r =requests.get('http://{}/api/{}/groups/37'.format(HUE_BRIDGE, API_CODE)) log.info('r.content: {} '.format(r.content)) log.info('r.headers["content-type"]: {} '.format(r.headers['content-type'])) log.info('r.json(): {} '.format(r.json())) ``` the log output: ``` 2020-03-29 17:10:57.224 [INFO ] [jsr223.jython.huegroups.log ] - r.headers["content-type"]: application/json; charset=utf-8 2020-03-29 17:10:57.234 [INFO ] [jsr223.jython.huegroups.log ] - r.json(): {u'devicemembership': [], u'type': u'LightGroup', u'name': u'T\xe4st Gruppe', u'scenes': [{u'transitiontime': 10, u'name': u'Morning', u'id': u'1', u'lightcount': 3}, {u'transitiontime': 10, u'name': u'Evening', u'id': u'2', u'lightcount': 3}, {u'transitiontime': 10, u'name': u'Middle OFF', u'id': u'3', u'lightcount': 3}], u'action': {u'xy': [0, 0], u'sat': 127, u'scene': u'3', u'ct': 370, u'effect': u'none', u'bri': 74, u'hue': 0, u'colormode': u'ct', u'on': False}, u'etag': u'b5e003450e01af7f862214ded33c74b6', u'id': u'37', u'state': {u'all_on': False, u'any_on': False}, u'lights': [u'17', u'2', u'6']} ``` One of the values is **T\xe4st Gruppe** instead of **T\xe4st Gruppe** is delivered Running the same request from the Chrome REST Client: ``` {"action":{"bri":74,"colormode":"ct","ct":370,"effect":"none","hue":0,"on":false,"sat":127,"scene":"3","xy":[0,0]},"devicemembership":[],"etag":"b5e003450e01af7f862214ded33c74b6","id":"37","lights":["17","2","6"],"name":"Täst Gruppe","scenes":[{"id":"1","lightcount":3,"name":"Morning","transitiontime":10},{"id":"2","lightcount":3,"name":"Evening","transitiontime":10},{"id":"3","lightcount":3,"name":"Middle OFF","transitiontime":10}],"state":{"all_on":false,"any_on":false},"type":"LightGroup"} ``` response headers: ``` access-control-allow-origin: * content-type: application/json; charset=utf-8 content-length: 498 ``` I am running on Jython 2.7.1, this is my installation log: ``` (lukics@vevedock-02:~/git.com/docker-swarm-and-compose/openhab $ sudo pip install --upgrade --target=/datavol/openhab-2.5.1/openhab_conf/automation/lib/python requests Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting requests Using cached https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl Collecting idna<3,>=2.5 (from requests) Using cached https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests) Using cached https://files.pythonhosted.org/packages/e8/74/6e4f91745020f967d09332bb2b8b9b10090957334692eb88ea4afe91b77f/urllib3-1.25.8-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests) Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl Collecting chardet<4,>=3.0.2 (from requests) Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl Installing collected packages: idna, urllib3, certifi, chardet, requests Successfully installed certifi-2019.11.28 chardet-3.0.4 idna-2.9 requests-2.23.0 urllib3-1.25.8 ) ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/23736716?v=4", "events_url": "https://api.github.com/users/lukicsl/events{/privacy}", "followers_url": "https://api.github.com/users/lukicsl/followers", "following_url": "https://api.github.com/users/lukicsl/following{/other_user}", "gists_url": "https://api.github.com/users/lukicsl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lukicsl", "id": 23736716, "login": "lukicsl", "node_id": "MDQ6VXNlcjIzNzM2NzE2", "organizations_url": "https://api.github.com/users/lukicsl/orgs", "received_events_url": "https://api.github.com/users/lukicsl/received_events", "repos_url": "https://api.github.com/users/lukicsl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lukicsl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukicsl/subscriptions", "type": "User", "url": "https://api.github.com/users/lukicsl", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5405/reactions" }
https://api.github.com/repos/psf/requests/issues/5405/timeline
null
completed
null
null
false
[ "Made some tests on online python server [python3](https://repl.it/languages/python3) and [python2.7](https://repl.it/languages/python) with sample json [http://my-json-server.typicode.com/lukicsl/requests-issue/posts/1](http://my-json-server.typicode.com/lukicsl/requests-issue/posts/1)\r\n\r\n![image](https://user...
https://api.github.com/repos/psf/requests/issues/5404
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5404/labels{/name}
https://api.github.com/repos/psf/requests/issues/5404/comments
https://api.github.com/repos/psf/requests/issues/5404/events
https://github.com/psf/requests/pull/5404
589,757,807
MDExOlB1bGxSZXF1ZXN0Mzk1MjI2NTE5
5,404
typo
{ "avatar_url": "https://avatars.githubusercontent.com/u/18441050?v=4", "events_url": "https://api.github.com/users/ndanil/events{/privacy}", "followers_url": "https://api.github.com/users/ndanil/followers", "following_url": "https://api.github.com/users/ndanil/following{/other_user}", "gists_url": "https://api.github.com/users/ndanil/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ndanil", "id": 18441050, "login": "ndanil", "node_id": "MDQ6VXNlcjE4NDQxMDUw", "organizations_url": "https://api.github.com/users/ndanil/orgs", "received_events_url": "https://api.github.com/users/ndanil/received_events", "repos_url": "https://api.github.com/users/ndanil/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ndanil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ndanil/subscriptions", "type": "User", "url": "https://api.github.com/users/ndanil", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-29T10:01:08Z
2021-08-29T00:06:59Z
2020-03-30T04:25:45Z
NONE
resolved
typo in options?
{ "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/5404/reactions" }
https://api.github.com/repos/psf/requests/issues/5404/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5404.diff", "html_url": "https://github.com/psf/requests/pull/5404", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5404.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5404" }
true
[ "@dtrodrigues is right, this is the correct endpoint in the current docs. Thanks for checking!" ]
https://api.github.com/repos/psf/requests/issues/5403
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5403/labels{/name}
https://api.github.com/repos/psf/requests/issues/5403/comments
https://api.github.com/repos/psf/requests/issues/5403/events
https://github.com/psf/requests/pull/5403
589,679,824
MDExOlB1bGxSZXF1ZXN0Mzk1MTY5ODE0
5,403
fix README typo
{ "avatar_url": "https://avatars.githubusercontent.com/u/614233?v=4", "events_url": "https://api.github.com/users/dtrodrigues/events{/privacy}", "followers_url": "https://api.github.com/users/dtrodrigues/followers", "following_url": "https://api.github.com/users/dtrodrigues/following{/other_user}", "gists_url": "https://api.github.com/users/dtrodrigues/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dtrodrigues", "id": 614233, "login": "dtrodrigues", "node_id": "MDQ6VXNlcjYxNDIzMw==", "organizations_url": "https://api.github.com/users/dtrodrigues/orgs", "received_events_url": "https://api.github.com/users/dtrodrigues/received_events", "repos_url": "https://api.github.com/users/dtrodrigues/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dtrodrigues/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dtrodrigues/subscriptions", "type": "User", "url": "https://api.github.com/users/dtrodrigues", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-28T23:26:27Z
2021-08-29T00:06:58Z
2020-04-03T20:59:18Z
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/5403/reactions" }
https://api.github.com/repos/psf/requests/issues/5403/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5403.diff", "html_url": "https://github.com/psf/requests/pull/5403", "merged_at": "2020-04-03T20:59:18Z", "patch_url": "https://github.com/psf/requests/pull/5403.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5403" }
true
[ "Good suggestions - I force-pushed the requested changes." ]
https://api.github.com/repos/psf/requests/issues/5402
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5402/labels{/name}
https://api.github.com/repos/psf/requests/issues/5402/comments
https://api.github.com/repos/psf/requests/issues/5402/events
https://github.com/psf/requests/issues/5402
589,551,566
MDU6SXNzdWU1ODk1NTE1NjY=
5,402
Send Request to HAProxyProtocol Enabled Endpoint
{ "avatar_url": "https://avatars.githubusercontent.com/u/6111679?v=4", "events_url": "https://api.github.com/users/yks0000/events{/privacy}", "followers_url": "https://api.github.com/users/yks0000/followers", "following_url": "https://api.github.com/users/yks0000/following{/other_user}", "gists_url": "https://api.github.com/users/yks0000/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yks0000", "id": 6111679, "login": "yks0000", "node_id": "MDQ6VXNlcjYxMTE2Nzk=", "organizations_url": "https://api.github.com/users/yks0000/orgs", "received_events_url": "https://api.github.com/users/yks0000/received_events", "repos_url": "https://api.github.com/users/yks0000/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yks0000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yks0000/subscriptions", "type": "User", "url": "https://api.github.com/users/yks0000", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-28T10:38:12Z
2021-08-28T00:06:07Z
2020-11-26T06:08:24Z
NONE
resolved
Trying to send request to below endpoint which implements haproxy protocol (v1 and v2) using requests module. I am not seeing any specific options to pass to `requests.request()` or `requests.get` ``` curl "https://localhost/health/local?skipCacheCheck=true" -ik --haproxy-protocol** ``` **Without Flag:** ``` [root@ip-10-89-83-80 ~]# curl "https://localhost/health/local?skipCacheCheck=true" -ik ;echo curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443 ``` **With Flag:** ``` [root@ip-10-89-83-80 ~]# curl "https://localhost/health/local?skipCacheCheck=true" -ik --haproxy-protocol;echo HTTP/2 200 server: envoy date: Fri, 27 Mar 2020 14:43:18 GMT content-type: text/plain x-envoy-upstream-service-time: 2 Health Check Ok ``` Please suggest?
{ "avatar_url": "https://avatars.githubusercontent.com/u/6111679?v=4", "events_url": "https://api.github.com/users/yks0000/events{/privacy}", "followers_url": "https://api.github.com/users/yks0000/followers", "following_url": "https://api.github.com/users/yks0000/following{/other_user}", "gists_url": "https://api.github.com/users/yks0000/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yks0000", "id": 6111679, "login": "yks0000", "node_id": "MDQ6VXNlcjYxMTE2Nzk=", "organizations_url": "https://api.github.com/users/yks0000/orgs", "received_events_url": "https://api.github.com/users/yks0000/received_events", "repos_url": "https://api.github.com/users/yks0000/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yks0000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yks0000/subscriptions", "type": "User", "url": "https://api.github.com/users/yks0000", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5402/reactions" }
https://api.github.com/repos/psf/requests/issues/5402/timeline
null
completed
null
null
false
[ "I used `pycurl` for this.\r\n\r\n```python\r\nimport pycurl\r\n\r\n\r\nurl = \"https://localhost/health/local\"\r\n\r\n\r\n# LibCurl Options as per https://github.com/curl/curl/blob/master/include/curl/curl.h\r\nCURLOPT_HAPROXYPROTOCOL = 274\r\nCURLOPT_SSL_VERIFYPEER = 64\r\nCURLOPT_SSL_VERIFYHOST = 81\r\nENABLE =...
https://api.github.com/repos/psf/requests/issues/5401
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5401/labels{/name}
https://api.github.com/repos/psf/requests/issues/5401/comments
https://api.github.com/repos/psf/requests/issues/5401/events
https://github.com/psf/requests/issues/5401
589,347,245
MDU6SXNzdWU1ODkzNDcyNDU=
5,401
Missing Occasional *space char/url %20* in HTML?
{ "avatar_url": "https://avatars.githubusercontent.com/u/39680353?v=4", "events_url": "https://api.github.com/users/treatmesubj/events{/privacy}", "followers_url": "https://api.github.com/users/treatmesubj/followers", "following_url": "https://api.github.com/users/treatmesubj/following{/other_user}", "gists_url": "https://api.github.com/users/treatmesubj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/treatmesubj", "id": 39680353, "login": "treatmesubj", "node_id": "MDQ6VXNlcjM5NjgwMzUz", "organizations_url": "https://api.github.com/users/treatmesubj/orgs", "received_events_url": "https://api.github.com/users/treatmesubj/received_events", "repos_url": "https://api.github.com/users/treatmesubj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/treatmesubj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/treatmesubj/subscriptions", "type": "User", "url": "https://api.github.com/users/treatmesubj", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-27T19:02:25Z
2021-09-01T00:11:36Z
2020-03-28T16:02:39Z
NONE
resolved
Requesting HTML to grab some links out of <script> at the end of the HTML, but I noticed that some strings being pulled from the requests_html.HTML object were missing space characters compared to strings in my Firefox developer source file. ## Expected Result Expected to find strings as they are in my Firefox Developer Debugger. They have occasional spaces that I can't systematically understand, so I just went to get them from the script as they are. Like this one with a weird space before the parentheses: ```'11 - Im Gonna Be Ft Jhene Aiko (Prod by keY Wane).mp3'``` !Actually, it's not even showing the extra space here when I submit my post, but I can see it in the raw text? ## Actual Result When parsing the requests_html.HTML object for the same string, I found that the weird space wasn't there. Like this: ```'11 - Im Gonna Be Ft Jhene Aiko (Prod by keY Wane).mp3'``` ## Reproduction Steps ``` import requests from requests_html import HTML player_link = f"https://embeds.datpiff.com/mixtape/390127" player_html = HTML(html=requests.get(player_link).text) js = player_html.find("body>script")[-1].text print(js) """ requests html: '11 - Im Gonna Be Ft Jhene Aiko (Prod by keY Wane).mp3' js in Firefox: '11 - Im Gonna Be Ft Jhene Aiko (Prod by keY Wane).mp3' """ ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/39680353?v=4", "events_url": "https://api.github.com/users/treatmesubj/events{/privacy}", "followers_url": "https://api.github.com/users/treatmesubj/followers", "following_url": "https://api.github.com/users/treatmesubj/following{/other_user}", "gists_url": "https://api.github.com/users/treatmesubj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/treatmesubj", "id": 39680353, "login": "treatmesubj", "node_id": "MDQ6VXNlcjM5NjgwMzUz", "organizations_url": "https://api.github.com/users/treatmesubj/orgs", "received_events_url": "https://api.github.com/users/treatmesubj/received_events", "repos_url": "https://api.github.com/users/treatmesubj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/treatmesubj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/treatmesubj/subscriptions", "type": "User", "url": "https://api.github.com/users/treatmesubj", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5401/reactions" }
https://api.github.com/repos/psf/requests/issues/5401/timeline
null
completed
null
null
false
[ "> \r\n> \r\n> Requesting HTML to grab some links out of <script> at the end of the HTML, but I noticed that some strings being pulled from the requests_html.HTML object were missing space characters compared to strings in my Firefox developer source file.\r\n> ## Expected Result\r\n> \r\n> Expected to find strings...
https://api.github.com/repos/psf/requests/issues/5400
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5400/labels{/name}
https://api.github.com/repos/psf/requests/issues/5400/comments
https://api.github.com/repos/psf/requests/issues/5400/events
https://github.com/psf/requests/issues/5400
588,704,171
MDU6SXNzdWU1ODg3MDQxNzE=
5,400
SSLError: HTTPSConnectionPool(host='free-proxy-list.net', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')])")))
{ "avatar_url": "https://avatars.githubusercontent.com/u/55036280?v=4", "events_url": "https://api.github.com/users/victorb37/events{/privacy}", "followers_url": "https://api.github.com/users/victorb37/followers", "following_url": "https://api.github.com/users/victorb37/following{/other_user}", "gists_url": "https://api.github.com/users/victorb37/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/victorb37", "id": 55036280, "login": "victorb37", "node_id": "MDQ6VXNlcjU1MDM2Mjgw", "organizations_url": "https://api.github.com/users/victorb37/orgs", "received_events_url": "https://api.github.com/users/victorb37/received_events", "repos_url": "https://api.github.com/users/victorb37/repos", "site_admin": false, "starred_url": "https://api.github.com/users/victorb37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/victorb37/subscriptions", "type": "User", "url": "https://api.github.com/users/victorb37", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-26T20:24:13Z
2021-09-01T00:11:33Z
2020-04-03T17:46:05Z
NONE
resolved
**I am getting this error in return when running Twitterscraper on Python. This is the the code that was used:** # -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ from twitterscraper import query_tweets import datetime as dt import pandas as pd begin_date = dt.date(2020, 2, 17) end_date = dt.date(2020, 3, 20) limit = 2000 lang = 'english' tweets = query_tweets('coronavirus deaths', begindate = begin_date, enddate = end_date, limit = limit, lang = lang) df = pd.DataFrame(t.__dict__ for t in tweets) filt = df['text'].str.contains('coronavirus deaths') df = df.loc[filt] export_excel = df.to_excel (r'C:\Users\victo\Desktop\coronavirus.xlsx', index = None, header=True) **How can I fix this issue?**
{ "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/5400/reactions" }
https://api.github.com/repos/psf/requests/issues/5400/timeline
null
completed
null
null
false
[ "Hi @victorb37,\r\n\r\nThis is due to either the web server you're hitting being unable to negotiate a proper TLS connection or potentially an issue with the version of OpenSSL you have installed on your machine.\r\n\r\nNeither of these are issues directly with Requests though which is what we have this issue track...
https://api.github.com/repos/psf/requests/issues/5399
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5399/labels{/name}
https://api.github.com/repos/psf/requests/issues/5399/comments
https://api.github.com/repos/psf/requests/issues/5399/events
https://github.com/psf/requests/issues/5399
588,700,250
MDU6SXNzdWU1ODg3MDAyNTA=
5,399
SSLError: HTTPSConnectionPool(host='free-proxy-list.net', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')])")))
{ "avatar_url": "https://avatars.githubusercontent.com/u/55036280?v=4", "events_url": "https://api.github.com/users/victorb37/events{/privacy}", "followers_url": "https://api.github.com/users/victorb37/followers", "following_url": "https://api.github.com/users/victorb37/following{/other_user}", "gists_url": "https://api.github.com/users/victorb37/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/victorb37", "id": 55036280, "login": "victorb37", "node_id": "MDQ6VXNlcjU1MDM2Mjgw", "organizations_url": "https://api.github.com/users/victorb37/orgs", "received_events_url": "https://api.github.com/users/victorb37/received_events", "repos_url": "https://api.github.com/users/victorb37/repos", "site_admin": false, "starred_url": "https://api.github.com/users/victorb37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/victorb37/subscriptions", "type": "User", "url": "https://api.github.com/users/victorb37", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-03-26T20:17:11Z
2021-09-01T00:11:36Z
2020-03-26T20:20:27Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/55036280?v=4", "events_url": "https://api.github.com/users/victorb37/events{/privacy}", "followers_url": "https://api.github.com/users/victorb37/followers", "following_url": "https://api.github.com/users/victorb37/following{/other_user}", "gists_url": "https://api.github.com/users/victorb37/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/victorb37", "id": 55036280, "login": "victorb37", "node_id": "MDQ6VXNlcjU1MDM2Mjgw", "organizations_url": "https://api.github.com/users/victorb37/orgs", "received_events_url": "https://api.github.com/users/victorb37/received_events", "repos_url": "https://api.github.com/users/victorb37/repos", "site_admin": false, "starred_url": "https://api.github.com/users/victorb37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/victorb37/subscriptions", "type": "User", "url": "https://api.github.com/users/victorb37", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5399/reactions" }
https://api.github.com/repos/psf/requests/issues/5399/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5398
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5398/labels{/name}
https://api.github.com/repos/psf/requests/issues/5398/comments
https://api.github.com/repos/psf/requests/issues/5398/events
https://github.com/psf/requests/issues/5398
588,590,092
MDU6SXNzdWU1ODg1OTAwOTI=
5,398
Request returns broken encoding (how to use with BeautifulSoup)?
{ "avatar_url": "https://avatars.githubusercontent.com/u/52889259?v=4", "events_url": "https://api.github.com/users/h56cho/events{/privacy}", "followers_url": "https://api.github.com/users/h56cho/followers", "following_url": "https://api.github.com/users/h56cho/following{/other_user}", "gists_url": "https://api.github.com/users/h56cho/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/h56cho", "id": 52889259, "login": "h56cho", "node_id": "MDQ6VXNlcjUyODg5MjU5", "organizations_url": "https://api.github.com/users/h56cho/orgs", "received_events_url": "https://api.github.com/users/h56cho/received_events", "repos_url": "https://api.github.com/users/h56cho/repos", "site_admin": false, "starred_url": "https://api.github.com/users/h56cho/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/h56cho/subscriptions", "type": "User", "url": "https://api.github.com/users/h56cho", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-03-26T17:21:08Z
2021-09-01T00:11:32Z
2020-04-03T18:01:21Z
NONE
resolved
Hello, I am trying to web scrap a site that contains lots of ELA questions (permission obtained). I have been trying to implement the code below: ```python login_url = 'https://www.helpteaching.com/registration/login.htm?' data = { 'name': '<myUserName>', 'password': '<myPassword>', 'remember_me': 1 } with requests.Session() as s: response = requests.post(login_url , data) s.encoding='utf_8' index_page= s.get('https://www.helpteaching.com/questions/Reading_Strategies') soup = BeautifulSoup(index_page.text, 'html.parser') ``` Note that the encoding used by the site is utf-8, and I even manually adjusted the encoding to 'utf-8'. However, when execute the code above, the texts are all broken. Is there any way that I can use Requests with BeautifulSoup? I am using Python 3.7.0. Thank you,
{ "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/5398/reactions" }
https://api.github.com/repos/psf/requests/issues/5398/timeline
null
completed
null
null
false
[ "Hi @h56cho,\r\n\r\n`Session` objects don't have an `encoding` parameter. With the web today, it will rarely work to apply a single encoding to all response. You can try to set the encoding on the `Response` object, but that shouldn't be needed in this case.\r\n\r\nYou should validate the output from Requests befor...