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/5900
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5900/labels{/name}
https://api.github.com/repos/psf/requests/issues/5900/comments
https://api.github.com/repos/psf/requests/issues/5900/events
https://github.com/psf/requests/issues/5900
963,211,190
MDU6SXNzdWU5NjMyMTExOTA=
5,900
Basic authentication with a proxy not using Proxy-Authorization header
{ "avatar_url": "https://avatars.githubusercontent.com/u/12960990?v=4", "events_url": "https://api.github.com/users/janemba/events{/privacy}", "followers_url": "https://api.github.com/users/janemba/followers", "following_url": "https://api.github.com/users/janemba/following{/other_user}", "gists_url": "https://api.github.com/users/janemba/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janemba", "id": 12960990, "login": "janemba", "node_id": "MDQ6VXNlcjEyOTYwOTkw", "organizations_url": "https://api.github.com/users/janemba/orgs", "received_events_url": "https://api.github.com/users/janemba/received_events", "repos_url": "https://api.github.com/users/janemba/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janemba/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janemba/subscriptions", "type": "User", "url": "https://api.github.com/users/janemba", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2021-08-07T11:21:25Z
2021-08-19T00:45:30Z
2021-08-17T16:45:32Z
NONE
off-topic
Hello, I am trying to perform an HTTPS request with a proxy with proxy authentication. I tried to do it using two different ways but I had the same issue for both which result on the following error: ``` [...] File "/usr/lib64/python3.9/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected:` Remote end closed connection without response [...] File "/home/janemba/.local/lib/python3.9/site-packages/urllib3/util/retry.py", line 446, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='wtfismyip.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))) ``` Monitoring the request using `Wireshark` I've noticed the `Proxy-Authorization` header hasn't been set. I performed the request that way: ``` class HTTPProxyAuth(requests.auth.HTTPBasicAuth): def __call__(self, r): auth_s = base64.b64encode('{}:{}'.format(self.username, self.password).encode('utf-8')) r.headers['Proxy-Authorization'] = ('Basic %s' % auth_s) return r s = requests.Session() s.proxies = {"https": "https://{}:{}".format(ip, port)} s.auth = HTTPProxyAuth(login, password) r = s.get("https://wtfismyip.com") print(r.headers) print(r.text) ``` And: ``` r = requests.get('https://wtfismyip.com', proxies={'https':'https://1.2.3.4:443'}, auth=requests.auth.HTTPProxyAuth('login','password')) print(r.headers) print(r.text) ``` For both requests I got the exact same issue, the `Proxy-Authorization` header is not set.
{ "avatar_url": "https://avatars.githubusercontent.com/u/12960990?v=4", "events_url": "https://api.github.com/users/janemba/events{/privacy}", "followers_url": "https://api.github.com/users/janemba/followers", "following_url": "https://api.github.com/users/janemba/following{/other_user}", "gists_url": "https://api.github.com/users/janemba/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janemba", "id": 12960990, "login": "janemba", "node_id": "MDQ6VXNlcjEyOTYwOTkw", "organizations_url": "https://api.github.com/users/janemba/orgs", "received_events_url": "https://api.github.com/users/janemba/received_events", "repos_url": "https://api.github.com/users/janemba/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janemba/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janemba/subscriptions", "type": "User", "url": "https://api.github.com/users/janemba", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5900/reactions" }
https://api.github.com/repos/psf/requests/issues/5900/timeline
null
completed
null
null
false
[ "```python\r\ns.proxies = {\r\n 'https': f'https://{username}:{password}@{ip}:{port}'\r\n} \r\nr = s.get(\"https://wtfismyip.com\")\r\n```", "Hmm...the password itself is 790 characters.\r\n\r\nIs there a way to add the `Proxy-Authorization` header for the HTTP `CONNECT` request ?", "https://datatracker.iet...
https://api.github.com/repos/psf/requests/issues/5899
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5899/labels{/name}
https://api.github.com/repos/psf/requests/issues/5899/comments
https://api.github.com/repos/psf/requests/issues/5899/events
https://github.com/psf/requests/pull/5899
959,918,806
MDExOlB1bGxSZXF1ZXN0NzAyOTkyNzE0
5,899
Fix broken link to adapters essay
{ "avatar_url": "https://avatars.githubusercontent.com/u/142512?v=4", "events_url": "https://api.github.com/users/itsadok/events{/privacy}", "followers_url": "https://api.github.com/users/itsadok/followers", "following_url": "https://api.github.com/users/itsadok/following{/other_user}", "gists_url": "https://api.github.com/users/itsadok/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/itsadok", "id": 142512, "login": "itsadok", "node_id": "MDQ6VXNlcjE0MjUxMg==", "organizations_url": "https://api.github.com/users/itsadok/orgs", "received_events_url": "https://api.github.com/users/itsadok/received_events", "repos_url": "https://api.github.com/users/itsadok/repos", "site_admin": false, "starred_url": "https://api.github.com/users/itsadok/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/itsadok/subscriptions", "type": "User", "url": "https://api.github.com/users/itsadok", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-08-04T05:39:12Z
2021-11-02T06:00:24Z
2021-08-04T05:58:51Z
CONTRIBUTOR
resolved
null
{ "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/5899/reactions" }
https://api.github.com/repos/psf/requests/issues/5899/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5899.diff", "html_url": "https://github.com/psf/requests/pull/5899", "merged_at": "2021-08-04T05:58:51Z", "patch_url": "https://github.com/psf/requests/pull/5899.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5899" }
true
[]
https://api.github.com/repos/psf/requests/issues/5898
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5898/labels{/name}
https://api.github.com/repos/psf/requests/issues/5898/comments
https://api.github.com/repos/psf/requests/issues/5898/events
https://github.com/psf/requests/issues/5898
958,028,322
MDU6SXNzdWU5NTgwMjgzMjI=
5,898
connection with retry=0 is retried
{ "avatar_url": "https://avatars.githubusercontent.com/u/2773622?v=4", "events_url": "https://api.github.com/users/lucas03/events{/privacy}", "followers_url": "https://api.github.com/users/lucas03/followers", "following_url": "https://api.github.com/users/lucas03/following{/other_user}", "gists_url": "https://api.github.com/users/lucas03/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lucas03", "id": 2773622, "login": "lucas03", "node_id": "MDQ6VXNlcjI3NzM2MjI=", "organizations_url": "https://api.github.com/users/lucas03/orgs", "received_events_url": "https://api.github.com/users/lucas03/received_events", "repos_url": "https://api.github.com/users/lucas03/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lucas03/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lucas03/subscriptions", "type": "User", "url": "https://api.github.com/users/lucas03", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2021-08-02T11:06:07Z
2021-11-01T13:10:33Z
2021-08-02T21:32:49Z
NONE
resolved
We have a celery task, where we just ping emailing service to send an email. We use requests for that with following params: ``` CONNECTION_TIMEOUT = 3 READ_TIMEOUT = 26 DEFAULT_TIMEOUT = (CONNECTION_TIMEOUT, READ_TIMEOUT) ... DEFAULT_MAX_REQUEST_RETRIES = 0 ``` we then initialize session with `timeout=DEFAULT_TIMEOUT` and when firing GET request, we pass `max_retries=0`. On celery side, we set `soft_time_limit=(emailing.CONNECTION_TIMEOUT + emailing.READ_TIMEOUT + 2) * (1 + DEFAULT_MAX_REQUEST_RETRIES)`, which amounts to 31 seconds (29 for possible timeouts and 2 seconds for extra room/processing). But yesterday we saw `SoftTimeLimitExceeded` being raised from this task. Looking into logs, I can see the request was retried: ``` Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPConnectionPool(host='our_host.example.com', port=30303): Read timed out. (read timeout=26)",)': /data/{path} ``` I found log warning in the code of urllib3: ``` if not conn: # Try again log.warning( "Retrying (%r) after connection broken by '%r': %s", retries, err, url ) return self.urlopen( ``` So after a timeout of 26 seconds, we should finish the celery task, but urllib3 is retrying after a broken connection and we hit the limit in async worker. ## Expected Result I expect requests retry only number of times specified in `max_retries` ## Actual Result Broken connections are retried ## Reproduction Steps ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.4.7" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.9" }, "platform": { "release": "20.3.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "101010bf", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010af" }, "urllib3": { "version": "1.26.4" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5898/reactions" }
https://api.github.com/repos/psf/requests/issues/5898/timeline
null
completed
null
null
false
[ "> we then initialize session with `timeout=DEFAULT_TIMEOUT` and when firing GET request, we pass `max_retries=0`.\r\n\r\nBased on what you describe here either you're not using Requests and are using something that wraps requests - in which case, I'm certain this is their bug - or you're attempting something this ...
https://api.github.com/repos/psf/requests/issues/5897
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5897/labels{/name}
https://api.github.com/repos/psf/requests/issues/5897/comments
https://api.github.com/repos/psf/requests/issues/5897/events
https://github.com/psf/requests/issues/5897
957,915,248
MDU6SXNzdWU5NTc5MTUyNDg=
5,897
get invalid url in InvalidSchema
{ "avatar_url": "https://avatars.githubusercontent.com/u/44614849?v=4", "events_url": "https://api.github.com/users/aliraad79/events{/privacy}", "followers_url": "https://api.github.com/users/aliraad79/followers", "following_url": "https://api.github.com/users/aliraad79/following{/other_user}", "gists_url": "https://api.github.com/users/aliraad79/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/aliraad79", "id": 44614849, "login": "aliraad79", "node_id": "MDQ6VXNlcjQ0NjE0ODQ5", "organizations_url": "https://api.github.com/users/aliraad79/orgs", "received_events_url": "https://api.github.com/users/aliraad79/received_events", "repos_url": "https://api.github.com/users/aliraad79/repos", "site_admin": false, "starred_url": "https://api.github.com/users/aliraad79/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aliraad79/subscriptions", "type": "User", "url": "https://api.github.com/users/aliraad79", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-08-02T08:51:36Z
2021-10-31T22:00:29Z
2021-08-02T21:33:46Z
NONE
resolved
Requests is not accepting feature requests at this time. Hi, I do a get request on a url that redirects to a intent:// or market:// url which are the meaningful url in android. After raising requests.exceptions.InvalidSchema i want to get this invalid url and do something else with it but there isn't a perfect way to do it so i do something like ``` e.args[0].split("'")[1] ``` that is a very bad and weird way to do it. python=3.9 and requests = "2.23.0"
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5897/reactions" }
https://api.github.com/repos/psf/requests/issues/5897/timeline
null
completed
null
null
false
[ "> Requests is not accepting feature requests at this time.\r\n\r\nAlso this isn't cogent so it's not as if we could assist you with suggesting what to do instead. For questions, please use StackOverflow." ]
https://api.github.com/repos/psf/requests/issues/5896
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5896/labels{/name}
https://api.github.com/repos/psf/requests/issues/5896/comments
https://api.github.com/repos/psf/requests/issues/5896/events
https://github.com/psf/requests/issues/5896
957,559,759
MDU6SXNzdWU5NTc1NTk3NTk=
5,896
ProxySchemeUnknown on Python 3.9
{ "avatar_url": "https://avatars.githubusercontent.com/u/3654783?v=4", "events_url": "https://api.github.com/users/iwalucas/events{/privacy}", "followers_url": "https://api.github.com/users/iwalucas/followers", "following_url": "https://api.github.com/users/iwalucas/following{/other_user}", "gists_url": "https://api.github.com/users/iwalucas/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/iwalucas", "id": 3654783, "login": "iwalucas", "node_id": "MDQ6VXNlcjM2NTQ3ODM=", "organizations_url": "https://api.github.com/users/iwalucas/orgs", "received_events_url": "https://api.github.com/users/iwalucas/received_events", "repos_url": "https://api.github.com/users/iwalucas/repos", "site_admin": false, "starred_url": "https://api.github.com/users/iwalucas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/iwalucas/subscriptions", "type": "User", "url": "https://api.github.com/users/iwalucas", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-08-01T18:49:05Z
2021-11-25T20:00:36Z
2021-08-27T19:12:23Z
NONE
resolved
During an upgrade from python 3.7 to 3.9 I face an error similar to the one reported on #5297. The proxies are defined on the system level (export http_proxy and export https_proxy). It works fine on 3.7. ## Expected Result Requests respect the proxy ## Actual Result Proxy causes the request fo fail ## Reproduction Steps ```python import requests headers={} payload={} url='https://www.someurl.com' response = requests.request("POST", url, headers=headers, data = payload) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.9.6" }, "platform": { "release": "20.6.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.25.11" }, "using_pyopenssl": false } ``` Traceback ``` response = requests.request("POST", url, headers=headers, data = payload) File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 412, in send conn = self.get_connection(request.url, proxies) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 309, in get_connection proxy_manager = self.proxy_manager_for(proxy) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 193, in proxy_manager_for manager = self.proxy_manager[proxy] = proxy_from_url( File "/usr/local/lib/python3.9/site-packages/urllib3/poolmanager.py", line 492, in proxy_from_url return ProxyManager(proxy_url=url, **kw) File "/usr/local/lib/python3.9/site-packages/urllib3/poolmanager.py", line 429, in __init__ raise ProxySchemeUnknown(proxy.scheme) ```
{ "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/5896/reactions" }
https://api.github.com/repos/psf/requests/issues/5896/timeline
null
completed
null
null
false
[ "Hi @iwalucas, can you please provide the proxies you’re using, or at least an identical format with sensitive info substituted? There isn’t enough information to determine if this is the same issue as #5297 or #5855.\r\n\r\nIn either case, this is almost certainly a duplicate.", "@nateprewitt I think its a dupli...
https://api.github.com/repos/psf/requests/issues/5895
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5895/labels{/name}
https://api.github.com/repos/psf/requests/issues/5895/comments
https://api.github.com/repos/psf/requests/issues/5895/events
https://github.com/psf/requests/pull/5895
956,368,128
MDExOlB1bGxSZXF1ZXN0Njk5OTc1ODMy
5,895
Clean up HTTP status code definitions
{ "avatar_url": "https://avatars.githubusercontent.com/u/12053937?v=4", "events_url": "https://api.github.com/users/jenstroeger/events{/privacy}", "followers_url": "https://api.github.com/users/jenstroeger/followers", "following_url": "https://api.github.com/users/jenstroeger/following{/other_user}", "gists_url": "https://api.github.com/users/jenstroeger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jenstroeger", "id": 12053937, "login": "jenstroeger", "node_id": "MDQ6VXNlcjEyMDUzOTM3", "organizations_url": "https://api.github.com/users/jenstroeger/orgs", "received_events_url": "https://api.github.com/users/jenstroeger/received_events", "repos_url": "https://api.github.com/users/jenstroeger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jenstroeger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jenstroeger/subscriptions", "type": "User", "url": "https://api.github.com/users/jenstroeger", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-30T03:29:40Z
2021-11-26T05:00:34Z
2021-08-28T04:37:00Z
NONE
resolved
Follow-up to the conversation in issue https://github.com/psf/requests/issues/5892. As is, this change is not a breaking change and produces the exact same `_codes` dictionary. However, I’ve separated out the official HTTP status codes from third-party status codes and added references to relevant documentation. It would probably make sense to at least complete the list of [nginx codes](https://www.nginx.com/resources/wiki/extending/api/http/); [IIS codes](https://docs.microsoft.com/en-us/troubleshoot/iis/http-status-code) have non-integer sub-codes which may be problematic to represent 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/5895/reactions" }
https://api.github.com/repos/psf/requests/issues/5895/timeline
null
null
true
{ "diff_url": "https://github.com/psf/requests/pull/5895.diff", "html_url": "https://github.com/psf/requests/pull/5895", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5895.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5895" }
true
[ "I think the feedback here is the same as in the issue. We don't have an interest in expanding on what we already feel was a poor decision. It encourages users to continue (or start) building on a non-core feature, which will create more user pain if it is removed/consolidated in the future." ]
https://api.github.com/repos/psf/requests/issues/5894
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5894/labels{/name}
https://api.github.com/repos/psf/requests/issues/5894/comments
https://api.github.com/repos/psf/requests/issues/5894/events
https://github.com/psf/requests/pull/5894
955,407,969
MDExOlB1bGxSZXF1ZXN0Njk5MTYzNDc2
5,894
Prevent unnecessary should_bypass_proxies checks in rebuild_proxies
{ "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
[]
{ "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" }
10
2021-07-29T02:56:36Z
2022-03-29T17:07:48Z
2021-12-29T17:06:05Z
CONTRIBUTOR
resolved
Signed-off-by: David Black <dblack@atlassian.com>
{ "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/5894/reactions" }
https://api.github.com/repos/psf/requests/issues/5894/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5894.diff", "html_url": "https://github.com/psf/requests/pull/5894", "merged_at": "2021-12-29T17:06:05Z", "patch_url": "https://github.com/psf/requests/pull/5894.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5894" }
true
[ "I noticed https://github.com/psf/requests/pull/5893 prior to pushing the exact same fix for the performance regression noticed that I had made locally. This PR extracts the re-building proxies performance regression fix from https://github.com/psf/requests/pull/5893 to have it be in its own pr/change . cc \r\n@om...
https://api.github.com/repos/psf/requests/issues/5893
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5893/labels{/name}
https://api.github.com/repos/psf/requests/issues/5893/comments
https://api.github.com/repos/psf/requests/issues/5893/events
https://github.com/psf/requests/pull/5893
955,334,463
MDExOlB1bGxSZXF1ZXN0Njk5MDk5NTc2
5,893
fix: improve proxy handling
{ "avatar_url": "https://avatars.githubusercontent.com/u/36623475?v=4", "events_url": "https://api.github.com/users/omermizr/events{/privacy}", "followers_url": "https://api.github.com/users/omermizr/followers", "following_url": "https://api.github.com/users/omermizr/following{/other_user}", "gists_url": "https://api.github.com/users/omermizr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/omermizr", "id": 36623475, "login": "omermizr", "node_id": "MDQ6VXNlcjM2NjIzNDc1", "organizations_url": "https://api.github.com/users/omermizr/orgs", "received_events_url": "https://api.github.com/users/omermizr/received_events", "repos_url": "https://api.github.com/users/omermizr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/omermizr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/omermizr/subscriptions", "type": "User", "url": "https://api.github.com/users/omermizr", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2021-07-29T00:36:58Z
2022-02-26T21:00:46Z
2021-11-24T20:57:08Z
NONE
resolved
* do not rebuild proxies if they are configured * do not remove Proxy-Authorization on initial request * internal refactoring This is my attempt to resolve https://github.com/psf/requests/issues/5891 as well as https://github.com/psf/requests/issues/5888.
{ "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/5893/reactions" }
https://api.github.com/repos/psf/requests/issues/5893/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5893.diff", "html_url": "https://github.com/psf/requests/pull/5893", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5893.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5893" }
true
[ "Note: there is even more worthwhile performance tuning to be done here, most notably - `getproxies_environment` is called multiple times in this flow. Caching it might also be a good idea, but I don't know this repo too well, so please let me know if that's something we want or not.\r\nIn any case, I didn't want t...
https://api.github.com/repos/psf/requests/issues/5892
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5892/labels{/name}
https://api.github.com/repos/psf/requests/issues/5892/comments
https://api.github.com/repos/psf/requests/issues/5892/events
https://github.com/psf/requests/issues/5892
955,205,801
MDU6SXNzdWU5NTUyMDU4MDE=
5,892
Non-standard HTTP status codes?
{ "avatar_url": "https://avatars.githubusercontent.com/u/12053937?v=4", "events_url": "https://api.github.com/users/jenstroeger/events{/privacy}", "followers_url": "https://api.github.com/users/jenstroeger/followers", "following_url": "https://api.github.com/users/jenstroeger/following{/other_user}", "gists_url": "https://api.github.com/users/jenstroeger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jenstroeger", "id": 12053937, "login": "jenstroeger", "node_id": "MDQ6VXNlcjEyMDUzOTM3", "organizations_url": "https://api.github.com/users/jenstroeger/orgs", "received_events_url": "https://api.github.com/users/jenstroeger/received_events", "repos_url": "https://api.github.com/users/jenstroeger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jenstroeger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jenstroeger/subscriptions", "type": "User", "url": "https://api.github.com/users/jenstroeger", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2021-07-28T20:22:33Z
2021-11-26T05:00:31Z
2021-08-28T04:40:08Z
NONE
resolved
According to [Wikipedia](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) and [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status), the following status codes are not defined yet available through `requests` https://github.com/psf/requests/blob/b227e3cb82c8d42ea27790d615ecafe12528d3bc/requests/status_codes.py#L32 https://github.com/psf/requests/blob/b227e3cb82c8d42ea27790d615ecafe12528d3bc/requests/status_codes.py#L84-L87 https://github.com/psf/requests/blob/b227e3cb82c8d42ea27790d615ecafe12528d3bc/requests/status_codes.py#L89 https://github.com/psf/requests/blob/b227e3cb82c8d42ea27790d615ecafe12528d3bc/requests/status_codes.py#L100 The above `444` and `499` seem to be from the [unofficial nginx errors](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#nginx)? In addition, [`508` Loop Detected](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508) is missing from that list. I think it would help to document this in some more detail.
{ "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/5892/reactions" }
https://api.github.com/repos/psf/requests/issues/5892/timeline
null
completed
null
null
false
[ "> I think it would help to document this in some more detail.\r\n\r\nWhat detail do you feel is required? Would it be simpler to ignore non-official but fairly widely used status codes here and remove them if this is so confusing?", "In addition to some documentation explaining the source of the extra codes, per...
https://api.github.com/repos/psf/requests/issues/5891
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5891/labels{/name}
https://api.github.com/repos/psf/requests/issues/5891/comments
https://api.github.com/repos/psf/requests/issues/5891/events
https://github.com/psf/requests/issues/5891
955,043,574
MDU6SXNzdWU5NTUwNDM1NzQ=
5,891
Session requests are ~70% slower in version 2.26.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/36623475?v=4", "events_url": "https://api.github.com/users/omermizr/events{/privacy}", "followers_url": "https://api.github.com/users/omermizr/followers", "following_url": "https://api.github.com/users/omermizr/following{/other_user}", "gists_url": "https://api.github.com/users/omermizr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/omermizr", "id": 36623475, "login": "omermizr", "node_id": "MDQ6VXNlcjM2NjIzNDc1", "organizations_url": "https://api.github.com/users/omermizr/orgs", "received_events_url": "https://api.github.com/users/omermizr/received_events", "repos_url": "https://api.github.com/users/omermizr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/omermizr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/omermizr/subscriptions", "type": "User", "url": "https://api.github.com/users/omermizr", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
true
null
[]
null
5
2021-07-28T16:43:39Z
2022-03-30T22:00:46Z
2021-12-30T21:40:46Z
NONE
resolved
When using a session, requests are slower than in previous versions. My metrics indicate a performance degradation, and after some testing I suspect this is the root cause. ## Expected Result Same performance as in version 2.25 ## Actual Result When I use a session, requests are about 70% slower than in previous versions. This seems to be the PR that caused the regression: https://github.com/psf/requests/pull/5681 I removed the `rebuild_proxies` call locally and performance shot back up. I ran a benchmark on 1000 requests making a real-world request with the same session. In version 2.25.1 it took ~13s, in version 2.26.0 it takes ~23s. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "charset_normalizer": { "version": "2.0.3" }, "cryptography": { "version": "3.4.7" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.10" }, "platform": { "release": "5.4.0-1055-azure", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "101010bf", "version": "19.1.0" }, "requests": { "version": "2.26.0" }, "system_ssl": { "version": "101000cf" }, "urllib3": { "version": "1.26.6" }, "using_charset_normalizer": false, "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": 6, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 6, "url": "https://api.github.com/repos/psf/requests/issues/5891/reactions" }
https://api.github.com/repos/psf/requests/issues/5891/timeline
null
completed
null
null
false
[ "I dug a little deeper and it looks like **all the time is spent inside `getproxies_environment`**, here: `requests.utils.proxy_bypass:781`.\r\nWe are deployed in a k8s cluster and have a lot of environment variables (around ~530 ATM), so it makes sense that iterating these would take time.\r\nI cached `getproxies_...
https://api.github.com/repos/psf/requests/issues/5890
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5890/labels{/name}
https://api.github.com/repos/psf/requests/issues/5890/comments
https://api.github.com/repos/psf/requests/issues/5890/events
https://github.com/psf/requests/pull/5890
954,626,136
MDExOlB1bGxSZXF1ZXN0Njk4NDkwNTk0
5,890
Fix creating non-listening sockets in tests on some platforms
{ "avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4", "events_url": "https://api.github.com/users/mgorny/events{/privacy}", "followers_url": "https://api.github.com/users/mgorny/followers", "following_url": "https://api.github.com/users/mgorny/following{/other_user}", "gists_url": "https://api.github.com/users/mgorny/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mgorny", "id": 110765, "login": "mgorny", "node_id": "MDQ6VXNlcjExMDc2NQ==", "organizations_url": "https://api.github.com/users/mgorny/orgs", "received_events_url": "https://api.github.com/users/mgorny/received_events", "repos_url": "https://api.github.com/users/mgorny/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mgorny/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mgorny/subscriptions", "type": "User", "url": "https://api.github.com/users/mgorny", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-28T08:48:27Z
2021-10-26T17:04:33Z
2021-07-28T16:23:08Z
CONTRIBUTOR
resolved
Fix the listen() invocation for the test server not to pass a backlog value of zero. The value of zero means no backlog which effectively means that the socket can not accept any connections. This does not matter for the majority of platforms since the value is only advisory and the platform tends to go with a bigger backlog anyway. However, a few platforms (e.g. alpha or riscv Linux) do take the value literally, and therefore the tests fail since they are unable to connect to the server. Let Python use a 'default reasonable value' instead.
{ "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/5890/reactions" }
https://api.github.com/repos/psf/requests/issues/5890/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5890.diff", "html_url": "https://github.com/psf/requests/pull/5890", "merged_at": "2021-07-28T16:23:08Z", "patch_url": "https://github.com/psf/requests/pull/5890.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5890" }
true
[ "I'm sorry about the failure, it didn't occur to me to test on Python 2." ]
https://api.github.com/repos/psf/requests/issues/5889
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5889/labels{/name}
https://api.github.com/repos/psf/requests/issues/5889/comments
https://api.github.com/repos/psf/requests/issues/5889/events
https://github.com/psf/requests/issues/5889
954,449,932
MDU6SXNzdWU5NTQ0NDk5MzI=
5,889
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
{ "avatar_url": "https://avatars.githubusercontent.com/u/34674841?v=4", "events_url": "https://api.github.com/users/Pacychen/events{/privacy}", "followers_url": "https://api.github.com/users/Pacychen/followers", "following_url": "https://api.github.com/users/Pacychen/following{/other_user}", "gists_url": "https://api.github.com/users/Pacychen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Pacychen", "id": 34674841, "login": "Pacychen", "node_id": "MDQ6VXNlcjM0Njc0ODQx", "organizations_url": "https://api.github.com/users/Pacychen/orgs", "received_events_url": "https://api.github.com/users/Pacychen/received_events", "repos_url": "https://api.github.com/users/Pacychen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Pacychen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Pacychen/subscriptions", "type": "User", "url": "https://api.github.com/users/Pacychen", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-28T04:02:00Z
2021-10-26T05:00:21Z
2021-07-28T04:49:25Z
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/5889/reactions" }
https://api.github.com/repos/psf/requests/issues/5889/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5888
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5888/labels{/name}
https://api.github.com/repos/psf/requests/issues/5888/comments
https://api.github.com/repos/psf/requests/issues/5888/events
https://github.com/psf/requests/issues/5888
953,939,981
MDU6SXNzdWU5NTM5Mzk5ODE=
5,888
Manually set Proxy-Authorization header is always removed in 2.26
{ "avatar_url": "https://avatars.githubusercontent.com/u/88030912?v=4", "events_url": "https://api.github.com/users/chris-sawarzynski/events{/privacy}", "followers_url": "https://api.github.com/users/chris-sawarzynski/followers", "following_url": "https://api.github.com/users/chris-sawarzynski/following{/other_user}", "gists_url": "https://api.github.com/users/chris-sawarzynski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chris-sawarzynski", "id": 88030912, "login": "chris-sawarzynski", "node_id": "MDQ6VXNlcjg4MDMwOTEy", "organizations_url": "https://api.github.com/users/chris-sawarzynski/orgs", "received_events_url": "https://api.github.com/users/chris-sawarzynski/received_events", "repos_url": "https://api.github.com/users/chris-sawarzynski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chris-sawarzynski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chris-sawarzynski/subscriptions", "type": "User", "url": "https://api.github.com/users/chris-sawarzynski", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
true
null
[]
{ "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" }
5
2021-07-27T14:24:46Z
2022-02-22T20:00:23Z
2021-11-24T19:28:59Z
NONE
resolved
In versions 2.25 it was possible to add Proxy-Authorization header manually. Starting from requests 2.26 this header is removed from request if set manually. When this could be a problem (real life example): If you use requests library to programatically access service hidden behind Google Identity Aware Proxy that is protected with Basic Auth you have to provide token in Proxy-Authorization header: https://cloud.google.com/iap/docs/authentication-howto#authenticating_from_proxy-authorization_header ## Expected Result Manually provided Proxy-Authorization header should be kept intact, or there should be an obvious way to make this work without hackng library internals ## Actual Result Proxy-Authorization header is removed from request ## Reproduction Steps ```python import requests s = requests.Session() s.headers.update({"Accept": "application/json", "Proxy-Authorization":"Bearer XXX"}) s.auth = ("login", "password") resp = s.get('http://localhost:3000/answer') print(resp.request.headers) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": null }, "charset_normalizer": { "version": "2.0.3" }, "cryptography": { "version": "" }, "idna": { "version": "3.2" }, "implementation": { "name": "CPython", "version": "3.6.8" }, "platform": { "release": "3.10.0-957.1.3.el7.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.26.0" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.26.6" }, "using_charset_normalizer": true, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/5888/reactions" }
https://api.github.com/repos/psf/requests/issues/5888/timeline
null
completed
null
null
false
[ "Hey @chris-sawarzynski, thanks for the report. I believe this is a byproduct of #5681. This change is now forcing a rebuild on the proxies to resolve parameters from both the Session and Request. Part of the rebuild involves [stripping existing Proxy-Authorization headers](https://github.com/psf/requests/blob/mast...
https://api.github.com/repos/psf/requests/issues/5887
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5887/labels{/name}
https://api.github.com/repos/psf/requests/issues/5887/comments
https://api.github.com/repos/psf/requests/issues/5887/events
https://github.com/psf/requests/issues/5887
953,607,000
MDU6SXNzdWU5NTM2MDcwMDA=
5,887
Truncated http request
{ "avatar_url": "https://avatars.githubusercontent.com/u/57199?v=4", "events_url": "https://api.github.com/users/dwt/events{/privacy}", "followers_url": "https://api.github.com/users/dwt/followers", "following_url": "https://api.github.com/users/dwt/following{/other_user}", "gists_url": "https://api.github.com/users/dwt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dwt", "id": 57199, "login": "dwt", "node_id": "MDQ6VXNlcjU3MTk5", "organizations_url": "https://api.github.com/users/dwt/orgs", "received_events_url": "https://api.github.com/users/dwt/received_events", "repos_url": "https://api.github.com/users/dwt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dwt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dwt/subscriptions", "type": "User", "url": "https://api.github.com/users/dwt", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2021-07-27T07:53:14Z
2021-11-17T01:21:19Z
2021-08-19T01:01:33Z
NONE
resolved
When requesting a development website locally, I get different results when using cURL vs httpie/requests. Namely requests gives me a shorter result. Further debugging seems to indicate that the gzip encoded response may be to blame. ## Expected Result I'd like the full server response - just as with curl ## Actual Result The output is shortened. ## Reproduction Steps ```python import requests r = requests.get('http://localhost:8000/Forschung/Forschungsprofil.html?c=14') >>> pprint(dict(r.headers)) {'Cache-Control': 'public', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Content-Generator': 'EGOTEC ECM', 'Content-Security-Policy': "default-src 'self' " 'https://www.uniklinikum-jena.de ' 'https://www.youtube.com https://dr-flex.de ' 'https://www.yumpu.com https://www.google.com ' 'https://vimeo.com https://player.vimeo.com; ' "img-src 'self' https://www.uniklinikum-jena.de " "www.krz.uni-jena.de; script-src 'self' " "'unsafe-inline' 'unsafe-eval' " 'https://www.uniklinikum-jena.de ' "www.krz.uni-jena.de; style-src 'self' " "'unsafe-inline'; font-src 'self'; object-src " "'none'", 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 27 Jul 2021 07:35:23 GMT', 'ETag': 'W/"medweb2016/de/folder.c1e7bb70509f15aa29d5402206a12138.0e9304b1aef96489c56d827c1451d3db.9bb97a957c625ae7dabe79aa95c06302.1627369626"', 'Expect-CT': 'enforce, max-age=36000', 'Expires': 'Tue, 27 Jul 2021 08:35:23 GMT', 'Last-Modified': 'Mon, 18 May 2020 08:44:34 GMT', 'Pragma': 'no-cache', 'Server': 'nginx/1.19.7', 'Set-Cookie': 'EGOTEC=be0s8uitorpvhgvcchidiosp62; path=/; ' 'domain=uniklinikum-jena.de; HttpOnly', 'Transfer-Encoding': 'chunked', 'X-Cache-Status': 'MISS', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'sameorigin', 'X-XSS-Protection': '1; mode=block'} >>> r.text[-200:] "449');\r\n\r\n\t}\r\n\t, mouseleave : function() {\r\n\t\tanode.css('background', initcolor);\r\n\t\tinode.css('background', initarrowcolor);\r\n\t}\r\n\t}\r\n\t, '.subnavigation a, .subnavigation i');\r\n\r\n</script>\n\t\n</html>\n" ``` It seems to work correctly, when I give an empty / remove the 'Accept-Encoding' header from the request. ```python >>> r = requests.get('http://localhost:8000/Forschung/Forschungsprofil.html?c=14', headers={'Accept-Encoding':''}) >>> pprint(dict(r.headers)) {'Cache-Control': 'public', 'Connection': 'keep-alive', 'Content-Generator': 'EGOTEC ECM', 'Content-Security-Policy': "default-src 'self' " 'https://www.uniklinikum-jena.de ' 'https://www.youtube.com https://dr-flex.de ' 'https://www.yumpu.com https://www.google.com ' 'https://vimeo.com https://player.vimeo.com; ' "img-src 'self' https://www.uniklinikum-jena.de " "www.krz.uni-jena.de; script-src 'self' " "'unsafe-inline' 'unsafe-eval' " 'https://www.uniklinikum-jena.de ' "www.krz.uni-jena.de; style-src 'self' " "'unsafe-inline'; font-src 'self'; object-src " "'none'", 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 27 Jul 2021 07:47:15 GMT', 'ETag': 'W/"medweb2016/de/folder.c1e7bb70509f15aa29d5402206a12138.0e9304b1aef96489c56d827c1451d3db.9bb97a957c625ae7dabe79aa95c06302.1627369626"', 'Expect-CT': 'enforce, max-age=36000', 'Expires': 'Tue, 27 Jul 2021 08:35:23 GMT', 'Last-Modified': 'Mon, 18 May 2020 08:44:34 GMT', 'Pragma': 'no-cache', 'Server': 'nginx/1.19.7', 'Set-Cookie': 'EGOTEC=pevpss1qf4de0uvd064gippn43; path=/; ' 'domain=uniklinikum-jena.de; HttpOnly', 'Transfer-Encoding': 'chunked', 'X-Cache-Status': 'MISS', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'sameorigin', 'X-XSS-Protection': '1; mode=block', 'X-cached': '1'} >>> r.text[-200:] 'or it\'s own uses in client pages.\n window._proxy_jquery = window.$.noConflict()\n</script>\n<script src="/proxy_static/added.js"></script>\n\n<style>\n @import url(/proxy_static/added.css);\n</style>\n' ``` What I'm doing server-side, is that I'm adding stuff to requests using Nginx's `add_after_body` directive. I'm not entirely sure what the problem is and how to further debug this, here's the Nginx config I've used to track this down so far: ```nginx # daemon off; include conf.d/error_logging.include; include conf.d/workers.include; http { include conf.d/access_logging.include; include conf.d/mime_types.include; upstream auth { server auth:8003; } upstream zms { server zms:8080; } server { listen 8000; server_name localhost; # include conf.d/proxy.include; # error_page 401 = @error401; location @error401 { # Let zms handle all authentication errors # TODO consider to redirect to a pre-determined url? proxy_pass http://zms; } # error_page 404 = @fallback; # location @fallback { # proxy_pass http://zms; # } # include conf.d/auth_locations.include; location /proxy_static { alias /srv/www/static; add_after_body ""; # disable add after body to these locations } add_after_body /proxy_static/custom_css_and_js.html; location / { # include conf.d/proxy.include; # include conf.d/auth_authenticate.include; proxy_pass http://zms; } # If needed additional namespaces can be be added here, that also get authenticated via auth_request # zms is special in that it handles authentication failures for all services, so no unauthenticated request # ever gets through to any third party service added here. resolver 8.8.8.8 ipv6=off; location /Forschung { # check with something like this # while true; do http http://localhost:8000/Forschung/Forschungsprofil.html\?cache_breaker=$(date +%s) | tail; sleep 1; done # while true; do http http://localhost:8000/Forschung/Forschungsprofil_missing.html\?cache_breaker=$(date +%s) | tail; sleep 1; done # Not sure why, but this doesn't seem to work with external proxy # add_after_body /proxy_static/custom_css_and_js.html; # serve static files to ease debugging # alias /srv/www/static/Forschung; # mitmproxy - to help debug what is happening in proxied requests # proxy_pass http://host.docker.internal:8001; # proxy_pass https://www.uniklinikum-jena.de; proxy_pass http://localhost:8010; # Fixes the problem that the upstream server doesn't resolve the url/host correctly # proxy_ssl_server_name on; # this also fixed the resolution issue - but I think proxy_ssl_server_name is the far better solution # proxy_set_header Host www.uniklinikum-jena.de; # proxy_redirect https://www.uniklinikum-jena.de/Forschung /Forschung/; add_after_body /debugging/custom_css_and_js2.html; } location /debugging/ { proxy_pass http://host.docker.internal:8100; } # sub_filter '</html>' 'fnord</html>'; # sub_filter_once off; } server { listen 8010; server_name localhost; # include conf.d/proxy.include; location / { proxy_pass https://www.uniklinikum-jena.de; proxy_ssl_server_name on; add_after_body /proxy_static/custom_css_and_js.html; } add_after_body /proxy_static/custom_css_and_js.html; } } ``` Sorry, not really minimised… ## System Information $ python -m requests.help ``` { "chardet": { "version": null }, "charset_normalizer": { "version": "2.0.3" }, "cryptography": { "version": "" }, "idna": { "version": "3.2" }, "implementation": { "name": "CPython", "version": "3.9.6" }, "platform": { "release": "20.6.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.26.0" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.6" }, "using_charset_normalizer": true, "using_pyopenssl": false } ``` MacOS 11.5 (20G71) Python 2.7 and 3.9 (same result) ``` % curl --version curl 7.64.1 (x86_64-apple-darwin20.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.41.0 Release-Date: 2019-03-27 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets % nginx -v nginx version: nginx/1.19.7 ```
{ "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/5887/reactions" }
https://api.github.com/repos/psf/requests/issues/5887/timeline
null
completed
null
null
false
[ "Looking into this more it starts to make sense what is going on:\r\n\r\n```shell\r\n% curl -vH \"Accept-Encoding: gzip\" http://localhost:8000/Forschung/Forschungsprofil.html\\?cache_breaker=$(date +%s) --output /dev/stdout| tail\r\n % Total % Received % Xferd Average Speed Time Time Time Current\r...
https://api.github.com/repos/psf/requests/issues/5886
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5886/labels{/name}
https://api.github.com/repos/psf/requests/issues/5886/comments
https://api.github.com/repos/psf/requests/issues/5886/events
https://github.com/psf/requests/issues/5886
952,072,810
MDU6SXNzdWU5NTIwNzI4MTA=
5,886
Prepare URL coerces to lower-case
{ "avatar_url": "https://avatars.githubusercontent.com/u/20093793?v=4", "events_url": "https://api.github.com/users/dmitrypolo/events{/privacy}", "followers_url": "https://api.github.com/users/dmitrypolo/followers", "following_url": "https://api.github.com/users/dmitrypolo/following{/other_user}", "gists_url": "https://api.github.com/users/dmitrypolo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dmitrypolo", "id": 20093793, "login": "dmitrypolo", "node_id": "MDQ6VXNlcjIwMDkzNzkz", "organizations_url": "https://api.github.com/users/dmitrypolo/orgs", "received_events_url": "https://api.github.com/users/dmitrypolo/received_events", "repos_url": "https://api.github.com/users/dmitrypolo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dmitrypolo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dmitrypolo/subscriptions", "type": "User", "url": "https://api.github.com/users/dmitrypolo", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-07-24T13:09:43Z
2021-07-27T22:05:18Z
2021-07-24T13:26:23Z
NONE
resolved
https://github.com/psf/requests/blob/916d171f2bf01155f2c115159ec475e8d76a690b/requests/models.py#L369 When passing in a URL with an upper-case letter after a `-` character the host is coerced to lower case. Python Version: 3.9.1 Requests Version: 2.26.0 OS: MacOS Steps to reproduce -------------------- ``` from requests.models import PreparedRequest p = PreparedRequest() url = "http://service-A/abc" p.prepare_url(url, None) print(p.url) "http://service-a/abc" ``` Notice how the `A` has been changed to `a`. This behavior is not expected. I have also submitted [this bug report](https://github.com/urllib3/urllib3/issues/2337) as the behavior arises from the use of `urllib3`.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5886/reactions" }
https://api.github.com/repos/psf/requests/issues/5886/timeline
null
completed
null
null
false
[ "This is 100% correct. RFC 3986 describes the part of any URI as such:\r\n\r\n- scheme (part of the URL preceding the first `:`)\r\n- authority (part of the URL starting with `//` before the path; this includes username/password, hostname, and port)\r\n- path (part of the URL starting with `/`)\r\n- query (part of ...
https://api.github.com/repos/psf/requests/issues/5885
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5885/labels{/name}
https://api.github.com/repos/psf/requests/issues/5885/comments
https://api.github.com/repos/psf/requests/issues/5885/events
https://github.com/psf/requests/issues/5885
951,681,556
MDU6SXNzdWU5NTE2ODE1NTY=
5,885
Issue with Backslash
{ "avatar_url": "https://avatars.githubusercontent.com/u/16897883?v=4", "events_url": "https://api.github.com/users/phospi/events{/privacy}", "followers_url": "https://api.github.com/users/phospi/followers", "following_url": "https://api.github.com/users/phospi/following{/other_user}", "gists_url": "https://api.github.com/users/phospi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/phospi", "id": 16897883, "login": "phospi", "node_id": "MDQ6VXNlcjE2ODk3ODgz", "organizations_url": "https://api.github.com/users/phospi/orgs", "received_events_url": "https://api.github.com/users/phospi/received_events", "repos_url": "https://api.github.com/users/phospi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/phospi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phospi/subscriptions", "type": "User", "url": "https://api.github.com/users/phospi", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-07-23T15:30:22Z
2021-10-31T09:00:16Z
2021-07-23T21:20:47Z
NONE
resolved
Hi all, I am at wits end. My scenario is that I am using python requests to interact with Icinga2 API and I am trying to schedule a downtime. So I know how that is supposed to works and it works most of time. But unfortunately I am totally out of luck when the Icinga2 service I try to set a downtime to has name with a backslash in it. My test environment: - Icinga2 2.9.0 - Python 3.6.8 / Python 3.8.11 - requests 2.27.0 Prerequisite: Create a host in Icinga. Create a service in Icinga with a "\\"-character. Python Code for Reproduction: ```` import requests session = requests.Session() session.hooks = { "response": lambda r, *args, **kwargs: r.raise_for_status() } session.headers.update( { "Accept": "application/json", "Content-Type": "application/json", "cache-control": "no-cache", } ) session.auth = requests.auth.HTTPBasicAuth("user","password") url = "https://icinga2-server.com:5665/v1/actions/schedule-downtime" body = { 'comment': 'Downtime', 'author': ('icingaadmin',), 'start_time': 1605196800.0, 'filter': 'host.name==\"HOSTNAME\" && service.name==\"SERVICE\\NAME\"', 'end_time': 1605286800.0, 'fixed': True, 'type': 'Service'} session.post(url, json=body, verify=False) ```` Result: ```` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/root/.pyenv/versions/3.8.11/lib/python3.8/site-packages/requests/sessions.py", line 590, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/root/.pyenv/versions/3.8.11/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/root/.pyenv/versions/3.8.11/lib/python3.8/site-packages/requests/sessions.py", line 662, in send r = dispatch_hook('response', hooks, r, **kwargs) File "/root/.pyenv/versions/3.8.11/lib/python3.8/site-packages/requests/hooks.py", line 31, in dispatch_hook _hook_data = hook(hook_data, **kwargs) File "<stdin>", line 2, in <lambda> File "/root/.pyenv/versions/3.8.11/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://icinga2-server.com:5665/v1/actions/schedule-downtime ```` I know very well that this error message indicates that Icinga2 could not find/match a service. But executing the command via curl is clearly working for me and I get a proper scheduled downtime! CURL Request: ```` curl -k -s -u user:password -H 'Accept: application/json' -X POST 'https://icinga2-server.com:5665/v1/actions/schedule-downtime' -d '{"comment": "Downtime", "author": ["icingaadmin"], "start_time": 1605196800.0, "filter": "host.name==\"MSSQLSERVER\" && service.name==\"MSSQLSERVER\\\\INSTANCE2\"", "end_time": 1605286800.0, "fixed": true, "type": "Service"}' ```` CURL ANSWER (SUCCESS): ```` {"results":[{"code":200.0,"legacy_id":8.0,"name":"MSSQLSERVER!MSSQLSERVER\\INSTANCE2!137c9ef9-3150-4e57-ba0b-a22ddc6611d4","status":"Successfully scheduled downtime 'MSSQLSERVER!MSSQLSERVER\\INSTANCE2!137c9ef9-3150-4e57-ba0b-a22ddc6611d4' for object 'MSSQLSERVER!MSSQLSERVER\\INSTANCE2'."}]} ```` Alternate approaches that did not help: ```` session.post(url, data=json.dumps(body), verify=False) string_body = json.dumps(body) session.post(url, data=string_body, verify=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/5885/reactions" }
https://api.github.com/repos/psf/requests/issues/5885/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nI believe your issue is in \r\n\r\n```python\r\n...
https://api.github.com/repos/psf/requests/issues/5884
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5884/labels{/name}
https://api.github.com/repos/psf/requests/issues/5884/comments
https://api.github.com/repos/psf/requests/issues/5884/events
https://github.com/psf/requests/issues/5884
951,651,658
MDU6SXNzdWU5NTE2NTE2NTg=
5,884
DNS round robin not working
{ "avatar_url": "https://avatars.githubusercontent.com/u/10252511?v=4", "events_url": "https://api.github.com/users/oschlueter/events{/privacy}", "followers_url": "https://api.github.com/users/oschlueter/followers", "following_url": "https://api.github.com/users/oschlueter/following{/other_user}", "gists_url": "https://api.github.com/users/oschlueter/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/oschlueter", "id": 10252511, "login": "oschlueter", "node_id": "MDQ6VXNlcjEwMjUyNTEx", "organizations_url": "https://api.github.com/users/oschlueter/orgs", "received_events_url": "https://api.github.com/users/oschlueter/received_events", "repos_url": "https://api.github.com/users/oschlueter/repos", "site_admin": false, "starred_url": "https://api.github.com/users/oschlueter/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/oschlueter/subscriptions", "type": "User", "url": "https://api.github.com/users/oschlueter", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-23T14:53:42Z
2021-10-21T22:00:19Z
2021-07-23T21:25:44Z
NONE
resolved
I want to setup a PyPI Cloud service with two servers in different data centers and leverage DNS round robin as failover mechanic (see [here](https://github.com/pypa/pip/issues/10185)). To do that, I have configured a multi-value DNS record: ``` $ dig +short pypi-dev.company.de 172.31.33.222 172.31.19.77 ``` In the ticket linked above, @uranusjr points out that the requests library should take care of DNS round robin (see [here](https://github.com/psf/requests/issues/2537)) and that I might have configured my setup incorrectly. To reproduce that, I shut down the application server on 172.31.33.222 and kept the reverse proxy alive. On 172.31.19.77 both application server and reverse proxy are operational. Furthermore, I created this script to retrieve the list of available python packages on my PyPI Cloud service: ``` import requests import logging from urllib3.util.retry import Retry from requests.adapters import HTTPAdapter def get_session(retries=3): s = requests.Session() retry = Retry( total=retries, read=retries, connect=retries, status_forcelist=[502], ) adapter = HTTPAdapter(max_retries=retry) s.mount('http://', adapter) s.mount('https://', adapter) return s if __name__ == '__main__': logging.basicConfig(level=logging.INFO) s = get_session() r = s.get('https://pypi-dev.company.de/simple/', stream=True, timeout=3) ip = r.raw._connection.sock.getpeername() logging.info(f'status code is {r.status_code}') logging.info(f'ip is {ip}') ``` ## Expected Result ``` $ python req.py INFO:root:status code is 200 INFO:root:ip is ('172.31.19.77', 443) ``` ## Actual Result ``` $ python req.py WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=1, read=0, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Read timed out. (read timeout=3)")': /simple/ Traceback (most recent call last): File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request httplib_response = conn.getresponse() File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1349, in getresponse response.begin() File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 277, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto return self._sock.recv_into(b) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1099, 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/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 447, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Read timed out. (read timeout=3) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 783, in urlopen return self.urlopen( File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Max retries exceeded with url: /simple/ (Caused by ReadTimeoutError("HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Read timed out. (read timeout=3)")) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/oschlueter/git/requests-dns-round-robin/req.py", line 25, in <module> r = s.get('https://pypi-dev.company.de/simple/', stream=True, timeout=3) File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/Users/oschlueter/git/requests-dns-round-robin/venv/lib/python3.9/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Max retries exceeded with url: /simple/ (Caused by ReadTimeoutError("HTTPSConnectionPool(host='pypi-dev.company.de', port=443): Read timed out. (read timeout=3)")) ``` Please note that everything is fine if I restart the application server on 172.31.33.222 and that requests only seems to use that one IP address to connect to my PyPI Cloud server: ``` for ((n=0;n<5;n++)); do python req.py; done INFO:root:status code is 200 INFO:root:ip is ('172.31.33.222', 443) INFO:root:status code is 200 INFO:root:ip is ('172.31.33.222', 443) INFO:root:status code is 200 INFO:root:ip is ('172.31.33.222', 443) INFO:root:status code is 200 INFO:root:ip is ('172.31.33.222', 443) INFO:root:status code is 200 INFO:root:ip is ('172.31.33.222', 443) ``` ## Reproduction Steps * Setup a multi-value DNS record and two servers with reverse proxies and upstream services. * Invoke the script above with your domain name instead of `pypi-dev.company.de` to identify which server requests connects to. * Shut down the upstream service of that server but keep the reverse proxy up and running. * Invoke the script again. ## System Information ``` $ python -m requests.help { "chardet": { "version": null }, "charset_normalizer": { "version": "2.0.3" }, "cryptography": { "version": "" }, "idna": { "version": "3.2" }, "implementation": { "name": "CPython", "version": "3.9.6" }, "platform": { "release": "20.6.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.26.0" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.6" }, "using_charset_normalizer": true, "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/5884/reactions" }
https://api.github.com/repos/psf/requests/issues/5884/timeline
null
completed
null
null
false
[ "I have neither the infrastructure nor the time to try to reproduce this but based solely on your description, I don't think you're quite testing this the way you think you are. Correct me if I'm wrong, but you said above that you have intermediaries between the actual application servers and requests. Without know...
https://api.github.com/repos/psf/requests/issues/5883
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5883/labels{/name}
https://api.github.com/repos/psf/requests/issues/5883/comments
https://api.github.com/repos/psf/requests/issues/5883/events
https://github.com/psf/requests/pull/5883
948,632,656
MDExOlB1bGxSZXF1ZXN0NjkzNDQ4MzA2
5,883
Replace for loops with dictionary comprehensions
{ "avatar_url": "https://avatars.githubusercontent.com/u/76561516?v=4", "events_url": "https://api.github.com/users/monosans/events{/privacy}", "followers_url": "https://api.github.com/users/monosans/followers", "following_url": "https://api.github.com/users/monosans/following{/other_user}", "gists_url": "https://api.github.com/users/monosans/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/monosans", "id": 76561516, "login": "monosans", "node_id": "MDQ6VXNlcjc2NTYxNTE2", "organizations_url": "https://api.github.com/users/monosans/orgs", "received_events_url": "https://api.github.com/users/monosans/received_events", "repos_url": "https://api.github.com/users/monosans/repos", "site_admin": false, "starred_url": "https://api.github.com/users/monosans/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/monosans/subscriptions", "type": "User", "url": "https://api.github.com/users/monosans", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-07-20T13:03:24Z
2021-10-18T23:00:40Z
2021-07-20T17:22:27Z
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/5883/reactions" }
https://api.github.com/repos/psf/requests/issues/5883/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5883.diff", "html_url": "https://github.com/psf/requests/pull/5883", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5883.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5883" }
true
[ "Hi @monosans, thanks for the contribution. Unfortunately, we generally don't accept PRs for cosmetic changes to Requests, so we won't be able to merge this.", "@monosans please stop spamming projects with changes like this. You did so on several other projects. It's unhelpful" ]
https://api.github.com/repos/psf/requests/issues/5882
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5882/labels{/name}
https://api.github.com/repos/psf/requests/issues/5882/comments
https://api.github.com/repos/psf/requests/issues/5882/events
https://github.com/psf/requests/issues/5882
948,580,999
MDU6SXNzdWU5NDg1ODA5OTk=
5,882
verify=False doesn't ignore certificate errors with proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/5131271?v=4", "events_url": "https://api.github.com/users/achapkowski/events{/privacy}", "followers_url": "https://api.github.com/users/achapkowski/followers", "following_url": "https://api.github.com/users/achapkowski/following{/other_user}", "gists_url": "https://api.github.com/users/achapkowski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/achapkowski", "id": 5131271, "login": "achapkowski", "node_id": "MDQ6VXNlcjUxMzEyNzE=", "organizations_url": "https://api.github.com/users/achapkowski/orgs", "received_events_url": "https://api.github.com/users/achapkowski/received_events", "repos_url": "https://api.github.com/users/achapkowski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/achapkowski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/achapkowski/subscriptions", "type": "User", "url": "https://api.github.com/users/achapkowski", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-07-20T11:56:23Z
2021-12-23T15:00:25Z
2021-09-24T14:08:42Z
NONE
resolved
Summary. When creating a session and setting `verify=False` with a proxy defined value error is raised. The easiest way to setup this issue is to open Fiddler4 and run the following on Windows: ``` import requests import urllib url = "https://www.arcgis.com/sharing/rest?f=json" proxies = urllib.request.getproxies() session = requests.Session() session.proxies = proxies session.trust_env = True session.verify = False resp = session.get(url=url) print(resp.json()) ``` ## Expected Result ``` {'currentVersion': '9.2'} ``` ## Actual Result ``` Traceback (most recent call last): Python Shell, prompt 2, line 10 File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\requests\sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen self._prepare_proxy(conn) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy conn.connect() File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\connection.py", line 359, in connect conn = self._connect_tls_proxy(hostname, conn) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\connection.py", line 506, in _connect_tls_proxy ssl_context=ssl_context, File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\ssl.py", line 423, in wrap_socket session=session File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-dev\Lib\ssl.py", line 827, in _create raise ValueError("check_hostname requires server_hostname") builtins.ValueError: check_hostname requires server_hostname ``` What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.3.1" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.10" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010109f", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010109f" }, "urllib3": { "version": "1.25.11" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5882/reactions" }
https://api.github.com/repos/psf/requests/issues/5882/timeline
null
completed
null
null
false
[ "I can reproduce the issue with the latest requests 2.26.x and urllib3 1.26.6\r\n\r\nPR: https://github.com/urllib3/urllib3/pull/2407 breaks the `requests.Session` object it appears when any proxy is given now.", "Duplicate of #5943" ]
https://api.github.com/repos/psf/requests/issues/5881
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5881/labels{/name}
https://api.github.com/repos/psf/requests/issues/5881/comments
https://api.github.com/repos/psf/requests/issues/5881/events
https://github.com/psf/requests/pull/5881
947,632,816
MDExOlB1bGxSZXF1ZXN0NjkyNTg4ODgy
5,881
docs: Update the Red Hat vulnerabilities contact
{ "avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4", "events_url": "https://api.github.com/users/jeremycline/events{/privacy}", "followers_url": "https://api.github.com/users/jeremycline/followers", "following_url": "https://api.github.com/users/jeremycline/following{/other_user}", "gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jeremycline", "id": 1977525, "login": "jeremycline", "node_id": "MDQ6VXNlcjE5Nzc1MjU=", "organizations_url": "https://api.github.com/users/jeremycline/orgs", "received_events_url": "https://api.github.com/users/jeremycline/received_events", "repos_url": "https://api.github.com/users/jeremycline/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions", "type": "User", "url": "https://api.github.com/users/jeremycline", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-19T13:05:36Z
2021-10-17T17:03:39Z
2021-07-19T16:44:02Z
CONTRIBUTOR
resolved
I am departing Red Hat so it would be best to contact the Python maintenance team there instead of me if a vulnerability is discovered. Cc: @hroncok
{ "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/5881/reactions" }
https://api.github.com/repos/psf/requests/issues/5881/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5881.diff", "html_url": "https://github.com/psf/requests/pull/5881", "merged_at": "2021-07-19T16:44:02Z", "patch_url": "https://github.com/psf/requests/pull/5881.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5881" }
true
[]
https://api.github.com/repos/psf/requests/issues/5880
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5880/labels{/name}
https://api.github.com/repos/psf/requests/issues/5880/comments
https://api.github.com/repos/psf/requests/issues/5880/events
https://github.com/psf/requests/pull/5880
946,577,588
MDExOlB1bGxSZXF1ZXN0NjkxNzI3MjUy
5,880
Set encoding for +json media type suffix responses like application/json
{ "avatar_url": "https://avatars.githubusercontent.com/u/109152?v=4", "events_url": "https://api.github.com/users/scop/events{/privacy}", "followers_url": "https://api.github.com/users/scop/followers", "following_url": "https://api.github.com/users/scop/following{/other_user}", "gists_url": "https://api.github.com/users/scop/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/scop", "id": 109152, "login": "scop", "node_id": "MDQ6VXNlcjEwOTE1Mg==", "organizations_url": "https://api.github.com/users/scop/orgs", "received_events_url": "https://api.github.com/users/scop/received_events", "repos_url": "https://api.github.com/users/scop/repos", "site_admin": false, "starred_url": "https://api.github.com/users/scop/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/scop/subscriptions", "type": "User", "url": "https://api.github.com/users/scop", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-07-16T20:28:21Z
2022-05-04T18:00:31Z
2022-02-02T18:39:16Z
CONTRIBUTOR
resolved
https://tools.ietf.org/html/rfc6839#section-3.1
{ "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/5880/reactions" }
https://api.github.com/repos/psf/requests/issues/5880/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5880.diff", "html_url": "https://github.com/psf/requests/pull/5880", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5880.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5880" }
true
[ "While this may be correct to spec, I'm pretty hesitant with making this change. We're using this function in the hot-path for all responses and how they interact with `.text`. Currently, these all rely on chardet/charset_normalizer for encoding, anything that isn't encodable with utf-8 will break with this change....
https://api.github.com/repos/psf/requests/issues/5879
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5879/labels{/name}
https://api.github.com/repos/psf/requests/issues/5879/comments
https://api.github.com/repos/psf/requests/issues/5879/events
https://github.com/psf/requests/issues/5879
946,389,064
MDU6SXNzdWU5NDYzODkwNjQ=
5,879
proxy with custom hostname on proxy (possible bug ?)
{ "avatar_url": "https://avatars.githubusercontent.com/u/29481952?v=4", "events_url": "https://api.github.com/users/flapili/events{/privacy}", "followers_url": "https://api.github.com/users/flapili/followers", "following_url": "https://api.github.com/users/flapili/following{/other_user}", "gists_url": "https://api.github.com/users/flapili/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flapili", "id": 29481952, "login": "flapili", "node_id": "MDQ6VXNlcjI5NDgxOTUy", "organizations_url": "https://api.github.com/users/flapili/orgs", "received_events_url": "https://api.github.com/users/flapili/received_events", "repos_url": "https://api.github.com/users/flapili/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flapili/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flapili/subscriptions", "type": "User", "url": "https://api.github.com/users/flapili", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-16T15:21:52Z
2021-10-15T19:00:28Z
2021-07-17T18:05:16Z
NONE
resolved
Hi, I'm running zaproxy behind an nginx to perform some audit on our customer website, infortunally I have few issues with requests proxying. ``` curl -x https://xxx.xxx.xxx -L http://zap ``` ``` <head> <title>ZAP API UI</title> </head> <body> ... </body> ``` but with requests (not exactly the same request): ``` req = requests.post( "http://zap/JSON/spider/view/scans", proxies={"https": settings.owasp_proxy_url}, data={"apikey": settings.owasp_api_key.get_secret_value()}, ) ``` ``` requests.exceptions.ConnectionError: HTTPConnectionPool(host='zap', port=80): Max retries exceeded with url: /JSON/spider/view/scans (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb1f84c2730>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')) ``` Python: 3.9 requests: 2.25.1 Best regards
{ "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/5879/reactions" }
https://api.github.com/repos/psf/requests/issues/5879/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\n`nodename nor servname provided, or not known` m...
https://api.github.com/repos/psf/requests/issues/5878
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5878/labels{/name}
https://api.github.com/repos/psf/requests/issues/5878/comments
https://api.github.com/repos/psf/requests/issues/5878/events
https://github.com/psf/requests/pull/5878
946,360,778
MDExOlB1bGxSZXF1ZXN0NjkxNTQ2NjYz
5,878
Unify interface definition
{ "avatar_url": "https://avatars.githubusercontent.com/u/1119426?v=4", "events_url": "https://api.github.com/users/weddige/events{/privacy}", "followers_url": "https://api.github.com/users/weddige/followers", "following_url": "https://api.github.com/users/weddige/following{/other_user}", "gists_url": "https://api.github.com/users/weddige/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/weddige", "id": 1119426, "login": "weddige", "node_id": "MDQ6VXNlcjExMTk0MjY=", "organizations_url": "https://api.github.com/users/weddige/orgs", "received_events_url": "https://api.github.com/users/weddige/received_events", "repos_url": "https://api.github.com/users/weddige/repos", "site_admin": false, "starred_url": "https://api.github.com/users/weddige/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/weddige/subscriptions", "type": "User", "url": "https://api.github.com/users/weddige", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-16T14:47:01Z
2021-10-15T19:00:29Z
2021-07-17T18:02:53Z
NONE
resolved
With this pull request I am trying to get rid of some differences in the interface definition and doc strings of `requests.api` and `requests.sessions.Session`. In not all cases there was an obvious right choice and some discussion might be necessary.
{ "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/5878/reactions" }
https://api.github.com/repos/psf/requests/issues/5878/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5878.diff", "html_url": "https://github.com/psf/requests/pull/5878", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5878.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5878" }
true
[ "Changing function argument definitions to attempt to match things is not something we're going to accept anytime soon, especially not before the next major version. Further, attempting to try to synchronize these docstrings is going to be a futile effort unfortunately as they're going to drift by nature of them be...
https://api.github.com/repos/psf/requests/issues/5877
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5877/labels{/name}
https://api.github.com/repos/psf/requests/issues/5877/comments
https://api.github.com/repos/psf/requests/issues/5877/events
https://github.com/psf/requests/pull/5877
945,526,525
MDExOlB1bGxSZXF1ZXN0NjkwODQ0NDYx
5,877
Update api.rst
{ "avatar_url": "https://avatars.githubusercontent.com/u/86739818?v=4", "events_url": "https://api.github.com/users/steveberdy/events{/privacy}", "followers_url": "https://api.github.com/users/steveberdy/followers", "following_url": "https://api.github.com/users/steveberdy/following{/other_user}", "gists_url": "https://api.github.com/users/steveberdy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/steveberdy", "id": 86739818, "login": "steveberdy", "node_id": "MDQ6VXNlcjg2NzM5ODE4", "organizations_url": "https://api.github.com/users/steveberdy/orgs", "received_events_url": "https://api.github.com/users/steveberdy/received_events", "repos_url": "https://api.github.com/users/steveberdy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/steveberdy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/steveberdy/subscriptions", "type": "User", "url": "https://api.github.com/users/steveberdy", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-15T15:48:27Z
2021-11-21T21:00:16Z
2021-07-16T18:06:43Z
CONTRIBUTOR
resolved
## Summary Updates API links so the examples will work as expected. Fixes #5876
{ "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/5877/reactions" }
https://api.github.com/repos/psf/requests/issues/5877/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5877.diff", "html_url": "https://github.com/psf/requests/pull/5877", "merged_at": "2021-07-16T18:06:42Z", "patch_url": "https://github.com/psf/requests/pull/5877.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5877" }
true
[]
https://api.github.com/repos/psf/requests/issues/5876
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5876/labels{/name}
https://api.github.com/repos/psf/requests/issues/5876/comments
https://api.github.com/repos/psf/requests/issues/5876/events
https://github.com/psf/requests/issues/5876
945,524,226
MDU6SXNzdWU5NDU1MjQyMjY=
5,876
GitHub API links for request streaming are outdated
{ "avatar_url": "https://avatars.githubusercontent.com/u/86739818?v=4", "events_url": "https://api.github.com/users/steveberdy/events{/privacy}", "followers_url": "https://api.github.com/users/steveberdy/followers", "following_url": "https://api.github.com/users/steveberdy/following{/other_user}", "gists_url": "https://api.github.com/users/steveberdy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/steveberdy", "id": 86739818, "login": "steveberdy", "node_id": "MDQ6VXNlcjg2NzM5ODE4", "organizations_url": "https://api.github.com/users/steveberdy/orgs", "received_events_url": "https://api.github.com/users/steveberdy/received_events", "repos_url": "https://api.github.com/users/steveberdy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/steveberdy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/steveberdy/subscriptions", "type": "User", "url": "https://api.github.com/users/steveberdy", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-15T15:45:53Z
2021-10-14T19:00:26Z
2021-07-16T18:06:43Z
CONTRIBUTOR
resolved
The URLs to GitHub API links [here](https://github.com/psf/requests/blob/master/docs/api.rst#api-changes) should be updated from `https://github.com/timeline.json` to `https://api.github.com/events` for a working example.
{ "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/5876/reactions" }
https://api.github.com/repos/psf/requests/issues/5876/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5875
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5875/labels{/name}
https://api.github.com/repos/psf/requests/issues/5875/comments
https://api.github.com/repos/psf/requests/issues/5875/events
https://github.com/psf/requests/pull/5875
945,325,266
MDExOlB1bGxSZXF1ZXN0NjkwNjcwMTk3
5,875
Make chardet/charset_normalizer optional dependencies
{ "avatar_url": "https://avatars.githubusercontent.com/u/58669?v=4", "events_url": "https://api.github.com/users/akx/events{/privacy}", "followers_url": "https://api.github.com/users/akx/followers", "following_url": "https://api.github.com/users/akx/following{/other_user}", "gists_url": "https://api.github.com/users/akx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akx", "id": 58669, "login": "akx", "node_id": "MDQ6VXNlcjU4NjY5", "organizations_url": "https://api.github.com/users/akx/orgs", "received_events_url": "https://api.github.com/users/akx/received_events", "repos_url": "https://api.github.com/users/akx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akx/subscriptions", "type": "User", "url": "https://api.github.com/users/akx", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2021-07-15T12:24:28Z
2023-05-31T00:03:20Z
2022-05-11T01:26:03Z
NONE
resolved
An implementation of #5871 for consideration. Unlike my suggestion in #5871, this implementation _prefers_ `chardet` / `charset_normalizer` if it's available, with the idea that those libraries should hopefully do a better job than trying to decode the payload in the two most likely encodings. Decoding ASCII and UTF-8 (["UTF-8 is used by 97.0% of all the websites whose character encoding we know."](https://w3techs.com/technologies/details/en-utf8)) will continue to work without those libraries, and a helpful error is raised in other cases. This is still missing documentation, changelogs, etc. – help appreciated. Considering the switchover to `charset_normalizer` has broken some users' workflows anyway, I think it wouldn't be too much of an additional breaking change to do this without a major version bump.
{ "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": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5875/reactions" }
https://api.github.com/repos/psf/requests/issues/5875/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5875.diff", "html_url": "https://github.com/psf/requests/pull/5875", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5875.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5875" }
true
[ "I think we're going to close this out given the outcome of tracking issue. The long term goal is to remove character detection from Requests. I'm not sure this solution is robust enough and is likely to introduce further unnecessary breakages at this point. We'll track progress on the original issue. Thanks!", "...
https://api.github.com/repos/psf/requests/issues/5874
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5874/labels{/name}
https://api.github.com/repos/psf/requests/issues/5874/comments
https://api.github.com/repos/psf/requests/issues/5874/events
https://github.com/psf/requests/pull/5874
945,256,762
MDExOlB1bGxSZXF1ZXN0NjkwNjExMjEz
5,874
Remove legacy version check for cryptography
{ "avatar_url": "https://avatars.githubusercontent.com/u/58669?v=4", "events_url": "https://api.github.com/users/akx/events{/privacy}", "followers_url": "https://api.github.com/users/akx/followers", "following_url": "https://api.github.com/users/akx/following{/other_user}", "gists_url": "https://api.github.com/users/akx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akx", "id": 58669, "login": "akx", "node_id": "MDQ6VXNlcjU4NjY5", "organizations_url": "https://api.github.com/users/akx/orgs", "received_events_url": "https://api.github.com/users/akx/received_events", "repos_url": "https://api.github.com/users/akx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akx/subscriptions", "type": "User", "url": "https://api.github.com/users/akx", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-07-15T10:55:38Z
2021-10-14T15:00:32Z
2021-07-16T14:49:15Z
NONE
resolved
It's unlikely that someone would be running [a version of cryptography from before June 2016](https://pypi.org/project/cryptography/1.3.3/) these days.
{ "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/5874/reactions" }
https://api.github.com/repos/psf/requests/issues/5874/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5874.diff", "html_url": "https://github.com/psf/requests/pull/5874", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5874.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5874" }
true
[ "Given that CentOS 7 was released in 2014 and many companies use that instead of Ubuntu or RHEL, I'm not entirely certain we can make that assumption", "I think I'm also not inclined to remove this yet. People can still manually reenable PyOpenSSL in requests via urllib3, and this check would still be needed/usef...
https://api.github.com/repos/psf/requests/issues/5873
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5873/labels{/name}
https://api.github.com/repos/psf/requests/issues/5873/comments
https://api.github.com/repos/psf/requests/issues/5873/events
https://github.com/psf/requests/issues/5873
945,116,063
MDU6SXNzdWU5NDUxMTYwNjM=
5,873
Support for Certificate Transparency
{ "avatar_url": "https://avatars.githubusercontent.com/u/1949076?v=4", "events_url": "https://api.github.com/users/RJPercival/events{/privacy}", "followers_url": "https://api.github.com/users/RJPercival/followers", "following_url": "https://api.github.com/users/RJPercival/following{/other_user}", "gists_url": "https://api.github.com/users/RJPercival/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RJPercival", "id": 1949076, "login": "RJPercival", "node_id": "MDQ6VXNlcjE5NDkwNzY=", "organizations_url": "https://api.github.com/users/RJPercival/orgs", "received_events_url": "https://api.github.com/users/RJPercival/received_events", "repos_url": "https://api.github.com/users/RJPercival/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RJPercival/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RJPercival/subscriptions", "type": "User", "url": "https://api.github.com/users/RJPercival", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-15T08:08:44Z
2021-10-13T21:00:41Z
2021-07-15T20:34:03Z
NONE
resolved
[OpenSSL 1.1 supports checking of Signed Certificate Timestamps](https://www.openssl.org/docs/man1.1.0/man7/ct.html) (SCTs) when establishing a TLS connection, but `requests` does not provide a way to enable or configure this. Doing so would allow for a higher degree of security for users that wish to opt into this.
{ "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/5873/reactions" }
https://api.github.com/repos/psf/requests/issues/5873/timeline
null
completed
null
null
false
[ "Requests can't take advantage until this API it's exposed via the standard library `ssl` module. I recommend opening an issue in [Python's issue tracker instead](https://bugs.python.org)." ]
https://api.github.com/repos/psf/requests/issues/5872
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5872/labels{/name}
https://api.github.com/repos/psf/requests/issues/5872/comments
https://api.github.com/repos/psf/requests/issues/5872/events
https://github.com/psf/requests/issues/5872
944,516,999
MDU6SXNzdWU5NDQ1MTY5OTk=
5,872
Failed to establish a new connection: [WinError 10060]
{ "avatar_url": "https://avatars.githubusercontent.com/u/32814992?v=4", "events_url": "https://api.github.com/users/ldc999/events{/privacy}", "followers_url": "https://api.github.com/users/ldc999/followers", "following_url": "https://api.github.com/users/ldc999/following{/other_user}", "gists_url": "https://api.github.com/users/ldc999/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ldc999", "id": 32814992, "login": "ldc999", "node_id": "MDQ6VXNlcjMyODE0OTky", "organizations_url": "https://api.github.com/users/ldc999/orgs", "received_events_url": "https://api.github.com/users/ldc999/received_events", "repos_url": "https://api.github.com/users/ldc999/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ldc999/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ldc999/subscriptions", "type": "User", "url": "https://api.github.com/users/ldc999", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-14T14:58:45Z
2021-07-15T00:08:14Z
2021-07-15T00:08:03Z
NONE
off-topic
Now I have a very difficult problem, I have spent a few days and still have not solved it, I hope to get help ,Thanks. When I request the google map website, I use the 'requests.get' method to report an exception. The request code and exception are as follows: ```python (Single thread) import requests header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', 'Accept': '*/*', 'Connection': 'close', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'zh-CN'} weburl = 'https://www.google.com.hk/maps/search/hospital/@1.26,103.7,12z' response = requests.get(weburl, headers=header, verify=False) ``` Actual Result -->Exception HTTPSConnectionPool(host='www.google.com.hk', port=443): Max retries exceeded with url: /maps/search/hospital/@1.26,103.7,12z (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000026D6189A700>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。')) ## Other info Currently my computer browser can access thew weburl normally. I also changed the parameter weburl value in the code to www.baidu.com, the request can also be successful ## System Information $ python -m requests.help { "chardet": { "version": "4.0.0" }, "charset_normalizer": { "version": "2.0.1" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.4" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.26.0" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.6" }, "using_charset_normalizer": false, "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/5872/reactions" }
https://api.github.com/repos/psf/requests/issues/5872/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/5871
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5871/labels{/name}
https://api.github.com/repos/psf/requests/issues/5871/comments
https://api.github.com/repos/psf/requests/issues/5871/events
https://github.com/psf/requests/issues/5871
944,382,996
MDU6SXNzdWU5NDQzODI5OTY=
5,871
Make chardet/charset_normalizer optional?
{ "avatar_url": "https://avatars.githubusercontent.com/u/58669?v=4", "events_url": "https://api.github.com/users/akx/events{/privacy}", "followers_url": "https://api.github.com/users/akx/followers", "following_url": "https://api.github.com/users/akx/following{/other_user}", "gists_url": "https://api.github.com/users/akx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akx", "id": 58669, "login": "akx", "node_id": "MDQ6VXNlcjU4NjY5", "organizations_url": "https://api.github.com/users/akx/orgs", "received_events_url": "https://api.github.com/users/akx/received_events", "repos_url": "https://api.github.com/users/akx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akx/subscriptions", "type": "User", "url": "https://api.github.com/users/akx", "user_view_type": "public" }
[ { "color": "02e10c", "default": false, "description": null, "id": 76800, "name": "Feature Request", "node_id": "MDU6TGFiZWw3NjgwMA==", "url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request" } ]
open
true
null
[]
null
23
2021-07-14T12:34:54Z
2022-01-13T16:35:47Z
null
NONE
off-topic
With a routine version bump of requirements, I noticed `chardet` had been switched out for `charset_normalizer` (which I had never heard of before) in #5797, apparently due to LGPL license concerns. I agree with @sigmavirus24's comment https://github.com/psf/requests/pull/5797#issuecomment-875158955 that it's strange for something as central in the Python ecosystem as `requests` is (45k stars, 8k forks, many contributors at the time of writing) to switch to such a relatively unknown and unproven library (132 stars, 5 forks, 2 contributors) for a _hard_ dependency in something as central in the Python ecosystem as `requests` is. The release notes say you could use `pip install "requests[use_chardet_on_py3]"` to use `chardet` instead of `charset_normalizer`, but with that extra set both libraries get installed. I would imagine many users don't really necessarily need the charset detection features in Requests; could we open a discussion on making both `chardet`/`charset_normalizer` optional, á la `requests[chardet]` or `requests[charset_normalizer]`? AFAICS, the only place where `chardet` is actually used in `requests` is `Response.apparent_encoding`, which is used by `Response.text` when there is no determined encoding. Maybe `apparent_encoding` could try to 1. as a built-in first attempt, try decoding the content as UTF-8 (which would likely be successful for many cases) 2. if neither `chardet` or `charset_normalizer` is installed, warn the user ("No encoding detection library is installed. Falling back to XXXX. Please see YYYY for instructions" or somesuch) and return e.g. `ascii` 3. use either chardet library as per usual
null
{ "+1": 8, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 8, "url": "https://api.github.com/repos/psf/requests/issues/5871/reactions" }
https://api.github.com/repos/psf/requests/issues/5871/timeline
null
null
null
null
false
[ "`apparent_encoding` genuinely just needs to go away. That can't be done until a major release. Once that happens, we don't need dependencies on either library", "Hi @akx \r\n\r\nHopefully, this change will benefit the people who actually depend on charset detection.", "`charset_normalizer` cannot correctly han...
https://api.github.com/repos/psf/requests/issues/5870
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5870/labels{/name}
https://api.github.com/repos/psf/requests/issues/5870/comments
https://api.github.com/repos/psf/requests/issues/5870/events
https://github.com/psf/requests/issues/5870
943,477,971
MDU6SXNzdWU5NDM0Nzc5NzE=
5,870
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
{ "avatar_url": "https://avatars.githubusercontent.com/u/50236306?v=4", "events_url": "https://api.github.com/users/edikiuspro/events{/privacy}", "followers_url": "https://api.github.com/users/edikiuspro/followers", "following_url": "https://api.github.com/users/edikiuspro/following{/other_user}", "gists_url": "https://api.github.com/users/edikiuspro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/edikiuspro", "id": 50236306, "login": "edikiuspro", "node_id": "MDQ6VXNlcjUwMjM2MzA2", "organizations_url": "https://api.github.com/users/edikiuspro/orgs", "received_events_url": "https://api.github.com/users/edikiuspro/received_events", "repos_url": "https://api.github.com/users/edikiuspro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/edikiuspro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edikiuspro/subscriptions", "type": "User", "url": "https://api.github.com/users/edikiuspro", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-13T14:32:25Z
2021-10-11T16:00:28Z
2021-07-13T15:14:18Z
NONE
resolved
My code: import requests from bs4 import BeautifulSoup as BS s = requests.Session() s.verify=False auth_html=s.get(url='https://wnioski.mazowieckie.pl/MuwWsc/pl/') auth_bs=BS(auth_html.content,"html.parser") csrf=auth_bs.select("input[name=__RequestVerificationToken]")[0]['value'] print(csrf) Error code: Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn conn.connect() File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connection.py", line 411, in connect self.sock = ssl_wrap_socket( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() FileNotFoundError: [Errno 2] No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 755, in urlopen retries = retries.increment( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\util\retry.py", line 531, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\packages\six.py", line 734, in reraise raise value.with_traceback(tb) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn conn.connect() File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\connection.py", line 411, in connect self.sock = ssl_wrap_socket( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Admin\OneDrive\parser.py", line 5, in <module> auth_html=s.get(url='https://wnioski.mazowieckie.pl/MuwWsc/pl/') File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
{ "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/5870/reactions" }
https://api.github.com/repos/psf/requests/issues/5870/timeline
null
completed
null
null
false
[ "Hi @edikiuspro, this is an issue with your Python installation. The standard library SSL module is throwing the `No such file or directory` error. We unfortunately can't provide assistance with that. We'd recommend posting on StackOverflow.com with any further debugging questions, as we try to reserve this tracker...
https://api.github.com/repos/psf/requests/issues/5869
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5869/labels{/name}
https://api.github.com/repos/psf/requests/issues/5869/comments
https://api.github.com/repos/psf/requests/issues/5869/events
https://github.com/psf/requests/pull/5869
941,754,612
MDExOlB1bGxSZXF1ZXN0Njg3NTgxMzYz
5,869
Stop abusing pytest-httpbin to test commonName support
{ "avatar_url": "https://avatars.githubusercontent.com/u/42327?v=4", "events_url": "https://api.github.com/users/pquentin/events{/privacy}", "followers_url": "https://api.github.com/users/pquentin/followers", "following_url": "https://api.github.com/users/pquentin/following{/other_user}", "gists_url": "https://api.github.com/users/pquentin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pquentin", "id": 42327, "login": "pquentin", "node_id": "MDQ6VXNlcjQyMzI3", "organizations_url": "https://api.github.com/users/pquentin/orgs", "received_events_url": "https://api.github.com/users/pquentin/received_events", "repos_url": "https://api.github.com/users/pquentin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pquentin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pquentin/subscriptions", "type": "User", "url": "https://api.github.com/users/pquentin", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-12T07:24:18Z
2021-10-11T07:00:32Z
2021-07-12T14:44:44Z
CONTRIBUTOR
resolved
pytest-httpbin<1.0 ships with a server certificate with a commonName but no subjectAltName. urllib3 2.0 will stop supporting those in the future, so we want to upgrade pytest-httpbin. Unfortunately, `test_https_warnings` was relying on this broken certificate. With this change, we use `trustme` to create a broken certificate specifically for this test, so that we can upgrade pytest-httpbin and make sure that other tests relying on httpbin TLS support will continue to work with urllib3 2.0. Closes #5530
{ "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/5869/reactions" }
https://api.github.com/repos/psf/requests/issues/5869/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5869.diff", "html_url": "https://github.com/psf/requests/pull/5869", "merged_at": "2021-07-12T14:44:43Z", "patch_url": "https://github.com/psf/requests/pull/5869.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5869" }
true
[ "You can see the tests passing in my fork: https://github.com/pquentin/requests/actions/runs/1021954813" ]
https://api.github.com/repos/psf/requests/issues/5868
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5868/labels{/name}
https://api.github.com/repos/psf/requests/issues/5868/comments
https://api.github.com/repos/psf/requests/issues/5868/events
https://github.com/psf/requests/pull/5868
941,023,478
MDExOlB1bGxSZXF1ZXN0Njg3MDAzOTI3
5,868
v2.26.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-09T19:45:56Z
2021-10-11T15:00:34Z
2021-07-13T14:52:02Z
MEMBER
resolved
2.26.0 (2021-07-13) ------------------- **Improvements** - Requests now supports Brotli compression, if either the `brotli` or `brotlicffi` package is installed. (#5783) - `Session.send` now correctly resolves proxy configurations from both the Session and Request. Behavior now matches `Session.request`. (#5681) **Bugfixes** - Fixed a race condition in zip extraction when using Requests in parallel from zip archive. (#5707) **Dependencies** - Instead of `chardet`, use the MIT-licensed `charset_normalizer` for Python3 to remove license ambiguity for projects bundling requests. If `chardet` is already installed on your machine it will be used instead of `charset_normalizer` to keep backwards compatibility. (#5797) You can also install `chardet` while installing requests by specifying `[use_chardet_on_py3]` extra as follows: ```shell pip install "requests[use_chardet_on_py3]" ``` Note that installation of `chardet` in your environment through any means will disable use of `charset_normalizer`. Python 2.7 still depends upon the `chardet` module. - Requests now supports `idna` 3.x on Python 3. `idna` 2.x will continue to be used on Python 2 installations. (#5711) **Deprecations** - The `requests[security]` extra has been converted to a no-op install. PyOpenSSL is no longer the recommended secure option for Requests. (#5867) - Requests has officially dropped support for Python 3.5. (#5867)
{ "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": 2, "-1": 0, "confused": 0, "eyes": 1, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 1, "total_count": 5, "url": "https://api.github.com/repos/psf/requests/issues/5868/reactions" }
https://api.github.com/repos/psf/requests/issues/5868/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5868.diff", "html_url": "https://github.com/psf/requests/pull/5868", "merged_at": "2021-07-13T14:52:02Z", "patch_url": "https://github.com/psf/requests/pull/5868.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5868" }
true
[ "Yep, great call out. I'll get that added." ]
https://api.github.com/repos/psf/requests/issues/5867
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5867/labels{/name}
https://api.github.com/repos/psf/requests/issues/5867/comments
https://api.github.com/repos/psf/requests/issues/5867/events
https://github.com/psf/requests/pull/5867
941,004,437
MDExOlB1bGxSZXF1ZXN0Njg2OTg3OTA4
5,867
Disable requests[security] and remove 3.5 support references
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-09T19:09:52Z
2021-10-07T20:00:26Z
2021-07-09T19:40:55Z
MEMBER
resolved
## requests[security] This PR will remove functionality from the `requests[security]` extra. We initially removed default support for PyOpenSSL in Requests 2.24.0 (#5443) as it is now considered less secure. Deprecation of the `extras_require` was announced in [Requests 2.25.0](https://github.com/psf/requests/blob/master/HISTORY.md#2250-2020-11-11) and we're officially removing the `extras_require` functionality in Requests 2.26.0. Projects currently using `requests[security]` after this change will continue to operate as if performing a standard requests installation (secure by default). While not recommended, if PyOpenSSL support is still a requirement in your project, you may install `urllib3[secure]` and add `urllib3.contrib.pyopenssl.inject_into_urllib3()` to your code to re-enable the functionality. ## Python 3.5 Support We will also be removing support for Python 3.5 in Requests 2.26.0 as announced in the [2.25.0 release notes](https://github.com/psf/requests/blob/master/HISTORY.md#2250-2020-11-11).
{ "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/5867/reactions" }
https://api.github.com/repos/psf/requests/issues/5867/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5867.diff", "html_url": "https://github.com/psf/requests/pull/5867", "merged_at": "2021-07-09T19:40:55Z", "patch_url": "https://github.com/psf/requests/pull/5867.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5867" }
true
[]
https://api.github.com/repos/psf/requests/issues/5866
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5866/labels{/name}
https://api.github.com/repos/psf/requests/issues/5866/comments
https://api.github.com/repos/psf/requests/issues/5866/events
https://github.com/psf/requests/issues/5866
940,846,161
MDU6SXNzdWU5NDA4NDYxNjE=
5,866
Request to link-local IPv6 address of service not listening for IPv6 tries all network interfaces, fails five times for each
{ "avatar_url": "https://avatars.githubusercontent.com/u/87194087?v=4", "events_url": "https://api.github.com/users/origin400-p/events{/privacy}", "followers_url": "https://api.github.com/users/origin400-p/followers", "following_url": "https://api.github.com/users/origin400-p/following{/other_user}", "gists_url": "https://api.github.com/users/origin400-p/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/origin400-p", "id": 87194087, "login": "origin400-p", "node_id": "MDQ6VXNlcjg3MTk0MDg3", "organizations_url": "https://api.github.com/users/origin400-p/orgs", "received_events_url": "https://api.github.com/users/origin400-p/received_events", "repos_url": "https://api.github.com/users/origin400-p/repos", "site_admin": false, "starred_url": "https://api.github.com/users/origin400-p/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/origin400-p/subscriptions", "type": "User", "url": "https://api.github.com/users/origin400-p", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-09T15:04:53Z
2021-10-11T12:00:21Z
2021-07-13T11:25:36Z
NONE
resolved
Summary. ## Expected Result Something more like what cURL does, trying the primary/first interface in the list, failing, then reverting to IPv4. ## Actual Result Requests tries each networking interface shown by the Windows ipconfig command (three in my case) on the link-local IPv6 address. Since the service in question isn't listening for IPv6, the TCP connection fails, and Requests tries again four more times before moving on to the next interface's link-local IPv6 address, which proceeds the same. Each interface takes about 2 seconds to get through this, taking six seconds in total before falling back to IPv4, which succeeds. ## Reproduction Steps ```python import requests r =requests.get('http://hostname-with-link-local-IPv6-address:8001/') ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.1" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.26.6" }, "using_pyopenssl": false } ``` This is using Python 3.8.1 on Windows 10 x64 Version 21H1 (OS Build 19043.1052). Running ipconfig shows three interfaces: one Ethernet, and two VMware Network Adapters. The following Wireshark transcript (with anonymized link-local addresses and port number; 8001 is not the actual port I'm using) shows the three sets of failed IPv6 sessions and eventual fallback to IPv4. ``` 1 0.000000 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 55447 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 2 0.000017 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 55447 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 3 0.504934 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 [TCP Retransmission] 55447 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 4 0.504960 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 55447 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 5 1.016384 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 [TCP Retransmission] 55447 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 6 1.016426 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 55447 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 7 1.525929 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 [TCP Retransmission] 55447 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 8 1.525955 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 55447 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 9 2.035264 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 [TCP Retransmission] 55447 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 10 2.035294 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 55447 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 11 2.035705 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 76 55454 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 12 2.035717 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 64 8001 → 55454 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 13 2.541853 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 76 [TCP Retransmission] 55454 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 14 2.541872 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 64 8001 → 55454 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 15 3.049899 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 76 [TCP Retransmission] 55454 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 16 3.049927 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 64 8001 → 55454 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 17 3.562027 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 76 [TCP Retransmission] 55454 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 18 3.562048 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 64 8001 → 55454 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 19 4.071151 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 76 [TCP Retransmission] 55454 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 20 4.071187 2001:db8::8a2e:370:7335 2001:db8::8a2e:370:7335 TCP 64 8001 → 55454 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 21 4.071510 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 76 55456 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 22 4.071522 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 64 8001 → 55456 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 23 4.584244 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 76 [TCP Retransmission] 55456 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 24 4.584271 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 64 8001 → 55456 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 25 5.094989 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 76 [TCP Retransmission] 55456 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 26 5.095010 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 64 8001 → 55456 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 27 5.604492 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 76 [TCP Retransmission] 55456 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 28 5.604510 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 64 8001 → 55456 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 29 6.113265 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 76 [TCP Retransmission] 55456 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 30 6.113289 2001:db8::8a2e:370:7336 2001:db8::8a2e:370:7336 TCP 64 8001 → 55456 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 31 6.113658 172.16.254.1 172.16.254.1 TCP 56 55457 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM=1 32 6.113710 172.16.254.1 172.16.254.1 TCP 56 8001 → 55457 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM=1 33 6.113771 172.16.254.1 172.16.254.1 TCP 44 55457 → 8001 [ACK] Seq=1 Ack=1 Win=2619648 Len=0 34 6.113800 172.16.254.1 172.16.254.1 HTTP 207 GET / HTTP/1.1 35 6.113825 172.16.254.1 172.16.254.1 TCP 44 8001 → 55457 [ACK] Seq=1 Ack=164 Win=2619648 Len=0 36 6.122350 172.16.254.1 172.16.254.1 TCP 203 8001 → 55457 [PSH, ACK] Seq=1 Ack=164 Win=2619648 Len=159 [TCP segment of a reassembled PDU] 37 6.122374 172.16.254.1 172.16.254.1 TCP 44 55457 → 8001 [ACK] Seq=164 Ack=160 Win=2619392 Len=0 38 6.122415 172.16.254.1 172.16.254.1 HTTP 67 HTTP/1.1 200 OK (text/html) 39 6.122425 172.16.254.1 172.16.254.1 TCP 44 55457 → 8001 [ACK] Seq=164 Ack=183 Win=2619392 Len=0 40 6.123083 172.16.254.1 172.16.254.1 TCP 44 55457 → 8001 [FIN, ACK] Seq=164 Ack=183 Win=2619392 Len=0 41 6.123103 172.16.254.1 172.16.254.1 TCP 44 8001 → 55457 [ACK] Seq=183 Ack=165 Win=2619648 Len=0 42 6.128661 172.16.254.1 172.16.254.1 TCP 44 8001 → 55457 [FIN, ACK] Seq=183 Ack=165 Win=2619648 Len=0 43 6.128714 172.16.254.1 172.16.254.1 TCP 44 55457 → 8001 [ACK] Seq=165 Ack=184 Win=2619392 Len=0 ``` In contrast, cURL tries only the Ethernet interface, fails once, and rapidly falls back to IPv4. ``` 1 0.000000 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 76 56252 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65475 WS=256 SACK_PERM=1 2 0.000015 2001:db8::8a2e:370:7334 2001:db8::8a2e:370:7334 TCP 64 8001 → 56252 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 3 0.211071 10.1.211.231 10.1.211.231 TCP 56 56253 → 8001 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM=1 4 0.211142 10.1.211.231 10.1.211.231 TCP 56 8001 → 56253 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM=1 5 0.211183 10.1.211.231 10.1.211.231 TCP 44 56253 → 8001 [ACK] Seq=1 Ack=1 Win=2619648 Len=0 6 0.211364 10.1.211.231 10.1.211.231 HTTP 140 GET / HTTP/1.1 7 0.211387 10.1.211.231 10.1.211.231 TCP 44 8001 → 56253 [ACK] Seq=1 Ack=97 Win=2619648 Len=0 8 0.218706 172.16.254.1 10.1.211.231 TCP 203 8001 → 56253 [PSH, ACK] Seq=1 Ack=97 Win=2619648 Len=159 [TCP segment of a reassembled PDU] 9 0.218733 10.1.211.231 10.1.211.231 TCP 44 56253 → 8001 [ACK] Seq=97 Ack=160 Win=2619392 Len=0 10 0.218777 10.1.211.231 10.1.211.231 HTTP 67 HTTP/1.1 200 OK (text/html) 11 0.218789 10.1.211.231 10.1.211.231 TCP 44 56253 → 8001 [ACK] Seq=97 Ack=183 Win=2619392 Len=0 12 0.219077 10.1.211.231 10.1.211.231 TCP 44 56253 → 8001 [FIN, ACK] Seq=97 Ack=183 Win=2619392 Len=0 13 0.219096 10.1.211.231 10.1.211.231 TCP 44 8001 → 56253 [ACK] Seq=183 Ack=98 Win=2619648 Len=0 14 0.226608 10.1.211.231 10.1.211.231 TCP 44 8001 → 56253 [FIN, ACK] Seq=183 Ack=98 Win=2619648 Len=0 15 0.226679 10.1.211.231 10.1.211.231 TCP 44 56253 → 8001 [ACK] Seq=98 Ack=184 Win=2619392 Len=0 ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/87194087?v=4", "events_url": "https://api.github.com/users/origin400-p/events{/privacy}", "followers_url": "https://api.github.com/users/origin400-p/followers", "following_url": "https://api.github.com/users/origin400-p/following{/other_user}", "gists_url": "https://api.github.com/users/origin400-p/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/origin400-p", "id": 87194087, "login": "origin400-p", "node_id": "MDQ6VXNlcjg3MTk0MDg3", "organizations_url": "https://api.github.com/users/origin400-p/orgs", "received_events_url": "https://api.github.com/users/origin400-p/received_events", "repos_url": "https://api.github.com/users/origin400-p/repos", "site_admin": false, "starred_url": "https://api.github.com/users/origin400-p/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/origin400-p/subscriptions", "type": "User", "url": "https://api.github.com/users/origin400-p", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5866/reactions" }
https://api.github.com/repos/psf/requests/issues/5866/timeline
null
completed
null
null
false
[ "This isn't a bug in requests, it also happens using other methods so it's a bug somewhere in Python itself, at least on Windows." ]
https://api.github.com/repos/psf/requests/issues/5865
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5865/labels{/name}
https://api.github.com/repos/psf/requests/issues/5865/comments
https://api.github.com/repos/psf/requests/issues/5865/events
https://github.com/psf/requests/issues/5865
940,629,364
MDU6SXNzdWU5NDA2MjkzNjQ=
5,865
How to set requests to use ipv4 by default?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1451096?v=4", "events_url": "https://api.github.com/users/demonguy/events{/privacy}", "followers_url": "https://api.github.com/users/demonguy/followers", "following_url": "https://api.github.com/users/demonguy/following{/other_user}", "gists_url": "https://api.github.com/users/demonguy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/demonguy", "id": 1451096, "login": "demonguy", "node_id": "MDQ6VXNlcjE0NTEwOTY=", "organizations_url": "https://api.github.com/users/demonguy/orgs", "received_events_url": "https://api.github.com/users/demonguy/received_events", "repos_url": "https://api.github.com/users/demonguy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/demonguy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/demonguy/subscriptions", "type": "User", "url": "https://api.github.com/users/demonguy", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-09T10:20:25Z
2021-10-08T19:00:27Z
2021-07-10T19:00:08Z
NONE
resolved
When i tried to use `requests.get("www.google.com")` and it hangs for 3 minutes and then succeed. after debug i found it connect to ipv6 address first and then tries to ipv4. So far i use `timeout=3` to force ipv6 try to timeout ASAP. but it's tricky. is there anyway to make it use ipv4 by default?
{ "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/5865/reactions" }
https://api.github.com/repos/psf/requests/issues/5865/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/5864
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5864/labels{/name}
https://api.github.com/repos/psf/requests/issues/5864/comments
https://api.github.com/repos/psf/requests/issues/5864/events
https://github.com/psf/requests/pull/5864
940,160,126
MDExOlB1bGxSZXF1ZXN0Njg2MjczMzM3
5,864
More Options To Run Example Code
{ "avatar_url": "https://avatars.githubusercontent.com/u/61983321?v=4", "events_url": "https://api.github.com/users/jameskaggwa/events{/privacy}", "followers_url": "https://api.github.com/users/jameskaggwa/followers", "following_url": "https://api.github.com/users/jameskaggwa/following{/other_user}", "gists_url": "https://api.github.com/users/jameskaggwa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jameskaggwa", "id": 61983321, "login": "jameskaggwa", "node_id": "MDQ6VXNlcjYxOTgzMzIx", "organizations_url": "https://api.github.com/users/jameskaggwa/orgs", "received_events_url": "https://api.github.com/users/jameskaggwa/received_events", "repos_url": "https://api.github.com/users/jameskaggwa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jameskaggwa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jameskaggwa/subscriptions", "type": "User", "url": "https://api.github.com/users/jameskaggwa", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-08T19:34:17Z
2021-10-07T18:00:30Z
2021-07-09T17:51:38Z
NONE
resolved
#### Making the example code sample available as a copy and paste and then run in any exiting python file.
{ "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/5864/reactions" }
https://api.github.com/repos/psf/requests/issues/5864/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5864.diff", "html_url": "https://github.com/psf/requests/pull/5864", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5864.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5864" }
true
[ "Hi @jameskaggwa, thanks for contributing to Requests! Unfortunately, I don't think we'll accept this PR at this time. We expect a basic level of Python knowledge with the docs, so understanding writing code in a file vs in the interpreter is assumed. Otherwise, the docs become significantly bloated and more diffic...
https://api.github.com/repos/psf/requests/issues/5863
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5863/labels{/name}
https://api.github.com/repos/psf/requests/issues/5863/comments
https://api.github.com/repos/psf/requests/issues/5863/events
https://github.com/psf/requests/issues/5863
940,045,305
MDU6SXNzdWU5NDAwNDUzMDU=
5,863
Empty space when using GET
{ "avatar_url": "https://avatars.githubusercontent.com/u/59108437?v=4", "events_url": "https://api.github.com/users/Aethese/events{/privacy}", "followers_url": "https://api.github.com/users/Aethese/followers", "following_url": "https://api.github.com/users/Aethese/following{/other_user}", "gists_url": "https://api.github.com/users/Aethese/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Aethese", "id": 59108437, "login": "Aethese", "node_id": "MDQ6VXNlcjU5MTA4NDM3", "organizations_url": "https://api.github.com/users/Aethese/orgs", "received_events_url": "https://api.github.com/users/Aethese/received_events", "repos_url": "https://api.github.com/users/Aethese/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Aethese/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Aethese/subscriptions", "type": "User", "url": "https://api.github.com/users/Aethese", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-08T16:48:09Z
2021-10-06T19:00:27Z
2021-07-08T18:18:44Z
NONE
resolved
I am trying to use GET to get current code for a project of mine to have an auto update system, but whenever I GET the latest latest code (raw github file) it adds blank lines in between lines of code, for example: ``` def clear(): os.system('cls' if os.name =='nt' else 'clear') clear() ``` It is adding unnecessary lines in between everything when their is none in the code. My code is: ``` import requests, time ask = input('Would you like to update to the latest version of Switchence? ') if ask == 'y' or ask == 'yes': print('Ok, updating...') try: onlineVersion = requests.get('https://raw.githubusercontent.com/Aethese/Switchence/main/main.py') if onlineVersion.status_code != 200: print(f'[ERROR] status code is not 200, it is {onlineVersion.status_code}') time.sleep(5) else: onlineVersion = onlineVersion.text with open('autoupdate.py', 'w') as file: file.write(onlineVersion) print('Successfully updated to latest version! Rerun the program to use the newest version!') time.sleep(5) except Exception as error: print(f'Couldn\'t get latest latest update | {error}') time.sleep(5) elif ask == 'n' or ask == 'no': print('Ok, you will not update to the latest version') time.sleep(5) else: print('The only acceptable answers are Yes or No') time.sleep(5) ``` Can someone help me or explain to me why my code won't work? I am running latest pip version of requests.
{ "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/5863/reactions" }
https://api.github.com/repos/psf/requests/issues/5863/timeline
null
completed
null
null
false
[ "This question is likely more suited for StackOverflow as there probably isn't a defect in Requests causing your issue. Please reserve this issue tracker for defects in Requests." ]
https://api.github.com/repos/psf/requests/issues/5861
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5861/labels{/name}
https://api.github.com/repos/psf/requests/issues/5861/comments
https://api.github.com/repos/psf/requests/issues/5861/events
https://github.com/psf/requests/issues/5861
939,668,280
MDU6SXNzdWU5Mzk2NjgyODA=
5,861
http redirection found that the authentication is missing
{ "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
2021-07-08T09:37:07Z
2021-10-06T11:00:22Z
2021-07-08T10:55:22Z
NONE
resolved
Summary. I find a problem , if http is redirected . auth is missing ```python if 'Authorization' in headers and self.should_strip_auth(response.request.url, url): # If we get redirected to a new host, we should strip out any # authentication headers. del headers['Authorization'] ```
{ "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/5861/reactions" }
https://api.github.com/repos/psf/requests/issues/5861/timeline
null
completed
null
null
false
[ "Yes that's on purpose. You can find the reasoning why in our documentation and in our issue tracker" ]
https://api.github.com/repos/psf/requests/issues/5860
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5860/labels{/name}
https://api.github.com/repos/psf/requests/issues/5860/comments
https://api.github.com/repos/psf/requests/issues/5860/events
https://github.com/psf/requests/pull/5860
938,529,554
MDExOlB1bGxSZXF1ZXN0Njg0ODk4MTcw
5,860
Document de-duplication of keys for params and data
{ "avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4", "events_url": "https://api.github.com/users/verhovsky/events{/privacy}", "followers_url": "https://api.github.com/users/verhovsky/followers", "following_url": "https://api.github.com/users/verhovsky/following{/other_user}", "gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/verhovsky", "id": 5687998, "login": "verhovsky", "node_id": "MDQ6VXNlcjU2ODc5OTg=", "organizations_url": "https://api.github.com/users/verhovsky/orgs", "received_events_url": "https://api.github.com/users/verhovsky/received_events", "repos_url": "https://api.github.com/users/verhovsky/repos", "site_admin": false, "starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions", "type": "User", "url": "https://api.github.com/users/verhovsky", "user_view_type": "public" }
[]
open
false
null
[]
null
0
2021-07-07T06:17:40Z
2022-06-11T06:26:05Z
null
CONTRIBUTOR
null
and format the files dict format correctly
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/5860/reactions" }
https://api.github.com/repos/psf/requests/issues/5860/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5860.diff", "html_url": "https://github.com/psf/requests/pull/5860", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5860.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5860" }
true
[]
https://api.github.com/repos/psf/requests/issues/5859
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5859/labels{/name}
https://api.github.com/repos/psf/requests/issues/5859/comments
https://api.github.com/repos/psf/requests/issues/5859/events
https://github.com/psf/requests/pull/5859
938,219,180
MDExOlB1bGxSZXF1ZXN0Njg0NjQ0NDIw
5,859
✅ Fix the tests suite on master by pinning Flask
{ "avatar_url": "https://avatars.githubusercontent.com/u/9326700?v=4", "events_url": "https://api.github.com/users/Ousret/events{/privacy}", "followers_url": "https://api.github.com/users/Ousret/followers", "following_url": "https://api.github.com/users/Ousret/following{/other_user}", "gists_url": "https://api.github.com/users/Ousret/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Ousret", "id": 9326700, "login": "Ousret", "node_id": "MDQ6VXNlcjkzMjY3MDA=", "organizations_url": "https://api.github.com/users/Ousret/orgs", "received_events_url": "https://api.github.com/users/Ousret/received_events", "repos_url": "https://api.github.com/users/Ousret/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Ousret/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ousret/subscriptions", "type": "User", "url": "https://api.github.com/users/Ousret", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-06T20:04:55Z
2021-10-04T21:00:28Z
2021-07-06T20:39:50Z
CONTRIBUTOR
resolved
httpbin does not limit Flask version. Latest 2.0 brings BC-break on the tests suite. This is a temporary fix. Waiting upon further investigation.
{ "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/5859/reactions" }
https://api.github.com/repos/psf/requests/issues/5859/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5859.diff", "html_url": "https://github.com/psf/requests/pull/5859", "merged_at": "2021-07-06T20:39:50Z", "patch_url": "https://github.com/psf/requests/pull/5859.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5859" }
true
[]
https://api.github.com/repos/psf/requests/issues/5858
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5858/labels{/name}
https://api.github.com/repos/psf/requests/issues/5858/comments
https://api.github.com/repos/psf/requests/issues/5858/events
https://github.com/psf/requests/pull/5858
938,165,348
MDExOlB1bGxSZXF1ZXN0Njg0NTk5MTU3
5,858
<removed>
{ "avatar_url": "https://avatars.githubusercontent.com/u/59779640?v=4", "events_url": "https://api.github.com/users/thiago1993/events{/privacy}", "followers_url": "https://api.github.com/users/thiago1993/followers", "following_url": "https://api.github.com/users/thiago1993/following{/other_user}", "gists_url": "https://api.github.com/users/thiago1993/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/thiago1993", "id": 59779640, "login": "thiago1993", "node_id": "MDQ6VXNlcjU5Nzc5NjQw", "organizations_url": "https://api.github.com/users/thiago1993/orgs", "received_events_url": "https://api.github.com/users/thiago1993/received_events", "repos_url": "https://api.github.com/users/thiago1993/repos", "site_admin": false, "starred_url": "https://api.github.com/users/thiago1993/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/thiago1993/subscriptions", "type": "User", "url": "https://api.github.com/users/thiago1993", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-07-06T18:45:34Z
2021-07-06T18:55:52Z
2021-07-06T18:55:37Z
NONE
spam
POP
{ "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/5858/reactions" }
https://api.github.com/repos/psf/requests/issues/5858/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5858.diff", "html_url": "https://github.com/psf/requests/pull/5858", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5858.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5858" }
true
[]
https://api.github.com/repos/psf/requests/issues/5857
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5857/labels{/name}
https://api.github.com/repos/psf/requests/issues/5857/comments
https://api.github.com/repos/psf/requests/issues/5857/events
https://github.com/psf/requests/pull/5857
936,836,671
MDExOlB1bGxSZXF1ZXN0NjgzNDg0NzIw
5,857
Fix calling get_connection() with a positional argument when it is optional
{ "avatar_url": "https://avatars.githubusercontent.com/u/2033598?v=4", "events_url": "https://api.github.com/users/BoboTiG/events{/privacy}", "followers_url": "https://api.github.com/users/BoboTiG/followers", "following_url": "https://api.github.com/users/BoboTiG/following{/other_user}", "gists_url": "https://api.github.com/users/BoboTiG/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/BoboTiG", "id": 2033598, "login": "BoboTiG", "node_id": "MDQ6VXNlcjIwMzM1OTg=", "organizations_url": "https://api.github.com/users/BoboTiG/orgs", "received_events_url": "https://api.github.com/users/BoboTiG/received_events", "repos_url": "https://api.github.com/users/BoboTiG/repos", "site_admin": false, "starred_url": "https://api.github.com/users/BoboTiG/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BoboTiG/subscriptions", "type": "User", "url": "https://api.github.com/users/BoboTiG", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2021-07-05T08:32:16Z
2021-10-05T08:00:35Z
2021-07-06T11:33:30Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5857/reactions" }
https://api.github.com/repos/psf/requests/issues/5857/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5857.diff", "html_url": "https://github.com/psf/requests/pull/5857", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5857.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5857" }
true
[ "This says it's fixing something, but it's not strictly necessary and there's no context for why you feel this to be necessary. Can you elaborate?", "Oh sorry for the lack of details, it seems I closed my computer without having filled the description...\r\n\r\nI subclassed the `HTTPAdapter` class, here is the re...
https://api.github.com/repos/psf/requests/issues/5856
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5856/labels{/name}
https://api.github.com/repos/psf/requests/issues/5856/comments
https://api.github.com/repos/psf/requests/issues/5856/events
https://github.com/psf/requests/pull/5856
936,327,390
MDExOlB1bGxSZXF1ZXN0NjgzMDc4MDU4
5,856
Fix inconsistent exception type in response.json() method
{ "avatar_url": "https://avatars.githubusercontent.com/u/86739818?v=4", "events_url": "https://api.github.com/users/steveberdy/events{/privacy}", "followers_url": "https://api.github.com/users/steveberdy/followers", "following_url": "https://api.github.com/users/steveberdy/following{/other_user}", "gists_url": "https://api.github.com/users/steveberdy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/steveberdy", "id": 86739818, "login": "steveberdy", "node_id": "MDQ6VXNlcjg2NzM5ODE4", "organizations_url": "https://api.github.com/users/steveberdy/orgs", "received_events_url": "https://api.github.com/users/steveberdy/received_events", "repos_url": "https://api.github.com/users/steveberdy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/steveberdy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/steveberdy/subscriptions", "type": "User", "url": "https://api.github.com/users/steveberdy", "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" }
8
2021-07-03T21:08:32Z
2021-12-01T08:00:28Z
2021-07-26T15:56:44Z
CONTRIBUTOR
resolved
## Summary Fixes the inconsistency of errors thrown in the `response.json()` method in `models.py`, while preserving backwards compatibility. ### What we used to have Depending on whether or not `simplejson` was installed in the user's library, and whether the user was running Python 3+ versus Python 2, a different exception would get thrown when there was an issue with decoding response text as JSON. If `simplejson` was installed, `simplejson.JSONDecodeError` would get thrown. If not, `json.JSONDecodeError` would get thrown for Python 3+ users, and `ValueError` for Python 2 users. Thus, depending on the scenario, users would find themselves having to catch either `simplejson.JSONDecodeError`, `json.JSONDecodeError`, or `ValueError` in the case of the `response.json()` method failing. This inconsistency is not ideal. ### What we have now There is now one error class in `exceptions.py` that will represent all errors that can be thrown or caught in the `response.json()` method: `requests.JSONDecodeError`. All `simplejson` functionality was replaced with `json` functionality, but the new error type aliases both `json.JSONDecodeError` and `simplejson.JSONDecodeError`. If `simplejson` is not installed, its `JSONDecodError` is replaced with a plain `Exception` when aliased. If the user is running Python 3+, `json.JSONDecodeError` is aliased, but if the user is running Python 2, that is replaced with `ValueError` when aliased, as the `JSONDecodeError` was not previously a part of the `json` library. Now, all five error types, `json.JSONDecodeError`, `simplejson.JSONDecodeError`, `ValueError`, and `requests.JSONDecodeError` and its parent class `requests.RequestException`, will be caught from the `requests.JSONDecodeError` that will be raised. Fixes #5794 @sigmavirus24
{ "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/5856/reactions" }
https://api.github.com/repos/psf/requests/issues/5856/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5856.diff", "html_url": "https://github.com/psf/requests/pull/5856", "merged_at": "2021-07-26T15:56:44Z", "patch_url": "https://github.com/psf/requests/pull/5856.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5856" }
true
[ "Same issues with Python 2 again. Is that normal?", "@steveberdy Please refer to my previous comments in the code review. Your current approach isn't going to work in Python 2. I'd recommend using your exception resolution in compat.py to handle this. I think there are also some outstanding comments that are stil...
https://api.github.com/repos/psf/requests/issues/5855
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5855/labels{/name}
https://api.github.com/repos/psf/requests/issues/5855/comments
https://api.github.com/repos/psf/requests/issues/5855/events
https://github.com/psf/requests/issues/5855
935,297,900
MDU6SXNzdWU5MzUyOTc5MDA=
5,855
proxy URLs without schemes break under Python 3.9
{ "avatar_url": "https://avatars.githubusercontent.com/u/46406?v=4", "events_url": "https://api.github.com/users/leifwalsh/events{/privacy}", "followers_url": "https://api.github.com/users/leifwalsh/followers", "following_url": "https://api.github.com/users/leifwalsh/following{/other_user}", "gists_url": "https://api.github.com/users/leifwalsh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leifwalsh", "id": 46406, "login": "leifwalsh", "node_id": "MDQ6VXNlcjQ2NDA2", "organizations_url": "https://api.github.com/users/leifwalsh/orgs", "received_events_url": "https://api.github.com/users/leifwalsh/received_events", "repos_url": "https://api.github.com/users/leifwalsh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leifwalsh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leifwalsh/subscriptions", "type": "User", "url": "https://api.github.com/users/leifwalsh", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
true
null
[]
{ "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" }
6
2021-07-01T23:56:49Z
2022-03-30T22:00:46Z
2021-12-30T21:36:55Z
NONE
resolved
In https://bugs.python.org/issue27657 it was decided to reverse an earlier decision about how `urllib.parse.urlparse` handles URLs that don't specify a scheme (e.g. `example.org:80`). This behavior change is in Python 3.9. One way this can present to a user is by confusing requests's attempt to add the scheme if it's missing: https://github.com/psf/requests/blob/1466ad713cf84738cd28f1224a7ab4a19e50e361/requests/utils.py#L904 With the old behavior, `urlparse` would return `ParseResult(scheme='', netloc='', path='example.org:80', params='', query='', fragment='')` and then `prepend_scheme_if_needed` would happily add the scheme, typically `http`. With the new behavior, you instead get `ParseResult(scheme='example.org', netloc='', path='80', params='', query='', fragment='')`, so `prepend_scheme_if_needed` thinks it has a scheme, and does nothing. Then later, if this is used as a proxy URL, `urllib3` will complain [here](https://github.com/urllib3/urllib3/blob/dc25db8e9f03ef2c506431e8a98f77c304ac2941/src/urllib3/poolmanager.py#L534), because it has [its own URL parser](https://github.com/urllib3/urllib3/blob/dc25db8e9f03ef2c506431e8a98f77c304ac2941/src/urllib3/util/url.py#L348) that is now I think out of sync with the stdlib. (I guess this means you could fix this by making requests use `urllib3.util.url.parse_url` instead of `urllib.parse.urlparse`, but that's maybe an antisocial fix) ## Expected Result If user code has given requests a proxy dict like `{'http': 'example.org:80'}`, the request is sent through that proxy. ## Actual Result `urllib3` raises `ProxySchemeUnknown` ## Reproduction Steps ```python import requests session = requests.Session() session.proxies = {'https': 'example.org:80'} session.get('https://www.google.com/') ``` ## System Information $ python -m requests.help ``` { "implementation": { "name": "CPython", "version": "3.9.5" }, "platform": { "system": "Linux" }, "requests": { "version": "2.22.0" }, "urllib3": { "version": "1.25.3" }, "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": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5855/reactions" }
https://api.github.com/repos/psf/requests/issues/5855/timeline
null
completed
null
null
false
[ "\"soon 3.7 and 3.8\" in the issue title isn't correct. The behavior change was present in 3.8.1 and 3.7.6 but reverted in 3.8.2 and 3.7.7.", "Oh good, I missed that, thanks. (There were a lot of bugs to read and I ended up skimming past that piece of history)", "@sethmlarson am I correct in that urllib3's url ...
https://api.github.com/repos/psf/requests/issues/5854
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5854/labels{/name}
https://api.github.com/repos/psf/requests/issues/5854/comments
https://api.github.com/repos/psf/requests/issues/5854/events
https://github.com/psf/requests/issues/5854
935,250,143
MDU6SXNzdWU5MzUyNTAxNDM=
5,854
stream=True break the zip file
{ "avatar_url": "https://avatars.githubusercontent.com/u/4510984?v=4", "events_url": "https://api.github.com/users/GF-Huang/events{/privacy}", "followers_url": "https://api.github.com/users/GF-Huang/followers", "following_url": "https://api.github.com/users/GF-Huang/following{/other_user}", "gists_url": "https://api.github.com/users/GF-Huang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GF-Huang", "id": 4510984, "login": "GF-Huang", "node_id": "MDQ6VXNlcjQ1MTA5ODQ=", "organizations_url": "https://api.github.com/users/GF-Huang/orgs", "received_events_url": "https://api.github.com/users/GF-Huang/received_events", "repos_url": "https://api.github.com/users/GF-Huang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GF-Huang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GF-Huang/subscriptions", "type": "User", "url": "https://api.github.com/users/GF-Huang", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-01T22:07:42Z
2021-07-02T01:29:31Z
2021-07-01T23:57:36Z
NONE
null
![image](https://user-images.githubusercontent.com/4510984/124194421-28239880-dafb-11eb-9a6b-132c4e550ead.png) ![image](https://user-images.githubusercontent.com/4510984/124194806-cd3e7100-dafb-11eb-876b-e4de04ae4417.png) **If I download that file by browser, it can be open.** ## Expected Result Download file do not break the file. ## Actual Result File broken, can not open. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.2.1" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.6" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010108f", "version": "19.1.0" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010108f" }, "urllib3": { "version": "1.25.11" }, "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/4510984?v=4", "events_url": "https://api.github.com/users/GF-Huang/events{/privacy}", "followers_url": "https://api.github.com/users/GF-Huang/followers", "following_url": "https://api.github.com/users/GF-Huang/following{/other_user}", "gists_url": "https://api.github.com/users/GF-Huang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GF-Huang", "id": 4510984, "login": "GF-Huang", "node_id": "MDQ6VXNlcjQ1MTA5ODQ=", "organizations_url": "https://api.github.com/users/GF-Huang/orgs", "received_events_url": "https://api.github.com/users/GF-Huang/received_events", "repos_url": "https://api.github.com/users/GF-Huang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GF-Huang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GF-Huang/subscriptions", "type": "User", "url": "https://api.github.com/users/GF-Huang", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5854/reactions" }
https://api.github.com/repos/psf/requests/issues/5854/timeline
null
completed
null
null
false
[ "Sorry, the tqdm example cause this issue, the `tqdm.wrapattr` did not close the file at the final.\r\n\r\n![image](https://user-images.githubusercontent.com/4510984/124201607-18ac4b80-db0b-11eb-9586-9beeed27ebc3.png)\r\n" ]
https://api.github.com/repos/psf/requests/issues/5853
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5853/labels{/name}
https://api.github.com/repos/psf/requests/issues/5853/comments
https://api.github.com/repos/psf/requests/issues/5853/events
https://github.com/psf/requests/issues/5853
935,070,423
MDU6SXNzdWU5MzUwNzA0MjM=
5,853
How to get the response from CONNECT while using proxy on a HTTPS target url
{ "avatar_url": "https://avatars.githubusercontent.com/u/26380784?v=4", "events_url": "https://api.github.com/users/lilanleo/events{/privacy}", "followers_url": "https://api.github.com/users/lilanleo/followers", "following_url": "https://api.github.com/users/lilanleo/following{/other_user}", "gists_url": "https://api.github.com/users/lilanleo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lilanleo", "id": 26380784, "login": "lilanleo", "node_id": "MDQ6VXNlcjI2MzgwNzg0", "organizations_url": "https://api.github.com/users/lilanleo/orgs", "received_events_url": "https://api.github.com/users/lilanleo/received_events", "repos_url": "https://api.github.com/users/lilanleo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lilanleo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lilanleo/subscriptions", "type": "User", "url": "https://api.github.com/users/lilanleo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-01T17:36:54Z
2021-10-03T17:03:11Z
2021-07-05T16:32:29Z
NONE
resolved
Hi, I'm trying to send a GET to a **HTTPS** target using proxy. Normally(like in curl), I will receive **two** response, one is from CONNECT <https://target>, the other is from GET <https://target> But the returning response obj from requests.get(url, proxy) only contains the second response. Could I ask how can I get the first response from CONNECT method? And is there any method to send only CONNECT but not GET? Thanks a lot.
{ "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/5853/reactions" }
https://api.github.com/repos/psf/requests/issues/5853/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/5852
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5852/labels{/name}
https://api.github.com/repos/psf/requests/issues/5852/comments
https://api.github.com/repos/psf/requests/issues/5852/events
https://github.com/psf/requests/issues/5852
935,037,179
MDU6SXNzdWU5MzUwMzcxNzk=
5,852
Request won't hit on endpoint
{ "avatar_url": "https://avatars.githubusercontent.com/u/21988764?v=4", "events_url": "https://api.github.com/users/vergelli/events{/privacy}", "followers_url": "https://api.github.com/users/vergelli/followers", "following_url": "https://api.github.com/users/vergelli/following{/other_user}", "gists_url": "https://api.github.com/users/vergelli/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vergelli", "id": 21988764, "login": "vergelli", "node_id": "MDQ6VXNlcjIxOTg4NzY0", "organizations_url": "https://api.github.com/users/vergelli/orgs", "received_events_url": "https://api.github.com/users/vergelli/received_events", "repos_url": "https://api.github.com/users/vergelli/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vergelli/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vergelli/subscriptions", "type": "User", "url": "https://api.github.com/users/vergelli", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-07-01T16:53:42Z
2021-10-03T16:00:30Z
2021-07-05T15:33:16Z
NONE
resolved
I know that this error may not be caused by anything related to _Request_, but I would like to know if you know anything that could help me find a solution. I'm working on a program that makes multiple petitions to a Redmine through its Rest service, and I'm using _python request_. The program I did was tested on a Redmine that was installed locally in a VM ( Centos 8) and work perfectly. The problem arises when I try to test it on a Redmine that is dockerized. Then any petition is rejected, it doesn't even strike on the database. This code is run in a Jupyter Notebook ``` import requests from app import connection response = requests.get( "http://<the_vm_ip>:3000/user.json", verify=False, auth=( connection.REDMINE_USER, connection.REDMINE_PASSWORD) ) ``` Received: ``` --------------------------------------------------------------------------- TimeoutError Traceback (most recent call last) ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py in _new_conn(self) 168 try: --> 169 conn = connection.create_connection( 170 (self._dns_host, self.port), self.timeout, **extra_kw ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 95 if err is not None: ---> 96 raise err 97 ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 85 sock.bind(source_address) ---> 86 sock.connect(sa) 87 return sock TimeoutError: [WinError 10060] An error occurred during the connection attempt as the connected party did not respond properly after a period of time, or the established connection failed as the connected host failed to respond During handling of the above exception, another exception occurred: NewConnectionError Traceback (most recent call last) ~\AppData\Local\Programs\Python\Python39\lib\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) 698 # Make the request on the httplib connection object. --> 699 httplib_response = self._make_request( 700 conn, ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 393 else: --> 394 conn.request(method, url, **httplib_request_kw) 395 ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py in request(self, method, url, body, headers) 233 headers["User-Agent"] = _get_default_user_agent() --> 234 super(HTTPConnection, self).request(method, url, body=body, headers=headers) 235 ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1254 """Send a complete request to the server.""" -> 1255 self._send_request(method, url, body, headers, encode_chunked) 1256 ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1300 body = _encode(body, 'body') -> 1301 self.endheaders(body, encode_chunked=encode_chunked) 1302 ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1249 raise CannotSendHeader() -> 1250 self._send_output(message_body, encode_chunked=encode_chunked) 1251 ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1009 del self._buffer[:] -> 1010 self.send(msg) 1011 ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in send(self, data) 949 if self.auto_open: --> 950 self.connect() 951 else: ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py in connect(self) 199 def connect(self): --> 200 conn = self._new_conn() 201 self._prepare_conn(conn) ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py in _new_conn(self) 180 except SocketError as e: --> 181 raise NewConnectionError( 182 self, "Failed to establish a new connection: %s" % e NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000072E29D3C70>: Failed to establish a new connection: [WinError 10060] Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder During handling of the above exception, another exception occurred: MaxRetryError Traceback (most recent call last) ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 438 if not chunked: --> 439 resp = conn.urlopen( 440 method=request.method, ~\AppData\Local\Programs\Python\Python39\lib\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) 754 --> 755 retries = retries.increment( 756 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] ~\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 572 if new_retry.is_exhausted(): --> 573 raise MaxRetryError(_pool, url, error or ResponseError(cause)) 574 MaxRetryError: HTTPConnectionPool(host='<my_vm_ip>', port=3000): Max retries exceeded with url: /user.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000072E29D3C70>: Failed to establish a new connection: [WinError 10060] Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder')) During handling of the above exception, another exception occurred: ConnectionError Traceback (most recent call last) <ipython-input-3-69baa6e28937> in <module> 3 'cookie': 'self.cookie'} 4 ----> 5 response = requests.get( "<my_vm_ip>:3000/user.json", verify=False, auth=( "admin", "password"), headers=header, allow_redirects=True, stream=True) 6 7 response ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py in get(url, params, **kwargs) 74 75 kwargs.setdefault('allow_redirects', True) ---> 76 return request('get', url, params=params, **kwargs) 77 78 ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 540 } 541 send_kwargs.update(settings) --> 542 resp = self.send(prep, **send_kwargs) 543 544 return resp ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py in send(self, request, **kwargs) 653 654 # Send the request --> 655 r = adapter.send(request, **kwargs) 656 657 # Total elapsed time of the request (approximately) ~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 514 raise SSLError(e, request=request) 515 --> 516 raise ConnectionError(e, request=request) 517 518 except ClosedPoolError as e: ConnectionError: HTTPConnectionPool(host='<my_vm_ip>', port=3000): Max retries exceeded with url: /user.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000072E29D3C70>: Failed to establish a new connection: [WinError 10060] An error occurred during the connection attempt as the connected party did not respond properly after a period of time, or the established connection failed as the connected host failed to respond ')) ``` The whole description is posted in this [StackOverflow thread](https://stackoverflow.com/questions/68166651/dockerized-redmine-not-responding-api-rest-requests/68168106?noredirect=1#comment120480086_68168106) just in case, but again, I know this might not be related to request, Sorry in Advance.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5852/reactions" }
https://api.github.com/repos/psf/requests/issues/5852/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/5851
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5851/labels{/name}
https://api.github.com/repos/psf/requests/issues/5851/comments
https://api.github.com/repos/psf/requests/issues/5851/events
https://github.com/psf/requests/pull/5851
934,142,171
MDExOlB1bGxSZXF1ZXN0NjgxMjQ3OTM4
5,851
Fix extract_zipped_paths infinite loop when provided invalid unc path
{ "avatar_url": "https://avatars.githubusercontent.com/u/79589038?v=4", "events_url": "https://api.github.com/users/tl-hbk/events{/privacy}", "followers_url": "https://api.github.com/users/tl-hbk/followers", "following_url": "https://api.github.com/users/tl-hbk/following{/other_user}", "gists_url": "https://api.github.com/users/tl-hbk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tl-hbk", "id": 79589038, "login": "tl-hbk", "node_id": "MDQ6VXNlcjc5NTg5MDM4", "organizations_url": "https://api.github.com/users/tl-hbk/orgs", "received_events_url": "https://api.github.com/users/tl-hbk/received_events", "repos_url": "https://api.github.com/users/tl-hbk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tl-hbk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tl-hbk/subscriptions", "type": "User", "url": "https://api.github.com/users/tl-hbk", "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
2021-06-30T21:29:35Z
2021-12-01T08:00:28Z
2021-08-03T00:40:35Z
CONTRIBUTOR
resolved
Fixes https://github.com/psf/requests/issues/5850
{ "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/5851/reactions" }
https://api.github.com/repos/psf/requests/issues/5851/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5851.diff", "html_url": "https://github.com/psf/requests/pull/5851", "merged_at": "2021-08-03T00:40:34Z", "patch_url": "https://github.com/psf/requests/pull/5851.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5851" }
true
[]
https://api.github.com/repos/psf/requests/issues/5850
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5850/labels{/name}
https://api.github.com/repos/psf/requests/issues/5850/comments
https://api.github.com/repos/psf/requests/issues/5850/events
https://github.com/psf/requests/issues/5850
933,051,642
MDU6SXNzdWU5MzMwNTE2NDI=
5,850
Infinite loop when verify is invalid UNC path
{ "avatar_url": "https://avatars.githubusercontent.com/u/79589038?v=4", "events_url": "https://api.github.com/users/tl-hbk/events{/privacy}", "followers_url": "https://api.github.com/users/tl-hbk/followers", "following_url": "https://api.github.com/users/tl-hbk/following{/other_user}", "gists_url": "https://api.github.com/users/tl-hbk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tl-hbk", "id": 79589038, "login": "tl-hbk", "node_id": "MDQ6VXNlcjc5NTg5MDM4", "organizations_url": "https://api.github.com/users/tl-hbk/orgs", "received_events_url": "https://api.github.com/users/tl-hbk/received_events", "repos_url": "https://api.github.com/users/tl-hbk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tl-hbk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tl-hbk/subscriptions", "type": "User", "url": "https://api.github.com/users/tl-hbk", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-29T19:49:07Z
2021-11-01T01:22:15Z
2021-08-03T00:40:35Z
CONTRIBUTOR
resolved
When an invalid UNC path is passed to `requests.utils.extract_zipped_paths` it results in an infinite loop ## Expected Result For `extract_zipped_paths` to return the path and an Exception to be thrown when the cert path is checked prior to verification being attempted. ## Actual Result Code gets stuck looping here https://github.com/psf/requests/blob/5855dd711f0ab9c9c4782574b8814b1e4c7f98cc/requests/utils.py#L245-L248 ## Reproduction Steps ```python import requests.utils requests.utils.extract_zipped_paths(r"\\localhost\a\b\c") # Assumes this path is invalid on testing machine ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.4.7" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.10" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "101010bf", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.4" }, "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/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/5850/reactions" }
https://api.github.com/repos/psf/requests/issues/5850/timeline
null
completed
null
null
false
[ "This code path is only hit when using a patched `certifi` package that has `certifi.where()` return a UNC path" ]
https://api.github.com/repos/psf/requests/issues/5849
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5849/labels{/name}
https://api.github.com/repos/psf/requests/issues/5849/comments
https://api.github.com/repos/psf/requests/issues/5849/events
https://github.com/psf/requests/issues/5849
932,271,195
MDU6SXNzdWU5MzIyNzExOTU=
5,849
How to upload large chunks of file in requests ?
{ "avatar_url": "https://avatars.githubusercontent.com/u/33820064?v=4", "events_url": "https://api.github.com/users/pghole/events{/privacy}", "followers_url": "https://api.github.com/users/pghole/followers", "following_url": "https://api.github.com/users/pghole/following{/other_user}", "gists_url": "https://api.github.com/users/pghole/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pghole", "id": 33820064, "login": "pghole", "node_id": "MDQ6VXNlcjMzODIwMDY0", "organizations_url": "https://api.github.com/users/pghole/orgs", "received_events_url": "https://api.github.com/users/pghole/received_events", "repos_url": "https://api.github.com/users/pghole/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pghole/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pghole/subscriptions", "type": "User", "url": "https://api.github.com/users/pghole", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-29T06:44:39Z
2021-10-03T17:03:11Z
2021-07-05T16:32:03Z
NONE
resolved
Hello team, I have to upload large files (~5GB). I am dividing the file in small chunks (10MB), can't send all together(as the api I am requesting fails for large data 5GB if sent in one request). The api I am uploading to, has a specification that it needs minimum of 10MB data to be sent. I did use read(10485760) and send it via requests which works fine. However, I do not want to read all the 10MB in the memory and if I leverage multithreading in my script, so each thread reading 10MB would cost me too much memory. Is there a way I can send a total of 10MB to the api requests but read only 4096/8192 bytes at a time and transfer till I reach 10MB, so that I do not overuse memory. Pls.note I don't want to send the fileobj in the requests as that will use less memory but I will not be able to break the chunk at 10MB and entire 5GB data will go to the request, which I do not want. Is there any way via requests. I see the httplib has it. https://github.com/python/cpython/blob/3.9/Lib/http/client.py - I will call the send(fh.read(4096) function here in loop till I complete 10MB and will complete one request of 10MB without heavy memory usage. Pls. suggest. Urgent
{ "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/5849/reactions" }
https://api.github.com/repos/psf/requests/issues/5849/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/5848
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5848/labels{/name}
https://api.github.com/repos/psf/requests/issues/5848/comments
https://api.github.com/repos/psf/requests/issues/5848/events
https://github.com/psf/requests/issues/5848
931,012,528
MDU6SXNzdWU5MzEwMTI1Mjg=
5,848
Requests can't be imported if file is named email.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/13700219?v=4", "events_url": "https://api.github.com/users/reisenmachtfreude/events{/privacy}", "followers_url": "https://api.github.com/users/reisenmachtfreude/followers", "following_url": "https://api.github.com/users/reisenmachtfreude/following{/other_user}", "gists_url": "https://api.github.com/users/reisenmachtfreude/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/reisenmachtfreude", "id": 13700219, "login": "reisenmachtfreude", "node_id": "MDQ6VXNlcjEzNzAwMjE5", "organizations_url": "https://api.github.com/users/reisenmachtfreude/orgs", "received_events_url": "https://api.github.com/users/reisenmachtfreude/received_events", "repos_url": "https://api.github.com/users/reisenmachtfreude/repos", "site_admin": false, "starred_url": "https://api.github.com/users/reisenmachtfreude/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/reisenmachtfreude/subscriptions", "type": "User", "url": "https://api.github.com/users/reisenmachtfreude", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-27T20:32:19Z
2021-09-25T22:00:40Z
2021-06-27T21:51:58Z
NONE
resolved
If I create a file called email.py importing requests end in an error. ## Expected Result I would expect the filename does not influence the functionality ## Actual Result The following exception occurs: ``` Traceback (most recent call last): File "/home/someDir/email.py", line 1, in <module> import requests File "/usr/lib/python3/dist-packages/requests/__init__.py", line 43, in <module> import urllib3 File "/usr/lib/python3/dist-packages/urllib3/__init__.py", line 11, in <module> from . import exceptions File "/usr/lib/python3/dist-packages/urllib3/exceptions.py", line 3, in <module> from six.moves.http_client import IncompleteRead as httplib_IncompleteRead File "/usr/lib/python3/dist-packages/six.py", line 203, in load_module mod = mod._resolve() File "/usr/lib/python3/dist-packages/six.py", line 115, in _resolve return _import_module(self.mod) File "/usr/lib/python3/dist-packages/six.py", line 82, in _import_module __import__(name) File "/usr/lib/python3.9/http/client.py", line 71, in <module> import email.parser ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module> from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module> from urllib.request import urlopen File "/usr/lib/python3.9/urllib/request.py", line 88, in <module> import http.client File "/usr/lib/python3.9/http/client.py", line 71, in <module> import email.parser ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package Original exception was: Traceback (most recent call last): File "/home/someDir/email.py", line 1, in <module> import requests File "/usr/lib/python3/dist-packages/requests/__init__.py", line 43, in <module> import urllib3 File "/usr/lib/python3/dist-packages/urllib3/__init__.py", line 11, in <module> from . import exceptions File "/usr/lib/python3/dist-packages/urllib3/exceptions.py", line 3, in <module> from six.moves.http_client import IncompleteRead as httplib_IncompleteRead File "/usr/lib/python3/dist-packages/six.py", line 203, in load_module mod = mod._resolve() File "/usr/lib/python3/dist-packages/six.py", line 115, in _resolve return _import_module(self.mod) File "/usr/lib/python3/dist-packages/six.py", line 82, in _import_module __import__(name) File "/usr/lib/python3.9/http/client.py", line 71, in <module> import email.parser ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package ``` ## Reproduction Steps create a file email.py. Content of the file ``` import requests ``` Execute with `/usr/local/bin/python3 email.py` If the file is renamed, e.g. `mv email.py email2.py` the execution works without errors. ## System Information OS: ``` Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute ``` Python 3.9.5 ``` Name: requests Version: 2.25.1 Summary: Python HTTP for Humans. Home-page: https://requests.readthedocs.io Author: Kenneth Reitz Author-email: me@kennethreitz.org License: Apache 2.0 Location: /usr/lib/python3/dist-packages Requires: Required-by: ... ```
{ "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/5848/reactions" }
https://api.github.com/repos/psf/requests/issues/5848/timeline
null
completed
null
null
false
[ "That's because `email` is a standard library module. Not recommended to conflict with those, you'll get all sorts of weird breakages.\n\nClosing as not an issue. " ]
https://api.github.com/repos/psf/requests/issues/5847
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5847/labels{/name}
https://api.github.com/repos/psf/requests/issues/5847/comments
https://api.github.com/repos/psf/requests/issues/5847/events
https://github.com/psf/requests/issues/5847
930,729,387
MDU6SXNzdWU5MzA3MjkzODc=
5,847
Request fails for subdomains of localhost
{ "avatar_url": "https://avatars.githubusercontent.com/u/1538187?v=4", "events_url": "https://api.github.com/users/Mixermachine/events{/privacy}", "followers_url": "https://api.github.com/users/Mixermachine/followers", "following_url": "https://api.github.com/users/Mixermachine/following{/other_user}", "gists_url": "https://api.github.com/users/Mixermachine/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Mixermachine", "id": 1538187, "login": "Mixermachine", "node_id": "MDQ6VXNlcjE1MzgxODc=", "organizations_url": "https://api.github.com/users/Mixermachine/orgs", "received_events_url": "https://api.github.com/users/Mixermachine/received_events", "repos_url": "https://api.github.com/users/Mixermachine/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Mixermachine/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Mixermachine/subscriptions", "type": "User", "url": "https://api.github.com/users/Mixermachine", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2021-06-26T16:15:49Z
2021-09-26T14:00:33Z
2021-06-28T13:03:20Z
NONE
resolved
Requesting subdomains of localhost fails with error message on Windows. This error does not appear on Linux (tested on an ARM64 server). Tested on a Windows laptop (Lenovo T14s, AMD 4750u) and a Windows desktop (AMD 2600) ## Expected Result I need to make a get request to an url in the following format: http://XXX.localhost (where XXX is replaced with an arbitrary value.) example: http://ark8s-844db1a4-2988-4f30-9ff6-e78df428bad3-test.localhost An nginx server inside kubernetes listens to this url. When I use the url in the browser the desired site is fetched. ## Actual Result I get the following error: `HTTPConnectionPool(host='ark8s-844db1a4-2988-4f30-9ff6-e78df428bad3-test.localhost', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D1E89E4940>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))` ## Reproduction Steps ```python import requests requests.get('http://test.localhost') ``` Same result for when 'test' is replaced with any other value no matter if a server is listening there or not. Requesting localhost works as expected. Subdomains of localhost do not work. ## System Information Windows 10 Ryzen 4750U ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.6" }, "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/5847/reactions" }
https://api.github.com/repos/psf/requests/issues/5847/timeline
null
completed
null
null
false
[ "The error here `getaddrinfo failed` indicates that Python (not requests) can not find your domain name. You should be able to reproduce this with\r\n\r\n```py\r\nimport socket\r\n\r\nprint(socket.getaddrinfo(\"ark8s-844db1a4-2988-4f30-9ff6-e78df428bad3-test.localhost\", 80, family=socket.AF_INET, proto=socket.IPPR...
https://api.github.com/repos/psf/requests/issues/5846
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5846/labels{/name}
https://api.github.com/repos/psf/requests/issues/5846/comments
https://api.github.com/repos/psf/requests/issues/5846/events
https://github.com/psf/requests/issues/5846
930,167,724
MDU6SXNzdWU5MzAxNjc3MjQ=
5,846
TestRequests.test_pyopenssl_redirect is broken in CI
{ "avatar_url": "https://avatars.githubusercontent.com/u/42327?v=4", "events_url": "https://api.github.com/users/pquentin/events{/privacy}", "followers_url": "https://api.github.com/users/pquentin/followers", "following_url": "https://api.github.com/users/pquentin/following{/other_user}", "gists_url": "https://api.github.com/users/pquentin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pquentin", "id": 42327, "login": "pquentin", "node_id": "MDQ6VXNlcjQyMzI3", "organizations_url": "https://api.github.com/users/pquentin/orgs", "received_events_url": "https://api.github.com/users/pquentin/received_events", "repos_url": "https://api.github.com/users/pquentin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pquentin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pquentin/subscriptions", "type": "User", "url": "https://api.github.com/users/pquentin", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2021-06-25T13:18:23Z
2023-05-01T00:03:16Z
2022-04-30T16:47:31Z
CONTRIBUTOR
resolved
TestRequests.test_pyopenssl_redirect is broken in CI. I just fixed the urllib3 integration tests to work on GitHub Actions in https://github.com/urllib3/urllib3/pull/2304, and noticed that TestRequests.test_pyopenssl_redirect is broken, and is broken on your CI as well. ## Expected Result The test should pass. ## Actual Result The test reliably fails, on all Python 3.6+ versions: https://github.com/psf/requests/runs/2715203297. Interestingly, it works on 2.7 and 3.5. ## Reproduction Steps Run you CI: https://github.com/psf/requests/runs/2715203297 ## System Information Fails on Linux, Windows and macOS. Also on PyPI. But only on Python 3.6+.
{ "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/5846/reactions" }
https://api.github.com/repos/psf/requests/issues/5846/timeline
null
completed
null
null
false
[ "Thanks for filing an issue, @pquentin! We first saw this a couple weeks ago but I haven't had a chance to track down the issue. We have both our httpbin/pytest-httpbin dependencies pinned, so they shouldn't have changed, unless an underlying dependency was recently updated. The local endpoint is now terminating th...
https://api.github.com/repos/psf/requests/issues/5845
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5845/labels{/name}
https://api.github.com/repos/psf/requests/issues/5845/comments
https://api.github.com/repos/psf/requests/issues/5845/events
https://github.com/psf/requests/issues/5845
927,702,615
MDU6SXNzdWU5Mjc3MDI2MTU=
5,845
Relax IDNA2008 requirement?
{ "avatar_url": "https://avatars.githubusercontent.com/u/778068?v=4", "events_url": "https://api.github.com/users/snarfed/events{/privacy}", "followers_url": "https://api.github.com/users/snarfed/followers", "following_url": "https://api.github.com/users/snarfed/following{/other_user}", "gists_url": "https://api.github.com/users/snarfed/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/snarfed", "id": 778068, "login": "snarfed", "node_id": "MDQ6VXNlcjc3ODA2OA==", "organizations_url": "https://api.github.com/users/snarfed/orgs", "received_events_url": "https://api.github.com/users/snarfed/received_events", "repos_url": "https://api.github.com/users/snarfed/repos", "site_admin": false, "starred_url": "https://api.github.com/users/snarfed/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/snarfed/subscriptions", "type": "User", "url": "https://api.github.com/users/snarfed", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-06-22T23:15:30Z
2021-10-05T15:10:52Z
2021-07-07T13:27:23Z
NONE
resolved
Hi all! First, thank you for all your hard work developing and maintaining requests. I know firsthand how thankless and time consuming managing an open source project can be, and I can only imagine how much more so on a project this popular. We appreciate it! I originally raised this as https://github.com/psf/requests/issues/3687#issuecomment-835688746, after that issue was closed. I suspect no one noticed, so I'm raising as a new issue. requests currently uses the `idna` library to check input URLs for IDNA2008 compliance, and rejects URLs that don't comply. This breaks non-compliant URLs with emoji characters, like http://☃.net/, which you all said was intentional in https://github.com/psf/requests/issues/3687#issuecomment-260757981 (also see https://github.com/psf/requests/issues/3683#issuecomment-261240279), since those domains' time is arguably limited, ie they're effectively "dead domains walking." Understood. However, not all TLDs require IDNA2008 compliance. Unlike gTLDs, ccTLDs generally get to choose their own domain policies - [background from Wikipedia](https://en.wikipedia.org/wiki/Country_code_top-level_domain), [ICANN](https://www.icann.org/resources/pages/cctlds-21-2012-02-25-en), [a GoDaddy representative](https://github.com/kjd/idna/issues/18#issuecomment-830969692) - and a handful of them have stuck with IDNA2003, UTS#46, or related variants. (Not to mention older proprietary schemes like [ThaiURL](https://en.wikipedia.org/wiki/ThaiURL) 😁.) For example, [.ws, .la, .ai, .to, and .fm evidently explicitly allow emoji.](https://gizmodo.com/emoji-domains-are-the-future-maybe-1823319626) Similarly, afaik domain owners can do whatever they want with their own subdomains. So thanks to Punycode, third level (and beyond) hostnames like https://🌏➡➡❤🔒.ayeshious.com and https://🔒🔒🔒.scotthelme.co.uk seem to not be at risk of breaking due to gTLD registries enforcing IDNA2008 on pay-level domain registrations. Any chance you all could relax the IDNA2008 requirement so that you support both of those kinds of domains? Right now, I'm working around this with code like this, using the `domain2idna` library, to support at least IDNA2003 in addition to IDNA2008. It'd be nice not to have to. ```py try: resp = requests.get(url, ...) except requests.exceptions.InvalidURL: punycode = domain2idna(url) if punycode != url: # the domain is valid idna2003 but not idna2008. encode and try again. resp = requests.get(punycode, ...) ``` Thanks again for listening, and for maintaining requests!
{ "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/5845/reactions" }
https://api.github.com/repos/psf/requests/issues/5845/timeline
null
completed
null
null
false
[ "This is not likely to land as there are additional security requirements to be mindful of when using IDNA2003, hence why it's preferable to use IDNA2008. My recommendation in this case is to do the normalization yourself and pass Requests an ASCII-only host.", "Fair enough, understood. Thanks for the response." ...
https://api.github.com/repos/psf/requests/issues/5844
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5844/labels{/name}
https://api.github.com/repos/psf/requests/issues/5844/comments
https://api.github.com/repos/psf/requests/issues/5844/events
https://github.com/psf/requests/issues/5844
925,504,093
MDU6SXNzdWU5MjU1MDQwOTM=
5,844
Allow for other JSON packages
{ "avatar_url": "https://avatars.githubusercontent.com/u/5131271?v=4", "events_url": "https://api.github.com/users/achapkowski/events{/privacy}", "followers_url": "https://api.github.com/users/achapkowski/followers", "following_url": "https://api.github.com/users/achapkowski/following{/other_user}", "gists_url": "https://api.github.com/users/achapkowski/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/achapkowski", "id": 5131271, "login": "achapkowski", "node_id": "MDQ6VXNlcjUxMzEyNzE=", "organizations_url": "https://api.github.com/users/achapkowski/orgs", "received_events_url": "https://api.github.com/users/achapkowski/received_events", "repos_url": "https://api.github.com/users/achapkowski/repos", "site_admin": false, "starred_url": "https://api.github.com/users/achapkowski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/achapkowski/subscriptions", "type": "User", "url": "https://api.github.com/users/achapkowski", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-20T02:12:23Z
2021-09-18T18:00:22Z
2021-06-20T17:47:29Z
NONE
resolved
It would be nice to be able to allow requests to register other ‘json’ libraries like Ujson.
{ "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/5844/reactions" }
https://api.github.com/repos/psf/requests/issues/5844/timeline
null
completed
null
null
false
[ "You can call `ujson.loads(resp.text)`?" ]
https://api.github.com/repos/psf/requests/issues/5843
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5843/labels{/name}
https://api.github.com/repos/psf/requests/issues/5843/comments
https://api.github.com/repos/psf/requests/issues/5843/events
https://github.com/psf/requests/issues/5843
924,862,018
MDU6SXNzdWU5MjQ4NjIwMTg=
5,843
SSL ERROR - WRONG_VERSION_NUMBER
{ "avatar_url": "https://avatars.githubusercontent.com/u/60690727?v=4", "events_url": "https://api.github.com/users/eilgug/events{/privacy}", "followers_url": "https://api.github.com/users/eilgug/followers", "following_url": "https://api.github.com/users/eilgug/following{/other_user}", "gists_url": "https://api.github.com/users/eilgug/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eilgug", "id": 60690727, "login": "eilgug", "node_id": "MDQ6VXNlcjYwNjkwNzI3", "organizations_url": "https://api.github.com/users/eilgug/orgs", "received_events_url": "https://api.github.com/users/eilgug/received_events", "repos_url": "https://api.github.com/users/eilgug/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eilgug/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eilgug/subscriptions", "type": "User", "url": "https://api.github.com/users/eilgug", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-06-18T12:34:30Z
2022-02-11T02:12:20Z
2021-11-13T01:48:48Z
NONE
resolved
While i'm using proxies just get always this error. I've try several times at least i resolved by removing the "s" in the https: proxy too as suggested in [this topic](https://stackoverflow.com/questions/65516325/ssl-wrong-version-number-on-python-request): I think this problem is related to the last version, because i've tried on an older one and it works great. ## Solution Steps ```python import requests ... self.proxies = { 'http': f'http://...:8080/', 'https': f'http://...:8080/' } def get(self, url): request_url = self.base_url + url return requests.get(request_url, headers=self.headers, proxies=self.proxies) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.5" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5843/reactions" }
https://api.github.com/repos/psf/requests/issues/5843/timeline
null
completed
null
null
false
[ "Sounds kind of like #5943 \r\n\r\nCan you check that issue and see if it answers your question? If not, I think you need to provide some more complete example code & errors.", "Almost certain this is the same issue mentioned in the comment above. Try changing https->http. Closing as duplicate. " ]
https://api.github.com/repos/psf/requests/issues/5842
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5842/labels{/name}
https://api.github.com/repos/psf/requests/issues/5842/comments
https://api.github.com/repos/psf/requests/issues/5842/events
https://github.com/psf/requests/issues/5842
922,961,018
MDU6SXNzdWU5MjI5NjEwMTg=
5,842
Support specifying adapter per-request
{ "avatar_url": "https://avatars.githubusercontent.com/u/27799541?v=4", "events_url": "https://api.github.com/users/brandon-leapyear/events{/privacy}", "followers_url": "https://api.github.com/users/brandon-leapyear/followers", "following_url": "https://api.github.com/users/brandon-leapyear/following{/other_user}", "gists_url": "https://api.github.com/users/brandon-leapyear/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/brandon-leapyear", "id": 27799541, "login": "brandon-leapyear", "node_id": "MDQ6VXNlcjI3Nzk5NTQx", "organizations_url": "https://api.github.com/users/brandon-leapyear/orgs", "received_events_url": "https://api.github.com/users/brandon-leapyear/received_events", "repos_url": "https://api.github.com/users/brandon-leapyear/repos", "site_admin": false, "starred_url": "https://api.github.com/users/brandon-leapyear/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brandon-leapyear/subscriptions", "type": "User", "url": "https://api.github.com/users/brandon-leapyear", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-06-16T18:40:49Z
2021-09-14T22:00:27Z
2021-06-16T21:50:44Z
NONE
resolved
Currently, the only way an adapter can be applied is by mounting into a Session. It would be great to add something like `http_adapter` as an argument to the `.get()`/`.post()` functions. In our project, we need to retry all idempotent requests, but we have some RPC-endpoints (e.g. a GraphQL endpoint) that uses `POST` even for idempotent requests. So we need some way of specifying that a particular request is idempotent and should be retried. Alternatively, this can be achieved by being able to specify a predicate in `Session.mount` that takes in a `Request` and returns `True` if this mounted adapter should be used. But specifying the adapter directly in the `.get()`/`.post()` functions would be better, so that the logic of "should i retry?" is on the actual request instead of centralized in one location
{ "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/5842/reactions" }
https://api.github.com/repos/psf/requests/issues/5842/timeline
null
completed
null
null
false
[ "Our current workaround:\r\n```python\r\nclass MyAdapter(HTTPAdapter):\r\n \"\"\"Requests transport adapter that retries requests when activated.\"\"\"\r\n\r\n def __init__(self, *args, **kwargs):\r\n max_retries = kwargs.pop(\"max_retries\", None)\r\n\r\n super().__init__(*args, **kwargs)\r\n\r...
https://api.github.com/repos/psf/requests/issues/5841
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5841/labels{/name}
https://api.github.com/repos/psf/requests/issues/5841/comments
https://api.github.com/repos/psf/requests/issues/5841/events
https://github.com/psf/requests/issues/5841
921,140,855
MDU6SXNzdWU5MjExNDA4NTU=
5,841
Custom auth with Oauth2 password authentication flow does not seem to work
{ "avatar_url": "https://avatars.githubusercontent.com/u/70274528?v=4", "events_url": "https://api.github.com/users/scd75/events{/privacy}", "followers_url": "https://api.github.com/users/scd75/followers", "following_url": "https://api.github.com/users/scd75/following{/other_user}", "gists_url": "https://api.github.com/users/scd75/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/scd75", "id": 70274528, "login": "scd75", "node_id": "MDQ6VXNlcjcwMjc0NTI4", "organizations_url": "https://api.github.com/users/scd75/orgs", "received_events_url": "https://api.github.com/users/scd75/received_events", "repos_url": "https://api.github.com/users/scd75/repos", "site_admin": false, "starred_url": "https://api.github.com/users/scd75/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/scd75/subscriptions", "type": "User", "url": "https://api.github.com/users/scd75", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-06-15T08:27:09Z
2021-09-13T12:00:49Z
2021-06-15T11:25:54Z
NONE
resolved
Summary. I am trying to implement a OAuth2 password flow authentication process with Requests. I then rely on a Custom AUthentication method as I could not find any built-in method. Is there any? Yet, while the prepared request seems to be fine, the final requets did not seem to pick up the header, as I get a "not authorised" error. What you expected. ## Actual Result What happened instead. ## Reproduction Steps ```python import requests import os from requests.auth import AuthBase username= os.environ['ADMIN_LOGIN'], password= os.environ['ADMIN_PWD'], class CustomAuth(AuthBase): """Attaches Oauth2 password Authentication to the given Request object.""" def __init__(self, username, password): # setup any auth-related data here auth_response = requests.post( url = os.environ['APP_URL'] +'/api/v1/login/access-token', data = { 'username': username, 'password': password, } ).json() self.token = auth_response['access_token'] def __call__(self, r): # modify and return the request r.headers['Authorization'] = 'bearer ' + self.token print(r.headers) return r response = requests.get( url = os.environ['APP_URL'] +'/api/v1/orders', auth= CustomAuth(username, password) ) print(response, response.content) ``` Output: ``` {'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjM3NDczNjgsInN1YiI6IjEifQ.UVDa1sfbbWByXkUWGFqSrLIN9L-0JKNepUm9BZBe5SE'} <Response [401]> b'{"detail":"Not authenticated"}' ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.5" }, "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/5841/reactions" }
https://api.github.com/repos/psf/requests/issues/5841/timeline
null
completed
null
null
false
[ "Have you tried requests-oauthlib?", "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/5840
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5840/labels{/name}
https://api.github.com/repos/psf/requests/issues/5840/comments
https://api.github.com/repos/psf/requests/issues/5840/events
https://github.com/psf/requests/issues/5840
917,378,759
MDU6SXNzdWU5MTczNzg3NTk=
5,840
http call throwing error in background mode
{ "avatar_url": "https://avatars.githubusercontent.com/u/16843102?v=4", "events_url": "https://api.github.com/users/ujjaldey/events{/privacy}", "followers_url": "https://api.github.com/users/ujjaldey/followers", "following_url": "https://api.github.com/users/ujjaldey/following{/other_user}", "gists_url": "https://api.github.com/users/ujjaldey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ujjaldey", "id": 16843102, "login": "ujjaldey", "node_id": "MDQ6VXNlcjE2ODQzMTAy", "organizations_url": "https://api.github.com/users/ujjaldey/orgs", "received_events_url": "https://api.github.com/users/ujjaldey/received_events", "repos_url": "https://api.github.com/users/ujjaldey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ujjaldey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ujjaldey/subscriptions", "type": "User", "url": "https://api.github.com/users/ujjaldey", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-10T13:57:30Z
2021-06-10T21:55:38Z
2021-06-10T21:55:14Z
NONE
off-topic
I am trying to make an HTTP call using `python-requests`. When I am running the script in the background as `python main.py &`, it works perfectly ok. But as soon as I close the terminal, it starts giving me the error "_[Errno 5] Input/output error_". The process keeps running in the background. Any idea how to make the HTTP call while running the python script in the background (and no terminal open)? My sample code: ``` import logging import time import requests logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO,filename='log.log') logger = logging.getLogger(__name__) def make_req() -> None: res = requests.get('https://w3schools.com/python/demopage.htm') return res.text def main() -> None: logger.info("----------------------------------------------") try: out = make_req() print(out) logger.info(out) except Exception as e: logger.error("-->"+ str(e)) if __name__ == '__main__': while True: main() time.sleep(5) ``` Output: ``` 2021-06-10 14:03:51,840 - __main__ - INFO - ---------------------------------------------- 2021-06-10 14:03:52,061 - __main__ - ERROR - -->[Errno 5] Input/output error 2021-06-10 14:03:57,081 - __main__ - INFO - ---------------------------------------------- 2021-06-10 14:03:57,317 - __main__ - ERROR - -->[Errno 5] Input/output error ``` Thanks in advance.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5840/reactions" }
https://api.github.com/repos/psf/requests/issues/5840/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/5839
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5839/labels{/name}
https://api.github.com/repos/psf/requests/issues/5839/comments
https://api.github.com/repos/psf/requests/issues/5839/events
https://github.com/psf/requests/issues/5839
917,319,899
MDU6SXNzdWU5MTczMTk4OTk=
5,839
Need Help Understanding the project structure.
{ "avatar_url": "https://avatars.githubusercontent.com/u/85453780?v=4", "events_url": "https://api.github.com/users/ujjwaltwitx/events{/privacy}", "followers_url": "https://api.github.com/users/ujjwaltwitx/followers", "following_url": "https://api.github.com/users/ujjwaltwitx/following{/other_user}", "gists_url": "https://api.github.com/users/ujjwaltwitx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ujjwaltwitx", "id": 85453780, "login": "ujjwaltwitx", "node_id": "MDQ6VXNlcjg1NDUzNzgw", "organizations_url": "https://api.github.com/users/ujjwaltwitx/orgs", "received_events_url": "https://api.github.com/users/ujjwaltwitx/received_events", "repos_url": "https://api.github.com/users/ujjwaltwitx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ujjwaltwitx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ujjwaltwitx/subscriptions", "type": "User", "url": "https://api.github.com/users/ujjwaltwitx", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-10T13:01:45Z
2021-10-05T14:19:30Z
2021-07-07T13:28:50Z
NONE
resolved
I am a begineer so, I need help understanding the project so that I could contribute.
{ "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": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 2, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/psf/requests/issues/5839/reactions" }
https://api.github.com/repos/psf/requests/issues/5839/timeline
null
completed
null
null
false
[ "Unfortunately this isn't the place to ask this question, as this issue tracker is reserved for defects in Requests. Our project structure isn't too complicated / non-standard, continue to do studying and research online and you will figure it out." ]
https://api.github.com/repos/psf/requests/issues/5838
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5838/labels{/name}
https://api.github.com/repos/psf/requests/issues/5838/comments
https://api.github.com/repos/psf/requests/issues/5838/events
https://github.com/psf/requests/issues/5838
913,672,421
MDU6SXNzdWU5MTM2NzI0MjE=
5,838
Requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/85451796?v=4", "events_url": "https://api.github.com/users/Bombaleya/events{/privacy}", "followers_url": "https://api.github.com/users/Bombaleya/followers", "following_url": "https://api.github.com/users/Bombaleya/following{/other_user}", "gists_url": "https://api.github.com/users/Bombaleya/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Bombaleya", "id": 85451796, "login": "Bombaleya", "node_id": "MDQ6VXNlcjg1NDUxNzk2", "organizations_url": "https://api.github.com/users/Bombaleya/orgs", "received_events_url": "https://api.github.com/users/Bombaleya/received_events", "repos_url": "https://api.github.com/users/Bombaleya/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Bombaleya/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Bombaleya/subscriptions", "type": "User", "url": "https://api.github.com/users/Bombaleya", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-06-07T15:24:17Z
2021-06-07T15:41:10Z
2021-06-07T15:41:02Z
NONE
null
{ "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/5838/reactions" }
https://api.github.com/repos/psf/requests/issues/5838/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5837
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5837/labels{/name}
https://api.github.com/repos/psf/requests/issues/5837/comments
https://api.github.com/repos/psf/requests/issues/5837/events
https://github.com/psf/requests/issues/5837
912,888,083
MDU6SXNzdWU5MTI4ODgwODM=
5,837
How can i get the network cache. i need a to get a link from there that changing every few seconds
{ "avatar_url": "https://avatars.githubusercontent.com/u/73111474?v=4", "events_url": "https://api.github.com/users/Godwhitelight/events{/privacy}", "followers_url": "https://api.github.com/users/Godwhitelight/followers", "following_url": "https://api.github.com/users/Godwhitelight/following{/other_user}", "gists_url": "https://api.github.com/users/Godwhitelight/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Godwhitelight", "id": 73111474, "login": "Godwhitelight", "node_id": "MDQ6VXNlcjczMTExNDc0", "organizations_url": "https://api.github.com/users/Godwhitelight/orgs", "received_events_url": "https://api.github.com/users/Godwhitelight/received_events", "repos_url": "https://api.github.com/users/Godwhitelight/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Godwhitelight/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Godwhitelight/subscriptions", "type": "User", "url": "https://api.github.com/users/Godwhitelight", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-06T16:54:05Z
2021-06-06T17:14:40Z
2021-06-06T17:09:27Z
NONE
spam
Help please
{ "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/5837/reactions" }
https://api.github.com/repos/psf/requests/issues/5837/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/5836
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5836/labels{/name}
https://api.github.com/repos/psf/requests/issues/5836/comments
https://api.github.com/repos/psf/requests/issues/5836/events
https://github.com/psf/requests/issues/5836
910,143,762
MDU6SXNzdWU5MTAxNDM3NjI=
5,836
post failed with 405 on macos 11.4 if data is larger than 65828
{ "avatar_url": "https://avatars.githubusercontent.com/u/5899962?v=4", "events_url": "https://api.github.com/users/dwSun/events{/privacy}", "followers_url": "https://api.github.com/users/dwSun/followers", "following_url": "https://api.github.com/users/dwSun/following{/other_user}", "gists_url": "https://api.github.com/users/dwSun/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dwSun", "id": 5899962, "login": "dwSun", "node_id": "MDQ6VXNlcjU4OTk5NjI=", "organizations_url": "https://api.github.com/users/dwSun/orgs", "received_events_url": "https://api.github.com/users/dwSun/received_events", "repos_url": "https://api.github.com/users/dwSun/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dwSun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dwSun/subscriptions", "type": "User", "url": "https://api.github.com/users/dwSun", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-06-03T06:22:22Z
2021-11-26T03:00:38Z
2021-08-28T02:20:27Z
NONE
resolved
Summary. post failed with 405 on macos 11.4 if data is larger than 65828 ## Reproduction Steps server.py ```python #!/usr/bin/env python3 # -*- coding: utf-8 -*- import json from flask import Flask, request app = Flask(__name__) @app.route("/<url>", methods=["POST", "OPTIONS"]) def url(url): print("[{0}] accessed".format(url)) data = request.data data = json.loads(data) return ( json.dumps({"code": 0, "msg": "ok"}), 200, {"Content-Type": "application/json; charset=utf-8"}, ) if __name__ == "__main__": app.run(host="0.0.0.0", port=5000, debug=True) ``` test.py ```python #!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests def test_api(server, count=10, log=True): try: if log: print("access [{}] with [{}]".format(server, count)) r = requests.post( "http://{}:5000/some_url".format(server), json={"data": "0" * count}, ) assert r.status_code == 200, "failed with [{}]".format(r.status_code) r = r.json(encoding="utf-8") return True except Exception as ex: print("[{}] failed [{}] [{}]".format(server, ex, count)) return False def run_api(server): print("#" * 20) for i in range(65800, 65900): if not test_api(server, i, log=False): break if __name__ == "__main__": linux = "192.168.8.153" macos_11_4 = "192.168.8.107" windows = "192.168.8.127" run_api(linux) run_api(macos_11_4) run_api(windows) ``` - 1 run server.py on windows, macos_11.4 and linux - 2 run test.py on windows, macos_11.4 and linux - 3 run test.py on macos_11.2.3 only on macos_11.4, test.py failed: ```sh #################### [192.168.8.153] failed [('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))] [65828] #################### [192.168.8.107] failed [('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))] [65828] #################### [192.168.8.127] failed [('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))] [65828] ``` server.py logs: ```sh 192.168.8.107 - - [03/Jun/2021 14:15:59] "POST /some_url HTTP/1.1" 200 - 192.168.8.107 - - [03/Jun/2021 14:15:59] "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}POST /some_url HTTP/1.1" 405 - ``` also tried requests 2.24.0 on macos_11.4, same error ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.13" }, "platform": { "release": "20.5.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.5" }, "using_pyopenssl": false } ``` postman and golang works without error when use data larger than 65828 on macos_11.4
{ "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/5836/reactions" }
https://api.github.com/repos/psf/requests/issues/5836/timeline
null
completed
null
null
false
[ "@dwSun, your server logs show the server is responding with a 405 Method Not Allowed. The server appears to be responding as soon as the request is received and closing the connection. Requests is still writing the original request body when the connection is closed by the flask server, resulting in the Connection...
https://api.github.com/repos/psf/requests/issues/5835
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5835/labels{/name}
https://api.github.com/repos/psf/requests/issues/5835/comments
https://api.github.com/repos/psf/requests/issues/5835/events
https://github.com/psf/requests/pull/5835
907,834,956
MDExOlB1bGxSZXF1ZXN0NjU4NjE1OTEx
5,835
Fix GitHub links
{ "avatar_url": "https://avatars.githubusercontent.com/u/167821?v=4", "events_url": "https://api.github.com/users/fmarier/events{/privacy}", "followers_url": "https://api.github.com/users/fmarier/followers", "following_url": "https://api.github.com/users/fmarier/following{/other_user}", "gists_url": "https://api.github.com/users/fmarier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fmarier", "id": 167821, "login": "fmarier", "node_id": "MDQ6VXNlcjE2NzgyMQ==", "organizations_url": "https://api.github.com/users/fmarier/orgs", "received_events_url": "https://api.github.com/users/fmarier/received_events", "repos_url": "https://api.github.com/users/fmarier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fmarier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fmarier/subscriptions", "type": "User", "url": "https://api.github.com/users/fmarier", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-06-01T03:29:22Z
2021-08-31T00:07:04Z
2021-06-01T04:23:54Z
CONTRIBUTOR
resolved
All of these links now redirect to a repo under a different GitHub user account. Not sure whether you want to update the changelog, but I'm happy to amend this PR if you'd rather not change `HISTORY.md`.
{ "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/5835/reactions" }
https://api.github.com/repos/psf/requests/issues/5835/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5835.diff", "html_url": "https://github.com/psf/requests/pull/5835", "merged_at": "2021-06-01T04:23:54Z", "patch_url": "https://github.com/psf/requests/pull/5835.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5835" }
true
[ "Thanks for the PR, @fmarier! Let’s leave the change log alone for now. I’m fine fixing the other references in the docs though.", "I've removed the changelog from this PR.", "Hmm, tests are failing on Python 3.6+ but it's obviously not related to this PR. Looks like something has broken in the last couple week...
https://api.github.com/repos/psf/requests/issues/5834
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5834/labels{/name}
https://api.github.com/repos/psf/requests/issues/5834/comments
https://api.github.com/repos/psf/requests/issues/5834/events
https://github.com/psf/requests/issues/5834
906,861,512
MDU6SXNzdWU5MDY4NjE1MTI=
5,834
Minor: pip install complains (not fails) with current
{ "avatar_url": "https://avatars.githubusercontent.com/u/3092067?v=4", "events_url": "https://api.github.com/users/griswolf/events{/privacy}", "followers_url": "https://api.github.com/users/griswolf/followers", "following_url": "https://api.github.com/users/griswolf/following{/other_user}", "gists_url": "https://api.github.com/users/griswolf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/griswolf", "id": 3092067, "login": "griswolf", "node_id": "MDQ6VXNlcjMwOTIwNjc=", "organizations_url": "https://api.github.com/users/griswolf/orgs", "received_events_url": "https://api.github.com/users/griswolf/received_events", "repos_url": "https://api.github.com/users/griswolf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/griswolf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/griswolf/subscriptions", "type": "User", "url": "https://api.github.com/users/griswolf", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-30T19:38:43Z
2021-08-29T00:06:35Z
2021-05-30T19:44:36Z
NONE
resolved
Summary. During pip install -U requests this message is sent to the terminal: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. requests 2.25.1 requires idna<3,>=2.5, but you have idna 3.2 which is incompatible. ## Expected Result No such message ## Actual Result See above ## Reproduction Steps pip install -U idna re ## System Information { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "3.2" }, "implementation": { "name": "CPython", "version": "3.9.5" }, "platform": { "release": "19.6.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.5" }, "using_pyopenssl": false }
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5834/reactions" }
https://api.github.com/repos/psf/requests/issues/5834/timeline
null
completed
null
null
false
[ "We're aware, please look for existing issues before opening new ones. " ]
https://api.github.com/repos/psf/requests/issues/5833
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5833/labels{/name}
https://api.github.com/repos/psf/requests/issues/5833/comments
https://api.github.com/repos/psf/requests/issues/5833/events
https://github.com/psf/requests/issues/5833
904,032,198
MDU6SXNzdWU5MDQwMzIxOTg=
5,833
Discrepancies between self-prepared and session-prepared request headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/28784688?v=4", "events_url": "https://api.github.com/users/rittneje/events{/privacy}", "followers_url": "https://api.github.com/users/rittneje/followers", "following_url": "https://api.github.com/users/rittneje/following{/other_user}", "gists_url": "https://api.github.com/users/rittneje/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rittneje", "id": 28784688, "login": "rittneje", "node_id": "MDQ6VXNlcjI4Nzg0Njg4", "organizations_url": "https://api.github.com/users/rittneje/orgs", "received_events_url": "https://api.github.com/users/rittneje/received_events", "repos_url": "https://api.github.com/users/rittneje/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rittneje/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rittneje/subscriptions", "type": "User", "url": "https://api.github.com/users/rittneje", "user_view_type": "public" }
[]
open
false
null
[]
null
9
2021-05-27T17:50:01Z
2022-01-06T12:57:11Z
null
NONE
null
If we prepare a request normally (the `prepare()` method), it does not include any additional headers by default, even if the resulting prepared request is sent via a session. However, if the request is prepared via the session (the `prepare_request(Request)` method), then it will include a few headers by default: `Accept`, `Accept-Encoding`, `User-Agent`, and `Connection`. There are some (arguably buggy) HTTP servers that apparently will reject any request that includes the `Accept` or `Accept-Encoding` header with 406 Not Acceptable. This situation led to major confusion when trying to fix our usage of this library to send all the requests through a single session in order to leverage cookie handling. This default header logic does not appear to be documented anywhere. I also think it is very confusing that a self-prepared request and a session-prepared request would have different headers. Unfortunately, I assume this cannot be changed easily for fear of breaking backwards compatibility.
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/5833/reactions" }
https://api.github.com/repos/psf/requests/issues/5833/timeline
null
null
null
null
false
[ "I'm fairly certain this was at one point covered in our docs. With that in mind, why is this a _bug report_? How can you expect `Request.prepare()` to do something with session state when it doesn't have access to the session?", "`Accept`, `Accept-Encoding`, and `User-Agent` have nothing to do with session state...
https://api.github.com/repos/psf/requests/issues/5832
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5832/labels{/name}
https://api.github.com/repos/psf/requests/issues/5832/comments
https://api.github.com/repos/psf/requests/issues/5832/events
https://github.com/psf/requests/issues/5832
903,936,455
MDU6SXNzdWU5MDM5MzY0NTU=
5,832
What is the correct way to use requests.Session with celery ??
{ "avatar_url": "https://avatars.githubusercontent.com/u/17484350?v=4", "events_url": "https://api.github.com/users/jackton1/events{/privacy}", "followers_url": "https://api.github.com/users/jackton1/followers", "following_url": "https://api.github.com/users/jackton1/following{/other_user}", "gists_url": "https://api.github.com/users/jackton1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jackton1", "id": 17484350, "login": "jackton1", "node_id": "MDQ6VXNlcjE3NDg0MzUw", "organizations_url": "https://api.github.com/users/jackton1/orgs", "received_events_url": "https://api.github.com/users/jackton1/received_events", "repos_url": "https://api.github.com/users/jackton1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jackton1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jackton1/subscriptions", "type": "User", "url": "https://api.github.com/users/jackton1", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-05-27T15:54:23Z
2021-11-04T00:00:31Z
2021-06-16T23:41:08Z
NONE
resolved
I have a fairly basic setup of celery running on `4.4.6` and `requests[security]` `2.24.0` most of the task look like. ```py @app.task(bind=True) def get_some_data_from_a_server_and_update_records(self, ...): # Make a request using requests via a Session that is maintained by the instance of the SDK my_sdk_client = Client() response = my_sdk_client.session.get(...) # Update my database ``` Django celery settings ```py # Celery CELERY_BROKER_URL = REDIS_URL CELERY_RESULT_BACKEND = REDIS_URL CELERY_TASK_QUEUES = ( Queue('critical', Exchange('critical'), routing_key='critical'), Queue('high', Exchange('high'), routing_key='high'), Queue('medium', Exchange('medium'), routing_key='medium'), Queue('low', Exchange('low'), routing_key='low'), ) CELERY_TASK_DEFAULT_QUEUE = 'medium' CELERY_TASK_IGNORE_RESULT = True CELERY_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_WORKER_HIJACK_ROOT_LOGGER = False CELERY_WORKER_POOL = 'threads' ``` Which runs on GKE using multiple pods i.e 8 - 10 pods with each worker reading from a dedicated queue Unfortunately this results in a number of `ConnectionErrors` as shown below ```py File /venv/lib/python3.6/site-packages/requests/sessions.py line 578 in post return self.request('POST', url, data=data, json=json, **kwargs) File /venv/lib/python3.6/site-packages/requests/sessions.py line 530 in request resp = self.send(prep, **send_kwargs) File /venv/lib/python3.6/site-packages/requests/sessions.py line 643 in send r = adapter.send(request, **kwargs) File /venv/lib/python3.6/site-packages/requests/adapters.py line 498 in send args locals raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', OSError(0, 'Error')) ProtocolError: ('Connection aborted.', OSError(0, 'Error')) (Most recent call last) ``` The current docs don't highlight this which seems like a common use case and is currently a pain point. Based: https://github.com/psf/requests/issues/4323 Most debate around this has been about the lack of multiprocess safety using requests or ensuring you use a single Session per thread/process which doesn't seem feasible when you interact with more than one endpoint or initialize multiple Sessions in different tasks. We switched our execution pool to use `threads` but this doesn't solve the issue. # Suggestions - Expect a better setup documentation that clearly states any limitations running in a distributed application like celery. - How to work with celery and `requests` or `urllib3` - A Recommended execution pool based on how celery is intended to be used. i.e `prefork` vs `threads` or `gevent` / `eventlet`. ## Package Versions: ``` celery[redis]==4.4.6 # via coherentpath (setup.py), django-celery-beat, flower certifi==2019.11.28 # via requests, urllib3 cffi==1.13.2 # via bcrypt, cryptography, pynacl chardet==3.0.4 # via aiohttp, requests cryptography==3.3.2 # via django-cryptography, paramiko, pyopenssl, requests, urllib3 django-celery-beat==2.0.0 # via coherentpath (setup.py) django-timezone-field==4.1.1 # via coherentpath (setup.py), django-celery-beat future==0.18.2 # via celery, django-json-widget, python-jose humanize==0.5.1 # via flower idna-ssl==1.1.0 # via aiohttp idna==2.6 # via idna-ssl, jsonschema, requests, urllib3, yarl importlib-metadata==1.6.0 # via kombu, scout-apm kombu==4.6.11 # via celery oauthlib==3.1.0 # via django-oauth-toolkit, requests-oauthlib psycopg2==2.7.3.1 # via coherentpath (setup.py) pycparser==2.19 # via cffi pyopenssl==19.1.0 # via requests, urllib3 pyparsing==2.4.7 # via httplib2, packaging python-crontab==2.5.1 # via django-celery-beat python-dateutil==2.8.1 # via jsonmodels, pandas, python-crontab redis==3.5.3 # via celery requests-toolbelt==0.9.1 # via zeep requests[security]==2.24.0 urllib3[secure]==1.25.11 # via pdpyras, requests, scout-apm, selenium vine==1.3.0 # via amqp, celery ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/17484350?v=4", "events_url": "https://api.github.com/users/jackton1/events{/privacy}", "followers_url": "https://api.github.com/users/jackton1/followers", "following_url": "https://api.github.com/users/jackton1/following{/other_user}", "gists_url": "https://api.github.com/users/jackton1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jackton1", "id": 17484350, "login": "jackton1", "node_id": "MDQ6VXNlcjE3NDg0MzUw", "organizations_url": "https://api.github.com/users/jackton1/orgs", "received_events_url": "https://api.github.com/users/jackton1/received_events", "repos_url": "https://api.github.com/users/jackton1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jackton1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jackton1/subscriptions", "type": "User", "url": "https://api.github.com/users/jackton1", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5832/reactions" }
https://api.github.com/repos/psf/requests/issues/5832/timeline
null
completed
null
null
false
[ "I've worked on products with several hundreds of thousands of tasks per minute running using requests and Sessions, API clients, etc. and never had this problem. \r\n\r\nWhat exactly should we be highlighting in particular in your opinion? The issue you linked if I remember correctly wanted to share the connection...
https://api.github.com/repos/psf/requests/issues/5831
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5831/labels{/name}
https://api.github.com/repos/psf/requests/issues/5831/comments
https://api.github.com/repos/psf/requests/issues/5831/events
https://github.com/psf/requests/issues/5831
903,562,243
MDU6SXNzdWU5MDM1NjIyNDM=
5,831
Root CA not initialized if running in threads the first time
{ "avatar_url": "https://avatars.githubusercontent.com/u/1155039?v=4", "events_url": "https://api.github.com/users/freegroup/events{/privacy}", "followers_url": "https://api.github.com/users/freegroup/followers", "following_url": "https://api.github.com/users/freegroup/following{/other_user}", "gists_url": "https://api.github.com/users/freegroup/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/freegroup", "id": 1155039, "login": "freegroup", "node_id": "MDQ6VXNlcjExNTUwMzk=", "organizations_url": "https://api.github.com/users/freegroup/orgs", "received_events_url": "https://api.github.com/users/freegroup/received_events", "repos_url": "https://api.github.com/users/freegroup/repos", "site_admin": false, "starred_url": "https://api.github.com/users/freegroup/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/freegroup/subscriptions", "type": "User", "url": "https://api.github.com/users/freegroup", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-27T11:05:38Z
2022-02-26T06:00:24Z
2021-11-28T05:27:17Z
NONE
resolved
I want use mTLS for a server connection. If I start this in an thread, I get a connection refused message. If I call them once in the main thread and then in the spawned thread, everything is fine. It seems, that the RootCA is not initialized correct if I use them the first time within a thread. ## Reproduction Steps ```python import requests thread = None stop_sync = False def prooftoken_thread(): while not stop_sync: with lock: print("sync") response = requests.get(PROOFTOKEN_URL, allow_redirects=True, cert=("./secrets/certificate", "./secrets/key")) print(response.json()) time.sleep(10) if __name__ == '__main__': if PROOFTOKEN_URL: print("start proof token sync job with URL: {}".format(PROOFTOKEN_URL)) ################################### # remove this line and the thread will fail response = requests.get(PROOFTOKEN_URL, allow_redirects=True, cert=("./secrets/certificate", "./secrets/key")) ################################### thread = threading.Thread(target=prooftoken_thread, daemon=True) thread.start() else: print("No 'prooftoken_url' found. Running in 'app-only' mode.") print("AuthZ Server Up and running") app.run(host='0.0.0.0', port=8080, debug=False, threaded=False) ``` StackTrace in case of failure ``` Exception in thread Thread-2: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection raise err File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa17cce1f10>: Failed to establish a new connection: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='eu-osb.accounts400.ondemand.com', port=443): Max retries exceeded with url: /sap/cp-kernel/identity/v1/prooftoken/1c30c40e-c434-41c1-a068-2036c08d2bb2/v2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa17cce1f10>: Failed to establish a new connection: [Errno 111] Connection refused')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "src/main.py", line 137, in prooftoken_thread response = requests.get(PROOFTOKEN_URL, allow_redirects=True, cert=("./secrets/certificate", "./secrets/key")) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='eu-osb.accounts400.ondemand.com', port=443): Max retries exceeded with url: /sap/cp-kernel/identity/v1/prooftoken/1c30c40e-c434-41c1-a068-2036c08d2bb2/v2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa17cce1f10>: Failed to establish a new connection: [Errno 111] Connection refused')) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.2" }, "platform": { "release": "20.4.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.4" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5831/reactions" }
https://api.github.com/repos/psf/requests/issues/5831/timeline
null
completed
null
null
false
[ "I get errors in the thread until I *init* the `certifi` lib in the main thread.\r\n\r\n```python\r\n import certifi\r\n print(certifi.where())\r\n```\r\n\r\nAfter the call of the statement above the errors in the thread are gone....\r\n\r\nIt seems that the `certifi` is not initialized correct.\r\n\r...
https://api.github.com/repos/psf/requests/issues/5830
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5830/labels{/name}
https://api.github.com/repos/psf/requests/issues/5830/comments
https://api.github.com/repos/psf/requests/issues/5830/events
https://github.com/psf/requests/issues/5830
903,471,354
MDU6SXNzdWU5MDM0NzEzNTQ=
5,830
JSON parameter string in requests.post
{ "avatar_url": "https://avatars.githubusercontent.com/u/33341167?v=4", "events_url": "https://api.github.com/users/L-lei/events{/privacy}", "followers_url": "https://api.github.com/users/L-lei/followers", "following_url": "https://api.github.com/users/L-lei/following{/other_user}", "gists_url": "https://api.github.com/users/L-lei/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/L-lei", "id": 33341167, "login": "L-lei", "node_id": "MDQ6VXNlcjMzMzQxMTY3", "organizations_url": "https://api.github.com/users/L-lei/orgs", "received_events_url": "https://api.github.com/users/L-lei/received_events", "repos_url": "https://api.github.com/users/L-lei/repos", "site_admin": false, "starred_url": "https://api.github.com/users/L-lei/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/L-lei/subscriptions", "type": "User", "url": "https://api.github.com/users/L-lei", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-27T09:35:56Z
2021-08-27T00:08:18Z
2021-05-27T21:45:52Z
NONE
resolved
Shouldn't the content of JSON parameters be judged by type? isinstance(json_content,dict) res = requests.post(url=url,json='{"a":1}'),In this way, the receiver needs to deserialize JSON twice to get the data
{ "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/5830/reactions" }
https://api.github.com/repos/psf/requests/issues/5830/timeline
null
completed
null
null
false
[ "No, it's clearly documented as something that _will_ be JSON serialized with a JSON library. That means what you pass in will be passed to a serializer. Some people may want to pass a string and have that properly serialized. What would you expect to happen if we you did `json=\"Some text\"`? That should be `\"\\\...
https://api.github.com/repos/psf/requests/issues/5829
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5829/labels{/name}
https://api.github.com/repos/psf/requests/issues/5829/comments
https://api.github.com/repos/psf/requests/issues/5829/events
https://github.com/psf/requests/issues/5829
902,196,113
MDU6SXNzdWU5MDIxOTYxMTM=
5,829
limit the data transfer of individual HTTP requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/22270983?v=4", "events_url": "https://api.github.com/users/Chiragasourabh/events{/privacy}", "followers_url": "https://api.github.com/users/Chiragasourabh/followers", "following_url": "https://api.github.com/users/Chiragasourabh/following{/other_user}", "gists_url": "https://api.github.com/users/Chiragasourabh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Chiragasourabh", "id": 22270983, "login": "Chiragasourabh", "node_id": "MDQ6VXNlcjIyMjcwOTgz", "organizations_url": "https://api.github.com/users/Chiragasourabh/orgs", "received_events_url": "https://api.github.com/users/Chiragasourabh/received_events", "repos_url": "https://api.github.com/users/Chiragasourabh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Chiragasourabh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Chiragasourabh/subscriptions", "type": "User", "url": "https://api.github.com/users/Chiragasourabh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-26T10:51:29Z
2021-08-27T00:08:19Z
2021-05-26T12:01:22Z
NONE
resolved
I have a system with limited network bandwidth. if I make an upload or download large file operation using the requests library, the single request is consuming the whole available bandwidth of the system. is there a way to add latency to these requests (which slows down throughout of serial requests but not consume overall bandwidth)? A direct solution to set download/upload bandwidth for an individual HTTP request or to keep a part of the total available bandwidth free would be great.
{ "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/5829/reactions" }
https://api.github.com/repos/psf/requests/issues/5829/timeline
null
completed
null
null
false
[ "In the future, please search **closed and** open issues before creating new ones that are duplicates.\r\n\r\nSee also #1690, #4330" ]
https://api.github.com/repos/psf/requests/issues/5828
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5828/labels{/name}
https://api.github.com/repos/psf/requests/issues/5828/comments
https://api.github.com/repos/psf/requests/issues/5828/events
https://github.com/psf/requests/issues/5828
900,876,358
MDU6SXNzdWU5MDA4NzYzNTg=
5,828
page 404 through Requests but can access through browser
{ "avatar_url": "https://avatars.githubusercontent.com/u/63130426?v=4", "events_url": "https://api.github.com/users/garagesteve1155/events{/privacy}", "followers_url": "https://api.github.com/users/garagesteve1155/followers", "following_url": "https://api.github.com/users/garagesteve1155/following{/other_user}", "gists_url": "https://api.github.com/users/garagesteve1155/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/garagesteve1155", "id": 63130426, "login": "garagesteve1155", "node_id": "MDQ6VXNlcjYzMTMwNDI2", "organizations_url": "https://api.github.com/users/garagesteve1155/orgs", "received_events_url": "https://api.github.com/users/garagesteve1155/received_events", "repos_url": "https://api.github.com/users/garagesteve1155/repos", "site_admin": false, "starred_url": "https://api.github.com/users/garagesteve1155/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/garagesteve1155/subscriptions", "type": "User", "url": "https://api.github.com/users/garagesteve1155", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-25T14:16:19Z
2021-08-27T00:08:19Z
2021-05-26T12:02:02Z
NONE
resolved
Trying to view a page with Requests but getting page 404 with Requests but I can access the page no problem through my browser My Code (Sorry about how it looks, Im not familiar with using Github): string_page = str(page) with requests.Session() as s: > resp = s.get('https://bscscan.com/token/generic-tokentxns2?m=normal&contractAddress=0x470862af0cf8d27ebfe0ff77b0649779c29186db&a=&sid=f58c1cdefacc680b799412c7645ed7f7&p='+string_page) > page_info = str(resp.text) print(page_info)
{ "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/5828/reactions" }
https://api.github.com/repos/psf/requests/issues/5828/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.", "Seems like a defect to me. Page works on browser, ...
https://api.github.com/repos/psf/requests/issues/5827
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5827/labels{/name}
https://api.github.com/repos/psf/requests/issues/5827/comments
https://api.github.com/repos/psf/requests/issues/5827/events
https://github.com/psf/requests/issues/5827
899,873,893
MDU6SXNzdWU4OTk4NzM4OTM=
5,827
Deadlock on long requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/46259?v=4", "events_url": "https://api.github.com/users/skhaz/events{/privacy}", "followers_url": "https://api.github.com/users/skhaz/followers", "following_url": "https://api.github.com/users/skhaz/following{/other_user}", "gists_url": "https://api.github.com/users/skhaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/skhaz", "id": 46259, "login": "skhaz", "node_id": "MDQ6VXNlcjQ2MjU5", "organizations_url": "https://api.github.com/users/skhaz/orgs", "received_events_url": "https://api.github.com/users/skhaz/received_events", "repos_url": "https://api.github.com/users/skhaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/skhaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/skhaz/subscriptions", "type": "User", "url": "https://api.github.com/users/skhaz", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-05-24T17:50:56Z
2021-08-27T00:08:20Z
2021-05-24T19:38:04Z
NONE
resolved
# Update This seems to happen only inside WSL2, inside docker and on a Linux, it works flawlessly. ## Description I have a HTTP service that takes around 6 minutes to make a response. If I run cURL manually it works, I can get the result. If I run urllib it works. I am sure that the service returns with a HTTP 200 with JSON data. You can check running `curl -X POST "https://uc.a.run.app?user=foobar"` But on requests it took forevers and never returns. # Atention This request took around 6 minutes to be completed. I can get this work with `urllib`, but no with requests. ## Expected Result The request be completed. ## Actual Result The request get stuck forever on `request.post` ## Reproduction Steps ```python import requests url = f"https://uc.a.run.app?user=foobar" response = requests.post(url) # THIS CALL NEVER RETURNS print(f"{response.json()=}") ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "5.4.72-microsoft-standard-WSL2", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.26.4" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/46259?v=4", "events_url": "https://api.github.com/users/skhaz/events{/privacy}", "followers_url": "https://api.github.com/users/skhaz/followers", "following_url": "https://api.github.com/users/skhaz/following{/other_user}", "gists_url": "https://api.github.com/users/skhaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/skhaz", "id": 46259, "login": "skhaz", "node_id": "MDQ6VXNlcjQ2MjU5", "organizations_url": "https://api.github.com/users/skhaz/orgs", "received_events_url": "https://api.github.com/users/skhaz/received_events", "repos_url": "https://api.github.com/users/skhaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/skhaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/skhaz/subscriptions", "type": "User", "url": "https://api.github.com/users/skhaz", "user_view_type": "public" }
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5827/reactions" }
https://api.github.com/repos/psf/requests/issues/5827/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5826
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5826/labels{/name}
https://api.github.com/repos/psf/requests/issues/5826/comments
https://api.github.com/repos/psf/requests/issues/5826/events
https://github.com/psf/requests/issues/5826
899,781,014
MDU6SXNzdWU4OTk3ODEwMTQ=
5,826
Response Content not read properly. _content_consumed: False
{ "avatar_url": "https://avatars.githubusercontent.com/u/10815442?v=4", "events_url": "https://api.github.com/users/tandonraghav/events{/privacy}", "followers_url": "https://api.github.com/users/tandonraghav/followers", "following_url": "https://api.github.com/users/tandonraghav/following{/other_user}", "gists_url": "https://api.github.com/users/tandonraghav/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tandonraghav", "id": 10815442, "login": "tandonraghav", "node_id": "MDQ6VXNlcjEwODE1NDQy", "organizations_url": "https://api.github.com/users/tandonraghav/orgs", "received_events_url": "https://api.github.com/users/tandonraghav/received_events", "repos_url": "https://api.github.com/users/tandonraghav/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tandonraghav/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tandonraghav/subscriptions", "type": "User", "url": "https://api.github.com/users/tandonraghav", "user_view_type": "public" }
[ { "color": "f7c6c7", "default": false, "description": null, "id": 167537670, "name": "Propose Close", "node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=", "url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close" } ]
closed
true
null
[]
null
6
2021-05-24T15:45:59Z
2021-08-27T00:08:19Z
2021-05-24T19:47:33Z
NONE
resolved
Summary. We are observing some weird behaviour with our requests lib. While making GET/POST calls we observe most of the time Headers are read and status=200, but fails to read _content. May I know what are the possible reasons for this? This is happening way too many times. The Response we get is - ``` "response":"{'cookies': , '_content': False, 'headers': {'Content-Length': '939', 'request-id': 'ZLnsodTJ', 'Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 24 May 2021 14:12:30 GMT', 'Content-Type': 'application\/json'}, 'url': u'http:\/\/xxx:yyyy\/', 'status_code': 200, '_content_consumed': False, 'encoding': 'utf-8', 'request': , 'connection': , 'elapsed': datetime.timedelta(0, 0, 9880), 'raw': , 'reason': 'OK', '_next': None, 'history': []} ``` This result in error in decoding response content. ## Expected Result ## Actual Result Exception while reading response. What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.2.1" }, "idna": { "version": "" }, "implementation": { "name": "CPython", "version": "2.7.17" }, "platform": { "release": "4.4.0-1119-aws", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010108f", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.26.2" }, "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/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/5826/reactions" }
https://api.github.com/repos/psf/requests/issues/5826/timeline
null
completed
null
null
false
[ "Hi @tandonraghav,\r\n\r\nThis issue doesn't make it clear what problem you're actually encountering. `_content` is a private variable, so there should never be a case where you're touching this directly. Are you saying the [`content`](https://docs.python-requests.org/en/master/user/quickstart/#binary-response-cont...
https://api.github.com/repos/psf/requests/issues/5825
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5825/labels{/name}
https://api.github.com/repos/psf/requests/issues/5825/comments
https://api.github.com/repos/psf/requests/issues/5825/events
https://github.com/psf/requests/issues/5825
897,939,610
MDU6SXNzdWU4OTc5Mzk2MTA=
5,825
Chardet license
{ "avatar_url": "https://avatars.githubusercontent.com/u/25073721?v=4", "events_url": "https://api.github.com/users/huniyaarif1/events{/privacy}", "followers_url": "https://api.github.com/users/huniyaarif1/followers", "following_url": "https://api.github.com/users/huniyaarif1/following{/other_user}", "gists_url": "https://api.github.com/users/huniyaarif1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/huniyaarif1", "id": 25073721, "login": "huniyaarif1", "node_id": "MDQ6VXNlcjI1MDczNzIx", "organizations_url": "https://api.github.com/users/huniyaarif1/orgs", "received_events_url": "https://api.github.com/users/huniyaarif1/received_events", "repos_url": "https://api.github.com/users/huniyaarif1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/huniyaarif1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/huniyaarif1/subscriptions", "type": "User", "url": "https://api.github.com/users/huniyaarif1", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-21T11:06:13Z
2021-08-27T00:08:20Z
2021-05-21T11:51:59Z
NONE
resolved
Hey I have a question. Chardet is using LGPL 2.1 licensing. Isn't it a copyleft license?
{ "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/5825/reactions" }
https://api.github.com/repos/psf/requests/issues/5825/timeline
null
completed
null
null
false
[ "This is and has been discussed elsewhere, search open and closed issues before opening a new one. " ]
https://api.github.com/repos/psf/requests/issues/5824
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5824/labels{/name}
https://api.github.com/repos/psf/requests/issues/5824/comments
https://api.github.com/repos/psf/requests/issues/5824/events
https://github.com/psf/requests/issues/5824
897,294,747
MDU6SXNzdWU4OTcyOTQ3NDc=
5,824
Timeline for fixing #5710?
{ "avatar_url": "https://avatars.githubusercontent.com/u/34655?v=4", "events_url": "https://api.github.com/users/dfrankow/events{/privacy}", "followers_url": "https://api.github.com/users/dfrankow/followers", "following_url": "https://api.github.com/users/dfrankow/following{/other_user}", "gists_url": "https://api.github.com/users/dfrankow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dfrankow", "id": 34655, "login": "dfrankow", "node_id": "MDQ6VXNlcjM0NjU1", "organizations_url": "https://api.github.com/users/dfrankow/orgs", "received_events_url": "https://api.github.com/users/dfrankow/received_events", "repos_url": "https://api.github.com/users/dfrankow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dfrankow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dfrankow/subscriptions", "type": "User", "url": "https://api.github.com/users/dfrankow", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-20T18:58:39Z
2021-08-27T00:08:21Z
2021-05-20T19:21:53Z
NONE
resolved
I see https://github.com/psf/requests/issues/5710 says #5711 will fix an issue with using an old idna. Looks like the last movement there was Jan 20, now about 4 months ago. Can you offer any guidance on when #5710 will be fixed? Like others, this is blocking some of my development. In particular, I wish to try https://github.com/karolyi/py3-validate-email, which requires `idna~=3.0`, incompatible with the current requests requirements.
{ "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/5824/reactions" }
https://api.github.com/repos/psf/requests/issues/5824/timeline
null
completed
null
null
false
[ "Hi @dfrankow,\r\n\r\nAs the last comments in both of those issues state (https://github.com/psf/requests/issues/5710#issuecomment-830211618) (https://github.com/psf/requests/pull/5711#issuecomment-764017260), this is likely to be included in the next release of Requests. The change is unfortunately breaking for a ...
https://api.github.com/repos/psf/requests/issues/5823
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5823/labels{/name}
https://api.github.com/repos/psf/requests/issues/5823/comments
https://api.github.com/repos/psf/requests/issues/5823/events
https://github.com/psf/requests/issues/5823
896,034,652
MDU6SXNzdWU4OTYwMzQ2NTI=
5,823
The character ü gets replaced by ü
{ "avatar_url": "https://avatars.githubusercontent.com/u/64863140?v=4", "events_url": "https://api.github.com/users/MicheleCotrufo/events{/privacy}", "followers_url": "https://api.github.com/users/MicheleCotrufo/followers", "following_url": "https://api.github.com/users/MicheleCotrufo/following{/other_user}", "gists_url": "https://api.github.com/users/MicheleCotrufo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MicheleCotrufo", "id": 64863140, "login": "MicheleCotrufo", "node_id": "MDQ6VXNlcjY0ODYzMTQw", "organizations_url": "https://api.github.com/users/MicheleCotrufo/orgs", "received_events_url": "https://api.github.com/users/MicheleCotrufo/received_events", "repos_url": "https://api.github.com/users/MicheleCotrufo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MicheleCotrufo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MicheleCotrufo/subscriptions", "type": "User", "url": "https://api.github.com/users/MicheleCotrufo", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-19T23:16:12Z
2021-08-27T00:08:21Z
2021-05-20T13:07:39Z
NONE
resolved
I am using this library to retrieve some bibliographic information. If I do ``` import requests url = "http://dx.doi.org/10.1103/PhysRevA.96.053817" headers = {"accept": "application/x-bibtex"} r = requests.get(url, headers = headers) print(r.text) ``` I get a string that contains the character ü. Instead, that character should be ü (I also double-checked by querying directly via broswer). Do I need to change any encoding/decoding settings?
{ "avatar_url": "https://avatars.githubusercontent.com/u/64863140?v=4", "events_url": "https://api.github.com/users/MicheleCotrufo/events{/privacy}", "followers_url": "https://api.github.com/users/MicheleCotrufo/followers", "following_url": "https://api.github.com/users/MicheleCotrufo/following{/other_user}", "gists_url": "https://api.github.com/users/MicheleCotrufo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MicheleCotrufo", "id": 64863140, "login": "MicheleCotrufo", "node_id": "MDQ6VXNlcjY0ODYzMTQw", "organizations_url": "https://api.github.com/users/MicheleCotrufo/orgs", "received_events_url": "https://api.github.com/users/MicheleCotrufo/received_events", "repos_url": "https://api.github.com/users/MicheleCotrufo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MicheleCotrufo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MicheleCotrufo/subscriptions", "type": "User", "url": "https://api.github.com/users/MicheleCotrufo", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5823/reactions" }
https://api.github.com/repos/psf/requests/issues/5823/timeline
null
completed
null
null
false
[ "I seem to have found a solution. Setting `r.encoding='utf-8'` does the trick,\r\n\r\n```\r\nimport requests\r\nurl = \"http://dx.doi.org/10.1103/PhysRevA.96.053817\" \r\nheaders = {\"accept\": \"application/x-bibtex\"}\r\nr = requests.get(url, headers = headers)\r\nr.encoding='utf-8'\r\nprint(r.text)\r\n```\r\n\r\...
https://api.github.com/repos/psf/requests/issues/5822
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5822/labels{/name}
https://api.github.com/repos/psf/requests/issues/5822/comments
https://api.github.com/repos/psf/requests/issues/5822/events
https://github.com/psf/requests/issues/5822
895,158,687
MDU6SXNzdWU4OTUxNTg2ODc=
5,822
Requests ignores KeyboardInterrupt
{ "avatar_url": "https://avatars.githubusercontent.com/u/4163396?v=4", "events_url": "https://api.github.com/users/mrx23dot/events{/privacy}", "followers_url": "https://api.github.com/users/mrx23dot/followers", "following_url": "https://api.github.com/users/mrx23dot/following{/other_user}", "gists_url": "https://api.github.com/users/mrx23dot/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrx23dot", "id": 4163396, "login": "mrx23dot", "node_id": "MDQ6VXNlcjQxNjMzOTY=", "organizations_url": "https://api.github.com/users/mrx23dot/orgs", "received_events_url": "https://api.github.com/users/mrx23dot/received_events", "repos_url": "https://api.github.com/users/mrx23dot/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mrx23dot/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrx23dot/subscriptions", "type": "User", "url": "https://api.github.com/users/mrx23dot", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-19T08:38:00Z
2021-08-27T00:08:20Z
2021-05-21T08:17:47Z
NONE
resolved
Requests ignores CTRL+C KeyboardInterrupt when it does it's timeout. ## Expected Result It should give up waiting when requested and exit immediately. ## Actual Result Keeps doing it's timeout until elapse then exits. ## Reproduction Steps ```python import requests # an invalid url resp = requests.get('http://192.1.5.2', timeout=50) # press CTRL+C while executing ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.1.1" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010108f", "version": "19.1.0" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.26.3" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/4163396?v=4", "events_url": "https://api.github.com/users/mrx23dot/events{/privacy}", "followers_url": "https://api.github.com/users/mrx23dot/followers", "following_url": "https://api.github.com/users/mrx23dot/following{/other_user}", "gists_url": "https://api.github.com/users/mrx23dot/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mrx23dot", "id": 4163396, "login": "mrx23dot", "node_id": "MDQ6VXNlcjQxNjMzOTY=", "organizations_url": "https://api.github.com/users/mrx23dot/orgs", "received_events_url": "https://api.github.com/users/mrx23dot/received_events", "repos_url": "https://api.github.com/users/mrx23dot/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mrx23dot/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mrx23dot/subscriptions", "type": "User", "url": "https://api.github.com/users/mrx23dot", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5822/reactions" }
https://api.github.com/repos/psf/requests/issues/5822/timeline
null
completed
null
null
false
[ "Hey @mrx23dot,\r\n\r\nThanks for the report. I took a quick look and was able to reproduce the issue. It's specific to Windows 10 and doesn't appear to happen in *nix flavor environments. A quick look at the stack trace shows the culprit isn't actually Requests, but the Python standard library. Specifically `socke...
https://api.github.com/repos/psf/requests/issues/5821
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5821/labels{/name}
https://api.github.com/repos/psf/requests/issues/5821/comments
https://api.github.com/repos/psf/requests/issues/5821/events
https://github.com/psf/requests/pull/5821
894,486,367
MDExOlB1bGxSZXF1ZXN0NjQ2ODQzNDg3
5,821
Update advanced.rst
{ "avatar_url": "https://avatars.githubusercontent.com/u/7696441?v=4", "events_url": "https://api.github.com/users/Akay7/events{/privacy}", "followers_url": "https://api.github.com/users/Akay7/followers", "following_url": "https://api.github.com/users/Akay7/following{/other_user}", "gists_url": "https://api.github.com/users/Akay7/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Akay7", "id": 7696441, "login": "Akay7", "node_id": "MDQ6VXNlcjc2OTY0NDE=", "organizations_url": "https://api.github.com/users/Akay7/orgs", "received_events_url": "https://api.github.com/users/Akay7/received_events", "repos_url": "https://api.github.com/users/Akay7/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Akay7/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Akay7/subscriptions", "type": "User", "url": "https://api.github.com/users/Akay7", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-05-18T15:07:30Z
2021-10-16T11:00:24Z
2021-07-18T10:59:38Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5821/reactions" }
https://api.github.com/repos/psf/requests/issues/5821/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5821.diff", "html_url": "https://github.com/psf/requests/pull/5821", "merged_at": "2021-07-18T10:59:38Z", "patch_url": "https://github.com/psf/requests/pull/5821.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5821" }
true
[]
https://api.github.com/repos/psf/requests/issues/5819
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5819/labels{/name}
https://api.github.com/repos/psf/requests/issues/5819/comments
https://api.github.com/repos/psf/requests/issues/5819/events
https://github.com/psf/requests/issues/5819
893,175,183
MDU6SXNzdWU4OTMxNzUxODM=
5,819
Help me update csrf token for the first time sess.headers.update({'X-CSRFToken' : sess.get('https:/
{ "avatar_url": "https://avatars.githubusercontent.com/u/84271940?v=4", "events_url": "https://api.github.com/users/Omborgad640/events{/privacy}", "followers_url": "https://api.github.com/users/Omborgad640/followers", "following_url": "https://api.github.com/users/Omborgad640/following{/other_user}", "gists_url": "https://api.github.com/users/Omborgad640/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Omborgad640", "id": 84271940, "login": "Omborgad640", "node_id": "MDQ6VXNlcjg0MjcxOTQw", "organizations_url": "https://api.github.com/users/Omborgad640/orgs", "received_events_url": "https://api.github.com/users/Omborgad640/received_events", "repos_url": "https://api.github.com/users/Omborgad640/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Omborgad640/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Omborgad640/subscriptions", "type": "User", "url": "https://api.github.com/users/Omborgad640", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2021-05-17T10:13:45Z
2021-05-19T21:57:02Z
2021-05-17T15:10:19Z
NONE
off-topic
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance. ![IMG_20210517_154240](https://user-images.githubusercontent.com/84271940/118472505-8a306600-b726-11eb-868c-da970d614d8a.jpg) How solve this error Please help
{ "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/5819/reactions" }
https://api.github.com/repos/psf/requests/issues/5819/timeline
null
completed
null
null
false
[ "> Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.\r\n> ![IMG_20210517_154240](https://user-images.githubusercontent.com/84271940/118472505-8a306600-b726-11eb-868c-da970d614d8a.jpg)\r\n> How solve this error\r\n> Please help\r\n\r\n", "As you ment...
https://api.github.com/repos/psf/requests/issues/5818
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5818/labels{/name}
https://api.github.com/repos/psf/requests/issues/5818/comments
https://api.github.com/repos/psf/requests/issues/5818/events
https://github.com/psf/requests/pull/5818
892,698,697
MDExOlB1bGxSZXF1ZXN0NjQ1MzM1NzUw
5,818
Add tests for conditional charset normalizer
{ "avatar_url": "https://avatars.githubusercontent.com/u/595491?v=4", "events_url": "https://api.github.com/users/potiuk/events{/privacy}", "followers_url": "https://api.github.com/users/potiuk/followers", "following_url": "https://api.github.com/users/potiuk/following{/other_user}", "gists_url": "https://api.github.com/users/potiuk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/potiuk", "id": 595491, "login": "potiuk", "node_id": "MDQ6VXNlcjU5NTQ5MQ==", "organizations_url": "https://api.github.com/users/potiuk/orgs", "received_events_url": "https://api.github.com/users/potiuk/received_events", "repos_url": "https://api.github.com/users/potiuk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/potiuk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/potiuk/subscriptions", "type": "User", "url": "https://api.github.com/users/potiuk", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-16T15:48:41Z
2021-08-27T00:08:39Z
2021-05-17T12:32:56Z
CONTRIBUTOR
resolved
This PR extends and updates tox infrastructure of requests to run tests in different environment - with or without lgpl extra. It should be merged only after the PR introducing the lgpl extra has been merged: https://github.com/psf/requests/pull/5797
{ "avatar_url": "https://avatars.githubusercontent.com/u/595491?v=4", "events_url": "https://api.github.com/users/potiuk/events{/privacy}", "followers_url": "https://api.github.com/users/potiuk/followers", "following_url": "https://api.github.com/users/potiuk/following{/other_user}", "gists_url": "https://api.github.com/users/potiuk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/potiuk", "id": 595491, "login": "potiuk", "node_id": "MDQ6VXNlcjU5NTQ5MQ==", "organizations_url": "https://api.github.com/users/potiuk/orgs", "received_events_url": "https://api.github.com/users/potiuk/received_events", "repos_url": "https://api.github.com/users/potiuk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/potiuk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/potiuk/subscriptions", "type": "User", "url": "https://api.github.com/users/potiuk", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5818/reactions" }
https://api.github.com/repos/psf/requests/issues/5818/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5818.diff", "html_url": "https://github.com/psf/requests/pull/5818", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5818.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5818" }
true
[ "Added it directly to #5797 . Closing this one." ]
https://api.github.com/repos/psf/requests/issues/5817
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5817/labels{/name}
https://api.github.com/repos/psf/requests/issues/5817/comments
https://api.github.com/repos/psf/requests/issues/5817/events
https://github.com/psf/requests/issues/5817
892,480,998
MDU6SXNzdWU4OTI0ODA5OTg=
5,817
Requests on pyth in 3 doesn't work the same as it does in python 2
{ "avatar_url": "https://avatars.githubusercontent.com/u/567047?v=4", "events_url": "https://api.github.com/users/jeffreydwalter/events{/privacy}", "followers_url": "https://api.github.com/users/jeffreydwalter/followers", "following_url": "https://api.github.com/users/jeffreydwalter/following{/other_user}", "gists_url": "https://api.github.com/users/jeffreydwalter/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jeffreydwalter", "id": 567047, "login": "jeffreydwalter", "node_id": "MDQ6VXNlcjU2NzA0Nw==", "organizations_url": "https://api.github.com/users/jeffreydwalter/orgs", "received_events_url": "https://api.github.com/users/jeffreydwalter/received_events", "repos_url": "https://api.github.com/users/jeffreydwalter/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jeffreydwalter/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jeffreydwalter/subscriptions", "type": "User", "url": "https://api.github.com/users/jeffreydwalter", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2021-05-15T15:57:17Z
2022-02-26T07:00:17Z
2021-11-28T03:35:53Z
NONE
resolved
I'm having a problem with making an `OPTIONS` request. If I run the following code in `python 2.7` with `requests 2.7.0` it works fine and I get a `204` back. If I run it with `python 3.8.5` I get a `403`: ``` import requests from requests_toolbelt.utils import dump def print_raw_http(response): data = dump.dump_all(response, request_prefix=b'', response_prefix=b'') print('\n' * 2 + data.decode('utf-8')) headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone)', } session = requests.Session() r = session.options('https://ocapi-app.arlo.com/api/auth', headers=headers) print_raw_http(r) r.raise_for_status() ``` ``` $ python -V Python 2.7.16 $ python3 -V Python 3.8.5 $ pip freeze | grep requests requests==2.7.0 $ pip3 freeze | grep requests requests==2.7.0 ``` `python 2.7`: ``` $ python blah.py OPTIONS /api/auth HTTP/1.1 Host: ocapi-app.arlo.com Connection: keep-alive Accept-Encoding: gzip, deflate Accept: */* User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone) Content-Length: 0 HTTP/1.1 204 No Content ``` `python 3.8.5`: ``` $ python3 blah.py OPTIONS /api/auth HTTP/1.1 Host: ocapi-app.arlo.com User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone) Accept-Encoding: gzip, deflate Accept: */* Connection: keep-alive Content-Length: 0 HTTP/1.1 403 Forbidden ``` Works fine with cURL too: ``` curl -vvvv -X OPTIONS "https://ocapi-app.arlo.com/api/auth" --output --http1.1 --no-alpn --no-npn -H "Host: ocapi-app.arlo.com" -H "Connection: keep-alive" -H "Accept-Encoding: gzip, deflate" -H "Accept: */*" -H "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone)" -H "Content-length: 0" ``` ``` > OPTIONS /api/auth HTTP/1.1 > Host: ocapi-app.arlo.com > Connection: keep-alive > Accept-Encoding: gzip, deflate > Accept: */* > User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone) > Content-length: 0 > < HTTP/1.1 204 No Content ```
{ "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/5817/reactions" }
https://api.github.com/repos/psf/requests/issues/5817/timeline
null
completed
null
null
false
[ "When pasting code blocks it is much easier to read if you use three `` tics around the code block. See [these docs](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) for more information.\r\n", "Yes, I know how to use markdown. That was a copy/paste fail while doing this ...
https://api.github.com/repos/psf/requests/issues/5816
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5816/labels{/name}
https://api.github.com/repos/psf/requests/issues/5816/comments
https://api.github.com/repos/psf/requests/issues/5816/events
https://github.com/psf/requests/pull/5816
891,696,495
MDExOlB1bGxSZXF1ZXN0NjQ0NTIzOTEw
5,816
Warn user if environment variables are used
{ "avatar_url": "https://avatars.githubusercontent.com/u/633765?v=4", "events_url": "https://api.github.com/users/Akasurde/events{/privacy}", "followers_url": "https://api.github.com/users/Akasurde/followers", "following_url": "https://api.github.com/users/Akasurde/following{/other_user}", "gists_url": "https://api.github.com/users/Akasurde/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Akasurde", "id": 633765, "login": "Akasurde", "node_id": "MDQ6VXNlcjYzMzc2NQ==", "organizations_url": "https://api.github.com/users/Akasurde/orgs", "received_events_url": "https://api.github.com/users/Akasurde/received_events", "repos_url": "https://api.github.com/users/Akasurde/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Akasurde/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Akasurde/subscriptions", "type": "User", "url": "https://api.github.com/users/Akasurde", "user_view_type": "public" }
[]
open
false
null
[]
null
7
2021-05-14T07:43:32Z
2022-06-02T08:14:12Z
null
NONE
null
When session.verify=False, session.trust_env=True and REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE is defined as environment variables then, notify user that requests will use environment variables rather than silently failing. partially fixes: #3829 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.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": 5, "-1": 0, "confused": 0, "eyes": 0, "heart": 5, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 10, "url": "https://api.github.com/repos/psf/requests/issues/5816/reactions" }
https://api.github.com/repos/psf/requests/issues/5816/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5816.diff", "html_url": "https://github.com/psf/requests/pull/5816", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5816.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5816" }
true
[ "I spend hours debugging this error. I am aware that this odd behavior is fixed in 3.* release.", "Really nice pr, I checked it – warnings works well, can save a tons of devs time.\r\nIt would be nice to have more verbose warning text, for those who are not familiar with this problem.", "> It would be nice to h...
https://api.github.com/repos/psf/requests/issues/5815
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5815/labels{/name}
https://api.github.com/repos/psf/requests/issues/5815/comments
https://api.github.com/repos/psf/requests/issues/5815/events
https://github.com/psf/requests/pull/5815
891,538,627
MDExOlB1bGxSZXF1ZXN0NjQ0Mzk1MTA0
5,815
fix typo in __init__.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/22633385?v=4", "events_url": "https://api.github.com/users/eltociear/events{/privacy}", "followers_url": "https://api.github.com/users/eltociear/followers", "following_url": "https://api.github.com/users/eltociear/following{/other_user}", "gists_url": "https://api.github.com/users/eltociear/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eltociear", "id": 22633385, "login": "eltociear", "node_id": "MDQ6VXNlcjIyNjMzMzg1", "organizations_url": "https://api.github.com/users/eltociear/orgs", "received_events_url": "https://api.github.com/users/eltociear/received_events", "repos_url": "https://api.github.com/users/eltociear/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eltociear/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eltociear/subscriptions", "type": "User", "url": "https://api.github.com/users/eltociear", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-14T02:22:50Z
2021-08-27T00:08:39Z
2021-05-14T03:34:53Z
NONE
resolved
initialisation -> initialization
{ "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/5815/reactions" }
https://api.github.com/repos/psf/requests/issues/5815/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5815.diff", "html_url": "https://github.com/psf/requests/pull/5815", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5815.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5815" }
true
[ "There are multiple spellings of the word. ", "@sethmlarson OK! Thank you for your reviewing." ]
https://api.github.com/repos/psf/requests/issues/5814
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5814/labels{/name}
https://api.github.com/repos/psf/requests/issues/5814/comments
https://api.github.com/repos/psf/requests/issues/5814/events
https://github.com/psf/requests/issues/5814
886,491,580
MDU6SXNzdWU4ODY0OTE1ODA=
5,814
Merging of default HTTP headers with specified headers breaks the defined ordering
{ "avatar_url": "https://avatars.githubusercontent.com/u/5196024?v=4", "events_url": "https://api.github.com/users/baderj/events{/privacy}", "followers_url": "https://api.github.com/users/baderj/followers", "following_url": "https://api.github.com/users/baderj/following{/other_user}", "gists_url": "https://api.github.com/users/baderj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/baderj", "id": 5196024, "login": "baderj", "node_id": "MDQ6VXNlcjUxOTYwMjQ=", "organizations_url": "https://api.github.com/users/baderj/orgs", "received_events_url": "https://api.github.com/users/baderj/received_events", "repos_url": "https://api.github.com/users/baderj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/baderj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/baderj/subscriptions", "type": "User", "url": "https://api.github.com/users/baderj", "user_view_type": "public" }
[]
open
false
null
[]
null
3
2021-05-11T08:33:34Z
2021-05-11T16:58:38Z
null
NONE
null
Even if headers are defined in an ``OrderedDict``, their order might change if they coincide with the ``default_headers`` set in ``utils.py``, namely ``User-Agent``, ``Accept-Encoding``, ``Accept``, and ``Connection``. ## Expected Result The order of the headers should not change when passed as an ``OrderedDict``. So for example: ```python import requests from collections import OrderedDict headers = OrderedDict([ ("Accept", '1'), ("Accept-Encoding", '2'), ("User-Agent", '3'), ]) r = requests.get('http://www.example.com', headers=headers) ``` should result in the ``Accept`` header coming first, followed by ``Accept-Encoding`` and finally ``User-Agent``. ## Actual Result The ``User-Agent`` comes first, followed by ``Accept-Encoding`` and then ``Accept`` ## Reason The default headers --- as set by ``requests.utils.default_headers()`` --- are merged with the user specified headers by the function ``requests.sessions.merge_settings``. This function first takes the default headers and then updates that with the user specified headers. This ensures that user specified headers overwrite the default ones. However, the update process does not change the order of the default headers. So when setting ``User-Agent`` after ``Accept``, this will not be taken into account as both headers are already in the default headers and in reverse order. A fix to ``merge_settings`` could be to take the user specified headers first, and then iterate over the default headers and add them in if their are misssing. ## Workaround If one wants exactly the headers specified, one can first create a ``Session`` and remove the default headers: ``` s = requests.Session() s.headers = {} r = s.get(url, headers=headers, ...) ``` Having a way to change the default headers on the ``requests`` module would be a welcome addition. So one could change, for example, the user agent in one place and have it affect all requests calls that follow. ## Reproduction Steps ```python import requests from collections import OrderedDict headers = OrderedDict([ ("Accept", '1'), ("Accept-Encoding", '2'), ("User-Agent", '3'), ]) r = requests.get('http://www.example.com', headers=headers) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.3.1" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "5.8.0-50-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010109f", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.26.4" }, "using_pyopenssl": true } ```
null
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/psf/requests/issues/5814/reactions" }
https://api.github.com/repos/psf/requests/issues/5814/timeline
null
null
null
null
false
[ "We provide no guarantees of heading ordering because the specification does not require ordering be preserved and we've never attempted to preserve ordering. That turns this into a feature request and the project is under a feature freeze", "Unfortunately there are many cases where the ordering of headers are us...
https://api.github.com/repos/psf/requests/issues/5813
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5813/labels{/name}
https://api.github.com/repos/psf/requests/issues/5813/comments
https://api.github.com/repos/psf/requests/issues/5813/events
https://github.com/psf/requests/issues/5813
885,578,958
MDU6SXNzdWU4ODU1Nzg5NTg=
5,813
EOF occurred in violation of protocol
{ "avatar_url": "https://avatars.githubusercontent.com/u/26256009?v=4", "events_url": "https://api.github.com/users/suvratd/events{/privacy}", "followers_url": "https://api.github.com/users/suvratd/followers", "following_url": "https://api.github.com/users/suvratd/following{/other_user}", "gists_url": "https://api.github.com/users/suvratd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/suvratd", "id": 26256009, "login": "suvratd", "node_id": "MDQ6VXNlcjI2MjU2MDA5", "organizations_url": "https://api.github.com/users/suvratd/orgs", "received_events_url": "https://api.github.com/users/suvratd/received_events", "repos_url": "https://api.github.com/users/suvratd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/suvratd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/suvratd/subscriptions", "type": "User", "url": "https://api.github.com/users/suvratd", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-05-11T01:32:00Z
2021-08-27T00:08:22Z
2021-05-11T11:13:51Z
NONE
resolved
Hi Team, I am getting this error a lot. ``` return session.request('GET', url, **kwargs) File "/var/python/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/var/python/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/var/python/lib/python2.7/site-packages/requests-2.21.0-py2.7.egg/requests/adapters.py", line 514, in send raise SSLError(e, request=request) SSLError: HTTPSConnectionPool(host='myservce.company.com', port=443): Max retries exceeded with url: /some/url/(Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:661)'),)) ``` currently using: 2.7.14 When I took traces, server is abruptly closing connection instead of sending server hello. Please help thank you in Advance. Below we are setting poolmanager ``` def init_poolmanager(self, *pool_args, **pool_kwargs): ctx = ssl_.create_urllib3_context(ciphers=CIPHERS, cert_reqs=ssl.CERT_REQUIRED, options=self.ssl_options) #import pdb; pdb.set_trace() self.poolmanager = PoolManager(*pool_args, ssl_context=ctx, **pool_kwargs) ``` And the way I am getting request ``` def get_request(self, url, **kwargs): kwargs.setdefault('allow_redirects', True) adapter = HTTPService(ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1) session = requests.session() session.mount(HTTPS, adapter) return session.request('GET', url, **kwargs) ```
{ "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/5813/reactions" }
https://api.github.com/repos/psf/requests/issues/5813/timeline
null
completed
null
null
false
[ "> When I took traces, server is abruptly closing connection instead of sending server hello.\r\n\r\nThis is the problem. There's nothing for Requests to do here as it's not a bug in requests but the nature of network programming." ]
https://api.github.com/repos/psf/requests/issues/5812
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5812/labels{/name}
https://api.github.com/repos/psf/requests/issues/5812/comments
https://api.github.com/repos/psf/requests/issues/5812/events
https://github.com/psf/requests/issues/5812
879,216,732
MDU6SXNzdWU4NzkyMTY3MzI=
5,812
SSL error with verify=False and mitmproxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/57026130?v=4", "events_url": "https://api.github.com/users/marmaladeseismic/events{/privacy}", "followers_url": "https://api.github.com/users/marmaladeseismic/followers", "following_url": "https://api.github.com/users/marmaladeseismic/following{/other_user}", "gists_url": "https://api.github.com/users/marmaladeseismic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/marmaladeseismic", "id": 57026130, "login": "marmaladeseismic", "node_id": "MDQ6VXNlcjU3MDI2MTMw", "organizations_url": "https://api.github.com/users/marmaladeseismic/orgs", "received_events_url": "https://api.github.com/users/marmaladeseismic/received_events", "repos_url": "https://api.github.com/users/marmaladeseismic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/marmaladeseismic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/marmaladeseismic/subscriptions", "type": "User", "url": "https://api.github.com/users/marmaladeseismic", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2021-05-07T15:29:45Z
2021-08-27T00:08:22Z
2021-05-10T13:13:32Z
NONE
resolved
Running mitmdump and trying to `requests.get` with mitmdump set as proxy and `verify=False`, I receive `SSL: CERTIFICATE_VERIFY_FAILED`. Problem on linux/macOS, **not a problem on Windows**. If I set the path to `http://...` instead of `https://...` then it does work, but I don't think I should have to do this and it's not a great solution in the actual client I'm writing. ## Expected Result Valid response in Python, no exceptions. mitmdump output: ``` % mitmdump Proxy server listening at http://*:8080 [::1]:57986: clientconnect [::1]:57986: GET https://example.com/ << 200 OK 648b [::1]:57986: clientdisconnect ``` ## Actual Result Python exception: `requests.exceptions.SSLError: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)')))` mitmdump output: ``` % mitmdump Proxy server listening at http://*:8080 [::1]:55825: clientconnect [::1]:55825: Cannot connect to server, no server address given. [::1]:55825: clientdisconnect ``` ## Reproduction Steps Run `mitmdump` and then run the following python: ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) verify = False #verify = '/path/to/mitmproxy/cert' # this gives a 502 but anyway shouldn't be necessary? requests.get( 'https://example.com', proxies = { 'http' : 'http://localhost:8080', 'https' : 'https://localhost:8080' }, verify = verify ) ``` ## System Information macOS (fails) ``` { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.3.2" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.4" }, "platform": { "release": "20.3.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010109f", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.4" }, "using_pyopenssl": true } ``` linux (fails) ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.7" }, "platform": { "release": "5.11.14-100.fc32.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.0.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.25.7" }, "using_pyopenssl": true } ``` Windows (works) ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.3.2" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010109f", "version": "20.0.1" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/57026130?v=4", "events_url": "https://api.github.com/users/marmaladeseismic/events{/privacy}", "followers_url": "https://api.github.com/users/marmaladeseismic/followers", "following_url": "https://api.github.com/users/marmaladeseismic/following{/other_user}", "gists_url": "https://api.github.com/users/marmaladeseismic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/marmaladeseismic", "id": 57026130, "login": "marmaladeseismic", "node_id": "MDQ6VXNlcjU3MDI2MTMw", "organizations_url": "https://api.github.com/users/marmaladeseismic/orgs", "received_events_url": "https://api.github.com/users/marmaladeseismic/received_events", "repos_url": "https://api.github.com/users/marmaladeseismic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/marmaladeseismic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/marmaladeseismic/subscriptions", "type": "User", "url": "https://api.github.com/users/marmaladeseismic", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5812/reactions" }
https://api.github.com/repos/psf/requests/issues/5812/timeline
null
completed
null
null
false
[ "Is mitmproxy even listening on `https://`?", "Honestly that confuses me given the first line of the mitmdump output, but `curl --proxy localhost:8080 https://example.com` is fine and it works on Windows again with the same run params and request from Python. curl works on all of linux/mac/windows.", "> Honestl...
https://api.github.com/repos/psf/requests/issues/5811
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5811/labels{/name}
https://api.github.com/repos/psf/requests/issues/5811/comments
https://api.github.com/repos/psf/requests/issues/5811/events
https://github.com/psf/requests/pull/5811
877,927,054
MDExOlB1bGxSZXF1ZXN0NjMxODA5NzY1
5,811
Updated to new be-cordial-or-be-on-your-way URL and CoC now references Python Community CoC
{ "avatar_url": "https://avatars.githubusercontent.com/u/9110632?v=4", "events_url": "https://api.github.com/users/MarkCBell/events{/privacy}", "followers_url": "https://api.github.com/users/MarkCBell/followers", "following_url": "https://api.github.com/users/MarkCBell/following{/other_user}", "gists_url": "https://api.github.com/users/MarkCBell/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MarkCBell", "id": 9110632, "login": "MarkCBell", "node_id": "MDQ6VXNlcjkxMTA2MzI=", "organizations_url": "https://api.github.com/users/MarkCBell/orgs", "received_events_url": "https://api.github.com/users/MarkCBell/received_events", "repos_url": "https://api.github.com/users/MarkCBell/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MarkCBell/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MarkCBell/subscriptions", "type": "User", "url": "https://api.github.com/users/MarkCBell", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2021-05-06T19:37:35Z
2021-08-27T00:08:40Z
2021-05-07T16:54:38Z
CONTRIBUTOR
resolved
The current documentation contains two references to Kenneth Reitz's "Be Cordial or Be on Your Way" but the URL for this has now changed. The PR replaces these with the current URL.
{ "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/5811/reactions" }
https://api.github.com/repos/psf/requests/issues/5811/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5811.diff", "html_url": "https://github.com/psf/requests/pull/5811", "merged_at": "2021-05-07T16:54:38Z", "patch_url": "https://github.com/psf/requests/pull/5811.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5811" }
true
[ "@nateprewitt I think we should switch to a _real_ CoC, i.e., the PSF CoC. I didn't realize this was still listed as our CoC since we're in the PSF's org", "Yep, totally fine by me, let's do it.", "@MarkCBell would you be willing to do that? You might look at how other github.com/psf repositories are linking to...
https://api.github.com/repos/psf/requests/issues/5810
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5810/labels{/name}
https://api.github.com/repos/psf/requests/issues/5810/comments
https://api.github.com/repos/psf/requests/issues/5810/events
https://github.com/psf/requests/pull/5810
875,330,708
MDExOlB1bGxSZXF1ZXN0NjI5Njk0ODQ2
5,810
Throw value error when serializing JSON object with NaN value
{ "avatar_url": "https://avatars.githubusercontent.com/u/47358379?v=4", "events_url": "https://api.github.com/users/tallalnparis4ev/events{/privacy}", "followers_url": "https://api.github.com/users/tallalnparis4ev/followers", "following_url": "https://api.github.com/users/tallalnparis4ev/following{/other_user}", "gists_url": "https://api.github.com/users/tallalnparis4ev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tallalnparis4ev", "id": 47358379, "login": "tallalnparis4ev", "node_id": "MDQ6VXNlcjQ3MzU4Mzc5", "organizations_url": "https://api.github.com/users/tallalnparis4ev/orgs", "received_events_url": "https://api.github.com/users/tallalnparis4ev/received_events", "repos_url": "https://api.github.com/users/tallalnparis4ev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tallalnparis4ev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tallalnparis4ev/subscriptions", "type": "User", "url": "https://api.github.com/users/tallalnparis4ev", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2021-05-04T10:37:03Z
2021-08-27T00:08:40Z
2021-05-06T18:18:58Z
CONTRIBUTOR
resolved
I am attempting to fix #5767 with this PR. Feedback is really appreciated.
{ "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/5810/reactions" }
https://api.github.com/repos/psf/requests/issues/5810/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5810.diff", "html_url": "https://github.com/psf/requests/pull/5810", "merged_at": "2021-05-06T18:18:58Z", "patch_url": "https://github.com/psf/requests/pull/5810.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5810" }
true
[]
https://api.github.com/repos/psf/requests/issues/5809
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5809/labels{/name}
https://api.github.com/repos/psf/requests/issues/5809/comments
https://api.github.com/repos/psf/requests/issues/5809/events
https://github.com/psf/requests/issues/5809
875,133,993
MDU6SXNzdWU4NzUxMzM5OTM=
5,809
Chardet Licence
{ "avatar_url": "https://avatars.githubusercontent.com/u/20928617?v=4", "events_url": "https://api.github.com/users/pokecheater/events{/privacy}", "followers_url": "https://api.github.com/users/pokecheater/followers", "following_url": "https://api.github.com/users/pokecheater/following{/other_user}", "gists_url": "https://api.github.com/users/pokecheater/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pokecheater", "id": 20928617, "login": "pokecheater", "node_id": "MDQ6VXNlcjIwOTI4NjE3", "organizations_url": "https://api.github.com/users/pokecheater/orgs", "received_events_url": "https://api.github.com/users/pokecheater/received_events", "repos_url": "https://api.github.com/users/pokecheater/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pokecheater/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pokecheater/subscriptions", "type": "User", "url": "https://api.github.com/users/pokecheater", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-04T06:04:18Z
2021-05-20T11:19:25Z
2021-05-04T09:42:39Z
NONE
resolved
Hey :), I have an question regarding the licensing and a sub module you are using. As builded our application which uses flask (and flask uses requests) I noticed that a tiny package with the name chardet appeared in our installation that is licenced under GNU. As far as I understand has GNU a copyleft. Since your package uses the chardet lib and builds up on the top of it's coding source I am confused that the requests lib is licenced under Apache 2.0 and not GNU. As far as I understand has GNU a strict copyleft which means that even if only library calls are used the whole software that is using it should be licenced under gpl. Maybe it is just me that misinterpret the rights and duties that come along with GNU. Just want to be sure I do not redistribute our closed source software when I have to put it under GNU. Thanks in advance :).
{ "avatar_url": "https://avatars.githubusercontent.com/u/20928617?v=4", "events_url": "https://api.github.com/users/pokecheater/events{/privacy}", "followers_url": "https://api.github.com/users/pokecheater/followers", "following_url": "https://api.github.com/users/pokecheater/following{/other_user}", "gists_url": "https://api.github.com/users/pokecheater/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pokecheater", "id": 20928617, "login": "pokecheater", "node_id": "MDQ6VXNlcjIwOTI4NjE3", "organizations_url": "https://api.github.com/users/pokecheater/orgs", "received_events_url": "https://api.github.com/users/pokecheater/received_events", "repos_url": "https://api.github.com/users/pokecheater/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pokecheater/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pokecheater/subscriptions", "type": "User", "url": "https://api.github.com/users/pokecheater", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5809/reactions" }
https://api.github.com/repos/psf/requests/issues/5809/timeline
null
completed
null
null
false
[ "Okay forget about it just found out that it is fine with Lesser GPL and chardet is licensed under this terms. ", "Hey I have the same question. Chardet is using LGPL 2.1 licensing. Isn't it a copyleft license?" ]
https://api.github.com/repos/psf/requests/issues/5808
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5808/labels{/name}
https://api.github.com/repos/psf/requests/issues/5808/comments
https://api.github.com/repos/psf/requests/issues/5808/events
https://github.com/psf/requests/pull/5808
873,678,146
MDExOlB1bGxSZXF1ZXN0NjI4NDM2NDA0
5,808
Make use of the 'yield from' keyword whenever possible for a better pythonic look!
{ "avatar_url": "https://avatars.githubusercontent.com/u/62179149?v=4", "events_url": "https://api.github.com/users/wiseaidev/events{/privacy}", "followers_url": "https://api.github.com/users/wiseaidev/followers", "following_url": "https://api.github.com/users/wiseaidev/following{/other_user}", "gists_url": "https://api.github.com/users/wiseaidev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wiseaidev", "id": 62179149, "login": "wiseaidev", "node_id": "MDQ6VXNlcjYyMTc5MTQ5", "organizations_url": "https://api.github.com/users/wiseaidev/orgs", "received_events_url": "https://api.github.com/users/wiseaidev/received_events", "repos_url": "https://api.github.com/users/wiseaidev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wiseaidev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wiseaidev/subscriptions", "type": "User", "url": "https://api.github.com/users/wiseaidev", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-05-01T13:48:59Z
2021-08-27T00:08:41Z
2021-05-01T15:44:11Z
NONE
resolved
Signed-off-by: Harmouch101 <mahmoudddharmouchhh@gmail.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/5808/reactions" }
https://api.github.com/repos/psf/requests/issues/5808/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5808.diff", "html_url": "https://github.com/psf/requests/pull/5808", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5808.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5808" }
true
[ "We're not accepting cosmetic changes or changes which break compatibility with Python 2.7", "Oh! I didn't notice it supports python 2.7. However, I think the project needs to be updated to support only versions > 3.5 of python since other versions have reached the [end of life](https://endoflife.date/python) in...
https://api.github.com/repos/psf/requests/issues/5807
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5807/labels{/name}
https://api.github.com/repos/psf/requests/issues/5807/comments
https://api.github.com/repos/psf/requests/issues/5807/events
https://github.com/psf/requests/issues/5807
873,028,335
MDU6SXNzdWU4NzMwMjgzMzU=
5,807
2.25.1: requests requires idna < 3
{ "avatar_url": "https://avatars.githubusercontent.com/u/31284574?v=4", "events_url": "https://api.github.com/users/kloczek/events{/privacy}", "followers_url": "https://api.github.com/users/kloczek/followers", "following_url": "https://api.github.com/users/kloczek/following{/other_user}", "gists_url": "https://api.github.com/users/kloczek/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kloczek", "id": 31284574, "login": "kloczek", "node_id": "MDQ6VXNlcjMxMjg0NTc0", "organizations_url": "https://api.github.com/users/kloczek/orgs", "received_events_url": "https://api.github.com/users/kloczek/received_events", "repos_url": "https://api.github.com/users/kloczek/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kloczek/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kloczek/subscriptions", "type": "User", "url": "https://api.github.com/users/kloczek", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-04-30T18:21:02Z
2021-08-27T00:08:23Z
2021-04-30T19:20:31Z
NONE
resolved
Looks like requests modulehas hardcoded dependency to require `idna >= 2.5 and idna< 3` and latest idna is 3.1. Is it any reason why it cannot be idna is 3.1? amd/or if it is could requests module can be adjusted to be able use it with latest idna?
{ "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/5807/reactions" }
https://api.github.com/repos/psf/requests/issues/5807/timeline
null
completed
null
null
false
[ "Hi @kloczek, there are a number of issues around this including very recent ones like #5804. Please make sure to check open and closed issues before opening new ones in the future. Thanks!", "> Hi @kloczek, there are a number of issues around this including very recent ones like #5804. Please make sure to check ...
https://api.github.com/repos/psf/requests/issues/5806
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5806/labels{/name}
https://api.github.com/repos/psf/requests/issues/5806/comments
https://api.github.com/repos/psf/requests/issues/5806/events
https://github.com/psf/requests/issues/5806
871,284,409
MDU6SXNzdWU4NzEyODQ0MDk=
5,806
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
{ "avatar_url": "https://avatars.githubusercontent.com/u/76562306?v=4", "events_url": "https://api.github.com/users/aymenbnl/events{/privacy}", "followers_url": "https://api.github.com/users/aymenbnl/followers", "following_url": "https://api.github.com/users/aymenbnl/following{/other_user}", "gists_url": "https://api.github.com/users/aymenbnl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/aymenbnl", "id": 76562306, "login": "aymenbnl", "node_id": "MDQ6VXNlcjc2NTYyMzA2", "organizations_url": "https://api.github.com/users/aymenbnl/orgs", "received_events_url": "https://api.github.com/users/aymenbnl/received_events", "repos_url": "https://api.github.com/users/aymenbnl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/aymenbnl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aymenbnl/subscriptions", "type": "User", "url": "https://api.github.com/users/aymenbnl", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-04-29T17:49:38Z
2021-04-30T00:36:29Z
2021-04-29T18:39:23Z
NONE
spam
Summary. Cant import json data into Mysql Database because of this issue What you expected. A proper import of course. What happened instead. json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2) ## Reproduction Steps ``` if args.input: with open(args.input, 'r') as f: for e in f: event = json.loads(e) misp.add_event(event) ``` ## System Information { "response":[ { "Event":{ "id":"1", "orgc_id":"1", "org_id":"1", "date":"2017-09-27", "threat_level_id":"4", "info":"ZeuS IP blocklist (Standard) feed", "published":true, "uuid":"59cb4f10-4190-4f76-988e-66a239b59801", "attribute_count":"108", "analysis":"2", "timestamp":"1506496272", "distribution":"3", "proposal_email_lock":false, "locked":false, "publish_timestamp":"1533556422", "sharing_group_id":"0", "disable_correlation":false, "extends_uuid":"" }}]} This is running on up-to-date Ubuntu 20.04 and Python 3.8.5
{ "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/5806/reactions" }
https://api.github.com/repos/psf/requests/issues/5806/timeline
null
completed
null
null
false
[ "Hi @aymenbnl,\r\n\r\nThis doesn't appear to be related to Requests from the info provided. We'd recommend posting general Python questions on [StackOverflow](https://stackoverflow.com/)." ]
https://api.github.com/repos/psf/requests/issues/5805
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5805/labels{/name}
https://api.github.com/repos/psf/requests/issues/5805/comments
https://api.github.com/repos/psf/requests/issues/5805/events
https://github.com/psf/requests/issues/5805
871,106,048
MDU6SXNzdWU4NzExMDYwNDg=
5,805
POST request is resent as GET when the status code is 301
{ "avatar_url": "https://avatars.githubusercontent.com/u/33695680?v=4", "events_url": "https://api.github.com/users/Maelstro/events{/privacy}", "followers_url": "https://api.github.com/users/Maelstro/followers", "following_url": "https://api.github.com/users/Maelstro/following{/other_user}", "gists_url": "https://api.github.com/users/Maelstro/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Maelstro", "id": 33695680, "login": "Maelstro", "node_id": "MDQ6VXNlcjMzNjk1Njgw", "organizations_url": "https://api.github.com/users/Maelstro/orgs", "received_events_url": "https://api.github.com/users/Maelstro/received_events", "repos_url": "https://api.github.com/users/Maelstro/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Maelstro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Maelstro/subscriptions", "type": "User", "url": "https://api.github.com/users/Maelstro", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-04-29T14:56:20Z
2021-08-27T00:08:23Z
2021-04-29T15:29:59Z
NONE
resolved
Hello, I'd like to report a bug with `requests` behavior towards processing a 301 response. The 301 response to a POST request causes the user agent to automatically redirect the request to a given address, but it also changes the request type from POST to GET. The RFC 2616 mentions such behavior as shown below: ``` Note: When automatically redirecting a POST request after receiving a 301 status code, some existing HTTP/1.0 user agents will erroneously change it into a GET request. ``` Therefore, I think that `requests` isn't compliant with the RFC [(10.3.2 301 Moved Permanently)](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) in this matter. ## Expected Result When the response to a POST request has a status code 301, the automatic redirect should also be a POST request. ## Actual Result Having sent a POST request to a given endpoint and receiving a response with a status code 301, the automatic redirect request becomes a GET request. Example shown below: ``` * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) 127.0.0.1 - - [29/Apr/2021 16:43:03] "POST /test_route HTTP/1.1" 301 - 127.0.0.1 - - [29/Apr/2021 16:43:03] "GET /test_route HTTP/1.1" 405 - ``` ## Reproduction Steps Create two scripts - a server and a client. `test_server.py` ``` import flask app = flask.Flask(__name__) @app.route("/test_route", methods=["POST"]) def test_response(): return flask.redirect("http://localhost:5000/test_route", code=301) if __name__ == "__main__": app.run() ``` `test_request.py`: ``` import requests if __name__ == "__main__": print(requests.request("POST", "http://localhost:5000/test_route")) ``` After creating them, start the `test_server.py`. When the server starts, run the `test_request.py`. In the server logs you'll see the aforementioned base request and the redirected request. ## System Information The library is system-independent, the behavior occurs on any device, from Raspberry Pi with Raspbian Buster, to x64 Debian Bullseye (testing).
{ "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/5805/reactions" }
https://api.github.com/repos/psf/requests/issues/5805/timeline
null
completed
null
null
false
[ "Hi @Maelstro,\r\n\r\nThis is expected behavior, the RFC you’re referencing has been obsolete for several years now.\r\n\r\nPlease make sure to search open and closed issues as we’ve requested before opening new ones in the future. You’ll be able to find this [answered](https://github.com/psf/requests/issues/5494#i...
https://api.github.com/repos/psf/requests/issues/5804
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5804/labels{/name}
https://api.github.com/repos/psf/requests/issues/5804/comments
https://api.github.com/repos/psf/requests/issues/5804/events
https://github.com/psf/requests/issues/5804
870,467,550
MDU6SXNzdWU4NzA0Njc1NTA=
5,804
idna-3 is not supported
{ "avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4", "events_url": "https://api.github.com/users/mgorny/events{/privacy}", "followers_url": "https://api.github.com/users/mgorny/followers", "following_url": "https://api.github.com/users/mgorny/following{/other_user}", "gists_url": "https://api.github.com/users/mgorny/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mgorny", "id": 110765, "login": "mgorny", "node_id": "MDQ6VXNlcjExMDc2NQ==", "organizations_url": "https://api.github.com/users/mgorny/orgs", "received_events_url": "https://api.github.com/users/mgorny/received_events", "repos_url": "https://api.github.com/users/mgorny/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mgorny/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mgorny/subscriptions", "type": "User", "url": "https://api.github.com/users/mgorny", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-04-28T22:58:53Z
2021-08-27T00:08:24Z
2021-04-28T23:01:56Z
CONTRIBUTOR
resolved
idna-3 has been released on Jan 1st. However, requests still requires idna<3 preventing a lot of projects from upgrading. ## Expected Result requests supporting idna-3.1 ## Actual Result requests force idna<3 ## Reproduction Steps Errr, install requests? ;-) ## System Information ``` $ python -m requests.help { "chardet": { "version": "4.0.0" }, "cryptography": { "version": "3.4.7" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.4" }, "platform": { "release": "5.11.16-gentoo-dist", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "101010bf", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.26.4" }, "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/5804/reactions" }
https://api.github.com/repos/psf/requests/issues/5804/timeline
null
completed
null
null
false
[ "Hi @mgorny, this is a duplicate of #5710. Please be sure to check open issues before posting new ones. Thanks!" ]
https://api.github.com/repos/psf/requests/issues/5803
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5803/labels{/name}
https://api.github.com/repos/psf/requests/issues/5803/comments
https://api.github.com/repos/psf/requests/issues/5803/events
https://github.com/psf/requests/issues/5803
870,394,738
MDU6SXNzdWU4NzAzOTQ3Mzg=
5,803
Gzip decompression corrupts file
{ "avatar_url": "https://avatars.githubusercontent.com/u/37975547?v=4", "events_url": "https://api.github.com/users/eloparco/events{/privacy}", "followers_url": "https://api.github.com/users/eloparco/followers", "following_url": "https://api.github.com/users/eloparco/following{/other_user}", "gists_url": "https://api.github.com/users/eloparco/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eloparco", "id": 37975547, "login": "eloparco", "node_id": "MDQ6VXNlcjM3OTc1NTQ3", "organizations_url": "https://api.github.com/users/eloparco/orgs", "received_events_url": "https://api.github.com/users/eloparco/received_events", "repos_url": "https://api.github.com/users/eloparco/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eloparco/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eloparco/subscriptions", "type": "User", "url": "https://api.github.com/users/eloparco", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-04-28T21:23:36Z
2021-08-27T00:08:24Z
2021-04-28T21:53:13Z
NONE
resolved
## Summary I want to download a gzip file (`https://iptoasn.com/data/ip2asn-v4.tsv.gz`) and save it locally already decompressed. According to the [docs](https://docs.python-requests.org/en/master/user/quickstart/#raw-response-content), downloading a compressed file should automatically decompress it. ## Expected Result The `ip2asn-v4.tsv` file correctly decompressed. ## Actual Result The `ip2asn-v4.tsv` generated is corrupted. Below the content after opening it with excel: ![image](https://user-images.githubusercontent.com/37975547/116474115-60e38f00-a878-11eb-8a1b-816ff9b89e54.png) ## Reproduction Steps This is the minimal code snippet to reproduce my use case: ```python import requests r = requests.get('https://iptoasn.com/data/ip2asn-v4.tsv.gz', stream=True) with open('ip2asn-v4.tsv', 'wb') as fd: for chunk in r.iter_content(chunk_size=None): fd.write(chunk) ```
{ "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/5803/reactions" }
https://api.github.com/repos/psf/requests/issues/5803/timeline
null
completed
null
null
false
[ "If you look at the headers on your response you'll see that there is no `Content-Encoding: gzip` which you seem to be expecting. Even if you forcibly send `Accept-Encoding: gzip` the URL doesn't reply with a `Content-Encoding`, so Requests won't automatically decode the gzipped file because the endpoint hasn't dec...
https://api.github.com/repos/psf/requests/issues/5802
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5802/labels{/name}
https://api.github.com/repos/psf/requests/issues/5802/comments
https://api.github.com/repos/psf/requests/issues/5802/events
https://github.com/psf/requests/pull/5802
870,250,619
MDExOlB1bGxSZXF1ZXN0NjI1NDc2Njc4
5,802
mini update and badges
{ "avatar_url": "https://avatars.githubusercontent.com/u/66271043?v=4", "events_url": "https://api.github.com/users/Yourun-proger/events{/privacy}", "followers_url": "https://api.github.com/users/Yourun-proger/followers", "following_url": "https://api.github.com/users/Yourun-proger/following{/other_user}", "gists_url": "https://api.github.com/users/Yourun-proger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Yourun-proger", "id": 66271043, "login": "Yourun-proger", "node_id": "MDQ6VXNlcjY2MjcxMDQz", "organizations_url": "https://api.github.com/users/Yourun-proger/orgs", "received_events_url": "https://api.github.com/users/Yourun-proger/received_events", "repos_url": "https://api.github.com/users/Yourun-proger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Yourun-proger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Yourun-proger/subscriptions", "type": "User", "url": "https://api.github.com/users/Yourun-proger", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2021-04-28T18:54:53Z
2021-08-27T00:08:42Z
2021-04-28T19:06:56Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5802/reactions" }
https://api.github.com/repos/psf/requests/issues/5802/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5802.diff", "html_url": "https://github.com/psf/requests/pull/5802", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5802.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5802" }
true
[ "Sorry, we're not accepting PRs that rearrange things.", "Sorry... Ok)" ]
https://api.github.com/repos/psf/requests/issues/5801
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5801/labels{/name}
https://api.github.com/repos/psf/requests/issues/5801/comments
https://api.github.com/repos/psf/requests/issues/5801/events
https://github.com/psf/requests/issues/5801
867,113,591
MDU6SXNzdWU4NjcxMTM1OTE=
5,801
403 error while using github API
{ "avatar_url": "https://avatars.githubusercontent.com/u/7804791?v=4", "events_url": "https://api.github.com/users/purarue/events{/privacy}", "followers_url": "https://api.github.com/users/purarue/followers", "following_url": "https://api.github.com/users/purarue/following{/other_user}", "gists_url": "https://api.github.com/users/purarue/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/purarue", "id": 7804791, "login": "purarue", "node_id": "MDQ6VXNlcjc4MDQ3OTE=", "organizations_url": "https://api.github.com/users/purarue/orgs", "received_events_url": "https://api.github.com/users/purarue/received_events", "repos_url": "https://api.github.com/users/purarue/repos", "site_admin": false, "starred_url": "https://api.github.com/users/purarue/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/purarue/subscriptions", "type": "User", "url": "https://api.github.com/users/purarue", "user_view_type": "public" }
[]
closed
true
null
[]
null
14
2021-04-25T21:03:16Z
2021-11-18T12:00:43Z
2021-08-20T07:01:06Z
NONE
resolved
## Summary TL;DR: `requests` raises a 403 while requesting an authenticated Github API route, which otherwise succeeds while using `curl`/another python library like `httpx` Was initially discovered [in the 'ghexport' project](https://github.com/karlicoss/ghexport/issues/4); I did a reasonable amount of debugging [and created this repo](https://github.com/seanbreckenridge/pygithub_requests_error) before submitting [this issue](https://github.com/PyGithub/PyGithub/issues/1700) to PyGithub, but thats a lot to look through, just leaving it here as context. It's been hard to reproduce, the creator of [ghexport](https://github.com/karlicoss/ghexport/issues/4) (where this was initially discovered) didn't have the same issue, so I'm unsure of the exact reason ## Expected Result `requests` succeeds for the authenticated request ## Actual Result Request fails, with: ``` {'message': 'Must have push access to repository', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-repository-clones'} failed Traceback (most recent call last): File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 47, in <module> main() File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 44, in main make_request(requests.get, url, headers) File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 31, in make_request resp.raise_for_status() File "/home/sean/.local/lib/python3.9/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.github.com/repos/seanbreckenridge/albums/traffic/clones ``` ## Reproduction Steps Apologies if this is a bit too specific, but otherwise `requests` works great on my system and I can't find any other way to reproduce this -- Is a bit long as it requires an auth token Go [here](https://github.com/settings/tokens) and create a token with scopes like: ![](https://camo.githubusercontent.com/26e2554ac4c840294f60e225242849c98c20dfb89470f493e89be4824f1218f9/68747470733a2f2f692e696d6775722e636f6d2f4f4d46724e6e4b2e706e67) I've compared this to httpx, where it doesn't fail: ```python #!/usr/bin/env python3 from typing import Callable, Any import requests import httpx # extract status/status_code from the requests/httpx item def extract_status(obj: Any) -> int: if hasattr(obj, "status"): return obj.status if hasattr(obj, "status_code"): return obj.status_code raise TypeError("unsupported request object") def make_request(using_verb: Callable[..., Any], url: str, headers: Any) -> None: print("using", using_verb.__module__, using_verb.__qualname__, url) resp = using_verb(url, headers=headers) status = extract_status(resp) print(str(resp.json())) if status == 200: print("succeeded") else: print("failed") resp.raise_for_status() def main(): # see https://github.com/seanbreckenridge/pygithub_requests_error for token scopes auth_token = "put your auth token here" headers = { "Authorization": "token {}".format(auth_token), "User-Agent": "requests_error", "Accept": "application/vnd.github.v3+json", } # replace this with a URL you have access to url = "https://api.github.com/repos/seanbreckenridge/albums/traffic/clones" make_request(httpx.get, url, headers) make_request(requests.get, url, headers) if __name__ == "__main__": main() ``` That outputs: ``` using httpx get https://api.github.com/repos/seanbreckenridge/albums/traffic/clones {'count': 15, 'uniques': 10, 'clones': [{'timestamp': '2021-04-12T00:00:00Z', 'count': 1, 'uniques': 1}, {'timestamp': '2021-04-14T00:00:00Z', 'count': 1, 'uniques': 1}, {'timestamp': '2021-04-17T00:00:00Z', 'count': 1, 'uniques': 1}, {'timestamp': '2021-04-18T00:00:00Z', 'count': 2, 'uniques': 2}, {'timestamp': '2021-04-23T00:00:00Z', 'count': 9, 'uniques': 5}, {'timestamp': '2021-04-25T00:00:00Z', 'count': 1, 'uniques': 1}]} succeeded using requests.api get https://api.github.com/repos/seanbreckenridge/albums/traffic/clones {'message': 'Must have push access to repository', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-repository-clones'} failed Traceback (most recent call last): File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 48, in <module> main() File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 45, in main make_request(requests.get, url, headers) File "/home/sean/Repos/pygithub_requests_error/minimal.py", line 32, in make_request resp.raise_for_status() File "/home/sean/.local/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.github.com/repos/seanbreckenridge/albums/traffic/clones ``` Another thing that may be useful as context is the [`pdb` trace I did here](https://github.com/karlicoss/ghexport/issues/4#issuecomment-693694338), which was me stepping into where the request was made in `PyGithub`, and making all the requests manually using the computed `url`/`headers`. Fails when I use `requests.get` but `httpx.get` works fine: ``` > /home/sean/.local/lib/python3.8/site-packages/github/Requester.py(484)__requestEncode() -> self.NEW_DEBUG_FRAME(requestHeaders) (Pdb) n > /home/sean/.local/lib/python3.8/site-packages/github/Requester.py(486)__requestEncode() -> status, responseHeaders, output = self.__requestRaw( (Pdb) w /home/sean/Repos/ghexport/export.py(109)<module>() -> main() /home/sean/Repos/ghexport/export.py(84)main() -> j = get_json(**params) /home/sean/Repos/ghexport/export.py(74)get_json() -> return Exporter(**params).export_json() /home/sean/Repos/ghexport/export.py(60)export_json() -> repo._requester.requestJsonAndCheck('GET', repo.url + '/traffic/' + f) /home/sean/.local/lib/python3.8/site-packages/github/Requester.py(318)requestJsonAndCheck() -> *self.requestJson( /home/sean/.local/lib/python3.8/site-packages/github/Requester.py(410)requestJson() -> return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode) > /home/sean/.local/lib/python3.8/site-packages/github/Requester.py(486)__requestEncode() -> status, responseHeaders, output = self.__requestRaw( (Pdb) url '/repos/seanbreckenridge/advent-of-code-2019/traffic/views' (Pdb) requestHeaders {'Authorization': 'token <MY TOKEN HERE>', 'User-Agent': 'PyGithub/Python'} (Pdb) import requests (Pdb) requests.get("https://api.github.com" + url, headers=requestHeaders).json() {'message': 'Must have push access to repository', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-page-views'} (Pdb) httpx.get("https://api.github.com" + url, headers=requestHeaders).json() {'count': 0, 'uniques': 0, 'views': []} (Pdb) httpx succeeded?? ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.4.7" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.9.3" }, "platform": { "release": "5.11.16-arch1-1", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "101010bf", "version": "20.0.1" }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010bf" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true } ``` ``` $ pip freeze | grep -E 'requests|httpx' httpx==0.16.1 requests==2.25.1 ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/7804791?v=4", "events_url": "https://api.github.com/users/purarue/events{/privacy}", "followers_url": "https://api.github.com/users/purarue/followers", "following_url": "https://api.github.com/users/purarue/following{/other_user}", "gists_url": "https://api.github.com/users/purarue/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/purarue", "id": 7804791, "login": "purarue", "node_id": "MDQ6VXNlcjc4MDQ3OTE=", "organizations_url": "https://api.github.com/users/purarue/orgs", "received_events_url": "https://api.github.com/users/purarue/received_events", "repos_url": "https://api.github.com/users/purarue/repos", "site_admin": false, "starred_url": "https://api.github.com/users/purarue/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/purarue/subscriptions", "type": "User", "url": "https://api.github.com/users/purarue", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5801/reactions" }
https://api.github.com/repos/psf/requests/issues/5801/timeline
null
completed
null
null
false
[ "I can't reproduce this\r\n\r\n```\r\n>>> import requests\r\n>>> token = 'ghp_mytotallyrealtokenwithonlyreposcope'\r\n>>> headers = {'Authorization': f'token {token}', \"User-Agent\": \"testing-requests-5801\", \"Accept\": \"application/vnd.github.v3+json\"}\r\n>>> url = \"https://api.github.com/repos/sigmavirus24/...
https://api.github.com/repos/psf/requests/issues/5800
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5800/labels{/name}
https://api.github.com/repos/psf/requests/issues/5800/comments
https://api.github.com/repos/psf/requests/issues/5800/events
https://github.com/psf/requests/pull/5800
867,099,261
MDExOlB1bGxSZXF1ZXN0NjIyODI5MzM3
5,800
Custom HTTP adapters via Session constructor
{ "avatar_url": "https://avatars.githubusercontent.com/u/2834892?v=4", "events_url": "https://api.github.com/users/rupertcw/events{/privacy}", "followers_url": "https://api.github.com/users/rupertcw/followers", "following_url": "https://api.github.com/users/rupertcw/following{/other_user}", "gists_url": "https://api.github.com/users/rupertcw/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rupertcw", "id": 2834892, "login": "rupertcw", "node_id": "MDQ6VXNlcjI4MzQ4OTI=", "organizations_url": "https://api.github.com/users/rupertcw/orgs", "received_events_url": "https://api.github.com/users/rupertcw/received_events", "repos_url": "https://api.github.com/users/rupertcw/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rupertcw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rupertcw/subscriptions", "type": "User", "url": "https://api.github.com/users/rupertcw", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2021-04-25T19:54:52Z
2021-08-27T00:08:42Z
2021-04-26T11:10:46Z
NONE
resolved
I often find myself having to do the following when using `Session` with custom retrying logic: ``` retry = Retry(3, backoff_factor=1.) http_adapter = requests.adapters.HTTPAdapter(pool_connections=4, max_retries=retry) session = requests.Session() session.mount('https://', http_adapter) session.mount('http://', http_adapter) ``` Having to mount the adapter myself for such a simple use-case seems superfluous, error-prone and not very user-friendly so I'm suggesting we open up the Session constructor a little bit: ``` retry = Retry(3, backoff_factor=1.) http_adapter = requests.adapters.HTTPAdapter(pool_connections=4, max_retries=retry) session = requests.Session(http_adapter=http_adapter) ```
{ "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/5800/reactions" }
https://api.github.com/repos/psf/requests/issues/5800/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5800.diff", "html_url": "https://github.com/psf/requests/pull/5800", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5800.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5800" }
true
[ "This project is under a feature-freeze which means we're not accepting any changes to the API at this time.\r\n\r\nThanks for submitting this but we will not be accepting it" ]
https://api.github.com/repos/psf/requests/issues/5799
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5799/labels{/name}
https://api.github.com/repos/psf/requests/issues/5799/comments
https://api.github.com/repos/psf/requests/issues/5799/events
https://github.com/psf/requests/pull/5799
866,900,674
MDExOlB1bGxSZXF1ZXN0NjIyNjg3MTU2
5,799
Add PATCH example to the Quickstart of documentation
{ "avatar_url": "https://avatars.githubusercontent.com/u/9413601?v=4", "events_url": "https://api.github.com/users/jeffreytse/events{/privacy}", "followers_url": "https://api.github.com/users/jeffreytse/followers", "following_url": "https://api.github.com/users/jeffreytse/following{/other_user}", "gists_url": "https://api.github.com/users/jeffreytse/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jeffreytse", "id": 9413601, "login": "jeffreytse", "node_id": "MDQ6VXNlcjk0MTM2MDE=", "organizations_url": "https://api.github.com/users/jeffreytse/orgs", "received_events_url": "https://api.github.com/users/jeffreytse/received_events", "repos_url": "https://api.github.com/users/jeffreytse/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jeffreytse/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jeffreytse/subscriptions", "type": "User", "url": "https://api.github.com/users/jeffreytse", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2021-04-25T03:32:04Z
2021-08-27T00:08:42Z
2021-04-30T02:48:50Z
NONE
resolved
This PR mades users understand that the library supports the patch method and the simple use of it quickly.
{ "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/5799/reactions" }
https://api.github.com/repos/psf/requests/issues/5799/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5799.diff", "html_url": "https://github.com/psf/requests/pull/5799", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5799.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5799" }
true
[ "Hi @nateprewitt, this simple change will mean a whole lot for many new users to quickly use this library. I hope you have a good day! Thanks and regards. : D", "We aren't accepting small changes to the README.", "Hi @sethmlarson, it's not the README, it's the document, so I need to open another PR just for the...