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/5598
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5598/labels{/name}
https://api.github.com/repos/psf/requests/issues/5598/comments
https://api.github.com/repos/psf/requests/issues/5598/events
https://github.com/psf/requests/issues/5598
708,726,248
MDU6SXNzdWU3MDg3MjYyNDg=
5,598
Request library not behaving same in AWS ec2 server and local jupyter notebook
{ "avatar_url": "https://avatars.githubusercontent.com/u/30792702?v=4", "events_url": "https://api.github.com/users/sumeshshetty/events{/privacy}", "followers_url": "https://api.github.com/users/sumeshshetty/followers", "following_url": "https://api.github.com/users/sumeshshetty/following{/other_user}", "gists_url": "https://api.github.com/users/sumeshshetty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sumeshshetty", "id": 30792702, "login": "sumeshshetty", "node_id": "MDQ6VXNlcjMwNzkyNzAy", "organizations_url": "https://api.github.com/users/sumeshshetty/orgs", "received_events_url": "https://api.github.com/users/sumeshshetty/received_events", "repos_url": "https://api.github.com/users/sumeshshetty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sumeshshetty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sumeshshetty/subscriptions", "type": "User", "url": "https://api.github.com/users/sumeshshetty", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-25T07:50:10Z
2021-08-29T00:06:50Z
2020-09-25T11:57:42Z
NONE
resolved
Hi I am using python requests library to read contents of url. On local jupyter notebook following is python code: ``` import json import requests response = (requests.get("https://ws.bbc34.cs.streamuk.com/services/channelFeed.php?channel=zee5-punjabi&group=punjabi&output=rss2.0").text) print((response)) ``` and the response is something like: **<?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"> <channel> <title>Zee5 Punjabi</title> <description>Zee5 Punjabi video rss feed</description> <link>https://ws.bbc34.cs.streamuk.com/</link> <atom:link href="https://ws.bbc34.cs.streamuk.com/services/channelFeed.php" rel="self" type="application/rss+xml"/> <lastBuildDate>Fri, 25 Sep 2020 08:01:54 GMT</lastBuildDate> <generator>StreamUK Crowdsourcer (http://www.streamuk.com)</generator> <image> <url>https://ws.bbc34.cs.streamuk.com/images/feed-logo.png</url> <title>Zee5 Punjabi</title> <link>https://ws.bbc34.cs.streamuk.com/</link> </image> <pubDate>Fri, 25 Sep 2020 03:23:34 GMT</pubDate> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>167</openSearch:itemsPerPage> <openSearch:totalResults>167</openSearch:totalResults> <item> <title>ਖੇਤੀ ਬਿਲਾਂ ’ਤੇ ਕਿਸਾਨ ਮੋਰਚਿਆਂ ’ਚੋਂ ਪੰਜਾਬ ਦੀਆਂ ਸਿਆਸੀ ਧਿਰਾਂ ਕੀ ਲੱਭ ਰਹੀਆਂ ਹਨ</title> <link>https://ws.bbc34.cs.streamuk.com/</link> <description>ਪੰਜਾਬ ਦੀਆਂ ਸਿਆਸੀ ਧਿਰਾਂ ਕਿਸਾਨਾਂ ਦੇ ਸਕੇ ਹੋਣ ਦੇ ਦਾਅਵੇ ਤਾਂ ਕਰ ਰਹੀਆਂ ਹਨ ਪਰ ਇਸ ਸੰਘਰਸ਼ ਵਿੱਚ ਉਨ੍ਹਾਂ ਦੇ ਨਿੱਜੀ ਮੁਫ਼ਾਦ ਕੀ ਹਨ</description> <category>ਨਿੱਜੀ,ਸਿਆਸੀ,ਸਿਆਸੀ ਧਿਰਾਂ,ਸੰਘਰਸ਼,ਧਿਰਾਂ,ਮੋਰਚਿਆਂ,ਮੁਫ਼ਾਦ,ਉਨ੍ਹਾਂ,ਕਿਸਾਨ,ਕਿਸਾਨਾਂ,ਰਹੀਆਂ,ਬਿਲਾਂ,ਦਾਅਵੇ,ਦੀਆਂ ਸਿਆਸੀ,ਦੀਆਂ ਸਿਆਸੀ ਧਿਰਾਂ,ਪੰਜਾਬ,ਪੰਜਾਬ ਦੀਆਂ,ਪੰਜਾਬ ਦੀਆਂ ਸਿਆਸੀ</category> <pubDate>Fri, 25 Sep 2020 01:00:03 GMT</pubDate> <guid>https://ws.bbc34.cs.streamuk.com/:7e3ac643-fede-11ea-9778-000c29b9294a</guid> <media:content url="https://ws.bbc34.cs.streamuk.com/content/channels/zee5-punjabi/streams/p08sgysb294a7e3ac64387.mp4" fileSize="204902218" bitrate="4690" type="video/mp4" medium="video" duration="362" width="1920" height="1080"/> <media:thumbnail url="https://ws.bbc34.cs.streamuk.com/content/channels/zee5-punjabi/thumbnails/p08sgysb294a7e3ac643.jpg" width="170" height="128"/> <media:keywords>ਨਿੱਜੀ,ਸਿਆਸੀ,ਸਿਆਸੀ ਧਿਰਾਂ,ਸੰਘਰਸ਼,ਧਿਰਾਂ,ਮੋਰਚਿਆਂ,ਮੁਫ਼ਾਦ,ਉਨ੍ਹਾਂ,ਕਿਸਾਨ,ਕਿਸਾਨਾਂ,ਰਹੀਆਂ,ਬਿਲਾਂ,ਦਾਅਵੇ,ਦੀਆਂ ਸਿਆਸੀ,ਦੀਆਂ ਸਿਆਸੀ ਧਿਰਾਂ,ਪੰਜਾਬ,ਪੰਜਾਬ ਦੀਆਂ,ਪੰਜਾਬ ਦੀਆਂ ਸਿਆਸੀ</media:keywords> </item> <item> <title>ਖੇਤੀ ਬਿੱਲ: ‘ਆਹ ਸਾਡੀ ਹੋਂਦ ਨੂੰ ਖ਼ਤਮ ਕਰਨ ਦਾ ਇੱਕ ਜ਼ਰੀਆ ਹੈ’</title> <link>https://ws.bbc34.cs.streamuk.com/</link> <description>ਕਿਸਾਨ ਧਰਨਿਆਂ ਵਿਚ ਪੁਰਸ਼ਾਂ ਦੇ ਨਾਲ ਇਸ ਵਾਰ ਮਹਿਲਾਵਾਂ ਵੀ ਵੱਡੀ ਗਿਣਤੀ ਪਹੁੰਚ ਕੇ ਆਪਣੀ ਹਾਜ਼ਰੀ ਭਰ ਰਹੀਆਂ ਹਨ</description> <category>ਗਿਣਤੀ,ਧਰਨਿਆਂ,ਮਹਿਲਾਵਾਂ,ਕਿਸਾਨ,ਰਹੀਆਂ,ਹਾਜ਼ਰੀ,ਪਹੁੰਚ,ਪੁਰਸ਼ਾਂ,ਜ਼ਰੀਆ</category> <pubDate>Thu, 24 Sep 2020 15:47:35 GMT</pubDate> <guid>https://ws.bbc34.cs.streamuk.com/:b4417aea-fecb-11ea-9778-000c29b9294a</guid> <media:content url="https://ws.bbc34.cs.streamuk.com/content/channels/zee5-punjabi/streams/p08sfy25294ab4417aea87.mp4" fileSize="177778979" bitrate="4690" type="video/mp4" medium="video" duration="306" width="1920" height="1080"/> <media:thumbnail url="https://ws.bbc34.cs.streamuk.com/content/channels/zee5-punjabi/thumbnails/p08sfy25294ab4417aea.jpg" width="170" height="128"/> <media:keywords>ਗਿਣਤੀ,ਧਰਨਿਆਂ,ਮਹਿਲਾਵਾਂ,ਕਿਸਾਨ,ਰਹੀਆਂ,ਹਾਜ਼ਰੀ,ਪਹੁੰਚ,ਪੁਰਸ਼ਾਂ,ਜ਼ਰੀਆ</media:keywords> </item> <item> <title>ਪੀਐੱਮ ਮੋਦੀ ਦੀ ਕਿਹੜੀ ਗੱਲ 'ਤੇ ਵਿਰਾਟ ਕੋਹਲੀ ਆਪਣਾ ਹਾਸਾ ਨਹੀਂ ਰੋਕ ਸਕੇ</title>** This is as expected: But the same piece of code I am trying to run on EC2 server with same requests library installed and same python version,But i am not able to print response.I am getting the following error. **print((response)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 1168-1171: ordinal not in range(128)** I did check both the versions of python and requests library and were same. python version:3.6 requests version:2.23 I am not able to find why this error. Is it beacause of "ਗਿਣਤੀ,ਧਰਨਿਆਂ,ਮਹਿਲਾਵਾਂ,ਕਿਸਾਨ,ਰਹੀਆਂ,ਹਾਜ਼ਰੀ,ਪਹੁੰਚ,ਪੁਰਸ਼ਾਂ,ਜ਼ਰੀਆ" characters,but it worked fine in local jupyter.I am not getting it .Please help.
{ "avatar_url": "https://avatars.githubusercontent.com/u/30792702?v=4", "events_url": "https://api.github.com/users/sumeshshetty/events{/privacy}", "followers_url": "https://api.github.com/users/sumeshshetty/followers", "following_url": "https://api.github.com/users/sumeshshetty/following{/other_user}", "gists_url": "https://api.github.com/users/sumeshshetty/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sumeshshetty", "id": 30792702, "login": "sumeshshetty", "node_id": "MDQ6VXNlcjMwNzkyNzAy", "organizations_url": "https://api.github.com/users/sumeshshetty/orgs", "received_events_url": "https://api.github.com/users/sumeshshetty/received_events", "repos_url": "https://api.github.com/users/sumeshshetty/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sumeshshetty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sumeshshetty/subscriptions", "type": "User", "url": "https://api.github.com/users/sumeshshetty", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5598/reactions" }
https://api.github.com/repos/psf/requests/issues/5598/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/5597
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5597/labels{/name}
https://api.github.com/repos/psf/requests/issues/5597/comments
https://api.github.com/repos/psf/requests/issues/5597/events
https://github.com/psf/requests/issues/5597
708,512,912
MDU6SXNzdWU3MDg1MTI5MTI=
5,597
response.text converting to utf-8 poorly
{ "avatar_url": "https://avatars.githubusercontent.com/u/6989085?v=4", "events_url": "https://api.github.com/users/GarrettArm/events{/privacy}", "followers_url": "https://api.github.com/users/GarrettArm/followers", "following_url": "https://api.github.com/users/GarrettArm/following{/other_user}", "gists_url": "https://api.github.com/users/GarrettArm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GarrettArm", "id": 6989085, "login": "GarrettArm", "node_id": "MDQ6VXNlcjY5ODkwODU=", "organizations_url": "https://api.github.com/users/GarrettArm/orgs", "received_events_url": "https://api.github.com/users/GarrettArm/received_events", "repos_url": "https://api.github.com/users/GarrettArm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GarrettArm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GarrettArm/subscriptions", "type": "User", "url": "https://api.github.com/users/GarrettArm", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2020-09-24T22:29:06Z
2021-08-29T00:06:45Z
2020-10-13T12:33:48Z
NONE
resolved
with `response = requests.get('some_xml_api_endpoint')` The xml response has the header: <?xml version="1.0" encoding="UTF-8"?> I'm using ubuntu, python3, requests 2.24.0, and saving that file in utf-8 on a ext-4 partition. response.text gives a lot of broken characters. response.content.decode('utf-8') works well. The response is rendered: Reptileâs Tail **response.text broke the curly quote character** Reptiles’s Tail **content.decode('utf-8') handled the curly-quote well** Could be described as: print(bytes([226, 128, 153]).decode('utf-8')) I expected `response.text` to behave the same as `response.content.decode('utf-8')`. I've never read any warnings in the guides or docs to anticipate this behavior. Some prominent warnings would help. Unless .decode('utf-8') is doing some magic heavy-lifting.
{ "avatar_url": "https://avatars.githubusercontent.com/u/6989085?v=4", "events_url": "https://api.github.com/users/GarrettArm/events{/privacy}", "followers_url": "https://api.github.com/users/GarrettArm/followers", "following_url": "https://api.github.com/users/GarrettArm/following{/other_user}", "gists_url": "https://api.github.com/users/GarrettArm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GarrettArm", "id": 6989085, "login": "GarrettArm", "node_id": "MDQ6VXNlcjY5ODkwODU=", "organizations_url": "https://api.github.com/users/GarrettArm/orgs", "received_events_url": "https://api.github.com/users/GarrettArm/received_events", "repos_url": "https://api.github.com/users/GarrettArm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GarrettArm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GarrettArm/subscriptions", "type": "User", "url": "https://api.github.com/users/GarrettArm", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5597/reactions" }
https://api.github.com/repos/psf/requests/issues/5597/timeline
null
completed
null
null
false
[ "I believe what you're missing is likely that the endpoint is giving us the wrong charset or we're trying to detect it with chardet. You should look at `response.encoding` and `response.apparent_encoding` (if `.encoding` is `None`). If you know the encoding and `response.encoding` is either unset or _wrong_ you sho...
https://api.github.com/repos/psf/requests/issues/5596
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5596/labels{/name}
https://api.github.com/repos/psf/requests/issues/5596/comments
https://api.github.com/repos/psf/requests/issues/5596/events
https://github.com/psf/requests/pull/5596
708,215,345
MDExOlB1bGxSZXF1ZXN0NDkyNDgzNTMw
5,596
Fix no_proxy and no, not being respected. Merge self.proxies and proxies
{ "avatar_url": "https://avatars.githubusercontent.com/u/2320837?v=4", "events_url": "https://api.github.com/users/Suika/events{/privacy}", "followers_url": "https://api.github.com/users/Suika/followers", "following_url": "https://api.github.com/users/Suika/following{/other_user}", "gists_url": "https://api.github.com/users/Suika/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Suika", "id": 2320837, "login": "Suika", "node_id": "MDQ6VXNlcjIzMjA4Mzc=", "organizations_url": "https://api.github.com/users/Suika/orgs", "received_events_url": "https://api.github.com/users/Suika/received_events", "repos_url": "https://api.github.com/users/Suika/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Suika/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Suika/subscriptions", "type": "User", "url": "https://api.github.com/users/Suika", "user_view_type": "public" }
[]
open
false
null
[]
null
7
2020-09-24T14:21:15Z
2024-05-16T03:04:27Z
null
NONE
null
Since no_proxy is not working as intended, I tried fixing it with least intrsion into whole process. It is contained to the `merge_environment_settings` and `request` function. In the `request` the proxy from request and proxy from session are merged. Having the request proxy overwrite the session proxy where needed. The `should_bypass_proxies` is applied outside `get_environ_proxies` in `merge_environment_settings`, since `no_proxy` is only applied to OS ENV and not the proxies set in `requests` or `Sessions` Should close #4871, I hope.
null
{ "+1": 4, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/psf/requests/issues/5596/reactions" }
https://api.github.com/repos/psf/requests/issues/5596/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5596.diff", "html_url": "https://github.com/psf/requests/pull/5596", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5596.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5596" }
true
[ "This patched fixed #5731 for me. I was very surprised this patch has not gotten any attention yet. Is there anything missing before it can be considered?", "Hi @Suika and @RichieB2B, we are also dealing with this issue, any updates?", "I found a work around that I described at https://github.com/psf/requests/i...
https://api.github.com/repos/psf/requests/issues/5595
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5595/labels{/name}
https://api.github.com/repos/psf/requests/issues/5595/comments
https://api.github.com/repos/psf/requests/issues/5595/events
https://github.com/psf/requests/pull/5595
707,915,856
MDExOlB1bGxSZXF1ZXN0NDkyMjM0NDQx
5,595
removed unused import from setup.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/6549852?v=4", "events_url": "https://api.github.com/users/vivekvashist/events{/privacy}", "followers_url": "https://api.github.com/users/vivekvashist/followers", "following_url": "https://api.github.com/users/vivekvashist/following{/other_user}", "gists_url": "https://api.github.com/users/vivekvashist/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vivekvashist", "id": 6549852, "login": "vivekvashist", "node_id": "MDQ6VXNlcjY1NDk4NTI=", "organizations_url": "https://api.github.com/users/vivekvashist/orgs", "received_events_url": "https://api.github.com/users/vivekvashist/received_events", "repos_url": "https://api.github.com/users/vivekvashist/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vivekvashist/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vivekvashist/subscriptions", "type": "User", "url": "https://api.github.com/users/vivekvashist", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-24T07:05:29Z
2021-08-27T00:08:40Z
2021-05-04T20:46:08Z
NONE
resolved
Removed import re which looks like its unused in setup.py
{ "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/5595/reactions" }
https://api.github.com/repos/psf/requests/issues/5595/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5595.diff", "html_url": "https://github.com/psf/requests/pull/5595", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5595.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5595" }
true
[ "#5780", "Yep, looks like this got lost in the shuffle. Apologies @vivekvashist and thanks for the contribution. Resolving since this is no longer needed." ]
https://api.github.com/repos/psf/requests/issues/5594
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5594/labels{/name}
https://api.github.com/repos/psf/requests/issues/5594/comments
https://api.github.com/repos/psf/requests/issues/5594/events
https://github.com/psf/requests/pull/5594
707,274,406
MDExOlB1bGxSZXF1ZXN0NDkxNzAzMjk5
5,594
Update advanced.rst
{ "avatar_url": "https://avatars.githubusercontent.com/u/7895513?v=4", "events_url": "https://api.github.com/users/icfly2/events{/privacy}", "followers_url": "https://api.github.com/users/icfly2/followers", "following_url": "https://api.github.com/users/icfly2/following{/other_user}", "gists_url": "https://api.github.com/users/icfly2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/icfly2", "id": 7895513, "login": "icfly2", "node_id": "MDQ6VXNlcjc4OTU1MTM=", "organizations_url": "https://api.github.com/users/icfly2/orgs", "received_events_url": "https://api.github.com/users/icfly2/received_events", "repos_url": "https://api.github.com/users/icfly2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/icfly2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/icfly2/subscriptions", "type": "User", "url": "https://api.github.com/users/icfly2", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-09-23T11:20:12Z
2021-08-28T00:06:15Z
2020-11-17T01:31:40Z
CONTRIBUTOR
resolved
replaced reference to requests-async with httpx the replacement project
{ "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/5594/reactions" }
https://api.github.com/repos/psf/requests/issues/5594/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5594.diff", "html_url": "https://github.com/psf/requests/pull/5594", "merged_at": "2020-11-17T01:31:40Z", "patch_url": "https://github.com/psf/requests/pull/5594.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5594" }
true
[]
https://api.github.com/repos/psf/requests/issues/5593
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5593/labels{/name}
https://api.github.com/repos/psf/requests/issues/5593/comments
https://api.github.com/repos/psf/requests/issues/5593/events
https://github.com/psf/requests/issues/5593
706,645,700
MDU6SXNzdWU3MDY2NDU3MDA=
5,593
The Post request route does not work for this library
{ "avatar_url": "https://avatars.githubusercontent.com/u/64030739?v=4", "events_url": "https://api.github.com/users/shreyamalogi/events{/privacy}", "followers_url": "https://api.github.com/users/shreyamalogi/followers", "following_url": "https://api.github.com/users/shreyamalogi/following{/other_user}", "gists_url": "https://api.github.com/users/shreyamalogi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shreyamalogi", "id": 64030739, "login": "shreyamalogi", "node_id": "MDQ6VXNlcjY0MDMwNzM5", "organizations_url": "https://api.github.com/users/shreyamalogi/orgs", "received_events_url": "https://api.github.com/users/shreyamalogi/received_events", "repos_url": "https://api.github.com/users/shreyamalogi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shreyamalogi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shreyamalogi/subscriptions", "type": "User", "url": "https://api.github.com/users/shreyamalogi", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-22T19:44:26Z
2021-08-29T00:06:51Z
2020-09-22T20:12:12Z
NONE
resolved
Summary. ## Expected Result What you expected. ## Actual Result What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` <paste here> ``` 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/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/5593/reactions" }
https://api.github.com/repos/psf/requests/issues/5593/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/5592
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5592/labels{/name}
https://api.github.com/repos/psf/requests/issues/5592/comments
https://api.github.com/repos/psf/requests/issues/5592/events
https://github.com/psf/requests/issues/5592
704,848,885
MDU6SXNzdWU3MDQ4NDg4ODU=
5,592
My kanboard is locked with an error - Internal Error: Identifier "container" is not defined.
{ "avatar_url": "https://avatars.githubusercontent.com/u/70618459?v=4", "events_url": "https://api.github.com/users/Jsn2win/events{/privacy}", "followers_url": "https://api.github.com/users/Jsn2win/followers", "following_url": "https://api.github.com/users/Jsn2win/following{/other_user}", "gists_url": "https://api.github.com/users/Jsn2win/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Jsn2win", "id": 70618459, "login": "Jsn2win", "node_id": "MDQ6VXNlcjcwNjE4NDU5", "organizations_url": "https://api.github.com/users/Jsn2win/orgs", "received_events_url": "https://api.github.com/users/Jsn2win/received_events", "repos_url": "https://api.github.com/users/Jsn2win/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Jsn2win/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jsn2win/subscriptions", "type": "User", "url": "https://api.github.com/users/Jsn2win", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-19T09:33:35Z
2021-08-29T00:06:51Z
2020-09-19T13:37:59Z
NONE
resolved
My kanboard is locked with an error - Internal Error: Identifier "container" is not defined. __Originally posted by @plyaskin in https://github.com/CoMPaTech/kanboard_plugin-done_column_highlight/issues/1__
{ "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/5592/reactions" }
https://api.github.com/repos/psf/requests/issues/5592/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/5591
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5591/labels{/name}
https://api.github.com/repos/psf/requests/issues/5591/comments
https://api.github.com/repos/psf/requests/issues/5591/events
https://github.com/psf/requests/issues/5591
704,680,441
MDU6SXNzdWU3MDQ2ODA0NDE=
5,591
multipart/form-data request preparation possible issues
{ "avatar_url": "https://avatars.githubusercontent.com/u/7011511?v=4", "events_url": "https://api.github.com/users/karanveersp/events{/privacy}", "followers_url": "https://api.github.com/users/karanveersp/followers", "following_url": "https://api.github.com/users/karanveersp/following{/other_user}", "gists_url": "https://api.github.com/users/karanveersp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/karanveersp", "id": 7011511, "login": "karanveersp", "node_id": "MDQ6VXNlcjcwMTE1MTE=", "organizations_url": "https://api.github.com/users/karanveersp/orgs", "received_events_url": "https://api.github.com/users/karanveersp/received_events", "repos_url": "https://api.github.com/users/karanveersp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/karanveersp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/karanveersp/subscriptions", "type": "User", "url": "https://api.github.com/users/karanveersp", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-18T21:56:56Z
2021-08-29T00:06:52Z
2020-09-19T01:58:24Z
NONE
resolved
I've been trying to send a POST multipart/form-data request using the following function ```python def upload_file(token, filepath, table_id): url = "https://h.app.wdesk.com/s/wdata/prep/api/v1/file" headers = { "Authorization": f"Bearer {token}", } files = { "file": open(filepath, "rb"), "tableId": (None, table_id) } resp = requests.post(url, headers=headers, files=files) print(resp.request.headers) return resp.json() ``` ## Expected Result Status 201 created JSON response. ## Actual Result Status 400, with error message that contentType is missing from the request headers. If `Content-Type` is added explicitly in the headers as `multipart/form-data` the response is a Status 500, unknown error. Running the same request in NodeJS and with Postman don't produce these errors. ## Reproduction Steps N/A since invoking the API requires an auth token. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.4.0-47-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.25.7" }, "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/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/5591/reactions" }
https://api.github.com/repos/psf/requests/issues/5591/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.", "Try examining your request with Wireshark to see e...
https://api.github.com/repos/psf/requests/issues/5590
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5590/labels{/name}
https://api.github.com/repos/psf/requests/issues/5590/comments
https://api.github.com/repos/psf/requests/issues/5590/events
https://github.com/psf/requests/issues/5590
704,569,276
MDU6SXNzdWU3MDQ1NjkyNzY=
5,590
raise InvalidSchema("No connection adapters were found for {!r}".format(url)) pip._vendor.requests.exceptions.InvalidSchema: No connection adapters were found for 'javascript: void(0)'
{ "avatar_url": "https://avatars.githubusercontent.com/u/28509822?v=4", "events_url": "https://api.github.com/users/souravsharan97/events{/privacy}", "followers_url": "https://api.github.com/users/souravsharan97/followers", "following_url": "https://api.github.com/users/souravsharan97/following{/other_user}", "gists_url": "https://api.github.com/users/souravsharan97/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/souravsharan97", "id": 28509822, "login": "souravsharan97", "node_id": "MDQ6VXNlcjI4NTA5ODIy", "organizations_url": "https://api.github.com/users/souravsharan97/orgs", "received_events_url": "https://api.github.com/users/souravsharan97/received_events", "repos_url": "https://api.github.com/users/souravsharan97/repos", "site_admin": false, "starred_url": "https://api.github.com/users/souravsharan97/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/souravsharan97/subscriptions", "type": "User", "url": "https://api.github.com/users/souravsharan97", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-18T18:20:37Z
2021-08-30T00:06:05Z
2020-09-18T18:24:50Z
NONE
resolved
import unittest from datetime import datetime from pip._vendor import requests from selenium import webdriver class Index(unittest.TestCase): @classmethod def setUpClass(cls) : chrome_options = webdriver.ChromeOptions() #chrome_options.add_argument('headless') #prefs = {"profile.default_content_setting_values.notifications": 2} #chrome_options.add_experimental_option("prefs", prefs) #chrome_options.add_argument("start-maximized") cls.driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=r'/home/sharan/Desktop/chromedriver') cls.driver.maximize_window() def test_all_links_test(self): now = datetime.now() date_time = now.strftime("%m%d%Y%H%M%S") pageUrl = "https://www.amazon.in/dp/B01EU2M62S/" driver = self.driver driver.get(pageUrl) links = [] elems = self.driver.find_elements_by_xpath("//a[@href]") for elem in elems: #href = [requests.head(elem.get_attribute("href"))] href = [elem.get_attribute("href")] page = requests.get(href) #print(elem.get_attribute('href'), href.status_code) print(page) links.append(href) file1 = open("/home/sharan/Desktop/flowace1/"+ date_time + ".xlsx", "x") file1.write("\n".join(links)) file1.close() @classmethod # def tearDown(self): def tearDownClass(cls): cls.driver.close() print("jao") if __name__== "main": # unittest.main(testRunner=HTMLTestRunner.HTMLTestRunner(output = "home/sharan/Desktop/Testing/Reports/")) unittest.main() #file1 = open("/home/sharan/Desktop/Testing/Reports/1.html", "x") #unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output=file1))
{ "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/5590/reactions" }
https://api.github.com/repos/psf/requests/issues/5590/timeline
null
completed
null
null
false
[ "Hi @souravsharan97,\r\n\r\nThere's a couple issues here. You're importing a very old version of requests from a package private vendoring in pip. This is a *very* bad idea for stability in your code. I'd recommend installing Requests and updating to the latest version. Secondly, you can't pass calls to javascript ...
https://api.github.com/repos/psf/requests/issues/5589
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5589/labels{/name}
https://api.github.com/repos/psf/requests/issues/5589/comments
https://api.github.com/repos/psf/requests/issues/5589/events
https://github.com/psf/requests/issues/5589
704,233,166
MDU6SXNzdWU3MDQyMzMxNjY=
5,589
About proxy
{ "avatar_url": "https://avatars.githubusercontent.com/u/33195613?v=4", "events_url": "https://api.github.com/users/spike-rx/events{/privacy}", "followers_url": "https://api.github.com/users/spike-rx/followers", "following_url": "https://api.github.com/users/spike-rx/following{/other_user}", "gists_url": "https://api.github.com/users/spike-rx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/spike-rx", "id": 33195613, "login": "spike-rx", "node_id": "MDQ6VXNlcjMzMTk1NjEz", "organizations_url": "https://api.github.com/users/spike-rx/orgs", "received_events_url": "https://api.github.com/users/spike-rx/received_events", "repos_url": "https://api.github.com/users/spike-rx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/spike-rx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/spike-rx/subscriptions", "type": "User", "url": "https://api.github.com/users/spike-rx", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-18T09:31:13Z
2021-08-28T00:06:05Z
2020-11-16T06:58:07Z
NONE
resolved
Accodring to the document about proxy should like this: proxies = {"http":"http://ip:port"}, but if i wrote like this : proxies = {"http":"ip+port"} some url also can got the response, but not all urls, I think should ban like this proxies = {"http":"ip:port"} so as to achieve unity.
{ "avatar_url": "https://avatars.githubusercontent.com/u/33195613?v=4", "events_url": "https://api.github.com/users/spike-rx/events{/privacy}", "followers_url": "https://api.github.com/users/spike-rx/followers", "following_url": "https://api.github.com/users/spike-rx/following{/other_user}", "gists_url": "https://api.github.com/users/spike-rx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/spike-rx", "id": 33195613, "login": "spike-rx", "node_id": "MDQ6VXNlcjMzMTk1NjEz", "organizations_url": "https://api.github.com/users/spike-rx/orgs", "received_events_url": "https://api.github.com/users/spike-rx/received_events", "repos_url": "https://api.github.com/users/spike-rx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/spike-rx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/spike-rx/subscriptions", "type": "User", "url": "https://api.github.com/users/spike-rx", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5589/reactions" }
https://api.github.com/repos/psf/requests/issues/5589/timeline
null
completed
null
null
false
[ "I think you should try like this ( http://address : port ) it is possibly work." ]
https://api.github.com/repos/psf/requests/issues/5588
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5588/labels{/name}
https://api.github.com/repos/psf/requests/issues/5588/comments
https://api.github.com/repos/psf/requests/issues/5588/events
https://github.com/psf/requests/issues/5588
702,655,633
MDU6SXNzdWU3MDI2NTU2MzM=
5,588
Seems `requests.packages` is not installed, please install and try again!
{ "avatar_url": "https://avatars.githubusercontent.com/u/60227739?v=4", "events_url": "https://api.github.com/users/sanswarn/events{/privacy}", "followers_url": "https://api.github.com/users/sanswarn/followers", "following_url": "https://api.github.com/users/sanswarn/following{/other_user}", "gists_url": "https://api.github.com/users/sanswarn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanswarn", "id": 60227739, "login": "sanswarn", "node_id": "MDQ6VXNlcjYwMjI3NzM5", "organizations_url": "https://api.github.com/users/sanswarn/orgs", "received_events_url": "https://api.github.com/users/sanswarn/received_events", "repos_url": "https://api.github.com/users/sanswarn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanswarn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanswarn/subscriptions", "type": "User", "url": "https://api.github.com/users/sanswarn", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-16T10:41:17Z
2021-08-30T00:06:05Z
2020-09-16T15:57:04Z
NONE
resolved
I am running idcssearch binaries that seems calling requests but somehow its not present in virtual python word. multiple times I tries uninstall and install but no results. [sswarnka@sswarnka-linux idcs-tools]$ python Python 2.7.5 (default, Nov 27 2019, 09:57:45) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39.0.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import request Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named request >>> import requests Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/requests-2.24.0-py2.7.egg/requests/__init__.py", line 43, in <module> import urllib3 ImportError: No module named urllib3 >>> ## System Information $ python -m requests.help [sswarnka@sswarnka-linux idcs-tools]$ python -m requests.help /usr/bin/python: No module named urllib3 [sswarnka@sswarnka-linux idcs-tools]$ [sswarnka@sswarnka-linux idcs-tools]$ pip3 freeze certifi==2020.6.20 chardet==3.0.4 freeze==3.0 idna==2.10 requests==2.24.0 six==1.15.0 urllib3==1.25.10 [sswarnka@sswarnka-linux idcs-tools]$ ``` <paste here> ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5588/reactions" }
https://api.github.com/repos/psf/requests/issues/5588/timeline
null
completed
null
null
false
[ "Your `python` is Python2, but you are using `pip3`, the Python3 version of pip, to show your installed packages. Take a look at the output of `python -m pip freeze`.", "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. Plea...
https://api.github.com/repos/psf/requests/issues/5587
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5587/labels{/name}
https://api.github.com/repos/psf/requests/issues/5587/comments
https://api.github.com/repos/psf/requests/issues/5587/events
https://github.com/psf/requests/issues/5587
702,301,437
MDU6SXNzdWU3MDIzMDE0Mzc=
5,587
Redirection Code 308 (Permanent Redirect - POST to POST)
{ "avatar_url": "https://avatars.githubusercontent.com/u/561669?v=4", "events_url": "https://api.github.com/users/sartigas/events{/privacy}", "followers_url": "https://api.github.com/users/sartigas/followers", "following_url": "https://api.github.com/users/sartigas/following{/other_user}", "gists_url": "https://api.github.com/users/sartigas/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sartigas", "id": 561669, "login": "sartigas", "node_id": "MDQ6VXNlcjU2MTY2OQ==", "organizations_url": "https://api.github.com/users/sartigas/orgs", "received_events_url": "https://api.github.com/users/sartigas/received_events", "repos_url": "https://api.github.com/users/sartigas/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sartigas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sartigas/subscriptions", "type": "User", "url": "https://api.github.com/users/sartigas", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-09-15T21:58:52Z
2021-08-30T00:06:06Z
2020-09-16T15:55:58Z
NONE
resolved
Hi, Not a request for help but a suggestion to the project team to review [RFC 7538](https://tools.ietf.org/html/rfc7538). It would be awesome to have redirection code 308 (POST to POST) implemented in a future Requests release. Thanks!
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5587/reactions" }
https://api.github.com/repos/psf/requests/issues/5587/timeline
null
completed
null
null
false
[ "@sartigas the issue is that as a client we can't know which servers reasonably support this as the majority of the web and a significant number of servers/applications pre-date this (relatively) recent RFC.", "Hi @sartigas,\r\n\r\nJust to clarify, are you asking about implementing redirect caching for a 308 resp...
https://api.github.com/repos/psf/requests/issues/5586
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5586/labels{/name}
https://api.github.com/repos/psf/requests/issues/5586/comments
https://api.github.com/repos/psf/requests/issues/5586/events
https://github.com/psf/requests/issues/5586
701,298,826
MDU6SXNzdWU3MDEyOTg4MjY=
5,586
Special characters getting replaced using `params` keywarg
{ "avatar_url": "https://avatars.githubusercontent.com/u/16466438?v=4", "events_url": "https://api.github.com/users/ktoldham/events{/privacy}", "followers_url": "https://api.github.com/users/ktoldham/followers", "following_url": "https://api.github.com/users/ktoldham/following{/other_user}", "gists_url": "https://api.github.com/users/ktoldham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ktoldham", "id": 16466438, "login": "ktoldham", "node_id": "MDQ6VXNlcjE2NDY2NDM4", "organizations_url": "https://api.github.com/users/ktoldham/orgs", "received_events_url": "https://api.github.com/users/ktoldham/received_events", "repos_url": "https://api.github.com/users/ktoldham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ktoldham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ktoldham/subscriptions", "type": "User", "url": "https://api.github.com/users/ktoldham", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-14T17:43:20Z
2021-08-30T00:06:06Z
2020-09-14T17:55:54Z
NONE
resolved
Special characters are getting replaced when sending them through the `params` kwarg. The same result occurs on mac and pc. Tested with the `get` and `post` methods. ## Expected Result For the string to be added to the url as it was given to the requests module. ## Actual Result Special characters getting replaced. Here are output some examples. input: `email='kevin@test.com'` output: `/cart?email=kevin%40test.com` input: `email='kevin%test.com'` output: `/cart?email=kevin%25test.com` input: `email='kevin&test.com'` output: `/cart?email=kevin%26test.com` ## Reproduction Steps ```python import requests url = url_factory() params = {'email': 'kevin@test.com'} response = session.post(url=url, params=params) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "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.24.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5586/reactions" }
https://api.github.com/repos/psf/requests/issues/5586/timeline
null
completed
null
null
false
[ "Hi @ktoldham,\r\n\r\nThis is the correct behavior for URI queries. You can read the full specification in [RFC 3986 section 3.4](https://tools.ietf.org/html/rfc3986#section-3.4). Those characters are required to be percent encoded before sending them across the network.\r\n\r\nIf you *must* violate that for some r...
https://api.github.com/repos/psf/requests/issues/5585
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5585/labels{/name}
https://api.github.com/repos/psf/requests/issues/5585/comments
https://api.github.com/repos/psf/requests/issues/5585/events
https://github.com/psf/requests/issues/5585
700,604,673
MDU6SXNzdWU3MDA2MDQ2NzM=
5,585
[DOCS] Quickstart Cookies link doesn't exist
{ "avatar_url": "https://avatars.githubusercontent.com/u/5807561?v=4", "events_url": "https://api.github.com/users/RomanKornev/events{/privacy}", "followers_url": "https://api.github.com/users/RomanKornev/followers", "following_url": "https://api.github.com/users/RomanKornev/following{/other_user}", "gists_url": "https://api.github.com/users/RomanKornev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RomanKornev", "id": 5807561, "login": "RomanKornev", "node_id": "MDQ6VXNlcjU4MDc1NjE=", "organizations_url": "https://api.github.com/users/RomanKornev/orgs", "received_events_url": "https://api.github.com/users/RomanKornev/received_events", "repos_url": "https://api.github.com/users/RomanKornev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RomanKornev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RomanKornev/subscriptions", "type": "User", "url": "https://api.github.com/users/RomanKornev", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-09-13T16:43:58Z
2021-08-30T00:06:07Z
2020-09-14T17:49:46Z
NONE
resolved
On https://requests.readthedocs.io/en/master/user/quickstart/ clicking on `Cookies` in `Table of Contents` does nothing. It doesn't link to anything. `Cookies` part is completely missing in documentation. ## Expected Result `Cookies` documentation to be present in the quickstart guide as described in `Table of Contents`. https://requests.readthedocs.io/en/master/user/quickstart/#cookies links to `Cookies` part of the `Quickstart`. ## Actual Result `Cookies` part is completely missing in documentation. Links to the beginning of the page or does nothing.
{ "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/5585/reactions" }
https://api.github.com/repos/psf/requests/issues/5585/timeline
null
completed
null
null
false
[ "I just tried clicking on the links that you posted to see what you were referring to, but they seem to work just fine. Both the \"Cookies\" link in the table of contents and the https://requests.readthedocs.io/en/master/user/quickstart/#cookies permalink work.", "> I just tried clicking on the links that you pos...
https://api.github.com/repos/psf/requests/issues/5584
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5584/labels{/name}
https://api.github.com/repos/psf/requests/issues/5584/comments
https://api.github.com/repos/psf/requests/issues/5584/events
https://github.com/psf/requests/pull/5584
699,423,950
MDExOlB1bGxSZXF1ZXN0NDg1MTY2OTUx
5,584
Update kens github
{ "avatar_url": "https://avatars.githubusercontent.com/u/193832?v=4", "events_url": "https://api.github.com/users/Visgean/events{/privacy}", "followers_url": "https://api.github.com/users/Visgean/followers", "following_url": "https://api.github.com/users/Visgean/following{/other_user}", "gists_url": "https://api.github.com/users/Visgean/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Visgean", "id": 193832, "login": "Visgean", "node_id": "MDQ6VXNlcjE5MzgzMg==", "organizations_url": "https://api.github.com/users/Visgean/orgs", "received_events_url": "https://api.github.com/users/Visgean/received_events", "repos_url": "https://api.github.com/users/Visgean/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Visgean/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Visgean/subscriptions", "type": "User", "url": "https://api.github.com/users/Visgean", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-09-11T15:02:28Z
2021-08-28T00:06:21Z
2020-09-11T15:36:21Z
CONTRIBUTOR
resolved
His website points to https://github.com/ken-reitz, kennethreitz seems to be trolling account (there is Islamophobic profile picture ) ![image](https://user-images.githubusercontent.com/193832/92941329-8722fe80-f450-11ea-9ee6-86e55957b21d.png)
{ "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/5584/reactions" }
https://api.github.com/repos/psf/requests/issues/5584/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5584.diff", "html_url": "https://github.com/psf/requests/pull/5584", "merged_at": "2020-09-11T15:36:21Z", "patch_url": "https://github.com/psf/requests/pull/5584.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5584" }
true
[]
https://api.github.com/repos/psf/requests/issues/5583
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5583/labels{/name}
https://api.github.com/repos/psf/requests/issues/5583/comments
https://api.github.com/repos/psf/requests/issues/5583/events
https://github.com/psf/requests/issues/5583
699,056,159
MDU6SXNzdWU2OTkwNTYxNTk=
5,583
ValueError: invalid literal for int() with base 16: b''
{ "avatar_url": "https://avatars.githubusercontent.com/u/55988471?v=4", "events_url": "https://api.github.com/users/gelodefaultbrain/events{/privacy}", "followers_url": "https://api.github.com/users/gelodefaultbrain/followers", "following_url": "https://api.github.com/users/gelodefaultbrain/following{/other_user}", "gists_url": "https://api.github.com/users/gelodefaultbrain/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gelodefaultbrain", "id": 55988471, "login": "gelodefaultbrain", "node_id": "MDQ6VXNlcjU1OTg4NDcx", "organizations_url": "https://api.github.com/users/gelodefaultbrain/orgs", "received_events_url": "https://api.github.com/users/gelodefaultbrain/received_events", "repos_url": "https://api.github.com/users/gelodefaultbrain/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gelodefaultbrain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gelodefaultbrain/subscriptions", "type": "User", "url": "https://api.github.com/users/gelodefaultbrain", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2020-09-11T09:03:03Z
2021-08-30T00:06:07Z
2020-09-14T17:59:30Z
NONE
resolved
Summary. I am just trying to make a http request on a certain website, the thing is I am making requests for a lot of website and I am doing it in a for loop and that error on the title SOMETIMES shows up! YES SOMETIMES! there would be times that it occurs and not What you expected. Expect to have a good result What happened instead. This is what happened ![image](https://user-images.githubusercontent.com/55988471/92898416-8ab68580-f450-11ea-81c2-79b506bfbf29.png) ```python #My Python version is 3.8.2 import requests url = "somesite.com" r = requests.get(url) ``` ## System Information $ python -m requests.help ``` <paste here> ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5583/reactions" }
https://api.github.com/repos/psf/requests/issues/5583/timeline
null
completed
null
null
false
[ "By the way this is my version of the requests library \r\n\r\n![image](https://user-images.githubusercontent.com/55988471/92898892-f0a30d00-f450-11ea-8343-896f0a32d528.png)\r\n", "i have also read some fixes from other people here is the site\r\n\r\nhttps://github.com/psf/requests/issues/4248\r\n\r\nThere is a g...
https://api.github.com/repos/psf/requests/issues/5581
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5581/labels{/name}
https://api.github.com/repos/psf/requests/issues/5581/comments
https://api.github.com/repos/psf/requests/issues/5581/events
https://github.com/psf/requests/issues/5581
695,866,555
MDU6SXNzdWU2OTU4NjY1NTU=
5,581
requests prase http headers error
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-08T13:20:55Z
2021-08-30T00:06:09Z
2020-09-08T15:10:29Z
NONE
resolved
requests not fully parsed the http headers when there was two reponse line,as follows: ``` GET /cgi-bin/get_jpeg?ch=1 HTTP/1.1 Host: 121.156.161.92 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 Accept-Encoding: gzip, deflate Accept: */* Connection: keep-alive HTTP/1.0 200 OK Date: Tue, 08 Sep 2020 13:17:53 GMT Server: Boa/0.94.13 Connection: close HTTP/1.0 200 OK Connection: close Content-Length: 77240 Content-Type: image/jpeg xxxxx ``` requests parse result: ``` {'Date': 'Tue, 08 Sep 2020 13:20:16 GMT', 'Server': 'Boa/0.94.13', 'Connection': 'close'} 200 ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5581/reactions" }
https://api.github.com/repos/psf/requests/issues/5581/timeline
null
completed
null
null
false
[ "Requests doesn't parse this - httplib does in standard python. Please open a bug on bugs.python.org", "I'll note this is also invalid HTTP. Server is not allowed to send multiple non-1XX responses from a single request. " ]
https://api.github.com/repos/psf/requests/issues/5580
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5580/labels{/name}
https://api.github.com/repos/psf/requests/issues/5580/comments
https://api.github.com/repos/psf/requests/issues/5580/events
https://github.com/psf/requests/issues/5580
695,841,496
MDU6SXNzdWU2OTU4NDE0OTY=
5,580
Crawling a web miss a # in url,and then fail,how to resolve it?
{ "avatar_url": "https://avatars.githubusercontent.com/u/46711557?v=4", "events_url": "https://api.github.com/users/ch-boogeyman/events{/privacy}", "followers_url": "https://api.github.com/users/ch-boogeyman/followers", "following_url": "https://api.github.com/users/ch-boogeyman/following{/other_user}", "gists_url": "https://api.github.com/users/ch-boogeyman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ch-boogeyman", "id": 46711557, "login": "ch-boogeyman", "node_id": "MDQ6VXNlcjQ2NzExNTU3", "organizations_url": "https://api.github.com/users/ch-boogeyman/orgs", "received_events_url": "https://api.github.com/users/ch-boogeyman/received_events", "repos_url": "https://api.github.com/users/ch-boogeyman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ch-boogeyman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ch-boogeyman/subscriptions", "type": "User", "url": "https://api.github.com/users/ch-boogeyman", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-09-08T12:49:14Z
2021-08-30T00:06:09Z
2020-09-08T15:39:52Z
NONE
resolved
Summary. ## Expected Result Don't lose the charts after # ## Actual Result The url after # will loss,the server can't get it!! ## Reproduction Steps ```python import requests import time ![loss](https://user-images.githubusercontent.com/46711557/92478607-f8766d80-f214-11ea-9887-87ac05ad8f32.png) url = 'https://ifm.zhaobenshu.com/User/user_ifa_LoginCard.ashx?a=[Lib={{gdut}}][OpenId={{}}][PmWebApiProxy={{}}][UrlQsLib={{#}}][Opac={{sulcmis4}}][OpacCaptcha={{0}}][UrlHost={{http://gdut.n1.zhaobenshu.com/}}][CardId={{' + \ req['account'] + '}}][CardPwd={{' + req['pwd'] + \ '}}][UniSess={{}}][SessLib={{gdut}}][SessFun={{wap}}][SessPrd={{reso}}][CookiesStr={{}}][CaptchaStr={{}}]&x=&y=01&z=&_=' + \ str(int(round(time.time() * 1000))) res = requests.get(url) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5580/reactions" }
https://api.github.com/repos/psf/requests/issues/5580/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "> Hi there! Thanks for opening this issue. Unfortu...
https://api.github.com/repos/psf/requests/issues/5579
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5579/labels{/name}
https://api.github.com/repos/psf/requests/issues/5579/comments
https://api.github.com/repos/psf/requests/issues/5579/events
https://github.com/psf/requests/issues/5579
694,061,825
MDU6SXNzdWU2OTQwNjE4MjU=
5,579
requests.get() fails with SOCKS5 proxy on python 3.7.8 64bit on some urls
{ "avatar_url": "https://avatars.githubusercontent.com/u/8864505?v=4", "events_url": "https://api.github.com/users/shinrax2/events{/privacy}", "followers_url": "https://api.github.com/users/shinrax2/followers", "following_url": "https://api.github.com/users/shinrax2/following{/other_user}", "gists_url": "https://api.github.com/users/shinrax2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shinrax2", "id": 8864505, "login": "shinrax2", "node_id": "MDQ6VXNlcjg4NjQ1MDU=", "organizations_url": "https://api.github.com/users/shinrax2/orgs", "received_events_url": "https://api.github.com/users/shinrax2/received_events", "repos_url": "https://api.github.com/users/shinrax2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shinrax2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shinrax2/subscriptions", "type": "User", "url": "https://api.github.com/users/shinrax2", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-09-05T11:06:37Z
2021-08-30T00:06:10Z
2020-09-05T13:47:25Z
NONE
resolved
Summary. requests.get() with a SOCKS5 proxy fails on 64bit python with some urls but works on 32bit python ## Expected Result getting the data ## Actual Result ```requests.exceptions.SSLError: SOCKSHTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/shinrax2/PS3GameUpdateDownloader/releases/latest (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4140)')))``` ## Reproduction Steps ```python import requests url = "https://api.github.com/repos/shinrax2/PS3GameUpdateDownloader/releases/latest" proxies = { "http": "socks5://foo:bar@localhost:1080", "https": "socks5://foo:bar@localhost:1080" } r = requests.get(url, proxies=proxies) print(r.content) ``` ## System Information $ python -m requests.help 32bit python: ```{ "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.8" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": false } ``` 64bit python: ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.8" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": false } ``` ## Additional Info SOCKS5-Server: from [simple-socks](https://www.npmjs.com/package/simple-socks/) "examples/createServerWithAuthentication.js"
{ "avatar_url": "https://avatars.githubusercontent.com/u/8864505?v=4", "events_url": "https://api.github.com/users/shinrax2/events{/privacy}", "followers_url": "https://api.github.com/users/shinrax2/followers", "following_url": "https://api.github.com/users/shinrax2/following{/other_user}", "gists_url": "https://api.github.com/users/shinrax2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/shinrax2", "id": 8864505, "login": "shinrax2", "node_id": "MDQ6VXNlcjg4NjQ1MDU=", "organizations_url": "https://api.github.com/users/shinrax2/orgs", "received_events_url": "https://api.github.com/users/shinrax2/received_events", "repos_url": "https://api.github.com/users/shinrax2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/shinrax2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shinrax2/subscriptions", "type": "User", "url": "https://api.github.com/users/shinrax2", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5579/reactions" }
https://api.github.com/repos/psf/requests/issues/5579/timeline
null
completed
null
null
false
[ "i just tested the same code on python 3.7.8 64bit on debian buster 64bit and it works flawless there\r\n\r\ni think this might be a windows specific issue", "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 [Sta...
https://api.github.com/repos/psf/requests/issues/5578
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5578/labels{/name}
https://api.github.com/repos/psf/requests/issues/5578/comments
https://api.github.com/repos/psf/requests/issues/5578/events
https://github.com/psf/requests/issues/5578
693,405,987
MDU6SXNzdWU2OTM0MDU5ODc=
5,578
Other APIs are fetching normal, but some APIs takes time 2-5 minutes to get response, jquery Ajax fetches in milli seconds same APIs
{ "avatar_url": "https://avatars.githubusercontent.com/u/37940163?v=4", "events_url": "https://api.github.com/users/proavinashthakur/events{/privacy}", "followers_url": "https://api.github.com/users/proavinashthakur/followers", "following_url": "https://api.github.com/users/proavinashthakur/following{/other_user}", "gists_url": "https://api.github.com/users/proavinashthakur/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/proavinashthakur", "id": 37940163, "login": "proavinashthakur", "node_id": "MDQ6VXNlcjM3OTQwMTYz", "organizations_url": "https://api.github.com/users/proavinashthakur/orgs", "received_events_url": "https://api.github.com/users/proavinashthakur/received_events", "repos_url": "https://api.github.com/users/proavinashthakur/repos", "site_admin": false, "starred_url": "https://api.github.com/users/proavinashthakur/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/proavinashthakur/subscriptions", "type": "User", "url": "https://api.github.com/users/proavinashthakur", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-09-04T17:15:41Z
2021-08-30T00:06:10Z
2020-09-04T19:13:43Z
NONE
resolved
I need to integrate ShipStation with my Python web app. ShipStation APIs are executing very slower, taking time about 2-5 minutes. I also tried to fetch more heavier APIs which are fetching normally. I tested Shipstation APIs using jQuery Ajax, Postman and it's taking time in milliseconds, or 1-2seconds. What's wrong with requests library. Samples: # python example -- taking minutes 2-5 ``` import requests # request header headers = { 'Authorization': '' } # shipstaion carrier services listing api endpoint list_services = 'https://ssapi.shipstation.com/carriers/listservices?carrierCode=stamps_com' # making get request res = requests.get(list_services, headers=headers) # results print("services_list: ", res, " and type is: ", type(res)) ``` # jQuery Ajax example taking milliseconds or 1-2 seconds: ``` <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> </body> <script> $.ajax({ url: 'https://ssapi.shipstation.com/carriers/listservices?carrierCode=stamps_com', headers: { 'Authorization': '' }, type: "GET", success: function(response) { console.log(response);//does not print in the console } }); </script> </html> ```
{ "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/5578/reactions" }
https://api.github.com/repos/psf/requests/issues/5578/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/5577
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5577/labels{/name}
https://api.github.com/repos/psf/requests/issues/5577/comments
https://api.github.com/repos/psf/requests/issues/5577/events
https://github.com/psf/requests/issues/5577
693,330,603
MDU6SXNzdWU2OTMzMzA2MDM=
5,577
Non Ascii characters are escaped when posting JSON
{ "avatar_url": "https://avatars.githubusercontent.com/u/1542037?v=4", "events_url": "https://api.github.com/users/martyglaubitz/events{/privacy}", "followers_url": "https://api.github.com/users/martyglaubitz/followers", "following_url": "https://api.github.com/users/martyglaubitz/following{/other_user}", "gists_url": "https://api.github.com/users/martyglaubitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/martyglaubitz", "id": 1542037, "login": "martyglaubitz", "node_id": "MDQ6VXNlcjE1NDIwMzc=", "organizations_url": "https://api.github.com/users/martyglaubitz/orgs", "received_events_url": "https://api.github.com/users/martyglaubitz/received_events", "repos_url": "https://api.github.com/users/martyglaubitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/martyglaubitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/martyglaubitz/subscriptions", "type": "User", "url": "https://api.github.com/users/martyglaubitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2020-09-04T15:57:26Z
2022-02-26T06:00:24Z
2021-11-28T05:30:14Z
NONE
resolved
When using import requests requests.post('https://httpbin.org/post', json={'data': 'My Päload'}) the non asci characters (like 'ä' in this case), are getting escaped, resulting in wron data beeing received by the endpoint. I had to help myself by doing all this stuff manually: import requests import json json_string = json.dumps({'data': 'My Päload'}, ensure_ascii=False) requests.post('https://httpbin.org/post', data=json_string.encode('utf-8'), headers={'Content-Type': 'application/json'}) ## Expected Result Payload should retain special characters: {"data": "My Päload"}" ## Actual Result Special characters are getting encoded: {"data": "My P\\u00e4load"} ## Reproduction Steps See summary ## System Information `{ "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.0" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.9" }, "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/5577/reactions" }
https://api.github.com/repos/psf/requests/issues/5577/timeline
null
completed
null
null
false
[ "I'd recommend having an additional parameter for JSON encoding options, something like that:\r\n\r\n requests.post('https://httpbin.org/post', json={'data': 'My Päload'}, json_args={\r\n ensure_ascii=False,\r\n sort_keys=True,\r\n indent=4\r\n })", "You can always encode your own JSON and pa...
https://api.github.com/repos/psf/requests/issues/5576
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5576/labels{/name}
https://api.github.com/repos/psf/requests/issues/5576/comments
https://api.github.com/repos/psf/requests/issues/5576/events
https://github.com/psf/requests/issues/5576
692,800,549
MDU6SXNzdWU2OTI4MDA1NDk=
5,576
Bad SSL Handshake on Windows 10
{ "avatar_url": "https://avatars.githubusercontent.com/u/25717245?v=4", "events_url": "https://api.github.com/users/modbender/events{/privacy}", "followers_url": "https://api.github.com/users/modbender/followers", "following_url": "https://api.github.com/users/modbender/following{/other_user}", "gists_url": "https://api.github.com/users/modbender/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/modbender", "id": 25717245, "login": "modbender", "node_id": "MDQ6VXNlcjI1NzE3MjQ1", "organizations_url": "https://api.github.com/users/modbender/orgs", "received_events_url": "https://api.github.com/users/modbender/received_events", "repos_url": "https://api.github.com/users/modbender/repos", "site_admin": false, "starred_url": "https://api.github.com/users/modbender/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/modbender/subscriptions", "type": "User", "url": "https://api.github.com/users/modbender", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-09-04T07:00:15Z
2021-08-30T00:06:11Z
2020-09-04T07:32:41Z
NONE
resolved
When I do `requests.get(self.feed_url)` ``` Traceback (most recent call last): File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn conn.connect() File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 362, in connect self.sock = ssl_wrap_socket( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\util\ssl_.py", line 384, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 439, in send File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "feed.py", line 47, in get_feed req = requests.get(self.feed_url) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', OSError(0, 'Error')) ``` And when I do `requests.get(self.feed_url, verify=False)` I have been getting this traceback when doing requests ``` Traceback (most recent call last): File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn conn.connect() File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 362, in connect self.sock = ssl_wrap_socket( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\util\ssl_.py", line 384, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\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\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 726, in urlopen retries = retries.increment( File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\util\retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\packages\six.py", line 734, in reraise raise value.with_traceback(tb) File "C:\Users\UserName\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( req = requests.get(self.feed_url, verify=False) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Users\UserName\AppData\Local\Programs\Python\Python38\lib\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')) ``` The URL is fine, because I was using the same URL just 2 days back and have not edited the files and it was fine. I also tried installing certificate from https://www.securly.com/ssl and Installed openssl and added bin folder of openssl to PATH and restarted pc, still not working. **EDIT:** OK, I tested it with other urls and looks like it's that website specific, here is the URL that I was trying to get: [URL](https://horriblesubs.info/shows/yahari-ore-no-seishun-love-come-wa-machigatteiru-kan/) Any help accepted. On Windows 10 with requests 2.24.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/25717245?v=4", "events_url": "https://api.github.com/users/modbender/events{/privacy}", "followers_url": "https://api.github.com/users/modbender/followers", "following_url": "https://api.github.com/users/modbender/following{/other_user}", "gists_url": "https://api.github.com/users/modbender/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/modbender", "id": 25717245, "login": "modbender", "node_id": "MDQ6VXNlcjI1NzE3MjQ1", "organizations_url": "https://api.github.com/users/modbender/orgs", "received_events_url": "https://api.github.com/users/modbender/received_events", "repos_url": "https://api.github.com/users/modbender/repos", "site_admin": false, "starred_url": "https://api.github.com/users/modbender/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/modbender/subscriptions", "type": "User", "url": "https://api.github.com/users/modbender", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5576/reactions" }
https://api.github.com/repos/psf/requests/issues/5576/timeline
null
completed
null
null
false
[ "Closing this as it is similar to #3774 ", "After a lot of tests, it turns that the website was blocked by ISP, I was using 1.1.1.1 DNS to bypass it on browser, but didn't work for python." ]
https://api.github.com/repos/psf/requests/issues/5575
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5575/labels{/name}
https://api.github.com/repos/psf/requests/issues/5575/comments
https://api.github.com/repos/psf/requests/issues/5575/events
https://github.com/psf/requests/issues/5575
692,373,612
MDU6SXNzdWU2OTIzNzM2MTI=
5,575
Requests ignores HSTS if redirected to http:// version of site
{ "avatar_url": "https://avatars.githubusercontent.com/u/6210340?v=4", "events_url": "https://api.github.com/users/gowenfawr/events{/privacy}", "followers_url": "https://api.github.com/users/gowenfawr/followers", "following_url": "https://api.github.com/users/gowenfawr/following{/other_user}", "gists_url": "https://api.github.com/users/gowenfawr/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gowenfawr", "id": 6210340, "login": "gowenfawr", "node_id": "MDQ6VXNlcjYyMTAzNDA=", "organizations_url": "https://api.github.com/users/gowenfawr/orgs", "received_events_url": "https://api.github.com/users/gowenfawr/received_events", "repos_url": "https://api.github.com/users/gowenfawr/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gowenfawr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gowenfawr/subscriptions", "type": "User", "url": "https://api.github.com/users/gowenfawr", "user_view_type": "public" }
[]
open
false
null
[]
null
8
2020-09-03T21:18:32Z
2020-10-14T13:24:55Z
null
NONE
null
Requests will follow an unencrypted http:// redirect from a site that implements HSTS. ## Expected Result I expected Requests to force https:// handling of all http:// URLs for a site which has advertised Strict-Transport-Security. ## Actual Result Requests followed a 301 redirect to Location: http://site and, since port 80 was blocked for that site, spun forever and timed out. (Note, the fact that an HSTS site is redirecting to a closed and unencrypted port is a sin on the site's behalf, not being defended here, but it illustrates the HSTS handling very nicely. Requests times out because it tries to follow the http:// link. Chrome, Firefox, Edge, and Internet Explorer all ignore the http:// referral and rewrite it as https://, arriving at the target landing page. Chrome developer mode describes it as a "307 Internal Redirect" and "Non-Authoritative-Reason: HSTS"). ## Reproduction Steps ```python import requests r = requests.get('https://olb.bsf.net', timeout=(3,15)) ``` Site sends a 302 Redirect to /login, then a 301 Redirect to http://olb.bsf.net/login/. This last redirect to an unencrypted URL is what exposes the behavior. Since the site doesn't listen on port 80, this request will time out and throw an urllib3.exceptions.MaxRetryError error. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.9" }, "platform": { "release": "5.7.6-x86_64-linode136", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5575/reactions" }
https://api.github.com/repos/psf/requests/issues/5575/timeline
null
null
null
null
false
[ "See also https://github.com/psf/requests/issues/3872 - this isn't supported by Requests (unfortunately) and the corresponding work in urllib3 never landed", "@gowenfawr can you please confirm that the redirect stucks on the _second_ redirect (which explicitly mentions http:// )? \r\nI noticed a probably similar ...
https://api.github.com/repos/psf/requests/issues/5574
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5574/labels{/name}
https://api.github.com/repos/psf/requests/issues/5574/comments
https://api.github.com/repos/psf/requests/issues/5574/events
https://github.com/psf/requests/issues/5574
689,602,245
MDU6SXNzdWU2ODk2MDIyNDU=
5,574
Errno 104 Connection Reset by peer in python3 requests executed in a VPS using Ubuntu20
{ "avatar_url": "https://avatars.githubusercontent.com/u/25153874?v=4", "events_url": "https://api.github.com/users/puppetrx/events{/privacy}", "followers_url": "https://api.github.com/users/puppetrx/followers", "following_url": "https://api.github.com/users/puppetrx/following{/other_user}", "gists_url": "https://api.github.com/users/puppetrx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/puppetrx", "id": 25153874, "login": "puppetrx", "node_id": "MDQ6VXNlcjI1MTUzODc0", "organizations_url": "https://api.github.com/users/puppetrx/orgs", "received_events_url": "https://api.github.com/users/puppetrx/received_events", "repos_url": "https://api.github.com/users/puppetrx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/puppetrx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/puppetrx/subscriptions", "type": "User", "url": "https://api.github.com/users/puppetrx", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-31T23:14:55Z
2021-08-30T00:06:12Z
2020-09-03T21:21:49Z
NONE
resolved
After backtesting in a windows laptop using python3 that the code worked fine, I uploaded the code to my recently purchased VPS service. I installed pip, python3 and the requests module (among others) only to find that when I try to run the script from the server terminal it returns the title error. It also returns the same error if I open python3 in the terminal of the vps and manually try to make a python3 request ## Expected Result I expected to be able to conduct a simple python request running python script in a VPS that makes use of Ubuntu20 ## Actual Result What worked perfectly in a windows pc returns an error when executed by the VPS ## Reproduction Steps ```python import requests url = "https://www.adidas.es/api/plp/content-engine?query=ultraboost-hombre" headers = { 'authority': 'www.adidas.es', 'x-instana-t': 'd822fbb23a5415d6', 'x-instana-s': 'd822fbb23a5415d6', 'content-type': 'application/json', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36', 'x-instana-l': '1,correlationType=web;correlationId=d822fbb23a5415d6', 'accept': '*/*', 'sec-fetch-site': 'same-origin', 'sec-fetch-mode': 'cors', 'sec-fetch-dest': 'empty', 'referer': 'https://www.adidas.es/ultraboost-hombre', 'accept-language': 'es-ES,es;q=0.9,en;q=0.8' } response=requests.get(url=url,headers=headers,data={}) TRACEBACK File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 264, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 702, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 264, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.0" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.4.0-42-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5574/reactions" }
https://api.github.com/repos/psf/requests/issues/5574/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/5573
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5573/labels{/name}
https://api.github.com/repos/psf/requests/issues/5573/comments
https://api.github.com/repos/psf/requests/issues/5573/events
https://github.com/psf/requests/issues/5573
689,132,166
MDU6SXNzdWU2ODkxMzIxNjY=
5,573
get/post method will convert some parameter in url into capital letter
{ "avatar_url": "https://avatars.githubusercontent.com/u/49085201?v=4", "events_url": "https://api.github.com/users/tjc0726/events{/privacy}", "followers_url": "https://api.github.com/users/tjc0726/followers", "following_url": "https://api.github.com/users/tjc0726/following{/other_user}", "gists_url": "https://api.github.com/users/tjc0726/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tjc0726", "id": 49085201, "login": "tjc0726", "node_id": "MDQ6VXNlcjQ5MDg1MjAx", "organizations_url": "https://api.github.com/users/tjc0726/orgs", "received_events_url": "https://api.github.com/users/tjc0726/received_events", "repos_url": "https://api.github.com/users/tjc0726/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tjc0726/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tjc0726/subscriptions", "type": "User", "url": "https://api.github.com/users/tjc0726", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-08-31T11:26:48Z
2021-08-30T00:06:11Z
2020-09-03T21:28:01Z
NONE
resolved
get/post method will convert some parameter in url into capital letter ## Expected Result It should send parameter same as I set in the URL ## Actual Result It will convert"https://xxx.yyy/index.html?a=%2f" into "https://xxx.yyy/index.html?a=%2F" notice that final 'F' ## Reproduction Steps At first,I found this problem when test a site which will return an 302,I found that because of parameter(_%2f_) changed ,the 302 location changed with it,in normal circumstances,it shouldn't be a problem because _%2F_ and _%2f_ will both be converted to "/" after urldecode,but in my case,it will make a difference,I don't know how the website work,but when I Get url returned by 302 with _%2F_ one,it shows 500 internal error,while use the _%2f_ one is fine,it is sure a bug about requests,because the parameter in url is Case Sensitive,so it shouldn't be changed. In order to prove that, I wrote a urllib version get, and the result are different indeed. This shows the difference between the 302 location. ![z](https://user-images.githubusercontent.com/49085201/91714485-65399a00-eb7b-11ea-91c7-9af2e2867df4.png) This is the package captured by wireshark, you can see that the requests version get convert the %2f into %2F while the urllib version not ![批注 2020-08-31 191750](https://user-images.githubusercontent.com/49085201/91714596-a467eb00-eb7b-11ea-9aba-5ef6389b014b.png) ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5573/reactions" }
https://api.github.com/repos/psf/requests/issues/5573/timeline
null
completed
null
null
false
[ "Part of URL normalization is uppercasing percent-encoded hex characters per RFC 3986. Service should handle both cases.", "> Part of URL normalization is uppercasing percent-encoded hex characters per RFC 3986. Service should handle both cases.\r\n\r\nIndeed,but I still don't think reuests.get/post should change...
https://api.github.com/repos/psf/requests/issues/5572
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5572/labels{/name}
https://api.github.com/repos/psf/requests/issues/5572/comments
https://api.github.com/repos/psf/requests/issues/5572/events
https://github.com/psf/requests/issues/5572
688,731,171
MDU6SXNzdWU2ODg3MzExNzE=
5,572
Response history is not available in response hooks during redirections
{ "avatar_url": "https://avatars.githubusercontent.com/u/5388424?v=4", "events_url": "https://api.github.com/users/putsi/events{/privacy}", "followers_url": "https://api.github.com/users/putsi/followers", "following_url": "https://api.github.com/users/putsi/following{/other_user}", "gists_url": "https://api.github.com/users/putsi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/putsi", "id": 5388424, "login": "putsi", "node_id": "MDQ6VXNlcjUzODg0MjQ=", "organizations_url": "https://api.github.com/users/putsi/orgs", "received_events_url": "https://api.github.com/users/putsi/received_events", "repos_url": "https://api.github.com/users/putsi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/putsi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/putsi/subscriptions", "type": "User", "url": "https://api.github.com/users/putsi", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-08-30T14:43:18Z
2021-08-30T00:06:13Z
2020-08-30T15:42:08Z
NONE
resolved
Response history is not available in response hooks during multiple redirections. For example, if a GET-request gets redirected 5 times, the response history stays empty when examined from inside a response hook after each redirection. However the response-object that get() returns will contain the full history. In some cases it would be useful to know, for example, what the initial requested URL was from inside a hook. However, currently I think it's not possible due to the lack of history. ## Expected Result Up-to-date history available in response hook after each redirection. ``` Hook history for https://ca.fi/r1.php: [] Hook history for https://ca.fi/r2.php: [<Response [302]>] Hook history for https://ca.fi/r3.php: [<Response [302]>, <Response [302]>] Hook history for https://ca.fi/r4.php: [<Response [302]>, <Response [302]>, <Response [302]>] Response history for https://ca.fi/r4.php: [<Response [302]>, <Response [302]>, <Response [302]>] ``` ## Actual Result Response history is empty when examined from response hooks. ``` Hook history for https://ca.fi/r1.php: [] Hook history for https://ca.fi/r2.php: [] Hook history for https://ca.fi/r3.php: [] Hook history for https://ca.fi/r4.php: [] Response history for https://ca.fi/r4.php: [<Response [302]>, <Response [302]>, <Response [302]>] ``` ## Reproduction Steps ```python import requests def print_resp_hist(r, *args, **kwargs): print("Hook history for %s: %s" % (r.url, r.history)) return r r = requests.get( 'https://ca.fi/r1.php', hooks={'response': [print_resp_hist]}, allow_redirects = True ) print("Response history for %s: %s" % (r.url, r.history)) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.0" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.4.0-42-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5388424?v=4", "events_url": "https://api.github.com/users/putsi/events{/privacy}", "followers_url": "https://api.github.com/users/putsi/followers", "following_url": "https://api.github.com/users/putsi/following{/other_user}", "gists_url": "https://api.github.com/users/putsi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/putsi", "id": 5388424, "login": "putsi", "node_id": "MDQ6VXNlcjUzODg0MjQ=", "organizations_url": "https://api.github.com/users/putsi/orgs", "received_events_url": "https://api.github.com/users/putsi/received_events", "repos_url": "https://api.github.com/users/putsi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/putsi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/putsi/subscriptions", "type": "User", "url": "https://api.github.com/users/putsi", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5572/reactions" }
https://api.github.com/repos/psf/requests/issues/5572/timeline
null
completed
null
null
false
[ "This is undocumented but has always been the behaviour. Each part of the history only has its own history because that is created at the very end before returning from the method that handles the request. In short, your expectation is not something that was documented as working, was never intended to work that wa...
https://api.github.com/repos/psf/requests/issues/5571
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5571/labels{/name}
https://api.github.com/repos/psf/requests/issues/5571/comments
https://api.github.com/repos/psf/requests/issues/5571/events
https://github.com/psf/requests/issues/5571
688,418,682
MDU6SXNzdWU2ODg0MTg2ODI=
5,571
requests & async
{ "avatar_url": "https://avatars.githubusercontent.com/u/50486789?v=4", "events_url": "https://api.github.com/users/renoyuan/events{/privacy}", "followers_url": "https://api.github.com/users/renoyuan/followers", "following_url": "https://api.github.com/users/renoyuan/following{/other_user}", "gists_url": "https://api.github.com/users/renoyuan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/renoyuan", "id": 50486789, "login": "renoyuan", "node_id": "MDQ6VXNlcjUwNDg2Nzg5", "organizations_url": "https://api.github.com/users/renoyuan/orgs", "received_events_url": "https://api.github.com/users/renoyuan/received_events", "repos_url": "https://api.github.com/users/renoyuan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/renoyuan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/renoyuan/subscriptions", "type": "User", "url": "https://api.github.com/users/renoyuan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-29T00:23:58Z
2021-08-30T00:06:13Z
2020-08-30T19:38:45Z
NONE
resolved
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance. Why my requests and async concurrent-use ,but without concurrent requests . my code format: ''' async def requests_func(): requests.post() async def handle_func(): await requests_func() ''' please,please,please ,help me
{ "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/5571/reactions" }
https://api.github.com/repos/psf/requests/issues/5571/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/5570
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5570/labels{/name}
https://api.github.com/repos/psf/requests/issues/5570/comments
https://api.github.com/repos/psf/requests/issues/5570/events
https://github.com/psf/requests/pull/5570
687,392,938
MDExOlB1bGxSZXF1ZXN0NDc0ODI2Nzgz
5,570
Apply the Apache-2.0 license correctly
{ "avatar_url": "https://avatars.githubusercontent.com/u/19536151?v=4", "events_url": "https://api.github.com/users/ajorg-aws/events{/privacy}", "followers_url": "https://api.github.com/users/ajorg-aws/followers", "following_url": "https://api.github.com/users/ajorg-aws/following{/other_user}", "gists_url": "https://api.github.com/users/ajorg-aws/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ajorg-aws", "id": 19536151, "login": "ajorg-aws", "node_id": "MDQ6VXNlcjE5NTM2MTUx", "organizations_url": "https://api.github.com/users/ajorg-aws/orgs", "received_events_url": "https://api.github.com/users/ajorg-aws/received_events", "repos_url": "https://api.github.com/users/ajorg-aws/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ajorg-aws/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ajorg-aws/subscriptions", "type": "User", "url": "https://api.github.com/users/ajorg-aws", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-08-27T16:50:29Z
2021-08-28T00:06:21Z
2020-08-27T18:09:02Z
CONTRIBUTOR
resolved
This follows instructions from the Apache Foundation. It also ensures that the license will be correctly detected by license scanning tools. Note that adding a NOTICE file triggers Section 4.d of the license, which is usually intended by users of the license. The text that was in the LICENSE file before this change is intended (by the authors of the license) to be used as a file header, and not as a full license notice for a project, but it is commonly used this way, so I would of course understand if this change is rejected.
{ "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/5570/reactions" }
https://api.github.com/repos/psf/requests/issues/5570/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5570.diff", "html_url": "https://github.com/psf/requests/pull/5570", "merged_at": "2020-08-27T18:09:02Z", "patch_url": "https://github.com/psf/requests/pull/5570.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5570" }
true
[]
https://api.github.com/repos/psf/requests/issues/5569
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5569/labels{/name}
https://api.github.com/repos/psf/requests/issues/5569/comments
https://api.github.com/repos/psf/requests/issues/5569/events
https://github.com/psf/requests/issues/5569
686,334,946
MDU6SXNzdWU2ODYzMzQ5NDY=
5,569
Customize message error in Response.raise_for_status()
{ "avatar_url": "https://avatars.githubusercontent.com/u/66838738?v=4", "events_url": "https://api.github.com/users/pozzolana93/events{/privacy}", "followers_url": "https://api.github.com/users/pozzolana93/followers", "following_url": "https://api.github.com/users/pozzolana93/following{/other_user}", "gists_url": "https://api.github.com/users/pozzolana93/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pozzolana93", "id": 66838738, "login": "pozzolana93", "node_id": "MDQ6VXNlcjY2ODM4NzM4", "organizations_url": "https://api.github.com/users/pozzolana93/orgs", "received_events_url": "https://api.github.com/users/pozzolana93/received_events", "repos_url": "https://api.github.com/users/pozzolana93/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pozzolana93/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pozzolana93/subscriptions", "type": "User", "url": "https://api.github.com/users/pozzolana93", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-26T13:46:36Z
2021-08-30T00:06:14Z
2020-08-26T18:50:05Z
NONE
resolved
I had to write a client to interact with CouchDB using `requests`. When calling `response.raise_for_status()` the message shown is the usual HTTP error message (like 404: Not found), but in the response body I have a more detailed explanation of the error (something like: {"error": "Not found", "reason": "The document has been deleted"}). To print this error I had to override the method of the response with a custom function. Since I believe this could be a common situation, it would be very helpful to have the possibility to print different error messages passing a parameter to the call to `raise_for_status`.
{ "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/5569/reactions" }
https://api.github.com/repos/psf/requests/issues/5569/timeline
null
completed
null
null
false
[ "The project's under feature freeze and even if it weren't, this is why wrapping libraries should follow a pattern like:\r\n\r\n```py\r\n# mylib/exceptions.py\r\nclass MyLibError(Exception):\r\n pass\r\n\r\nclass MyLibHTTPError(MyLibError):\r\n pass\r\n\r\n# mylib/client.py\r\n\r\ntry:\r\n response.raise_fo...
https://api.github.com/repos/psf/requests/issues/5568
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5568/labels{/name}
https://api.github.com/repos/psf/requests/issues/5568/comments
https://api.github.com/repos/psf/requests/issues/5568/events
https://github.com/psf/requests/issues/5568
686,303,537
MDU6SXNzdWU2ODYzMDM1Mzc=
5,568
[bug]requests isn't work when meets too long url,what can i do?
{ "avatar_url": "https://avatars.githubusercontent.com/u/46711557?v=4", "events_url": "https://api.github.com/users/ch-boogeyman/events{/privacy}", "followers_url": "https://api.github.com/users/ch-boogeyman/followers", "following_url": "https://api.github.com/users/ch-boogeyman/following{/other_user}", "gists_url": "https://api.github.com/users/ch-boogeyman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ch-boogeyman", "id": 46711557, "login": "ch-boogeyman", "node_id": "MDQ6VXNlcjQ2NzExNTU3", "organizations_url": "https://api.github.com/users/ch-boogeyman/orgs", "received_events_url": "https://api.github.com/users/ch-boogeyman/received_events", "repos_url": "https://api.github.com/users/ch-boogeyman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ch-boogeyman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ch-boogeyman/subscriptions", "type": "User", "url": "https://api.github.com/users/ch-boogeyman", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-26T13:04:33Z
2021-08-30T00:06:14Z
2020-08-26T13:23:35Z
NONE
resolved
Summary. ## Expected Result What you expected. ## Actual Result What happened instead. When i am crawling a web,I meet a long url.it returned me a wrong result. So i used fiddler to check what happen,it showed the url not complete. How can i resolve it? ![lose](https://user-images.githubusercontent.com/46711557/91306837-b6463880-e7df-11ea-8b4d-45143ebf76aa.png) ![code](https://user-images.githubusercontent.com/46711557/91306843-b8a89280-e7df-11ea-9649-e449d3a66e4f.png) ## Reproduction Steps ```python import requests import time url = 'https://ifm.zhaobenshu.com/User/user_ifa_LoginCard.ashx?a=[Lib={{gdut}}][OpenId={{}}][PmWebApiProxy={{}}][UrlQsLib={{#}}][Opac={{sulcmis4}}][OpacCaptcha={{0}}][UrlHost={{http://gdut.n1.zhaobenshu.com/}}][CardId={{' + \ req['account'] + '}}][CardPwd={{' + req['pwd'] + \ '}}][UniSess={{}}][SessLib={{gdut}}][SessFun={{wap}}][SessPrd={{reso}}][CookiesStr={{}}][CaptchaStr={{}}]&x=&y=01&z=&_=' + \ str(int(round(time.time() * 1000))) res = requests.get(url) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "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/46711557?v=4", "events_url": "https://api.github.com/users/ch-boogeyman/events{/privacy}", "followers_url": "https://api.github.com/users/ch-boogeyman/followers", "following_url": "https://api.github.com/users/ch-boogeyman/following{/other_user}", "gists_url": "https://api.github.com/users/ch-boogeyman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ch-boogeyman", "id": 46711557, "login": "ch-boogeyman", "node_id": "MDQ6VXNlcjQ2NzExNTU3", "organizations_url": "https://api.github.com/users/ch-boogeyman/orgs", "received_events_url": "https://api.github.com/users/ch-boogeyman/received_events", "repos_url": "https://api.github.com/users/ch-boogeyman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ch-boogeyman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ch-boogeyman/subscriptions", "type": "User", "url": "https://api.github.com/users/ch-boogeyman", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5568/reactions" }
https://api.github.com/repos/psf/requests/issues/5568/timeline
null
completed
null
null
false
[ "My url has a '#',we should replace it to empty." ]
https://api.github.com/repos/psf/requests/issues/5567
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5567/labels{/name}
https://api.github.com/repos/psf/requests/issues/5567/comments
https://api.github.com/repos/psf/requests/issues/5567/events
https://github.com/psf/requests/pull/5567
685,919,577
MDExOlB1bGxSZXF1ZXN0NDczNTc1Njk5
5,567
Update index.rst to mention support Python 3.5+
{ "avatar_url": "https://avatars.githubusercontent.com/u/6840782?v=4", "events_url": "https://api.github.com/users/girisagar46/events{/privacy}", "followers_url": "https://api.github.com/users/girisagar46/followers", "following_url": "https://api.github.com/users/girisagar46/following{/other_user}", "gists_url": "https://api.github.com/users/girisagar46/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/girisagar46", "id": 6840782, "login": "girisagar46", "node_id": "MDQ6VXNlcjY4NDA3ODI=", "organizations_url": "https://api.github.com/users/girisagar46/orgs", "received_events_url": "https://api.github.com/users/girisagar46/received_events", "repos_url": "https://api.github.com/users/girisagar46/repos", "site_admin": false, "starred_url": "https://api.github.com/users/girisagar46/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/girisagar46/subscriptions", "type": "User", "url": "https://api.github.com/users/girisagar46", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-08-26T00:34:25Z
2021-08-28T00:06:21Z
2020-08-26T00:50:14Z
CONTRIBUTOR
resolved
The [README](https://github.com/psf/requests/blob/master/README.md) and [FAQ](https://github.com/psf/requests/blob/master/docs/community/faq.rst) mentions that it supports Python 3.5+. But, the `docs/index.rst` still mentions that the support is only for Python 3.4–3.7 which is misleading and is not consistent with other docs. This PR is for the update of misleading text about python support and make it consistent with README and FAQ.
{ "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/5567/reactions" }
https://api.github.com/repos/psf/requests/issues/5567/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5567.diff", "html_url": "https://github.com/psf/requests/pull/5567", "merged_at": "2020-08-26T00:50:14Z", "patch_url": "https://github.com/psf/requests/pull/5567.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5567" }
true
[]
https://api.github.com/repos/psf/requests/issues/5566
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5566/labels{/name}
https://api.github.com/repos/psf/requests/issues/5566/comments
https://api.github.com/repos/psf/requests/issues/5566/events
https://github.com/psf/requests/issues/5566
685,489,791
MDU6SXNzdWU2ODU0ODk3OTE=
5,566
Response time differences between different OS(e.g. Windows and Ubuntu)
{ "avatar_url": "https://avatars.githubusercontent.com/u/25847103?v=4", "events_url": "https://api.github.com/users/RedPurpleHand/events{/privacy}", "followers_url": "https://api.github.com/users/RedPurpleHand/followers", "following_url": "https://api.github.com/users/RedPurpleHand/following{/other_user}", "gists_url": "https://api.github.com/users/RedPurpleHand/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RedPurpleHand", "id": 25847103, "login": "RedPurpleHand", "node_id": "MDQ6VXNlcjI1ODQ3MTAz", "organizations_url": "https://api.github.com/users/RedPurpleHand/orgs", "received_events_url": "https://api.github.com/users/RedPurpleHand/received_events", "repos_url": "https://api.github.com/users/RedPurpleHand/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RedPurpleHand/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RedPurpleHand/subscriptions", "type": "User", "url": "https://api.github.com/users/RedPurpleHand", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-25T13:32:34Z
2021-08-30T00:06:16Z
2020-08-25T13:58:28Z
NONE
resolved
Hi, I send simple request to a website and get a response with requests library. When I run this code on Ubuntu I get response at 3secs but if I run this on Windows I get response below 1 second. What is problem? I try with same versions. (requests 2.22, 2.23, 2.24) Test Code: ` def responseTime(): start_time = time.time() requests.get("https://github.com/") stop_time = time.time() print(stop_time - start_time) ` In Windows: 0.2963371276855469 secs In Ubuntu: 5.247551441192627 secs
{ "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/5566/reactions" }
https://api.github.com/repos/psf/requests/issues/5566/timeline
null
completed
null
null
false
[ "This is a tough thing for us to figure out as we don't have access to your systems or know anything about how they're configured. I recommend using Wireshark to see where in the request process things are getting hung up.\n\nClosing this as not an issue, in the future use StackOverflow for questions like this. " ]
https://api.github.com/repos/psf/requests/issues/5565
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5565/labels{/name}
https://api.github.com/repos/psf/requests/issues/5565/comments
https://api.github.com/repos/psf/requests/issues/5565/events
https://github.com/psf/requests/issues/5565
684,250,060
MDU6SXNzdWU2ODQyNTAwNjA=
5,565
nested dict with multipart/form-data
{ "avatar_url": "https://avatars.githubusercontent.com/u/25934244?v=4", "events_url": "https://api.github.com/users/Poolitzer/events{/privacy}", "followers_url": "https://api.github.com/users/Poolitzer/followers", "following_url": "https://api.github.com/users/Poolitzer/following{/other_user}", "gists_url": "https://api.github.com/users/Poolitzer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Poolitzer", "id": 25934244, "login": "Poolitzer", "node_id": "MDQ6VXNlcjI1OTM0MjQ0", "organizations_url": "https://api.github.com/users/Poolitzer/orgs", "received_events_url": "https://api.github.com/users/Poolitzer/received_events", "repos_url": "https://api.github.com/users/Poolitzer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Poolitzer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Poolitzer/subscriptions", "type": "User", "url": "https://api.github.com/users/Poolitzer", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-08-23T20:22:23Z
2021-08-30T00:06:16Z
2020-08-25T16:26:44Z
NONE
resolved
Hello there. I am trying to send a post request with a nested dict which contains files, but it fails at urrlib3 level. This is a minimal working example dict `{"media": [{"type": "photo", "media": open("besttest.jpg", "rb")}, {"type": "video", "media": open("bettertest.mp4", "rb"),"thumb": open("index.jpeg", "rb")}]}` And I am doing the request like this: `requests.post("URL", files=dict)` This now results in the following error: ``` Traceback (most recent call last): File "C:/Users/Poolitzer/AppData/Roaming/JetBrains/PyCharm2020.1/scratches/scratch.py", line 5, in <module> response = requests.post("URL", File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\sessions.py", line 516, in request prep = self.prepare_request(req) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\sessions.py", line 449, in prepare_request p.prepare( File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\models.py", line 317, in prepare self.prepare_body(data, files, json) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\models.py", line 505, in prepare_body (body, content_type) = self._encode_files(files, data) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\requests\models.py", line 166, in _encode_files rf.make_multipart(content_type=ft) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\urllib3\fields.py", line 267, in make_multipart self._render_parts( File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\urllib3\fields.py", line 225, in _render_parts parts.append(self._render_part(name, value)) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\urllib3\fields.py", line 205, in _render_part return self.header_formatter(name, value) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\urllib3\fields.py", line 116, in format_header_param_html5 value = _replace_multiple(value, _HTML5_REPLACEMENTS) File "C:\Users\Poolitzer\PycharmProjects\test\venv\lib\site-packages\urllib3\fields.py", line 89, in _replace_multiple result = pattern.sub(replacer, value) TypeError: expected string or bytes-like object ```
{ "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/5565/reactions" }
https://api.github.com/repos/psf/requests/issues/5565/timeline
null
completed
null
null
false
[ "There's no documentation that shows this would work so it's unclear to me why you think this is a bug. If you want help making this work, please use StackOverflow. This is a defect tracker, not a Q&A website", "I just expected it to work, why is it limited? And there was a question template, so I assumed issues ...
https://api.github.com/repos/psf/requests/issues/5564
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5564/labels{/name}
https://api.github.com/repos/psf/requests/issues/5564/comments
https://api.github.com/repos/psf/requests/issues/5564/events
https://github.com/psf/requests/issues/5564
682,690,476
MDU6SXNzdWU2ODI2OTA0NzY=
5,564
Accept-Encoding can't be removed
{ "avatar_url": "https://avatars.githubusercontent.com/u/761578?v=4", "events_url": "https://api.github.com/users/Dao258/events{/privacy}", "followers_url": "https://api.github.com/users/Dao258/followers", "following_url": "https://api.github.com/users/Dao258/following{/other_user}", "gists_url": "https://api.github.com/users/Dao258/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Dao258", "id": 761578, "login": "Dao258", "node_id": "MDQ6VXNlcjc2MTU3OA==", "organizations_url": "https://api.github.com/users/Dao258/orgs", "received_events_url": "https://api.github.com/users/Dao258/received_events", "repos_url": "https://api.github.com/users/Dao258/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Dao258/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Dao258/subscriptions", "type": "User", "url": "https://api.github.com/users/Dao258", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-08-20T12:52:32Z
2021-08-30T00:06:16Z
2020-08-25T16:28:04Z
NONE
resolved
I am using requests 2.21.0 headers={ 'Connection':None, 'Accept-Encoding':None, 'Accept':None, 'User-Agent':None } session = requests.Session() session.keep_alive = False session.post(url,headers=headers, data=postData,verify=False) I tired to remove "Accept-Encoding" for post request header however it still shows Accept-Encoding: identity which is NOT the same as Accept/User-Agent How do I remove Accept-Encoding in the header? Thanks!
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5564/reactions" }
https://api.github.com/repos/psf/requests/issues/5564/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.", "Hi @Dao258, I'd check documentation for using [Pre...
https://api.github.com/repos/psf/requests/issues/5563
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5563/labels{/name}
https://api.github.com/repos/psf/requests/issues/5563/comments
https://api.github.com/repos/psf/requests/issues/5563/events
https://github.com/psf/requests/issues/5563
682,680,253
MDU6SXNzdWU2ODI2ODAyNTM=
5,563
Cert behavior regression (2.14.0)
{ "avatar_url": "https://avatars.githubusercontent.com/u/113200?v=4", "events_url": "https://api.github.com/users/romuald/events{/privacy}", "followers_url": "https://api.github.com/users/romuald/followers", "following_url": "https://api.github.com/users/romuald/following{/other_user}", "gists_url": "https://api.github.com/users/romuald/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/romuald", "id": 113200, "login": "romuald", "node_id": "MDQ6VXNlcjExMzIwMA==", "organizations_url": "https://api.github.com/users/romuald/orgs", "received_events_url": "https://api.github.com/users/romuald/received_events", "repos_url": "https://api.github.com/users/romuald/repos", "site_admin": false, "starred_url": "https://api.github.com/users/romuald/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/romuald/subscriptions", "type": "User", "url": "https://api.github.com/users/romuald", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-20T12:37:52Z
2021-08-29T00:06:37Z
2020-11-10T00:07:49Z
NONE
resolved
## TLDR; requests used to ignore the cert parameter when used, now it raises an error when the certificate files are missing ------- I'm certainly late to the party, but we found a regression introduced in requests 2.14.0 From the changelog: > When users provide invalid paths to certificate bundle files or directories Requests now raises IOError, rather than failing at the time of the HTTPS request with a fairly inscrutable certificate validation error When used with **http://** URLs, the previous behavior was to ignore the certificate completely. "Now" requests will always raise an error regardless of the protocol ## Reproduction Steps ```python import requests req = requests.get('http://perdu.com', cert=('nope.crt', 'nope.key')) print(req) ``` Works fine on 2.13.0, and raise an IOError with requests 2.14.0 and up (since the certificates does not exist) As fixing this might introduce more regressions, feel free to close it as invalid
{ "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/5563/reactions" }
https://api.github.com/repos/psf/requests/issues/5563/timeline
null
completed
null
null
false
[ "Hi @romuald, thanks for reporting this. We made this change intentionally due to the unintuitive failure mode prior to 2.14.0. Given it's been in place for a few year and this is the first feedback we've received about it, I think we'll leave it in place." ]
https://api.github.com/repos/psf/requests/issues/5562
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5562/labels{/name}
https://api.github.com/repos/psf/requests/issues/5562/comments
https://api.github.com/repos/psf/requests/issues/5562/events
https://github.com/psf/requests/pull/5562
681,362,187
MDExOlB1bGxSZXF1ZXN0NDY5NzYzODE3
5,562
Cleanup documentation and README
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-08-18T21:47:55Z
2021-08-28T00:06:22Z
2020-08-18T22:14:01Z
MEMBER
resolved
- Fixed or removed lots of outdated information - Removed images where not needed - Removed unused JavaScript from our bundle
{ "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/5562/reactions" }
https://api.github.com/repos/psf/requests/issues/5562/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5562.diff", "html_url": "https://github.com/psf/requests/pull/5562", "merged_at": "2020-08-18T22:14:01Z", "patch_url": "https://github.com/psf/requests/pull/5562.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5562" }
true
[]
https://api.github.com/repos/psf/requests/issues/5561
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5561/labels{/name}
https://api.github.com/repos/psf/requests/issues/5561/comments
https://api.github.com/repos/psf/requests/issues/5561/events
https://github.com/psf/requests/issues/5561
681,085,482
MDU6SXNzdWU2ODEwODU0ODI=
5,561
Requests 2.24.0 removed necessary namespace for other modules
{ "avatar_url": "https://avatars.githubusercontent.com/u/4681318?v=4", "events_url": "https://api.github.com/users/deajan/events{/privacy}", "followers_url": "https://api.github.com/users/deajan/followers", "following_url": "https://api.github.com/users/deajan/following{/other_user}", "gists_url": "https://api.github.com/users/deajan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/deajan", "id": 4681318, "login": "deajan", "node_id": "MDQ6VXNlcjQ2ODEzMTg=", "organizations_url": "https://api.github.com/users/deajan/orgs", "received_events_url": "https://api.github.com/users/deajan/received_events", "repos_url": "https://api.github.com/users/deajan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/deajan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/deajan/subscriptions", "type": "User", "url": "https://api.github.com/users/deajan", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2020-08-18T14:24:50Z
2021-08-29T00:06:37Z
2020-11-10T00:10:34Z
NONE
resolved
Commit https://github.com/psf/requests/commit/db47b9b4a0c5877fb97f64ac442757604c4c45cc made import of pyopenssl optional. Some modules rely on the created requests namespace created via `from urllib3.contrib import pyopenssl` which is now uncertain to be imported, depending on ssl SNI support. While this does not seem to affect CPython, it can affect programs that have been compiled with Nuitka, that may result in the following error: ``` ModuleNotFoundError: No module named 'requests.packages.urllib3.contrib.pyopenssl ``` This may also happen with frozen CPython (pyinstaller, cx_freeze...), although I didn't check this. Indeed I've tried to manually import `requests.packages.urllib3.contrib.pyopenssl` in my script to 'force' it to be present. While I've tracked the issue down, I've tested various Python versions: - Python 3.7.6 x64 & x32 - Python 3.8.3 x64 - Python 3.8.5 x64 & x32 For every Python version, I also tested the following Nuitka versions: - Nuitka 0.6.6 - Nuitka 0.6.7 - Nuitka 0.6.8 I guess all modules that rely on requests might use that namespace too. I think there are two ways to fix the issue (I've verified, both methods work): 1. Make the pyopenssl import mandatory in requests module 2. Fix all requests dependant modules that use that namespace In my case, using requests_pkcs12 module, I can fix the namespace error by replacing the import from requests by an import from urllib3 in `requests_pkcs12.py`: ``` #from requests.packages.urllib3.contrib.pyopenssl import PyOpenSSLContext from urllib3.contrib.pyopenssl import PyOpenSSLContext ``` @vog, could you proof read me here ? Any ideas what's the 'good' choice ? ## Reproduction Steps Here's a minimal self contained example, but it will need a server asking for a client certificate, and a PKCS12 client certificate. ```#!/usr/bin/env python from requests_pkcs12 import Pkcs12Adapter import requests api_session = requests.Session() api_session.mount('https://my_server.fqdn', Pkcs12Adapter(pkcs12_filename='/path/to/my/client/cert.p12', pkcs12_password='my_pkcs12_password')) r = api_session.post('https://my_server.fqdn' + '/api/login') print('request result %s' % r.text) ``` When compiled with: ``` python -m nuitka --standalone --include-module=urllib3 my_test_program.py ``` Program execution will fail with `ModuleNotFoundError: No module named 'requests.packages.urllib3.contrib.pyopenssl'` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.0" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "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/5561/reactions" }
https://api.github.com/repos/psf/requests/issues/5561/timeline
null
completed
null
null
false
[ "So the import removed would be `requests.pyopenssl` not `requests.packages.urllib3.contrib.pyopenssl` if I'm reading things correctly. How would removing that import cause the import that's occuring within `requests/packages.py` to not be available?", "From `requests/packages.py` the import states `from urllib3....
https://api.github.com/repos/psf/requests/issues/5560
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5560/labels{/name}
https://api.github.com/repos/psf/requests/issues/5560/comments
https://api.github.com/repos/psf/requests/issues/5560/events
https://github.com/psf/requests/issues/5560
680,833,415
MDU6SXNzdWU2ODA4MzM0MTU=
5,560
Do not re-encode a UTF-8 string as ISO-8859-1 silently in HTTP requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/2605584?v=4", "events_url": "https://api.github.com/users/baharev/events{/privacy}", "followers_url": "https://api.github.com/users/baharev/followers", "following_url": "https://api.github.com/users/baharev/following{/other_user}", "gists_url": "https://api.github.com/users/baharev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/baharev", "id": 2605584, "login": "baharev", "node_id": "MDQ6VXNlcjI2MDU1ODQ=", "organizations_url": "https://api.github.com/users/baharev/orgs", "received_events_url": "https://api.github.com/users/baharev/received_events", "repos_url": "https://api.github.com/users/baharev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/baharev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/baharev/subscriptions", "type": "User", "url": "https://api.github.com/users/baharev", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-08-18T09:12:45Z
2021-08-29T00:06:41Z
2020-10-29T20:13:56Z
NONE
resolved
This issue is about sending an HTTP **request**, and not about the response. ```python headers = { 'Content-Type': 'application/json; charset=utf-8' } response = requests.post(url, headers=headers, data=my_native_python3_utf8_string) ``` ## Expected Result I expected the **request** to be sent as UTF-8, after all, everything in the Python 3 ecosystem uses UTF-8 by default. ## Actual Result My UTF-8 string is **silently** re-encoded as ISO-8859-1, causing confusing bugs at the recipient. The code in `http.client` is doing it: https://github.com/python/cpython/blob/c3dd7e45cc5d36bbe2295c2840faabb5c75d83e4/Lib/http/client.py#L1312 - In my opinion, RFC 2616 Section 3.7.1 does not apply here. - The whole Python 3 ecosystem uses UTF-8 by default, so I find it utterly confusing that a library **silently** re-encodes a UTF-8 string as ISO-8859-1. ## Suggestion I suggest that if `requests` takes a native UTF-8 string as `data` argument, it makes sure that it is handled as a UTF-8 string all the way, and won't be **silently** re-encoded as ISO-8859-1. It can cause really obscure bugs otherwise. ## Related This issue is about sending a request. Related open issues are mostly concerned with the response: - [Remove ISO-8859-1 charset fallback](https://github.com/psf/requests/issues/2086) - [Simplify charset handling](https://github.com/psf/requests/issues/1737) ## Reproduction Steps See above. ## System Information ``` $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.4" }, "platform": { "release": "4.15.0-107-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.1.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.8" }, "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/5560/reactions" }
https://api.github.com/repos/psf/requests/issues/5560/timeline
null
completed
null
null
false
[ "I may have encountered this problem too. I wonder if there is any status change.\r\n\r\npython3 -m requests.help\r\n{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"3.1.1\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.10\"\r\n },\r\n \"implementation\...
https://api.github.com/repos/psf/requests/issues/5559
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5559/labels{/name}
https://api.github.com/repos/psf/requests/issues/5559/comments
https://api.github.com/repos/psf/requests/issues/5559/events
https://github.com/psf/requests/issues/5559
680,498,012
MDU6SXNzdWU2ODA0OTgwMTI=
5,559
Proper scope for session object
{ "avatar_url": "https://avatars.githubusercontent.com/u/30312167?v=4", "events_url": "https://api.github.com/users/janheindejong/events{/privacy}", "followers_url": "https://api.github.com/users/janheindejong/followers", "following_url": "https://api.github.com/users/janheindejong/following{/other_user}", "gists_url": "https://api.github.com/users/janheindejong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janheindejong", "id": 30312167, "login": "janheindejong", "node_id": "MDQ6VXNlcjMwMzEyMTY3", "organizations_url": "https://api.github.com/users/janheindejong/orgs", "received_events_url": "https://api.github.com/users/janheindejong/received_events", "repos_url": "https://api.github.com/users/janheindejong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janheindejong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janheindejong/subscriptions", "type": "User", "url": "https://api.github.com/users/janheindejong", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-17T20:13:06Z
2021-08-30T00:06:17Z
2020-08-20T14:45:32Z
NONE
resolved
I'm using requests in the back-end of my web-app, to get sensor data from another REST API, at 1 Hz. I'm using _one_ session instance for my entire app, which is used in ~5 threads to perform the HTTP requests; typically around 5-10 per cycle. There's some error handling and all the fun stuff, to make sure the program just skips to the next cycle if one of the requests fails. In a nutshell, it looks something like this: ```python from concurrent.futures import ThreadPoolExecutor, as_completed import requests import threading import time from requests_negotiate_sspi.requests_negotiate_sspi import HttpNegotiateAuth class MyAPI: def __init__(self, host): self._host = host self._session = Session() self._session.auth = HttpNegotiateAuth() def get_a_lot_of_stuff(end_points: list): with ThreadPoolExecutor(max_workers=5) as executor: futures = [] for end_point in end_points: futures.append(executor.submit(self._get_a_bit_of_stuff, end_point)) for future in as_completed(futures): r = future.result() r.raise_for_status() def _get_a_bit_of_stuff(end_point: str): return self._session.get(self._host + end_point) def main(): my_api = MyAPI("http://my.host.com")\ end_points = ["/0", "/1", "/2", "/3", "/4"] while True: try: my_api.get_a_lot_of_stuff(end_points) except: print("Whatever, m8...") time.sleep(1) ``` Works fine, nothing out of the ordinary there (at least I think)... However... I noticed that after running smoothly for several hours, at some point the number of timeout errors starts to increase exponentially - eventually stopping the whole thing altogether - until suddenly everything returns to normal. After some tinkering, I found out this behavior could be prevented by calling `self._session.close()` whenever an exception occurs. The program just continues as normal afterwards. My limited expertise leads me to believe there is some connection pool buffer that is overflowing, or something of the sorts. Am I thinking in the right direction? What would be the 'proper' way to deal with this? It's important for me to re-use my connections, since I'm making ~5-10 calls per second to the same host, and NTLM authentication also requires an additional 2 calls per connection.
{ "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/5559/reactions" }
https://api.github.com/repos/psf/requests/issues/5559/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/5558
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5558/labels{/name}
https://api.github.com/repos/psf/requests/issues/5558/comments
https://api.github.com/repos/psf/requests/issues/5558/events
https://github.com/psf/requests/issues/5558
679,929,422
MDU6SXNzdWU2Nzk5Mjk0MjI=
5,558
[Doc] ALL_PROXY is undocumented
{ "avatar_url": "https://avatars.githubusercontent.com/u/4003950?v=4", "events_url": "https://api.github.com/users/jiasli/events{/privacy}", "followers_url": "https://api.github.com/users/jiasli/followers", "following_url": "https://api.github.com/users/jiasli/following{/other_user}", "gists_url": "https://api.github.com/users/jiasli/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jiasli", "id": 4003950, "login": "jiasli", "node_id": "MDQ6VXNlcjQwMDM5NTA=", "organizations_url": "https://api.github.com/users/jiasli/orgs", "received_events_url": "https://api.github.com/users/jiasli/received_events", "repos_url": "https://api.github.com/users/jiasli/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jiasli/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jiasli/subscriptions", "type": "User", "url": "https://api.github.com/users/jiasli", "user_view_type": "public" }
[ { "color": "fad8c7", "default": false, "description": null, "id": 136616769, "name": "Documentation", "node_id": "MDU6TGFiZWwxMzY2MTY3Njk=", "url": "https://api.github.com/repos/psf/requests/labels/Documentation" }, { "color": "69ccdb", "default": false, "description": nu...
closed
true
null
[]
null
1
2020-08-17T04:48:33Z
2022-05-03T18:05:36Z
2022-02-02T18:03:26Z
NONE
resolved
## Expected Result The doc for [Proxies](https://2.python-requests.org/en/master/user/advanced/#proxies) should include `ALL_PROXY` introduced by https://github.com/psf/requests/pull/3185 and its precedence compared to `HTTP_PROXY` and `HTTPS_PROXY`. ## Actual Result The document [Proxies](https://2.python-requests.org/en/master/user/advanced/#proxies) lacks the description for `ALL_PROXY`, and the only appearance of `ALL_PROXY` is in the [Release History](https://2.python-requests.org/en/master/community/updates/#id37).
{ "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/5558/reactions" }
https://api.github.com/repos/psf/requests/issues/5558/timeline
null
completed
null
null
false
[ "If anyone would like to provide a PR for this, we'd be fine reviewing it." ]
https://api.github.com/repos/psf/requests/issues/5557
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5557/labels{/name}
https://api.github.com/repos/psf/requests/issues/5557/comments
https://api.github.com/repos/psf/requests/issues/5557/events
https://github.com/psf/requests/issues/5557
678,208,612
MDU6SXNzdWU2NzgyMDg2MTI=
5,557
about redirection
{ "avatar_url": "https://avatars.githubusercontent.com/u/60337599?v=4", "events_url": "https://api.github.com/users/daffapaggani/events{/privacy}", "followers_url": "https://api.github.com/users/daffapaggani/followers", "following_url": "https://api.github.com/users/daffapaggani/following{/other_user}", "gists_url": "https://api.github.com/users/daffapaggani/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/daffapaggani", "id": 60337599, "login": "daffapaggani", "node_id": "MDQ6VXNlcjYwMzM3NTk5", "organizations_url": "https://api.github.com/users/daffapaggani/orgs", "received_events_url": "https://api.github.com/users/daffapaggani/received_events", "repos_url": "https://api.github.com/users/daffapaggani/repos", "site_admin": false, "starred_url": "https://api.github.com/users/daffapaggani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/daffapaggani/subscriptions", "type": "User", "url": "https://api.github.com/users/daffapaggani", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-13T07:11:06Z
2021-08-30T00:06:18Z
2020-08-14T01:40:39Z
NONE
resolved
i know python requests is dynamic httplib, but some problem with requests. 'requests.exceptions.TooManyRedirects: Exceeded 30 redirects.' i am already increase max redirect , but same response. i am try using other ISP 'requests' is perfect and nothing problem. and cross check , problem is ISP . there injection ads from my ISP how i can baypass injection ads ?
{ "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/5557/reactions" }
https://api.github.com/repos/psf/requests/issues/5557/timeline
null
completed
null
null
false
[ "> how i can baypass injection ads ?\r\n\r\nThat's not a feature of any HTTP client and does not and will not exist in Requests. You'll need to ask StackOverflow questions like this" ]
https://api.github.com/repos/psf/requests/issues/5556
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5556/labels{/name}
https://api.github.com/repos/psf/requests/issues/5556/comments
https://api.github.com/repos/psf/requests/issues/5556/events
https://github.com/psf/requests/issues/5556
677,393,109
MDU6SXNzdWU2NzczOTMxMDk=
5,556
HEAD request inexplicably failing
{ "avatar_url": "https://avatars.githubusercontent.com/u/221526?v=4", "events_url": "https://api.github.com/users/dopplershift/events{/privacy}", "followers_url": "https://api.github.com/users/dopplershift/followers", "following_url": "https://api.github.com/users/dopplershift/following{/other_user}", "gists_url": "https://api.github.com/users/dopplershift/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dopplershift", "id": 221526, "login": "dopplershift", "node_id": "MDQ6VXNlcjIyMTUyNg==", "organizations_url": "https://api.github.com/users/dopplershift/orgs", "received_events_url": "https://api.github.com/users/dopplershift/received_events", "repos_url": "https://api.github.com/users/dopplershift/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dopplershift/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dopplershift/subscriptions", "type": "User", "url": "https://api.github.com/users/dopplershift", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-08-12T05:21:12Z
2021-08-30T00:06:19Z
2020-08-12T18:13:10Z
NONE
resolved
A HEAD request to this [website](https://www.ncdc.noaa.gov/data-access/model-data/model-datasets/north-american-regional-reanalysis-narr) is inexplicably giving `RemoteDisconnected`. A GET request to the same URL succeeds. Issuing a HEAD request using `curl --head https://www.ncdc.noaa.gov/data-access/model-data/model-datasets/north-american-regional-reanalysis-narr` also succeeds. ## Expected Result No error. ## Actual Result ```pytb --------------------------------------------------------------------------- RemoteDisconnected Traceback (most recent call last) ~/miniconda3/envs/py38/lib/python3.8/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) 669 # Make the request on the httplib connection object. --> 670 httplib_response = self._make_request( 671 conn, ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 425 # Otherwise it looks like a bug in the code. --> 426 six.raise_from(e, None) 427 except (SocketTimeout, BaseSSLError, SocketError) as e: ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/packages/six.py in raise_from(value, from_value) ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 420 try: --> 421 httplib_response = conn.getresponse() 422 except BaseException as e: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in getresponse(self) 1346 try: -> 1347 response.begin() 1348 except ConnectionError: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in begin(self) 306 while True: --> 307 version, status, reason = self._read_status() 308 if status != CONTINUE: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in _read_status(self) 275 # sending a valid response. --> 276 raise RemoteDisconnected("Remote end closed connection without" 277 " response") RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: ProtocolError Traceback (most recent call last) ~/miniconda3/envs/py38/lib/python3.8/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, ~/miniconda3/envs/py38/lib/python3.8/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) 725 --> 726 retries = retries.increment( 727 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 402 if read is False or not self._is_method_retryable(method): --> 403 raise six.reraise(type(error), error, _stacktrace) 404 elif read is not None: ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/packages/six.py in reraise(tp, value, tb) 733 if value.__traceback__ is not tb: --> 734 raise value.with_traceback(tb) 735 raise value ~/miniconda3/envs/py38/lib/python3.8/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) 669 # Make the request on the httplib connection object. --> 670 httplib_response = self._make_request( 671 conn, ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 425 # Otherwise it looks like a bug in the code. --> 426 six.raise_from(e, None) 427 except (SocketTimeout, BaseSSLError, SocketError) as e: ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/packages/six.py in raise_from(value, from_value) ~/miniconda3/envs/py38/lib/python3.8/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 420 try: --> 421 httplib_response = conn.getresponse() 422 except BaseException as e: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in getresponse(self) 1346 try: -> 1347 response.begin() 1348 except ConnectionError: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in begin(self) 306 while True: --> 307 version, status, reason = self._read_status() 308 if status != CONTINUE: ~/miniconda3/envs/py38/lib/python3.8/http/client.py in _read_status(self) 275 # sending a valid response. --> 276 raise RemoteDisconnected("Remote end closed connection without" 277 " response") ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: ConnectionError Traceback (most recent call last) <ipython-input-3-6743eb250be3> in <module> 1 import requests 2 ----> 3 resp = requests.head('https://www.ncdc.noaa.gov/data-access/model-data/model-datasets/north-american-regional-reanalysis-narr' class="ansi-blue-fg">) ~/miniconda3/envs/py38/lib/python3.8/site-packages/requests/api.py in head(url, **kwargs) 102 103 kwargs.setdefault('allow_redirects', False) --> 104 return request('head', url, **kwargs) 105 106 ~/miniconda3/envs/py38/lib/python3.8/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 ~/miniconda3/envs/py38/lib/python3.8/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) 528 } 529 send_kwargs.update(settings) --> 530 resp = self.send(prep, **send_kwargs) 531 532 return resp ~/miniconda3/envs/py38/lib/python3.8/site-packages/requests/sessions.py in send(self, request, **kwargs) 641 642 # Send the request --> 643 r = adapter.send(request, **kwargs) 644 645 # Total elapsed time of the request (approximately) ~/miniconda3/envs/py38/lib/python3.8/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 496 497 except (ProtocolError, socket.error) as err: --> 498 raise ConnectionError(err, request=request) 499 500 except MaxRetryError as e: ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) ``` ## Reproduction Steps ```python import requests requests.head('https://www.ncdc.noaa.gov/data-access/model-data/model-datasets/north-american-regional-reanalysis-narr') ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "3.0" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "19.6.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "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/221526?v=4", "events_url": "https://api.github.com/users/dopplershift/events{/privacy}", "followers_url": "https://api.github.com/users/dopplershift/followers", "following_url": "https://api.github.com/users/dopplershift/following{/other_user}", "gists_url": "https://api.github.com/users/dopplershift/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dopplershift", "id": 221526, "login": "dopplershift", "node_id": "MDQ6VXNlcjIyMTUyNg==", "organizations_url": "https://api.github.com/users/dopplershift/orgs", "received_events_url": "https://api.github.com/users/dopplershift/received_events", "repos_url": "https://api.github.com/users/dopplershift/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dopplershift/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dopplershift/subscriptions", "type": "User", "url": "https://api.github.com/users/dopplershift", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5556/reactions" }
https://api.github.com/repos/psf/requests/issues/5556/timeline
null
completed
null
null
false
[ "So the problem is the headers that requests is sending. I can make things work just fine using `http.client.HTTPSConnection` from the stdlib. This works:\r\n```python\r\nfrom contextlib import closing\r\nfrom http.client import HTTPSConnection\r\n\r\nwith closing(HTTPSConnection('www.ncdc.noaa.gov')) as conn:\r\n ...
https://api.github.com/repos/psf/requests/issues/5555
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5555/labels{/name}
https://api.github.com/repos/psf/requests/issues/5555/comments
https://api.github.com/repos/psf/requests/issues/5555/events
https://github.com/psf/requests/issues/5555
677,201,329
MDU6SXNzdWU2NzcyMDEzMjk=
5,555
Requests now forcing TLS 1.2 on Python 3.6.10
{ "avatar_url": "https://avatars.githubusercontent.com/u/3922117?v=4", "events_url": "https://api.github.com/users/cleebp/events{/privacy}", "followers_url": "https://api.github.com/users/cleebp/followers", "following_url": "https://api.github.com/users/cleebp/following{/other_user}", "gists_url": "https://api.github.com/users/cleebp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cleebp", "id": 3922117, "login": "cleebp", "node_id": "MDQ6VXNlcjM5MjIxMTc=", "organizations_url": "https://api.github.com/users/cleebp/orgs", "received_events_url": "https://api.github.com/users/cleebp/received_events", "repos_url": "https://api.github.com/users/cleebp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cleebp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cleebp/subscriptions", "type": "User", "url": "https://api.github.com/users/cleebp", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-08-11T21:13:43Z
2021-08-29T00:06:36Z
2020-11-10T00:12:44Z
NONE
resolved
Due to the changes in [this PR](https://github.com/psf/requests/pull/5443) that made it into release 2.24.0 our stack went from using TLS 1.3 through `pyopenssl` to TLS 1.2 through the new requests/`ssl` path that is forced when `ssl` has SNI. This occurs when using Python 3.6.10. ## Expected Result On Python 3.6.10 with `pyopenssl` installed requests should use the highest TLS available, 1.3 (from `pyopenssl`), not 1.2 (from `ssl`). ## Actual Result On Python 3.6.10 TLS 1.2 is being used from `ssl`. ## Reproduction Steps ```python import requests tls_actual = requests.get('https://www.howsmyssl.com/a/check', verify=False).json()['tls_version'] print(tls_actual) ``` You can run the above easily from py36/py37 to observe the difference using conda: - `conda create -n py36-test requests=2.24.0 python=3.6.10 pyopenssl=19.10.1` - **Output:** TLS 1.2 - `conda create -n py37-test requests=2.24.0 python=3.7 pyopenssl=19.10.1` - **Output:** TLS 1.3 ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.10" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010105f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1000214f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true } ``` **Note:** this really isn't a blocker for us at all since we are currently upgrading from Python 3.6.10 -> 3.7 which fixes the issue since the 3.7 ssl has TLS 1.3 support. But for any users using Python 3.6.10 there may be unexpected consequences from this update.
{ "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/5555/reactions" }
https://api.github.com/repos/psf/requests/issues/5555/timeline
null
completed
null
null
false
[ "Hey @cleebp,\n\nThanks for bringing this up! I don't think we'd taken this into account when pushing pyopenssl to the background. You can still opt into using pyopenssl on 3.6 with:\n\n```\nfrom urllib3.contrib import pyopenssl\npyopenssl.inject_into_urllib3()\n```\n\nIt may be worth adding some kind of messaging ...
https://api.github.com/repos/psf/requests/issues/5554
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5554/labels{/name}
https://api.github.com/repos/psf/requests/issues/5554/comments
https://api.github.com/repos/psf/requests/issues/5554/events
https://github.com/psf/requests/pull/5554
675,764,818
MDExOlB1bGxSZXF1ZXN0NDY1MTk3NTIy
5,554
WIP: Make Brotli support enabled by default, if appropriate urllib3 version is available
{ "avatar_url": "https://avatars.githubusercontent.com/u/566632?v=4", "events_url": "https://api.github.com/users/gdubicki/events{/privacy}", "followers_url": "https://api.github.com/users/gdubicki/followers", "following_url": "https://api.github.com/users/gdubicki/following{/other_user}", "gists_url": "https://api.github.com/users/gdubicki/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gdubicki", "id": 566632, "login": "gdubicki", "node_id": "MDQ6VXNlcjU2NjYzMg==", "organizations_url": "https://api.github.com/users/gdubicki/orgs", "received_events_url": "https://api.github.com/users/gdubicki/received_events", "repos_url": "https://api.github.com/users/gdubicki/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gdubicki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gdubicki/subscriptions", "type": "User", "url": "https://api.github.com/users/gdubicki", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-08-09T20:17:48Z
2021-08-27T00:08:43Z
2021-04-02T07:38:10Z
CONTRIBUTOR
resolved
This is still a work in progress - I have to make sure that the tests are actually running, not skipped every time 😅 but [I would like to get feedback if the direction is right](https://github.com/psf/requests/blob/master/docs/dev/contributing.rst#get-early-feedback). I had to update some deps to make the tests pass after a lot of packages being updated after I added `brotli` to dev-packages. But I assume that this should be done anyway. Especially as there were discrepancies in the versions - f.e. `pytest` version in `setup.py` commit message declared v. 4 compatibility while the version in `Pipenv` was set to be at most v. 3.10.1. Speaking of dependencies I have a doubt how to declare required urllib3 version. Technically the first with brotli support is 1.25.1, but this is a version not supported by Requests... Should I update all the references to require urllib3 >= 1.25.2 then instead of >= 1.25.1?
{ "avatar_url": "https://avatars.githubusercontent.com/u/566632?v=4", "events_url": "https://api.github.com/users/gdubicki/events{/privacy}", "followers_url": "https://api.github.com/users/gdubicki/followers", "following_url": "https://api.github.com/users/gdubicki/following{/other_user}", "gists_url": "https://api.github.com/users/gdubicki/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gdubicki", "id": 566632, "login": "gdubicki", "node_id": "MDQ6VXNlcjU2NjYzMg==", "organizations_url": "https://api.github.com/users/gdubicki/orgs", "received_events_url": "https://api.github.com/users/gdubicki/received_events", "repos_url": "https://api.github.com/users/gdubicki/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gdubicki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gdubicki/subscriptions", "type": "User", "url": "https://api.github.com/users/gdubicki", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5554/reactions" }
https://api.github.com/repos/psf/requests/issues/5554/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5554.diff", "html_url": "https://github.com/psf/requests/pull/5554", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5554.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5554" }
true
[ "Ping! :)", "FYI Requests already supports Brotli [via urllib3](https://urllib3.readthedocs.io/en/latest/advanced-usage.html#brotli-encoding):\r\n\r\n```python\r\nimport requests\r\n\r\nhttp = requests.Session()\r\nhttp.headers = {\"Accept-Encoding\": \"br\"}\r\n\r\nresp = http.request(\"GET\", \"https://cloudfla...
https://api.github.com/repos/psf/requests/issues/5553
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5553/labels{/name}
https://api.github.com/repos/psf/requests/issues/5553/comments
https://api.github.com/repos/psf/requests/issues/5553/events
https://github.com/psf/requests/issues/5553
675,744,300
MDU6SXNzdWU2NzU3NDQzMDA=
5,553
Requests module detected by antibot protection, but curl not
{ "avatar_url": "https://avatars.githubusercontent.com/u/69431678?v=4", "events_url": "https://api.github.com/users/yojuwahajeke/events{/privacy}", "followers_url": "https://api.github.com/users/yojuwahajeke/followers", "following_url": "https://api.github.com/users/yojuwahajeke/following{/other_user}", "gists_url": "https://api.github.com/users/yojuwahajeke/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yojuwahajeke", "id": 69431678, "login": "yojuwahajeke", "node_id": "MDQ6VXNlcjY5NDMxNjc4", "organizations_url": "https://api.github.com/users/yojuwahajeke/orgs", "received_events_url": "https://api.github.com/users/yojuwahajeke/received_events", "repos_url": "https://api.github.com/users/yojuwahajeke/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yojuwahajeke/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yojuwahajeke/subscriptions", "type": "User", "url": "https://api.github.com/users/yojuwahajeke", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-09T18:03:20Z
2021-08-30T00:06:19Z
2020-08-11T23:58:05Z
NONE
resolved
I am tring to get pixabay.com content. Requests module detected by antibot protection, but curl command working perfectly. (Please don't tell anything about javascript, ...) This is the second website I seen detected with python module requests. ## Expected Result Response status code: 200 pixabay website content ## Actual Result Response status code: 403 cloudflare page ## Reproduction Steps python requests code to load page ``` import requests headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US;q=0.5,en;q=0.3', 'Connection': 'keep-alive', } response = requests.get('https://pixabay.com/photos/search/?cat=animals&min_height=2400&min_width=3000&orientation=horizontal&pagi=2', headers=headers) print(response.text) print(response.status_code, len(response.text)) print(response.request.headers) ``` curl command (for windows) ``` curl "https://pixabay.com/photos/search/?cat=animals&min_height=2400&min_width=3000&orientation=horizontal&pagi=2" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US;q=0.5,en;q=0.3" -H "Connection: keep-alive" --output f ``` ## System Information Python version: 3.6.10 :: Anaconda, Inc. requests==2.24.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" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5553/reactions" }
https://api.github.com/repos/psf/requests/issues/5553/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/5552
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5552/labels{/name}
https://api.github.com/repos/psf/requests/issues/5552/comments
https://api.github.com/repos/psf/requests/issues/5552/events
https://github.com/psf/requests/issues/5552
675,528,050
MDU6SXNzdWU2NzU1MjgwNTA=
5,552
Response 400 while using Requests package in Django
{ "avatar_url": "https://avatars.githubusercontent.com/u/27157974?v=4", "events_url": "https://api.github.com/users/imsurajsharma/events{/privacy}", "followers_url": "https://api.github.com/users/imsurajsharma/followers", "following_url": "https://api.github.com/users/imsurajsharma/following{/other_user}", "gists_url": "https://api.github.com/users/imsurajsharma/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/imsurajsharma", "id": 27157974, "login": "imsurajsharma", "node_id": "MDQ6VXNlcjI3MTU3OTc0", "organizations_url": "https://api.github.com/users/imsurajsharma/orgs", "received_events_url": "https://api.github.com/users/imsurajsharma/received_events", "repos_url": "https://api.github.com/users/imsurajsharma/repos", "site_admin": false, "starred_url": "https://api.github.com/users/imsurajsharma/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/imsurajsharma/subscriptions", "type": "User", "url": "https://api.github.com/users/imsurajsharma", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2020-08-08T13:47:21Z
2021-08-30T00:06:15Z
2020-08-25T16:31:44Z
NONE
resolved
I want to scrap Myntra using Django Framework but when I put my code in Django project I get 400 error. The same code runs without error when I run it on the same file even in Django. Means calling the MyntraScraperClass in MyntraScraper.py file. Here is my project directory ``` BackendController -MyntraScraper.py myDjangoApp -views.py ``` Inside views.py, there is a function where I am calling my MyntraScraperClass ``` def tst(request): ------------ ``` The same code that is MyntraScraperClass runs error free when I call it on ``` BackendController -MyntraScraper.py ``` Here is my code: ``` import requests, json from bs4 import BeautifulSoup import os, ssl import certifi import urllib3 class MyntraScraperClass: def __init__(self,url): self.url=url def myntra(self): mt={} http = urllib3.PoolManager( cert_reqs='CERT_REQUIRED', ca_certs=certifi.where()) if (not os.environ.get('PYTHONHTTPSVERIFY', '') and getattr(ssl, '_create_unverified_context', None)): ssl._create_default_https_context = ssl._create_unverified_context proxy = {'http': '-------'} headers = {'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'} for x in range(0,5): print(x) try: s = requests.Session() res = s.get(self.url, headers=headers, verify=True, proxies=proxy) print(res) soup = BeautifulSoup(res.text, "lxml") print(soup) if "Access Denied" in soup.title: continue break except requests.exceptions.ProxyError: continue except Exception as e: print(e) mt['error']=e script = None for s in soup.find_all("script"): if 'pdpData' in s.text: script = s.get_text(strip=True) break else: continue mt['data'] =json.loads(script[script.index('{'):]) return mt ``` I am calling MyntraScraperClass in my Django Views from BackendController directory. ``` def tst(request): url = request.GET.get('url') from BackendController.MyntraScraper import MyntraScraperClass obj1 = MyntraScraperClass(url) kk = obj1.myntra() print(kk) return JsonResponse(kk) ``` The response is ``` <Response [400]> ``` I am getting this in soup ``` <html><head> <title>Invalid URL</title> </head><body> <h1>Invalid URL</h1> The requested URL "[no URL]", is invalid.<p> Reference #9.6b722c31.1596891375.7bfc4ae </p></body></html> ```
{ "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/5552/reactions" }
https://api.github.com/repos/psf/requests/issues/5552/timeline
null
completed
null
null
false
[ "Had the same issue. I couldn't solved it.", "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.", "@si...
https://api.github.com/repos/psf/requests/issues/5551
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5551/labels{/name}
https://api.github.com/repos/psf/requests/issues/5551/comments
https://api.github.com/repos/psf/requests/issues/5551/events
https://github.com/psf/requests/issues/5551
675,123,577
MDU6SXNzdWU2NzUxMjM1Nzc=
5,551
urllib3.exceptions.ProtocolError
{ "avatar_url": "https://avatars.githubusercontent.com/u/15031992?v=4", "events_url": "https://api.github.com/users/ishaileshmishra/events{/privacy}", "followers_url": "https://api.github.com/users/ishaileshmishra/followers", "following_url": "https://api.github.com/users/ishaileshmishra/following{/other_user}", "gists_url": "https://api.github.com/users/ishaileshmishra/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ishaileshmishra", "id": 15031992, "login": "ishaileshmishra", "node_id": "MDQ6VXNlcjE1MDMxOTky", "organizations_url": "https://api.github.com/users/ishaileshmishra/orgs", "received_events_url": "https://api.github.com/users/ishaileshmishra/received_events", "repos_url": "https://api.github.com/users/ishaileshmishra/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ishaileshmishra/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ishaileshmishra/subscriptions", "type": "User", "url": "https://api.github.com/users/ishaileshmishra", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-07T16:18:22Z
2021-08-30T00:06:20Z
2020-08-07T16:29:05Z
NONE
resolved
Summary. getting urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) Log ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1344, in getresponse response.begin() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into return self.read(nbytes, buffer) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 929, in read return self._sslobj.read(len, buffer) ConnectionResetError: [Errno 54] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1344, in getresponse response.begin() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into return self.read(nbytes, buffer) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 929, in read return self._sslobj.read(len, buffer) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/shaileshmishra/Documents/contentstack/workspace/python/contentstack-python/tests/test_assets.py", line 45, in test_04_asset_filetype result = self.asset.fetch() File "/Users/shaileshmishra/Documents/contentstack/workspace/python/contentstack-python/contentstack/asset.py", line 140, in fetch return self.http_instance.get(url) File "/Users/shaileshmishra/Documents/contentstack/workspace/python/contentstack-python/contentstack/https_connection.py", line 57, in get response = requests.get(url, verify=True, headers=self.headers) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): cdn.contentstack.io:443 ----------------------------------------------------------------------
{ "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/5551/reactions" }
https://api.github.com/repos/psf/requests/issues/5551/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/5550
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5550/labels{/name}
https://api.github.com/repos/psf/requests/issues/5550/comments
https://api.github.com/repos/psf/requests/issues/5550/events
https://github.com/psf/requests/issues/5550
674,506,147
MDU6SXNzdWU2NzQ1MDYxNDc=
5,550
ConnectionError BadStatusLine on Python 3.8 on macOS
{ "avatar_url": "https://avatars.githubusercontent.com/u/8939758?v=4", "events_url": "https://api.github.com/users/andy-maier/events{/privacy}", "followers_url": "https://api.github.com/users/andy-maier/followers", "following_url": "https://api.github.com/users/andy-maier/following{/other_user}", "gists_url": "https://api.github.com/users/andy-maier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andy-maier", "id": 8939758, "login": "andy-maier", "node_id": "MDQ6VXNlcjg5Mzk3NTg=", "organizations_url": "https://api.github.com/users/andy-maier/orgs", "received_events_url": "https://api.github.com/users/andy-maier/received_events", "repos_url": "https://api.github.com/users/andy-maier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andy-maier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andy-maier/subscriptions", "type": "User", "url": "https://api.github.com/users/andy-maier", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-06T18:10:41Z
2021-11-26T04:00:33Z
2021-08-28T03:23:17Z
NONE
resolved
We are using a thread-based HTTP server, and on the client side the `requests.post()` method raises: ``` ConnectionError: ('Connection aborted.', BadStatusLine('POST / HTTP/1.1\r\n')) ``` The exception happens only every now and then, and is not really predictable. Sometimes, it happens after 100+ successful POSTs. It only happens on Python 3.8 (presumably only on 3.8.5) and only on macOS on Travis (where the macOS is virtualized, I believe). I was not able to reproduce it on a local MacBook with Python 3.8.5 (and the exact same set of Python packages in the Python virtualenv). I have isolated the code into a standalone demo that reproduces the issue (on Travis, see above), and that contains both the minimalized HTTP server code, and the pytest test case that sends the POSTs, all in a single standalone Python module named `test_demo_listener.py` that is designed to be invoked by pytest. The test is serialized, i.e. there is only one client sending POSTs against the server. There is a variable that sets the log level. If you want me to make modifications to the code, just let me know. The server is a thread-based HTTP server derived from `socketserver.ThreadingMixIn` and `http.server.HTTPServer` and runs in a separate thread from the test thread, but in the same Python process. The only test case in that module creates a HTTP server object, starts its thread, and sends N POSTs to it via localhost, all in the same Python process. The pytest parametrization repeats this test case 10 times for N=10, and then 10 times for N=100. The full-fledged server from our project showed this error in many Travis runs by now. Issue https://github.com/pywbem/pywbem/issues/2383 lists a number of them in order to find out whether there is some rule to it: The issue happens always in the series with N=100, in one of the first two or three repetitions. Once the issue has happened, it never happens again in that Python process (pytest considers the parametrizations of the test case function to be different test cases, so it continues executing the remaining test cases if one is unsuccessful). I suspect these rules also apply to the minimalistic standalone server. This PR https://github.com/pywbem/pywbem/pull/2402 contains the standalone Python module mentioned above, and its Travis run https://travis-ci.org/github/pywbem/pywbem/jobs/715557420#L5191 shows the exception (which in this case happened at POST 40 in the 3rd repetition of the 100-series). ## Expected Result I expected no such exception to be raised. ## Actual Result See above. ## Reproduction Steps Caveats: 1. I only saw this in macOS in Travis, with Python 3.8.5 2. It only happens sometimes in each pytest run shown below With these caveats, to reproduce, have `requests`, `pytest` and `six` installed and the standalone test module in the current directory and then run: ``` $ pytest test_demo_listener.py -s ``` ## System Information This is admittedly my local macOS, but I verified that Python version and package versions are the same as on Travis. ``` $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.5" }, "platform": { "release": "19.5.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.10" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5550/reactions" }
https://api.github.com/repos/psf/requests/issues/5550/timeline
null
completed
null
null
false
[ "Hi @andy-maier, I'm not sure if you've resolved this but I took a quick look at this issue. The server in question appears to be periodically confused. This may be due to a threading issue or some other defect. You can see that we've received a [Status Line](https://datatracker.ietf.org/doc/html/rfc7230#section-3....
https://api.github.com/repos/psf/requests/issues/5549
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5549/labels{/name}
https://api.github.com/repos/psf/requests/issues/5549/comments
https://api.github.com/repos/psf/requests/issues/5549/events
https://github.com/psf/requests/issues/5549
674,276,856
MDU6SXNzdWU2NzQyNzY4NTY=
5,549
Allow [] in params
{ "avatar_url": "https://avatars.githubusercontent.com/u/6634187?v=4", "events_url": "https://api.github.com/users/Luttik/events{/privacy}", "followers_url": "https://api.github.com/users/Luttik/followers", "following_url": "https://api.github.com/users/Luttik/following{/other_user}", "gists_url": "https://api.github.com/users/Luttik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Luttik", "id": 6634187, "login": "Luttik", "node_id": "MDQ6VXNlcjY2MzQxODc=", "organizations_url": "https://api.github.com/users/Luttik/orgs", "received_events_url": "https://api.github.com/users/Luttik/received_events", "repos_url": "https://api.github.com/users/Luttik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Luttik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Luttik/subscriptions", "type": "User", "url": "https://api.github.com/users/Luttik", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-06T12:31:16Z
2021-08-30T00:06:15Z
2020-08-25T19:01:17Z
NONE
resolved
Currently, it seems to not be possible to have [] in query parameters at all using requests since it url-encodes them even though these characters are essential parts of many API's (e.g. they require filters like `?filters[key1]=val1&filters[key2]=val2`). There seems to be no other method to obtain the filters as mentioned above either. ## Expected Result The `[` and `]` characters should not be encoded when they are present in the key of a query parameter. ## Actual Result They are url-encoded. ## Reproduction Steps ```python import requests request = requests.get('http://example.com', params={'filter[key1]': 'val1'}) print(request.url) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "4.14.181-142.260.amzn2.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5549/reactions" }
https://api.github.com/repos/psf/requests/issues/5549/timeline
null
completed
null
null
false
[ "Hi @Luttik,\r\n\r\nIt sounds like there may be some confusion about valid query params. Query parameters are defined in [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.4) to explicitly be a `pchar`*.\r\n\r\nIf your application isn't able to properly decode URIs, you may be able to look at using PreparedRe...
https://api.github.com/repos/psf/requests/issues/5548
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5548/labels{/name}
https://api.github.com/repos/psf/requests/issues/5548/comments
https://api.github.com/repos/psf/requests/issues/5548/events
https://github.com/psf/requests/issues/5548
672,317,146
MDU6SXNzdWU2NzIzMTcxNDY=
5,548
Is chardetect.exe required for get request and content?
{ "avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4", "events_url": "https://api.github.com/users/wilberh/events{/privacy}", "followers_url": "https://api.github.com/users/wilberh/followers", "following_url": "https://api.github.com/users/wilberh/following{/other_user}", "gists_url": "https://api.github.com/users/wilberh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wilberh", "id": 6799242, "login": "wilberh", "node_id": "MDQ6VXNlcjY3OTkyNDI=", "organizations_url": "https://api.github.com/users/wilberh/orgs", "received_events_url": "https://api.github.com/users/wilberh/received_events", "repos_url": "https://api.github.com/users/wilberh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wilberh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wilberh/subscriptions", "type": "User", "url": "https://api.github.com/users/wilberh", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-03T20:15:13Z
2021-08-30T00:06:20Z
2020-08-03T20:34:10Z
NONE
resolved
Hi - is "chardetect.exe" executable required for a get request and content? Just wanted to know. If not needed, then is it okay to delete it so that I can store the chardet files in bitbucket/git? ``` req = requests.get(url) with io.BytesIO() as buf: buf.write(req.content) buf.seek(0) ``` Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
{ "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/5548/reactions" }
https://api.github.com/repos/psf/requests/issues/5548/timeline
null
completed
null
null
false
[ "Requests currently requires the `chardet` package but doesn't rely on any of the CLI tools.\r\nSince this isn't a defect with the library please ask questions like this on StackOverflow in the future." ]
https://api.github.com/repos/psf/requests/issues/5547
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5547/labels{/name}
https://api.github.com/repos/psf/requests/issues/5547/comments
https://api.github.com/repos/psf/requests/issues/5547/events
https://github.com/psf/requests/issues/5547
672,247,992
MDU6SXNzdWU2NzIyNDc5OTI=
5,547
Got ProtocolError when Sending SOAP requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/2102491?v=4", "events_url": "https://api.github.com/users/XiaoguangMo/events{/privacy}", "followers_url": "https://api.github.com/users/XiaoguangMo/followers", "following_url": "https://api.github.com/users/XiaoguangMo/following{/other_user}", "gists_url": "https://api.github.com/users/XiaoguangMo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/XiaoguangMo", "id": 2102491, "login": "XiaoguangMo", "node_id": "MDQ6VXNlcjIxMDI0OTE=", "organizations_url": "https://api.github.com/users/XiaoguangMo/orgs", "received_events_url": "https://api.github.com/users/XiaoguangMo/received_events", "repos_url": "https://api.github.com/users/XiaoguangMo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/XiaoguangMo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/XiaoguangMo/subscriptions", "type": "User", "url": "https://api.github.com/users/XiaoguangMo", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-08-03T18:00:20Z
2021-11-26T04:00:32Z
2021-08-28T03:31:01Z
NONE
resolved
I was trying to send a SOAP request to an ancient banking server, firstly I tried with Postman and it returns whatever I want. Then I tried to send requests from pure python 3.8.3 with requests, `headers = {"content-type" : "text/xml"}` and using `response = requests.post(url, data = body, headers = headers) `, I got ``` Traceback (most recent call last): File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 272, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/http/client.py", line 272, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<console>", line 1, in <module> File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/Users/xmo/.pyenv/versions/3.8.3/lib/python3.8/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) ``` I used the default setting of Postman and requests, only changed the `content-type` to `text/xml`. I have no idea how it get ProtocolError.
{ "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/5547/reactions" }
https://api.github.com/repos/psf/requests/issues/5547/timeline
null
completed
null
null
false
[ "BTW that server also will return a default message if you send a GET request, so `response = requests.get(url, data = body, headers = headers)` will return the correct response same as what I can get from Postman or web browser.", "It appears this server is intentionally killing the connection with Requests when...
https://api.github.com/repos/psf/requests/issues/5546
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5546/labels{/name}
https://api.github.com/repos/psf/requests/issues/5546/comments
https://api.github.com/repos/psf/requests/issues/5546/events
https://github.com/psf/requests/pull/5546
671,633,531
MDExOlB1bGxSZXF1ZXN0NDYxODE5MTg1
5,546
Fix Reitz's GitHub handle in docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/6032823?v=4", "events_url": "https://api.github.com/users/Jackenmen/events{/privacy}", "followers_url": "https://api.github.com/users/Jackenmen/followers", "following_url": "https://api.github.com/users/Jackenmen/following{/other_user}", "gists_url": "https://api.github.com/users/Jackenmen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Jackenmen", "id": 6032823, "login": "Jackenmen", "node_id": "MDQ6VXNlcjYwMzI4MjM=", "organizations_url": "https://api.github.com/users/Jackenmen/orgs", "received_events_url": "https://api.github.com/users/Jackenmen/received_events", "repos_url": "https://api.github.com/users/Jackenmen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Jackenmen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jackenmen/subscriptions", "type": "User", "url": "https://api.github.com/users/Jackenmen", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-08-02T15:11:13Z
2021-08-28T00:06:23Z
2020-08-02T15:21:49Z
NONE
resolved
Currently it links to some account created in April 21 2020, so I'm taking a wild guess that it isn't intentional.
{ "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/5546/reactions" }
https://api.github.com/repos/psf/requests/issues/5546/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5546.diff", "html_url": "https://github.com/psf/requests/pull/5546", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5546.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5546" }
true
[ "Hi @jack1142, thanks for contributing! We actually already have a branch up with this change that will get merged in the near future. I think we'll keep the doc changes consolidated to there for now." ]
https://api.github.com/repos/psf/requests/issues/5545
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5545/labels{/name}
https://api.github.com/repos/psf/requests/issues/5545/comments
https://api.github.com/repos/psf/requests/issues/5545/events
https://github.com/psf/requests/issues/5545
669,020,324
MDU6SXNzdWU2NjkwMjAzMjQ=
5,545
407 Proxy Requires Authentication
{ "avatar_url": "https://avatars.githubusercontent.com/u/58109239?v=4", "events_url": "https://api.github.com/users/scullcandyz/events{/privacy}", "followers_url": "https://api.github.com/users/scullcandyz/followers", "following_url": "https://api.github.com/users/scullcandyz/following{/other_user}", "gists_url": "https://api.github.com/users/scullcandyz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/scullcandyz", "id": 58109239, "login": "scullcandyz", "node_id": "MDQ6VXNlcjU4MTA5MjM5", "organizations_url": "https://api.github.com/users/scullcandyz/orgs", "received_events_url": "https://api.github.com/users/scullcandyz/received_events", "repos_url": "https://api.github.com/users/scullcandyz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/scullcandyz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/scullcandyz/subscriptions", "type": "User", "url": "https://api.github.com/users/scullcandyz", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-30T17:45:01Z
2021-08-29T00:06:36Z
2020-11-10T00:14:08Z
NONE
resolved
I cant seem to send any requests with auth proxies, I know for a fact the way I have it set up should theoretically work. Proxies are being passed in the correct format, I tried passing them to requests in all possible ways. I tried: - Reinstall Requests - Pass requests the proxies in all possible ways - Create completely fresh venv with just requests - 3 different proxy providers (which I know all work) - sess.trust_env=False -Python 3.7 -Windows -requests 2.24 -urllib3 1.25.10 I dont remember doing any changes to my venv that should matter, but it has to be something along that way as everything worked just fine yesterday. Maybe im missing something you can spot out right away, thanks in advance been sitting here for 5 hours now reading through everything I can find but cant seem to fix it up. Edit: Im completely lost now, im getting the same issue when running in python console on a different python version (3.8) Code (tried passing in as arg in s.get, tried passing in auth and proxy´s seperately): ``` s = requests.session() proxy = {'http': 'user:pass@ip:port', 'https': 'user:pass@ip:port'} s.proxies = proxy s.get("https://www.google.com") ``` Full traceback: ```Traceback (most recent call last): File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\urllib3\connectionpool.py", line 594, in urlopen self._prepare_proxy(conn) File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\urllib3\connectionpool.py", line 805, in _prepare_proxy conn.connect() File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\urllib3\connection.py", line 308, in connect self._tunnel() File "C:\Users\\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 923, in _tunnel message.strip())) OSError: Tunnel connection failed: 407 Proxy Authentication Required During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\urllib3\util\retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.google.de', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Users//PycharmProjects/test123/testr.py", line 6, in <module> r.get("https://www.google.de") File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\requests\sessions.py", line 543, in get return self.request('GET', url, **kwargs) File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Users\\PycharmProjects\test123\venv\lib\site-packages\requests\adapters.py", line 510, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.google.de', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))```
{ "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/5545/reactions" }
https://api.github.com/repos/psf/requests/issues/5545/timeline
null
completed
null
null
false
[ "Either your proxy server requires authentication different from the basic one, or you did not enter the username and password correctly in the proxy_url. To begin with, you can send a request to your proxy server and look at the header 'Proxy-Authenticate' of response. It will indicate the type of authentication t...
https://api.github.com/repos/psf/requests/issues/5544
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5544/labels{/name}
https://api.github.com/repos/psf/requests/issues/5544/comments
https://api.github.com/repos/psf/requests/issues/5544/events
https://github.com/psf/requests/issues/5544
668,903,401
MDU6SXNzdWU2Njg5MDM0MDE=
5,544
Raising readtimeout instead of connecttimeout
{ "avatar_url": "https://avatars.githubusercontent.com/u/1932338?v=4", "events_url": "https://api.github.com/users/stephanebruckert/events{/privacy}", "followers_url": "https://api.github.com/users/stephanebruckert/followers", "following_url": "https://api.github.com/users/stephanebruckert/following{/other_user}", "gists_url": "https://api.github.com/users/stephanebruckert/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stephanebruckert", "id": 1932338, "login": "stephanebruckert", "node_id": "MDQ6VXNlcjE5MzIzMzg=", "organizations_url": "https://api.github.com/users/stephanebruckert/orgs", "received_events_url": "https://api.github.com/users/stephanebruckert/received_events", "repos_url": "https://api.github.com/users/stephanebruckert/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stephanebruckert/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephanebruckert/subscriptions", "type": "User", "url": "https://api.github.com/users/stephanebruckert", "user_view_type": "public" }
[]
open
false
null
[]
null
7
2020-07-30T15:57:31Z
2021-08-10T13:47:24Z
null
NONE
null
My timeout is set to `(1,10)` AKA connect=1, read=10 and when it times out, I can see either: > HTTPSConnectionPool(host='cloud-collector.newrelic.com', port=443): Read timed out. (read timeout=10) or > HTTPSConnectionPool(host='cloud-collector.newrelic.com', port=443): Read timed out. (read timeout=1) <img width="1320" alt="Screenshot 2020-07-30 at 16 36 08" src="https://user-images.githubusercontent.com/1932338/88945113-7d20b400-d285-11ea-8189-ea68dfc7e9ff.png"> The second one looks like definitely a connect timeout and should mention `connect` instead of `read`. Currently it's possibly making one believe that the timeouts are not being applied correctly.
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/5544/reactions" }
https://api.github.com/repos/psf/requests/issues/5544/timeline
null
null
null
null
false
[ "I'm not sure if this is related, but it's a read timeout issue. I have timeout=60 but this exception is thrown <= 154ms after the post?\r\n```\r\n2020-09-06 09:28:12,599 Controller polyinterface DEBUG pgSession: Ecobee Controller:post: Sending: url=https://api.ecobee.com/token payload={}\r\n2020-09-06 09:...
https://api.github.com/repos/psf/requests/issues/5543
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5543/labels{/name}
https://api.github.com/repos/psf/requests/issues/5543/comments
https://api.github.com/repos/psf/requests/issues/5543/events
https://github.com/psf/requests/issues/5543
668,078,886
MDU6SXNzdWU2NjgwNzg4ODY=
5,543
Request fails in python subprocess
{ "avatar_url": "https://avatars.githubusercontent.com/u/766285?v=4", "events_url": "https://api.github.com/users/vijay120/events{/privacy}", "followers_url": "https://api.github.com/users/vijay120/followers", "following_url": "https://api.github.com/users/vijay120/following{/other_user}", "gists_url": "https://api.github.com/users/vijay120/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vijay120", "id": 766285, "login": "vijay120", "node_id": "MDQ6VXNlcjc2NjI4NQ==", "organizations_url": "https://api.github.com/users/vijay120/orgs", "received_events_url": "https://api.github.com/users/vijay120/received_events", "repos_url": "https://api.github.com/users/vijay120/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vijay120/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vijay120/subscriptions", "type": "User", "url": "https://api.github.com/users/vijay120", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2020-07-29T19:14:07Z
2021-08-30T00:06:21Z
2020-07-31T17:49:41Z
NONE
resolved
## Summary The request library stalls in a python subprocess and does not fulfill the request. ## Expected Result The line "after call" should be printed and the response to the GET request should also be printed. ## Actual Result The subprocess stalls at "before call" and does not print "after call" and the response to the GET request. ## Reproduction Steps ```python import requests from multiprocessing import Process def call_locahost(): print("before call") response = requests.request("GET", "https://www.google.com/") print("after call") print(response) return response p = Process(target=call_locahost) p.start() p.join() ``` ## System Information ``` (botlite) VIJAYRK-M-L1E5:botlite vijay$ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "17.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/766285?v=4", "events_url": "https://api.github.com/users/vijay120/events{/privacy}", "followers_url": "https://api.github.com/users/vijay120/followers", "following_url": "https://api.github.com/users/vijay120/following{/other_user}", "gists_url": "https://api.github.com/users/vijay120/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vijay120", "id": 766285, "login": "vijay120", "node_id": "MDQ6VXNlcjc2NjI4NQ==", "organizations_url": "https://api.github.com/users/vijay120/orgs", "received_events_url": "https://api.github.com/users/vijay120/received_events", "repos_url": "https://api.github.com/users/vijay120/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vijay120/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vijay120/subscriptions", "type": "User", "url": "https://api.github.com/users/vijay120", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5543/reactions" }
https://api.github.com/repos/psf/requests/issues/5543/timeline
null
completed
null
null
false
[ "Where does `Process` come frome?", "I ask because with a slight modification (using `multiprocessing`) I see no issues:\r\n\r\n```\r\nfrom multiprocessing import Process\r\n\r\nimport requests\r\n\r\n\r\ndef make_request():\r\n print(\"before call\")\r\n response = requests.request(\"GET\", \"https://www.g...
https://api.github.com/repos/psf/requests/issues/5542
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5542/labels{/name}
https://api.github.com/repos/psf/requests/issues/5542/comments
https://api.github.com/repos/psf/requests/issues/5542/events
https://github.com/psf/requests/pull/5542
667,775,748
MDExOlB1bGxSZXF1ZXN0NDU4MzgxMTM5
5,542
Fix documentation for proxies, missing an "s" for https
{ "avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4", "events_url": "https://api.github.com/users/jonathan-s/events{/privacy}", "followers_url": "https://api.github.com/users/jonathan-s/followers", "following_url": "https://api.github.com/users/jonathan-s/following{/other_user}", "gists_url": "https://api.github.com/users/jonathan-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jonathan-s", "id": 2124818, "login": "jonathan-s", "node_id": "MDQ6VXNlcjIxMjQ4MTg=", "organizations_url": "https://api.github.com/users/jonathan-s/orgs", "received_events_url": "https://api.github.com/users/jonathan-s/received_events", "repos_url": "https://api.github.com/users/jonathan-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jonathan-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jonathan-s/subscriptions", "type": "User", "url": "https://api.github.com/users/jonathan-s", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-29T11:36:18Z
2021-08-28T00:06:24Z
2020-07-29T14:25:16Z
NONE
resolved
It looks like the documentation regarding how proxies should be defined is using the wrong scheme for https. I assume that this is a mistake, otherwise it would be good to explain why this is the case in the documentation.
{ "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/5542/reactions" }
https://api.github.com/repos/psf/requests/issues/5542/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5542.diff", "html_url": "https://github.com/psf/requests/pull/5542", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5542.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5542" }
true
[ "This is intentional. Requests doesn't support HTTPS proxies currently." ]
https://api.github.com/repos/psf/requests/issues/5541
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5541/labels{/name}
https://api.github.com/repos/psf/requests/issues/5541/comments
https://api.github.com/repos/psf/requests/issues/5541/events
https://github.com/psf/requests/pull/5541
667,324,463
MDExOlB1bGxSZXF1ZXN0NDU4MDEzNzY5
5,541
Making code examples in documentation more consistent with contributi…
{ "avatar_url": "https://avatars.githubusercontent.com/u/28850462?v=4", "events_url": "https://api.github.com/users/kgr7/events{/privacy}", "followers_url": "https://api.github.com/users/kgr7/followers", "following_url": "https://api.github.com/users/kgr7/following{/other_user}", "gists_url": "https://api.github.com/users/kgr7/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kgr7", "id": 28850462, "login": "kgr7", "node_id": "MDQ6VXNlcjI4ODUwNDYy", "organizations_url": "https://api.github.com/users/kgr7/orgs", "received_events_url": "https://api.github.com/users/kgr7/received_events", "repos_url": "https://api.github.com/users/kgr7/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kgr7/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kgr7/subscriptions", "type": "User", "url": "https://api.github.com/users/kgr7", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-07-28T19:43:37Z
2021-10-10T19:00:51Z
2021-07-12T18:21:06Z
NONE
resolved
…on guidelines
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5541/reactions" }
https://api.github.com/repos/psf/requests/issues/5541/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5541.diff", "html_url": "https://github.com/psf/requests/pull/5541", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5541.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5541" }
true
[ "@AaronRobson hello, I recognised that you approved these changes a while ago. I tried pulling the changes into my forked repo, but now it has left this massive PR... Should I just close this? It seems like a pain to deal with.", "> @AaronRobson hello, I recognised that you approved these changes a while ago. I t...
https://api.github.com/repos/psf/requests/issues/5540
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5540/labels{/name}
https://api.github.com/repos/psf/requests/issues/5540/comments
https://api.github.com/repos/psf/requests/issues/5540/events
https://github.com/psf/requests/issues/5540
665,135,091
MDU6SXNzdWU2NjUxMzUwOTE=
5,540
iter_lines is still broken?
{ "avatar_url": "https://avatars.githubusercontent.com/u/2243958?v=4", "events_url": "https://api.github.com/users/vitidev/events{/privacy}", "followers_url": "https://api.github.com/users/vitidev/followers", "following_url": "https://api.github.com/users/vitidev/following{/other_user}", "gists_url": "https://api.github.com/users/vitidev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vitidev", "id": 2243958, "login": "vitidev", "node_id": "MDQ6VXNlcjIyNDM5NTg=", "organizations_url": "https://api.github.com/users/vitidev/orgs", "received_events_url": "https://api.github.com/users/vitidev/received_events", "repos_url": "https://api.github.com/users/vitidev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vitidev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vitidev/subscriptions", "type": "User", "url": "https://api.github.com/users/vitidev", "user_view_type": "public" }
[]
open
false
null
[]
null
9
2020-07-24T12:27:57Z
2023-11-10T21:01:17Z
null
NONE
null
I don't understand. I can't iterate "\r\n" because "\r" and "\n" can be read into different chunks. But I can't even get solve this problem by explicitly setting the final delimiter "\n" for line in (_.strip() for _ in resp.iter_lines(delimiter=b"\n")): print(line) because if chunk end with "\r\n", then `lines = chunk.split(delimiter)` in `iter_lines` append empty extra line (but chunk.splitlines() not) the same problem and just with "\n" - if chunk end with delimiter, then we get an extra empty line. Which forces you to set a large buffer size if line length is unknown So if the `split(...)` adds an extra line, why not remove it? if delimiter: lines = chunk.split(delimiter) if lines and not lines[-1]: lines.pop(-1) else: lines = chunk.splitlines()
null
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/5540/reactions" }
https://api.github.com/repos/psf/requests/issues/5540/timeline
null
null
null
null
false
[ "> I can't iterate \"\\r\\n\" because \"\\r\" and \"\\n\" can be read into different chunks.\r\n\r\n\r\n\r\n> I can't even get solve this problem\r\n\r\nI still don't understand your problem but I think you have unrealistic expectations of what iter_lines does. Your issue isn't cogent enough for me to make sense o...
https://api.github.com/repos/psf/requests/issues/5539
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5539/labels{/name}
https://api.github.com/repos/psf/requests/issues/5539/comments
https://api.github.com/repos/psf/requests/issues/5539/events
https://github.com/psf/requests/issues/5539
664,905,871
MDU6SXNzdWU2NjQ5MDU4NzE=
5,539
PyPi website description is showing HTML
{ "avatar_url": "https://avatars.githubusercontent.com/u/2363526?v=4", "events_url": "https://api.github.com/users/LyalinDotCom/events{/privacy}", "followers_url": "https://api.github.com/users/LyalinDotCom/followers", "following_url": "https://api.github.com/users/LyalinDotCom/following{/other_user}", "gists_url": "https://api.github.com/users/LyalinDotCom/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LyalinDotCom", "id": 2363526, "login": "LyalinDotCom", "node_id": "MDQ6VXNlcjIzNjM1MjY=", "organizations_url": "https://api.github.com/users/LyalinDotCom/orgs", "received_events_url": "https://api.github.com/users/LyalinDotCom/received_events", "repos_url": "https://api.github.com/users/LyalinDotCom/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LyalinDotCom/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LyalinDotCom/subscriptions", "type": "User", "url": "https://api.github.com/users/LyalinDotCom", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-07-24T04:22:24Z
2020-08-04T19:06:19Z
2020-07-24T04:25:05Z
NONE
null
When viewing the package on PyPi using Edge I am seeing HTML where it should just be a text description. **Details:** * Browser: Edge (Chromium) version 84.0.522.40 (Official build) (64-bit) * OS: Windows 10 ## Screenshot of the problem: ![image](https://user-images.githubusercontent.com/2363526/88360396-5cf37100-cd2a-11ea-9d09-404f25d4896a.png)
{ "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/5539/reactions" }
https://api.github.com/repos/psf/requests/issues/5539/timeline
null
completed
null
null
false
[ "Hi @LyalinDotCom, this is a dupe of #5501. Please make sure to check existing issues before posting new ones. Thanks!", "Will do next time sorry 🙏", "Why is this closed? The problem is still prevalent on both Firefox and Chrome.\r\n\r\n![image](https://user-images.githubusercontent.com/47085752/89333803-cb72f...
https://api.github.com/repos/psf/requests/issues/5538
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5538/labels{/name}
https://api.github.com/repos/psf/requests/issues/5538/comments
https://api.github.com/repos/psf/requests/issues/5538/events
https://github.com/psf/requests/issues/5538
664,500,015
MDU6SXNzdWU2NjQ1MDAwMTU=
5,538
Deadlock / infinite stall when using HTTPAdapter and Retry
{ "avatar_url": "https://avatars.githubusercontent.com/u/13543580?v=4", "events_url": "https://api.github.com/users/Seminko/events{/privacy}", "followers_url": "https://api.github.com/users/Seminko/followers", "following_url": "https://api.github.com/users/Seminko/following{/other_user}", "gists_url": "https://api.github.com/users/Seminko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Seminko", "id": 13543580, "login": "Seminko", "node_id": "MDQ6VXNlcjEzNTQzNTgw", "organizations_url": "https://api.github.com/users/Seminko/orgs", "received_events_url": "https://api.github.com/users/Seminko/received_events", "repos_url": "https://api.github.com/users/Seminko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Seminko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Seminko/subscriptions", "type": "User", "url": "https://api.github.com/users/Seminko", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-23T14:02:37Z
2021-08-30T00:06:22Z
2020-07-23T17:01:33Z
NONE
resolved
Summary. ## Expected Result The code to finish or error out. ## Actual Result Execution stalls / never finishes. ## Reproduction Steps Run the code below. Tried multiple versions without status_forcelist, without Retry altogether, just with max_retries=2. I cannot get any version to finish. ``` import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # disabled SSL warnings HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'} TIMEOUT = 5 s = requests.Session() retries = Retry(total=3, backoff_factor=1, status_forcelist=[503]) s.mount("https://", HTTPAdapter(max_retries=retries)) response = s.get('https://employdentllc.com', headers=HEADERS, timeout=TIMEOUT, verify=False) ``` ## System Information ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.7" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.4" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010103f", "version": "19.0.0" }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/13543580?v=4", "events_url": "https://api.github.com/users/Seminko/events{/privacy}", "followers_url": "https://api.github.com/users/Seminko/followers", "following_url": "https://api.github.com/users/Seminko/following{/other_user}", "gists_url": "https://api.github.com/users/Seminko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Seminko", "id": 13543580, "login": "Seminko", "node_id": "MDQ6VXNlcjEzNTQzNTgw", "organizations_url": "https://api.github.com/users/Seminko/orgs", "received_events_url": "https://api.github.com/users/Seminko/received_events", "repos_url": "https://api.github.com/users/Seminko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Seminko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Seminko/subscriptions", "type": "User", "url": "https://api.github.com/users/Seminko", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5538/reactions" }
https://api.github.com/repos/psf/requests/issues/5538/timeline
null
completed
null
null
false
[ "Sorry about this, just found out about the `retry-after` header and `respect_retry_after_header` option.Closing issue..." ]
https://api.github.com/repos/psf/requests/issues/5537
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5537/labels{/name}
https://api.github.com/repos/psf/requests/issues/5537/comments
https://api.github.com/repos/psf/requests/issues/5537/events
https://github.com/psf/requests/issues/5537
661,014,519
MDU6SXNzdWU2NjEwMTQ1MTk=
5,537
Not using pyOpenSSL on GAE Flexible environment seems to cause an infinite loop
{ "avatar_url": "https://avatars.githubusercontent.com/u/3140245?v=4", "events_url": "https://api.github.com/users/the-machinist/events{/privacy}", "followers_url": "https://api.github.com/users/the-machinist/followers", "following_url": "https://api.github.com/users/the-machinist/following{/other_user}", "gists_url": "https://api.github.com/users/the-machinist/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/the-machinist", "id": 3140245, "login": "the-machinist", "node_id": "MDQ6VXNlcjMxNDAyNDU=", "organizations_url": "https://api.github.com/users/the-machinist/orgs", "received_events_url": "https://api.github.com/users/the-machinist/received_events", "repos_url": "https://api.github.com/users/the-machinist/repos", "site_admin": false, "starred_url": "https://api.github.com/users/the-machinist/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/the-machinist/subscriptions", "type": "User", "url": "https://api.github.com/users/the-machinist", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-19T19:16:20Z
2021-08-28T00:06:12Z
2020-11-10T00:15:50Z
NONE
resolved
Summary: We use requests on a Google App Engine Flexible environment and saw an SSL-related infinite recursion occur after upgrading to 2.24.0. Reverting to 2.23.0 fixed it for now. Additionally, we were using eventlet and it seemed like we also had to replace eventlet with gevent. ## Expected Result Requests made over https work as normal ## Actual Result ``` Traceback (most recent call last): File "/env/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/env/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/env/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/env/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise raise value File "/env/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/env/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/env/lib/python3.6/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/env/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn conn.connect() File "/env/lib/python3.6/site-packages/urllib3/connection.py", line 344, in connect cert_reqs=resolve_cert_reqs(self.cert_reqs), File "/env/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 276, in create_urllib3_context context.options |= options File "/opt/python3.6/lib/python3.6/ssl.py", line 465, in options super(SSLContext, SSLContext).options.__set__(self, value) File "/opt/python3.6/lib/python3.6/ssl.py", line 465, in options super(SSLContext, SSLContext).options.__set__(self, value) File "/opt/python3.6/lib/python3.6/ssl.py", line 465, in options super(SSLContext, SSLContext).options.__set__(self, value) ``` ## Reproduction Steps Add `requests==2.24.0` to requirements.txt, and deploy a simple Flask app that makes a request using it ## System Information GAE Flexible Environment with Python 3
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5537/reactions" }
https://api.github.com/repos/psf/requests/issues/5537/timeline
null
completed
null
null
false
[ "Hi @the-machinist,\r\n\r\nA change to how we import PyOpenSSL was made in 2.24.0 (#5443). We no longer prefer PyOpenSSL unless there isn't an available ssl library with SNI support from the base interpreter. There are a number of concerns about PyOpenSSL that have lead both Requests and urllib3 to deprioritize its...
https://api.github.com/repos/psf/requests/issues/5536
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5536/labels{/name}
https://api.github.com/repos/psf/requests/issues/5536/comments
https://api.github.com/repos/psf/requests/issues/5536/events
https://github.com/psf/requests/issues/5536
660,816,593
MDU6SXNzdWU2NjA4MTY1OTM=
5,536
When stream=True iter_content(chunk_size=None) reads the input as a single big chunk
{ "avatar_url": "https://avatars.githubusercontent.com/u/52621858?v=4", "events_url": "https://api.github.com/users/hexagonrecursion/events{/privacy}", "followers_url": "https://api.github.com/users/hexagonrecursion/followers", "following_url": "https://api.github.com/users/hexagonrecursion/following{/other_user}", "gists_url": "https://api.github.com/users/hexagonrecursion/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hexagonrecursion", "id": 52621858, "login": "hexagonrecursion", "node_id": "MDQ6VXNlcjUyNjIxODU4", "organizations_url": "https://api.github.com/users/hexagonrecursion/orgs", "received_events_url": "https://api.github.com/users/hexagonrecursion/received_events", "repos_url": "https://api.github.com/users/hexagonrecursion/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hexagonrecursion/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hexagonrecursion/subscriptions", "type": "User", "url": "https://api.github.com/users/hexagonrecursion", "user_view_type": "public" }
[]
open
false
null
[]
null
15
2020-07-19T12:45:58Z
2023-11-09T15:26:01Z
null
NONE
null
[According to the documentation](https://2.python-requests.org/en/master/api/#requests.Response.iter_content) when stream=True iter_content(chunk_size=None) "will read data as it arrives in whatever size the chunks are received", But it actually collects all input into a single big bytes object consuming large amounts of memory and entirely defeating the purpose of iter_content(). ## Expected Result iter_content(chunk_size=None) yields "data as it arrives in whatever size the chunks are received". ## Actual Result A single big chunk ## Reproduction Steps [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hexagonrecursion/requests-bug/c34439734aca44a8b5df85d606b2ac63ca0510f0?filepath=repro.ipynb) ```python from requests import get URL = 'https://dl.fedoraproject.org/pub/alt/iot/32/IoT/x86_64/images/Fedora-IoT-32-20200603.0.x86_64.raw.xz' r = get(URL, stream=True) for b in r.iter_content(chunk_size=None): print(len(b)) ``` prints ``` 533830860 ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.9.2" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.6" }, "platform": { "release": "4.19.104+", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true } ```
null
{ "+1": 5, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 5, "url": "https://api.github.com/repos/psf/requests/issues/5536/reactions" }
https://api.github.com/repos/psf/requests/issues/5536/timeline
null
null
null
null
false
[ "`chunk_size=None` as you've quoted relies on the size of the data as sent by the server. If there server is sending everything all at once and it's all on the socket, what do you expect the library to do differently?", "@sigmavirus24 I don't think the server sends the file all at once. The example above produces...
https://api.github.com/repos/psf/requests/issues/5535
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5535/labels{/name}
https://api.github.com/repos/psf/requests/issues/5535/comments
https://api.github.com/repos/psf/requests/issues/5535/events
https://github.com/psf/requests/issues/5535
657,810,045
MDU6SXNzdWU2NTc4MTAwNDU=
5,535
https request via http proxy lead to hangs
{ "avatar_url": "https://avatars.githubusercontent.com/u/11945009?v=4", "events_url": "https://api.github.com/users/xiazhibin/events{/privacy}", "followers_url": "https://api.github.com/users/xiazhibin/followers", "following_url": "https://api.github.com/users/xiazhibin/following{/other_user}", "gists_url": "https://api.github.com/users/xiazhibin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xiazhibin", "id": 11945009, "login": "xiazhibin", "node_id": "MDQ6VXNlcjExOTQ1MDA5", "organizations_url": "https://api.github.com/users/xiazhibin/orgs", "received_events_url": "https://api.github.com/users/xiazhibin/received_events", "repos_url": "https://api.github.com/users/xiazhibin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xiazhibin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xiazhibin/subscriptions", "type": "User", "url": "https://api.github.com/users/xiazhibin", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-07-16T03:16:09Z
2021-08-30T00:06:27Z
2020-07-19T03:07:09Z
NONE
resolved
``` http_proxy = "http://192.168.128.3:58591" proxyDict = { "http": http_proxy, "https": http_proxy, } resp = requests.get("https://example.com/", proxies=proxyDict, timeout=3) print(resp.text) ``` When I use this proxy to request, it hangs at ssl handshake.So I change to sock proxy, it works. And then I use node to request with this http proxy, it works too. Of course, I use this proxy url with Chrome, it works. So my question is that `requests` only send https request via https proxy?
{ "avatar_url": "https://avatars.githubusercontent.com/u/11945009?v=4", "events_url": "https://api.github.com/users/xiazhibin/events{/privacy}", "followers_url": "https://api.github.com/users/xiazhibin/followers", "following_url": "https://api.github.com/users/xiazhibin/following{/other_user}", "gists_url": "https://api.github.com/users/xiazhibin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xiazhibin", "id": 11945009, "login": "xiazhibin", "node_id": "MDQ6VXNlcjExOTQ1MDA5", "organizations_url": "https://api.github.com/users/xiazhibin/orgs", "received_events_url": "https://api.github.com/users/xiazhibin/received_events", "repos_url": "https://api.github.com/users/xiazhibin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xiazhibin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xiazhibin/subscriptions", "type": "User", "url": "https://api.github.com/users/xiazhibin", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5535/reactions" }
https://api.github.com/repos/psf/requests/issues/5535/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/5534
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5534/labels{/name}
https://api.github.com/repos/psf/requests/issues/5534/comments
https://api.github.com/repos/psf/requests/issues/5534/events
https://github.com/psf/requests/issues/5534
657,727,541
MDU6SXNzdWU2NTc3Mjc1NDE=
5,534
-
{ "avatar_url": "https://avatars.githubusercontent.com/u/527862?v=4", "events_url": "https://api.github.com/users/zyxue/events{/privacy}", "followers_url": "https://api.github.com/users/zyxue/followers", "following_url": "https://api.github.com/users/zyxue/following{/other_user}", "gists_url": "https://api.github.com/users/zyxue/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zyxue", "id": 527862, "login": "zyxue", "node_id": "MDQ6VXNlcjUyNzg2Mg==", "organizations_url": "https://api.github.com/users/zyxue/orgs", "received_events_url": "https://api.github.com/users/zyxue/received_events", "repos_url": "https://api.github.com/users/zyxue/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zyxue/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zyxue/subscriptions", "type": "User", "url": "https://api.github.com/users/zyxue", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-15T23:32:58Z
2021-08-30T00:06:27Z
2020-07-15T23:34:08Z
NONE
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/527862?v=4", "events_url": "https://api.github.com/users/zyxue/events{/privacy}", "followers_url": "https://api.github.com/users/zyxue/followers", "following_url": "https://api.github.com/users/zyxue/following{/other_user}", "gists_url": "https://api.github.com/users/zyxue/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zyxue", "id": 527862, "login": "zyxue", "node_id": "MDQ6VXNlcjUyNzg2Mg==", "organizations_url": "https://api.github.com/users/zyxue/orgs", "received_events_url": "https://api.github.com/users/zyxue/received_events", "repos_url": "https://api.github.com/users/zyxue/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zyxue/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zyxue/subscriptions", "type": "User", "url": "https://api.github.com/users/zyxue", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5534/reactions" }
https://api.github.com/repos/psf/requests/issues/5534/timeline
null
completed
null
null
false
[ "sorry, asked in wrong repo." ]
https://api.github.com/repos/psf/requests/issues/5533
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5533/labels{/name}
https://api.github.com/repos/psf/requests/issues/5533/comments
https://api.github.com/repos/psf/requests/issues/5533/events
https://github.com/psf/requests/pull/5533
657,284,108
MDExOlB1bGxSZXF1ZXN0NDQ5NDI2MzY2
5,533
Update Python Version in Shell Example in README
{ "avatar_url": "https://avatars.githubusercontent.com/u/52805709?v=4", "events_url": "https://api.github.com/users/wyz23x2/events{/privacy}", "followers_url": "https://api.github.com/users/wyz23x2/followers", "following_url": "https://api.github.com/users/wyz23x2/following{/other_user}", "gists_url": "https://api.github.com/users/wyz23x2/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wyz23x2", "id": 52805709, "login": "wyz23x2", "node_id": "MDQ6VXNlcjUyODA1NzA5", "organizations_url": "https://api.github.com/users/wyz23x2/orgs", "received_events_url": "https://api.github.com/users/wyz23x2/received_events", "repos_url": "https://api.github.com/users/wyz23x2/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wyz23x2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wyz23x2/subscriptions", "type": "User", "url": "https://api.github.com/users/wyz23x2", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-15T11:41:15Z
2021-08-28T00:06:26Z
2020-07-21T06:09:10Z
NONE
resolved
Python 3.8.4 is now released, but the version in README is still 3.7.4. Let's update it.
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5533/reactions" }
https://api.github.com/repos/psf/requests/issues/5533/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5533.diff", "html_url": "https://github.com/psf/requests/pull/5533", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5533.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5533" }
true
[ "Why? This isn't necessary to illustrate the code in the console", "Hi @wyz23x2, thanks for contributing to Requests! Unfortunately, we don't usually accept cosmetic changes to documentation and I'm not sure this provides new info for the reader. I think we'll pass on this for now." ]
https://api.github.com/repos/psf/requests/issues/5532
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5532/labels{/name}
https://api.github.com/repos/psf/requests/issues/5532/comments
https://api.github.com/repos/psf/requests/issues/5532/events
https://github.com/psf/requests/issues/5532
655,948,675
MDU6SXNzdWU2NTU5NDg2NzU=
5,532
Erroneous response headers parsing in some cases
{ "avatar_url": "https://avatars.githubusercontent.com/u/601975?v=4", "events_url": "https://api.github.com/users/fbparis/events{/privacy}", "followers_url": "https://api.github.com/users/fbparis/followers", "following_url": "https://api.github.com/users/fbparis/following{/other_user}", "gists_url": "https://api.github.com/users/fbparis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fbparis", "id": 601975, "login": "fbparis", "node_id": "MDQ6VXNlcjYwMTk3NQ==", "organizations_url": "https://api.github.com/users/fbparis/orgs", "received_events_url": "https://api.github.com/users/fbparis/received_events", "repos_url": "https://api.github.com/users/fbparis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fbparis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fbparis/subscriptions", "type": "User", "url": "https://api.github.com/users/fbparis", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-13T15:37:11Z
2021-08-31T00:06:40Z
2020-07-14T07:35:27Z
NONE
resolved
## Summary Information can be lost during the parsing of some complex headers response, like for example these ones [https://developers.google.com/search/reference/robots_meta_tag#xrobotstag](https://developers.google.com/search/reference/robots_meta_tag#xrobotstag) Simulating something like this with httpbin gives us: [http://httpbin.org/response-headers?X-Robots-Tag=googlebot:%20nofollow&X-Robots-Tag=otherbot:%20noindex,%20nofollow&X-Robots-Tag=noarchive&X-Robots-Tag=unavailable_after:%2025%20Jun%202010%2015:00:00%20PST](http://httpbin.org/response-headers?X-Robots-Tag=googlebot:%20nofollow&X-Robots-Tag=otherbot:%20noindex,%20nofollow&X-Robots-Tag=noarchive&X-Robots-Tag=unavailable_after:%2025%20Jun%202010%2015:00:00%20PST) ## Expected Result Something like the httpbin output would be nice: `{ "Content-Length": "227", "Content-Type": "application/json", "X-Robots-Tag": [ "googlebot: nofollow", "otherbot: noindex, nofollow", "noarchive", "unavailable_after: 25 Jun 2010 15:00:00 PST" ] }` ## Actual Result Instead response headers returned by _requests_ are like this: `{'Date': 'Mon, 13 Jul 2020 15:14:21 GMT', 'Content-Type': 'application/json', 'Content-Length': '227', 'Connection': 'keep-alive', 'Server': 'gunicorn/19.9.0', 'X-Robots-Tag': 'googlebot: nofollow, otherbot: noindex, nofollow, noarchive, unavailable_after: 25 Jun 2010 15:00:00 PST', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true'}` Note that using `raw._original_response.getheaders()` is returning more useful results: `[('Date', 'Mon, 13 Jul 2020 15:14:21 GMT'), ('Content-Type', 'application/json'), ('Content-Length', '227'), ('Connection', 'keep-alive'), ('Server', 'gunicorn/19.9.0'), ('X-Robots-Tag', 'googlebot: nofollow'), ('X-Robots-Tag', 'otherbot: noindex, nofollow'), ('X-Robots-Tag', 'noarchive'), ('X-Robots-Tag', 'unavailable_after: 25 Jun 2010 15:00:00 PST'), ('Access-Control-Allow-Origin', '*'), ('Access-Control-Allow-Credentials', 'true')]` ## Reproduction Steps ```python import requests r=requests.get('http://httpbin.org/response-headers?X-Robots-Tag=googlebot:%20nofollow&X-Robots-Tag=otherbot:%20noindex,%20nofollow&X-Robots-Tag=noarchive&X-Robots-Tag=unavailable_after:%2025%20Jun%202010%2015:00:00%20PST') print(r.headers) print(r.raw._original_response.getheaders()) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.23.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/601975?v=4", "events_url": "https://api.github.com/users/fbparis/events{/privacy}", "followers_url": "https://api.github.com/users/fbparis/followers", "following_url": "https://api.github.com/users/fbparis/following{/other_user}", "gists_url": "https://api.github.com/users/fbparis/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fbparis", "id": 601975, "login": "fbparis", "node_id": "MDQ6VXNlcjYwMTk3NQ==", "organizations_url": "https://api.github.com/users/fbparis/orgs", "received_events_url": "https://api.github.com/users/fbparis/received_events", "repos_url": "https://api.github.com/users/fbparis/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fbparis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fbparis/subscriptions", "type": "User", "url": "https://api.github.com/users/fbparis", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5532/reactions" }
https://api.github.com/repos/psf/requests/issues/5532/timeline
null
completed
null
null
false
[ "This is totally valid HTTP/1.1 header behaviour and has been discussed in numerous closed issues.", "OK so, if it's _valid_... I'll keep using `requests.Response.raw._original_response.getheaders()` instead of `requests.Response.headers` I can't trust (but I guess the X-Robots-Tag specification is legit too).\r\...
https://api.github.com/repos/psf/requests/issues/5531
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5531/labels{/name}
https://api.github.com/repos/psf/requests/issues/5531/comments
https://api.github.com/repos/psf/requests/issues/5531/events
https://github.com/psf/requests/issues/5531
655,187,323
MDU6SXNzdWU2NTUxODczMjM=
5,531
I get 403 from a get request
{ "avatar_url": "https://avatars.githubusercontent.com/u/32908055?v=4", "events_url": "https://api.github.com/users/UWTD/events{/privacy}", "followers_url": "https://api.github.com/users/UWTD/followers", "following_url": "https://api.github.com/users/UWTD/following{/other_user}", "gists_url": "https://api.github.com/users/UWTD/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/UWTD", "id": 32908055, "login": "UWTD", "node_id": "MDQ6VXNlcjMyOTA4MDU1", "organizations_url": "https://api.github.com/users/UWTD/orgs", "received_events_url": "https://api.github.com/users/UWTD/received_events", "repos_url": "https://api.github.com/users/UWTD/repos", "site_admin": false, "starred_url": "https://api.github.com/users/UWTD/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/UWTD/subscriptions", "type": "User", "url": "https://api.github.com/users/UWTD", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-07-11T11:00:07Z
2021-08-31T00:06:39Z
2020-07-15T05:04:24Z
NONE
resolved
I don't know if it's ok to post this url? [url](https://gcpvuclip-a.akamaihd.net/exp=1594464888~acl=%2f11125cc917d31e89f39b04e48017551f%2f*~data=cid%3d1165763700%2ciid%3dc85a94cc-1674-4eda-b955-fb54269101a6%2csid%3dakamai-890d3df2-8143-41ae-a5ca-2d6e8a8d1be4%2csiteId%3dviu%2cslotId%3dwebapp2%2cclientId%3dnone%2cn%3d1594452428397%2ch%3d63150D199AB469D014D2F6C869D5CA1D%2cip%3d103.78.114.109%2ccdnid%3dakamai%2ccdnprefix%3dgcpvuclip-a.akamaihd.net%2f~hmac=88bef1822223760250961d1ff745a9e4995af5d804ca88155146267ca3289e65/11125cc917d31e89f39b04e48017551f/vp63207_V20200707045412/hlsc_e2931_7.m3u8) When I make a get request on the above url I get 403 from requests but if I use curl, urllib or anything else I get 200 ## Expected Result A 200 response ## Actual Result 403 response ## Reproduction Steps ```python import requests r = requests.get(url) print(r) ``` ## System Information $ python -m requests.help ``` The problem seems to be on all systems with latest requests version ```
{ "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/5531/reactions" }
https://api.github.com/repos/psf/requests/issues/5531/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> Hi there! Thanks for opening this is...
https://api.github.com/repos/psf/requests/issues/5530
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5530/labels{/name}
https://api.github.com/repos/psf/requests/issues/5530/comments
https://api.github.com/repos/psf/requests/issues/5530/events
https://github.com/psf/requests/issues/5530
655,071,087
MDU6SXNzdWU2NTUwNzEwODc=
5,530
Test test_https_warnings is not functional with pytest-httpbin 1.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/2401856?v=4", "events_url": "https://api.github.com/users/hroncok/events{/privacy}", "followers_url": "https://api.github.com/users/hroncok/followers", "following_url": "https://api.github.com/users/hroncok/following{/other_user}", "gists_url": "https://api.github.com/users/hroncok/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hroncok", "id": 2401856, "login": "hroncok", "node_id": "MDQ6VXNlcjI0MDE4NTY=", "organizations_url": "https://api.github.com/users/hroncok/orgs", "received_events_url": "https://api.github.com/users/hroncok/received_events", "repos_url": "https://api.github.com/users/hroncok/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hroncok/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hroncok/subscriptions", "type": "User", "url": "https://api.github.com/users/hroncok", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-07-10T22:38:13Z
2021-10-10T15:00:17Z
2021-07-12T14:44:43Z
CONTRIBUTOR
resolved
test_https_warnings is expecting the certificates from pytest-httpbin to produce SubjectAltNameWarning. pytest-httpbin 1.0 was released, but it has newer certificates that do not produce the warning: https://github.com/kevin1024/pytest-httpbin/pull/53 And hence the version of pytest-httpbin is pinned here: https://github.com/psf/requests/blob/1b417634721ec377abb7f17bc1f215e07202c2f7/Pipfile#L16 However with old certificates from pytest-httpbin \< 1.0, we are [no longer unable to test requests on recent Fedora](https://bugzilla.redhat.com/show_bug.cgi?id=1676023), because we get: pytest-httpbin server hit an exception serving request: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:4020) Hence we need to update pytest-httpbin in Fedora to 1.0+ in order to test requests, but that way, test_https_warnings fails. ## Expected Result test_https_warnings should pass with recent pytest-httpbin, possibly by bundling its own certificates. ## Actual Result test_https_warnings fails: ``` =================================== FAILURES =================================== _______________________ TestRequests.test_https_warnings _______________________ self = <tests.test_requests.TestRequests object at 0x7fc802ebaa60> httpbin_secure = <function prepare_url.<locals>.inner at 0x7fc8031980d0> httpbin_ca_bundle = None def test_https_warnings(self, httpbin_secure, httpbin_ca_bundle): """warnings are emitted with requests.get""" if HAS_MODERN_SSL or HAS_PYOPENSSL: warnings_expected = ('SubjectAltNameWarning', ) else: warnings_expected = ('SNIMissingWarning', 'InsecurePlatformWarning', 'SubjectAltNameWarning', ) with pytest.warns(None) as warning_records: warnings.simplefilter('always') requests.get(httpbin_secure('status', '200'), verify=httpbin_ca_bundle) warning_records = [item for item in warning_records if item.category.__name__ != 'ResourceWarning'] warnings_category = tuple( item.category.__name__ for item in warning_records) > assert warnings_category == warnings_expected E AssertionError: assert () == ('SubjectAltNameWarning',) E Right contains one more item: 'SubjectAltNameWarning' E Full diff: E - () E + ('SubjectAltNameWarning',) tests/test_requests.py:855: AssertionError ----------------------------- Captured stderr call ----------------------------- 127.0.0.1 - - [11/Jul/2020 00:24:33] "GET /status/200 HTTP/1.1" 200 0 ======== 1 failed, 526 passed, 12 skipped, 1 xfailed in 175.72 seconds ========= ``` ## Reproduction Steps Unpin the pytest-httpbin version, run tox. ``` $ tox -e py38 $ .tox/py38/bin/python -m pip install -U pytest-httpbin pygments $ tox -e py38 ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.8.3" }, "platform": { "release": "5.7.6-201.fc32.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "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/5530/reactions" }
https://api.github.com/repos/psf/requests/issues/5530/timeline
null
completed
null
null
false
[ "Thanks for reporting this issue, we've known of this problem for some time but would take some work to fix, would you be willing to provide a patch?", "Not sure how to approach it. Certainly, the warning can be made not expected with the new pytest-httpbin, that I can do. However actually testing the warning hap...
https://api.github.com/repos/psf/requests/issues/5529
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5529/labels{/name}
https://api.github.com/repos/psf/requests/issues/5529/comments
https://api.github.com/repos/psf/requests/issues/5529/events
https://github.com/psf/requests/issues/5529
654,762,873
MDU6SXNzdWU2NTQ3NjI4NzM=
5,529
Avoid reading unlimited body of the redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/3994211?v=4", "events_url": "https://api.github.com/users/Sindbag/events{/privacy}", "followers_url": "https://api.github.com/users/Sindbag/followers", "following_url": "https://api.github.com/users/Sindbag/following{/other_user}", "gists_url": "https://api.github.com/users/Sindbag/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Sindbag", "id": 3994211, "login": "Sindbag", "node_id": "MDQ6VXNlcjM5OTQyMTE=", "organizations_url": "https://api.github.com/users/Sindbag/orgs", "received_events_url": "https://api.github.com/users/Sindbag/received_events", "repos_url": "https://api.github.com/users/Sindbag/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Sindbag/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Sindbag/subscriptions", "type": "User", "url": "https://api.github.com/users/Sindbag", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-10T12:56:13Z
2021-08-30T00:06:26Z
2020-07-21T05:38:20Z
NONE
resolved
https://github.com/psf/requests/blob/1b417634721ec377abb7f17bc1f215e07202c2f7/requests/sessions.py#L160:L164 Here socket is read till the end, but in case of unlimited or extremely huge body the process is stuck. Solution I can assume - drop connection in case of extremely huge body (unlimited by default), as redirect meaning is kept inside headers, unlimited body seems to be a vulnerability.
{ "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/5529/reactions" }
https://api.github.com/repos/psf/requests/issues/5529/timeline
null
completed
null
null
false
[ "Not reading the entire body is also a vulnerability and was a deliberate choice. There's no way to close the socket from Python without draining it or otherwise causing a significant memory leak. So on one hand, you read a lot of data off the socket, on the other your program OOMs", "Hi @Sindbag, sigmavirus24 is...
https://api.github.com/repos/psf/requests/issues/5528
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5528/labels{/name}
https://api.github.com/repos/psf/requests/issues/5528/comments
https://api.github.com/repos/psf/requests/issues/5528/events
https://github.com/psf/requests/issues/5528
654,551,095
MDU6SXNzdWU2NTQ1NTEwOTU=
5,528
Wrong page in Pipy
{ "avatar_url": "https://avatars.githubusercontent.com/u/8952687?v=4", "events_url": "https://api.github.com/users/carolcoral/events{/privacy}", "followers_url": "https://api.github.com/users/carolcoral/followers", "following_url": "https://api.github.com/users/carolcoral/following{/other_user}", "gists_url": "https://api.github.com/users/carolcoral/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/carolcoral", "id": 8952687, "login": "carolcoral", "node_id": "MDQ6VXNlcjg5NTI2ODc=", "organizations_url": "https://api.github.com/users/carolcoral/orgs", "received_events_url": "https://api.github.com/users/carolcoral/received_events", "repos_url": "https://api.github.com/users/carolcoral/repos", "site_admin": false, "starred_url": "https://api.github.com/users/carolcoral/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/carolcoral/subscriptions", "type": "User", "url": "https://api.github.com/users/carolcoral", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-10T06:44:05Z
2021-08-31T00:06:41Z
2020-07-10T14:31:18Z
NONE
resolved
# desc URL:https://pypi.org/project/requests/ There have error in pipy page like this. The CSS doesn`t get work. ![image](https://user-images.githubusercontent.com/8952687/87124674-c9e32180-c2bb-11ea-8316-8c0e9d92987f.png)
{ "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/5528/reactions" }
https://api.github.com/repos/psf/requests/issues/5528/timeline
null
completed
null
null
false
[ "Duplicate of #5501 " ]
https://api.github.com/repos/psf/requests/issues/5527
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5527/labels{/name}
https://api.github.com/repos/psf/requests/issues/5527/comments
https://api.github.com/repos/psf/requests/issues/5527/events
https://github.com/psf/requests/issues/5527
653,288,393
MDU6SXNzdWU2NTMyODgzOTM=
5,527
is there a way to use a requests session with tasks e.g. celery?
{ "avatar_url": "https://avatars.githubusercontent.com/u/26790901?v=4", "events_url": "https://api.github.com/users/christopherpross/events{/privacy}", "followers_url": "https://api.github.com/users/christopherpross/followers", "following_url": "https://api.github.com/users/christopherpross/following{/other_user}", "gists_url": "https://api.github.com/users/christopherpross/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/christopherpross", "id": 26790901, "login": "christopherpross", "node_id": "MDQ6VXNlcjI2NzkwOTAx", "organizations_url": "https://api.github.com/users/christopherpross/orgs", "received_events_url": "https://api.github.com/users/christopherpross/received_events", "repos_url": "https://api.github.com/users/christopherpross/repos", "site_admin": false, "starred_url": "https://api.github.com/users/christopherpross/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/christopherpross/subscriptions", "type": "User", "url": "https://api.github.com/users/christopherpross", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-07-08T13:15:15Z
2021-11-26T04:00:33Z
2021-08-28T03:27:35Z
NONE
resolved
Hey, first, I have already created a question on stack-overflow, but didn't recieve an answer. I want to write this down here, because I know about the discusion about threat safity of requests sessions and so on. You can find the Question [here](https://stackoverflow.com/questions/62648309/is-there-a-way-to-use-a-requests-session-with-tasks-e-g-celery) I try only to use some task-manager to automate some requests on a session. For more details see please the question in stack-overflow. Sorry, for reposting here, but I need a solution or work-arround. :-)
{ "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/5527/reactions" }
https://api.github.com/repos/psf/requests/issues/5527/timeline
null
completed
null
null
false
[ "I have read your problem but can you simplify what you need about this ?", "It looks like the original stack overflow question was removed for moderation violations. If you search Stack Overflow for \"Requests Celery\" you'll find many answers to this question. The short answer is yes there are options to use th...
https://api.github.com/repos/psf/requests/issues/5526
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5526/labels{/name}
https://api.github.com/repos/psf/requests/issues/5526/comments
https://api.github.com/repos/psf/requests/issues/5526/events
https://github.com/psf/requests/issues/5526
650,303,338
MDU6SXNzdWU2NTAzMDMzMzg=
5,526
Requests and chrome browser requests behave differently when params contains '|'
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-03T02:40:57Z
2021-08-30T00:06:27Z
2020-07-15T05:06:38Z
NONE
resolved
when request URL: `http://192.168.12.202/cgi-bin/rtpd.cgi?echo&AdminPasswd_ss|tdb&get&HTTPAccount`,It urlencode the '|' char to '%7C' when use requests.But when I use chrome request the url,It seems the chrome doesn't encoded the '|' char, I have try the flowing way to disable url encode,but It seem not work.Does there any way disable requests encode url? ```python def raw_url_request(method,url, **kwargs): req = requests.Request(method, url, **kwargs) prepped = req.prepare() prepped.url = url with requests.Session() as s: return s.send(prepped, timeout=timeout, verify=verify) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.6.1" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.8" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010102f", "version": "19.0.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1000211f" }, "urllib3": { "version": "1.25.9" }, "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/5526/reactions" }
https://api.github.com/repos/psf/requests/issues/5526/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/5525
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5525/labels{/name}
https://api.github.com/repos/psf/requests/issues/5525/comments
https://api.github.com/repos/psf/requests/issues/5525/events
https://github.com/psf/requests/issues/5525
650,070,920
MDU6SXNzdWU2NTAwNzA5MjA=
5,525
Setting encoding of UTF-8 for some websites with non-UTF-8 encoding change response.text to be gibberish
{ "avatar_url": "https://avatars.githubusercontent.com/u/3903412?v=4", "events_url": "https://api.github.com/users/advance512/events{/privacy}", "followers_url": "https://api.github.com/users/advance512/followers", "following_url": "https://api.github.com/users/advance512/following{/other_user}", "gists_url": "https://api.github.com/users/advance512/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/advance512", "id": 3903412, "login": "advance512", "node_id": "MDQ6VXNlcjM5MDM0MTI=", "organizations_url": "https://api.github.com/users/advance512/orgs", "received_events_url": "https://api.github.com/users/advance512/received_events", "repos_url": "https://api.github.com/users/advance512/repos", "site_admin": false, "starred_url": "https://api.github.com/users/advance512/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/advance512/subscriptions", "type": "User", "url": "https://api.github.com/users/advance512", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2020-07-02T16:43:26Z
2021-08-30T00:06:26Z
2020-07-21T05:44:16Z
NONE
resolved
When making a request to http://www.qq.com (or other pages like it), the encoding is returned as GB-2312. Looking at the response.text with the debugger, everything looks fine - correct characters. ![image](https://user-images.githubusercontent.com/3903412/86387117-5d549b00-bc9b-11ea-8151-7c54f6239818.png) However, setting the response.encoding to UTF-8 causes the text to become garbled, gibberish: ![image](https://user-images.githubusercontent.com/3903412/86387167-6e9da780-bc9b-11ea-8088-babb5c9edbc9.png) I am thinking it might be that the document is actually utf-8 encoded, but the content-type and document all say GB-2312, so the decoder gets confused. ## Expected Result Setting response.encoding to 'utf-8' should not cause text to become gibberish. ## Actual Result Text becomes gibberish. ## Reproduction Steps ```python import requests response = \ requests.get( 'http://www.qq.com', headers={ 'Accept-Language': 'en-US, en;q=0.5', 'Accept-Charset': 'utf-8', }, timeout=10, verify=False, ) # If we have an error, raise an exception response.raise_for_status() # Looking at response.text, it looks fine right now print( response.text[0:200] ) # It is GB2312, convert to UTF-8 if response.encoding != 'utf-8': response.encoding = 'utf-8' # Looking at response.text, it is garbled now print( response.text[0:200] ) ``` Output looks like: ![image](https://user-images.githubusercontent.com/3903412/86387695-377bc600-bc9c-11ea-9ccc-f1cdccda407c.png) and ![image](https://user-images.githubusercontent.com/3903412/86387713-3ea2d400-bc9c-11ea-9821-b4aef481b04f.png) ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.2" }, "platform": { "release": "5.4.0-39-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.22.0" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.25.8" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5525/reactions" }
https://api.github.com/repos/psf/requests/issues/5525/timeline
null
completed
null
null
false
[ "According to https://requests.readthedocs.io/en/master/user/advanced/#encodings, the encodings are extracted from the headers, and if it cannot be found, it uses `chardet` as a fallback. When the encoding is in the body, it seems it is just ignored.\r\nI am trying out this one: https://w3lib.readthedocs.io/en/late...
https://api.github.com/repos/psf/requests/issues/5524
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5524/labels{/name}
https://api.github.com/repos/psf/requests/issues/5524/comments
https://api.github.com/repos/psf/requests/issues/5524/events
https://github.com/psf/requests/issues/5524
649,872,101
MDU6SXNzdWU2NDk4NzIxMDE=
5,524
Error when importing requests.
{ "avatar_url": "https://avatars.githubusercontent.com/u/39850778?v=4", "events_url": "https://api.github.com/users/arshadshk/events{/privacy}", "followers_url": "https://api.github.com/users/arshadshk/followers", "following_url": "https://api.github.com/users/arshadshk/following{/other_user}", "gists_url": "https://api.github.com/users/arshadshk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/arshadshk", "id": 39850778, "login": "arshadshk", "node_id": "MDQ6VXNlcjM5ODUwNzc4", "organizations_url": "https://api.github.com/users/arshadshk/orgs", "received_events_url": "https://api.github.com/users/arshadshk/received_events", "repos_url": "https://api.github.com/users/arshadshk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/arshadshk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arshadshk/subscriptions", "type": "User", "url": "https://api.github.com/users/arshadshk", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-07-02T11:55:01Z
2021-08-31T00:06:41Z
2020-07-02T18:25:26Z
NONE
resolved
Following error when I import requests. ``` check_compatibility(urllib3.__version__, chardet.__version__) AttributeError: module 'chardet' has no attribute '__version__' ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/39850778?v=4", "events_url": "https://api.github.com/users/arshadshk/events{/privacy}", "followers_url": "https://api.github.com/users/arshadshk/followers", "following_url": "https://api.github.com/users/arshadshk/following{/other_user}", "gists_url": "https://api.github.com/users/arshadshk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/arshadshk", "id": 39850778, "login": "arshadshk", "node_id": "MDQ6VXNlcjM5ODUwNzc4", "organizations_url": "https://api.github.com/users/arshadshk/orgs", "received_events_url": "https://api.github.com/users/arshadshk/received_events", "repos_url": "https://api.github.com/users/arshadshk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/arshadshk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arshadshk/subscriptions", "type": "User", "url": "https://api.github.com/users/arshadshk", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5524/reactions" }
https://api.github.com/repos/psf/requests/issues/5524/timeline
null
completed
null
null
false
[ "Installed chardet==2.3.0 and the issue resolved.\r\n" ]
https://api.github.com/repos/psf/requests/issues/5523
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5523/labels{/name}
https://api.github.com/repos/psf/requests/issues/5523/comments
https://api.github.com/repos/psf/requests/issues/5523/events
https://github.com/psf/requests/issues/5523
647,728,693
MDU6SXNzdWU2NDc3Mjg2OTM=
5,523
response.text is too slow
{ "avatar_url": "https://avatars.githubusercontent.com/u/38455509?v=4", "events_url": "https://api.github.com/users/GoddessLuBoYan/events{/privacy}", "followers_url": "https://api.github.com/users/GoddessLuBoYan/followers", "following_url": "https://api.github.com/users/GoddessLuBoYan/following{/other_user}", "gists_url": "https://api.github.com/users/GoddessLuBoYan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GoddessLuBoYan", "id": 38455509, "login": "GoddessLuBoYan", "node_id": "MDQ6VXNlcjM4NDU1NTA5", "organizations_url": "https://api.github.com/users/GoddessLuBoYan/orgs", "received_events_url": "https://api.github.com/users/GoddessLuBoYan/received_events", "repos_url": "https://api.github.com/users/GoddessLuBoYan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GoddessLuBoYan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GoddessLuBoYan/subscriptions", "type": "User", "url": "https://api.github.com/users/GoddessLuBoYan", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-06-29T23:12:46Z
2021-08-27T00:08:36Z
2021-02-05T01:42:27Z
NONE
resolved
if response.content is too long(3MB) and there's no encoding, response.text will auto calculate the encoding, it takes me 15 seconds(33 for the debug mode) so, what if we calculate the encoding only for content[0:1024]? (if failed, we can add content[1024:2048] into the encoding-calculater and get the newest result)
{ "avatar_url": "https://avatars.githubusercontent.com/u/38455509?v=4", "events_url": "https://api.github.com/users/GoddessLuBoYan/events{/privacy}", "followers_url": "https://api.github.com/users/GoddessLuBoYan/followers", "following_url": "https://api.github.com/users/GoddessLuBoYan/following{/other_user}", "gists_url": "https://api.github.com/users/GoddessLuBoYan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GoddessLuBoYan", "id": 38455509, "login": "GoddessLuBoYan", "node_id": "MDQ6VXNlcjM4NDU1NTA5", "organizations_url": "https://api.github.com/users/GoddessLuBoYan/orgs", "received_events_url": "https://api.github.com/users/GoddessLuBoYan/received_events", "repos_url": "https://api.github.com/users/GoddessLuBoYan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GoddessLuBoYan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GoddessLuBoYan/subscriptions", "type": "User", "url": "https://api.github.com/users/GoddessLuBoYan", "user_view_type": "public" }
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/5523/reactions" }
https://api.github.com/repos/psf/requests/issues/5523/timeline
null
completed
null
null
false
[ "`chardet` (the package which guesses the encoding) works better with the more data you give it. If you already need to _guess_ the encoding, you need to look at as much of the data as possible to guess more accurately. Guessing off the first 1kiB wouldn't be useful for a number of cases (e.g. if the response has a...
https://api.github.com/repos/psf/requests/issues/5522
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5522/labels{/name}
https://api.github.com/repos/psf/requests/issues/5522/comments
https://api.github.com/repos/psf/requests/issues/5522/events
https://github.com/psf/requests/issues/5522
647,680,945
MDU6SXNzdWU2NDc2ODA5NDU=
5,522
request.get does not return
{ "avatar_url": "https://avatars.githubusercontent.com/u/62627215?v=4", "events_url": "https://api.github.com/users/Leonardo8133/events{/privacy}", "followers_url": "https://api.github.com/users/Leonardo8133/followers", "following_url": "https://api.github.com/users/Leonardo8133/following{/other_user}", "gists_url": "https://api.github.com/users/Leonardo8133/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Leonardo8133", "id": 62627215, "login": "Leonardo8133", "node_id": "MDQ6VXNlcjYyNjI3MjE1", "organizations_url": "https://api.github.com/users/Leonardo8133/orgs", "received_events_url": "https://api.github.com/users/Leonardo8133/received_events", "repos_url": "https://api.github.com/users/Leonardo8133/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Leonardo8133/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Leonardo8133/subscriptions", "type": "User", "url": "https://api.github.com/users/Leonardo8133", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-29T21:24:28Z
2021-08-30T00:06:21Z
2020-07-02T00:11:12Z
NONE
resolved
When using `request.get("https://google.com/"),` i dont receive any response. When i add a request.get("https://google.com/", timeout=5) i receive the response after 5 seconds! >> 0:00:05.223328. if i switch the timeout to 10, it takes 10 second and etc... if I request a simple html file, this problem doesnt occur. request.get("http://www.brainjar.com/java/host/test.html", timeout=5") >> 0:00:00.212320. ## Reproduction Steps ```python import requests r = requests.get('http://www.google.com', timeout=5) [print(key, value) for key, value in r.__dict__.items() if key!='_content'] b = requests.get("http://www.brainjar.com/java/host/test.html", timeout=5) print("\n\n\nSecond Request", b.elapsed) ``` What i Get: ``` _content_consumed True _next None status_code 200 headers {'Date': 'Mon, 29 Jun 2020 21:20:13 GMT', 'Expires': '-1', 'Cache-Control': 'private, max-age=0', 'Content-Type': 'text/html; charset=ISO-8859-1', 'P3P': 'CP="This is not a P3P policy! See g.co/p3phelp for more info."', 'Content-Encoding': 'gzip', 'Server': 'gws', 'Content-Length': '5373', 'X-XSS-Protection': '0', 'X-Frame-Options': 'SAMEORIGIN', 'Set-Cookie': '1P_JAR=2020-06-29-21; expires=Wed, 29-Jul-2020 21:20:13 GMT; path=/; domain=.google.com; Secure, NID=204=jAqS174mLLgKDn7KMjJbpb0mFz1Ohwt-PCAiztVbh5Bv95DowuZXyCvBtOYsLbTwxUwE-GIfrInLI9GRXNfbTi1Yxp2-FpTgEs45nCq0UQpUzRHT_jhfTbgpfwn2eDjQIPNloZIXQMuegH1bDPGlX4nJVmD-H61wuvcRVtV_oSE; expires=Tue, 29-Dec-2020 21:20:13 GMT; path=/; domain=.google.com; HttpOnly'} raw <urllib3.response.HTTPResponse object at 0x7fc3c0d190f0> url http://www.google.com/ encoding ISO-8859-1 history [] reason OK cookies <RequestsCookieJar[<Cookie 1P_JAR=2020-06-29-21 for .google.com/>, <Cookie NID=204=jAqS174mLLgKDn7KMjJbpb0mFz1Ohwt-PCAiztVbh5Bv95DowuZXyCvBtOYsLbTwxUwE-GIfrInLI9GRXNfbTi1Yxp2-FpTgEs45nCq0UQpUzRHT_jhfTbgpfwn2eDjQIPNloZIXQMuegH1bDPGlX4nJVmD-H61wuvcRVtV_oSE for .google.com/>]> elapsed 0:00:05.139103 request <PreparedRequest [GET]> connection <requests.adapters.HTTPAdapter object at 0x7fc3bff46208> Second Request 0:00:00.303124 [Finished in 6.3s] ``` ## System Information $ python -m requests.help ``` eonardo@leonardo-Acer:~/Desktop/Cheesecake$ python3 -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.9" }, "platform": { "release": "5.3.0-61-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/62627215?v=4", "events_url": "https://api.github.com/users/Leonardo8133/events{/privacy}", "followers_url": "https://api.github.com/users/Leonardo8133/followers", "following_url": "https://api.github.com/users/Leonardo8133/following{/other_user}", "gists_url": "https://api.github.com/users/Leonardo8133/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Leonardo8133", "id": 62627215, "login": "Leonardo8133", "node_id": "MDQ6VXNlcjYyNjI3MjE1", "organizations_url": "https://api.github.com/users/Leonardo8133/orgs", "received_events_url": "https://api.github.com/users/Leonardo8133/received_events", "repos_url": "https://api.github.com/users/Leonardo8133/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Leonardo8133/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Leonardo8133/subscriptions", "type": "User", "url": "https://api.github.com/users/Leonardo8133", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5522/reactions" }
https://api.github.com/repos/psf/requests/issues/5522/timeline
null
completed
null
null
false
[ "maybe you get the response headers in 5 seconds, but you get the content for more and more time(such as because of bad network)\r\ntimeout is only for connect, not the content", "I discovered the problem. \r\nThis problem just occur when using ipv6, when using ipv4,response comes in the right time.", "I can ob...
https://api.github.com/repos/psf/requests/issues/5521
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5521/labels{/name}
https://api.github.com/repos/psf/requests/issues/5521/comments
https://api.github.com/repos/psf/requests/issues/5521/events
https://github.com/psf/requests/pull/5521
647,601,306
MDExOlB1bGxSZXF1ZXN0NDQxNTk3MzM4
5,521
Support for multipart/form-data boundary
{ "avatar_url": "https://avatars.githubusercontent.com/u/316111?v=4", "events_url": "https://api.github.com/users/virajkanwade/events{/privacy}", "followers_url": "https://api.github.com/users/virajkanwade/followers", "following_url": "https://api.github.com/users/virajkanwade/following{/other_user}", "gists_url": "https://api.github.com/users/virajkanwade/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/virajkanwade", "id": 316111, "login": "virajkanwade", "node_id": "MDQ6VXNlcjMxNjExMQ==", "organizations_url": "https://api.github.com/users/virajkanwade/orgs", "received_events_url": "https://api.github.com/users/virajkanwade/received_events", "repos_url": "https://api.github.com/users/virajkanwade/repos", "site_admin": false, "starred_url": "https://api.github.com/users/virajkanwade/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/virajkanwade/subscriptions", "type": "User", "url": "https://api.github.com/users/virajkanwade", "user_view_type": "public" }
[]
closed
false
null
[]
null
4
2020-06-29T19:10:45Z
2024-05-19T19:08:50Z
2024-05-19T19:08:49Z
NONE
null
If custom boundary is set in content-type header, use it. Relates to issues: #1997 #3744 #621 #4740 #4589 #4554
{ "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/5521/reactions" }
https://api.github.com/repos/psf/requests/issues/5521/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5521.diff", "html_url": "https://github.com/psf/requests/pull/5521", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5521.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5521" }
true
[ "Shouldn't need adding another library for something which could easily be achieved in the base lib", "The library is in feature-freeze and this is the worst way to implement this. So many users copy headers out of their Chrome inspector without knowing what they mean and this has wildly undefined behaviour with ...
https://api.github.com/repos/psf/requests/issues/5520
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5520/labels{/name}
https://api.github.com/repos/psf/requests/issues/5520/comments
https://api.github.com/repos/psf/requests/issues/5520/events
https://github.com/psf/requests/pull/5520
646,451,309
MDExOlB1bGxSZXF1ZXN0NDQwNzM4MDkx
5,520
Removing extra documentation parameter json when undefined
{ "avatar_url": "https://avatars.githubusercontent.com/u/576885?v=4", "events_url": "https://api.github.com/users/tuxskar/events{/privacy}", "followers_url": "https://api.github.com/users/tuxskar/followers", "following_url": "https://api.github.com/users/tuxskar/following{/other_user}", "gists_url": "https://api.github.com/users/tuxskar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tuxskar", "id": 576885, "login": "tuxskar", "node_id": "MDQ6VXNlcjU3Njg4NQ==", "organizations_url": "https://api.github.com/users/tuxskar/orgs", "received_events_url": "https://api.github.com/users/tuxskar/received_events", "repos_url": "https://api.github.com/users/tuxskar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tuxskar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tuxskar/subscriptions", "type": "User", "url": "https://api.github.com/users/tuxskar", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-06-26T18:55:07Z
2021-08-28T00:06:27Z
2020-06-26T19:01:52Z
NONE
resolved
On the functions `put` and `patch` the parameter `json` is not defined as function parameter but it is on the docstring. This commit is to remove the extra lines from the docstring. The json parameter can be passed on the kwargs but never as positional parameter as it would be following the current docstring.
{ "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/5520/reactions" }
https://api.github.com/repos/psf/requests/issues/5520/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5520.diff", "html_url": "https://github.com/psf/requests/pull/5520", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5520.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5520" }
true
[ "Hi @tuxskar,\r\n\r\nThanks for the contribution! This is a reversion of #3666 where these were specifically added. They're intended to make the docstrings consistent and clarify that all of the APIs support the json parameter. I think we'll leave it in place for now.", "I see, thanks for the response. \r\n\r\nIf...
https://api.github.com/repos/psf/requests/issues/5519
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5519/labels{/name}
https://api.github.com/repos/psf/requests/issues/5519/comments
https://api.github.com/repos/psf/requests/issues/5519/events
https://github.com/psf/requests/issues/5519
646,368,294
MDU6SXNzdWU2NDYzNjgyOTQ=
5,519
Remove copyrighted media from documentation
{ "avatar_url": "https://avatars.githubusercontent.com/u/13191497?v=4", "events_url": "https://api.github.com/users/brandondube/events{/privacy}", "followers_url": "https://api.github.com/users/brandondube/followers", "following_url": "https://api.github.com/users/brandondube/following{/other_user}", "gists_url": "https://api.github.com/users/brandondube/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/brandondube", "id": 13191497, "login": "brandondube", "node_id": "MDQ6VXNlcjEzMTkxNDk3", "organizations_url": "https://api.github.com/users/brandondube/orgs", "received_events_url": "https://api.github.com/users/brandondube/received_events", "repos_url": "https://api.github.com/users/brandondube/repos", "site_admin": false, "starred_url": "https://api.github.com/users/brandondube/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brandondube/subscriptions", "type": "User", "url": "https://api.github.com/users/brandondube", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-06-26T16:15:15Z
2021-08-31T00:06:43Z
2020-06-26T18:55:49Z
NONE
resolved
The [advanced usage](https://requests.readthedocs.io/en/master/user/advanced/) page contains a derivative of a [copyrighted album cover](https://wilderun.bandcamp.com/album/veil-of-imagination) the copyright for which is not owned by the PSF. This must be removed.
{ "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/5519/reactions" }
https://api.github.com/repos/psf/requests/issues/5519/timeline
null
completed
null
null
false
[ "Hi @brandondube,\r\n\r\nI believe the work is question is actually Veil of Summer by Adrian Cox from an art gallery in San Franciso. That and the photo in question both predate the album by several years. That said, I don't think it's necessary here and opens the psf to unnecessary liability. I've merged 1b41763 t...
https://api.github.com/repos/psf/requests/issues/5518
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5518/labels{/name}
https://api.github.com/repos/psf/requests/issues/5518/comments
https://api.github.com/repos/psf/requests/issues/5518/events
https://github.com/psf/requests/issues/5518
645,625,276
MDU6SXNzdWU2NDU2MjUyNzY=
5,518
Cannot jump to Japanese documentation
{ "avatar_url": "https://avatars.githubusercontent.com/u/38104335?v=4", "events_url": "https://api.github.com/users/senbeiman/events{/privacy}", "followers_url": "https://api.github.com/users/senbeiman/followers", "following_url": "https://api.github.com/users/senbeiman/following{/other_user}", "gists_url": "https://api.github.com/users/senbeiman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/senbeiman", "id": 38104335, "login": "senbeiman", "node_id": "MDQ6VXNlcjM4MTA0MzM1", "organizations_url": "https://api.github.com/users/senbeiman/orgs", "received_events_url": "https://api.github.com/users/senbeiman/received_events", "repos_url": "https://api.github.com/users/senbeiman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/senbeiman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/senbeiman/subscriptions", "type": "User", "url": "https://api.github.com/users/senbeiman", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-25T14:48:00Z
2021-11-10T07:00:20Z
2021-08-12T06:57:23Z
NONE
resolved
The link to Japanese documentation is redirected to English one. ## Expected Result As you know, there are translation links in the sidebar of [documentation page](https://requests.readthedocs.io/en/latest/), but I can't jump to the Japanese documentation page. I expect to jump to [this page](https://requests-docs-ja.readthedocs.io/en/latest/) ## Actual Result The link to Japanese translation page is redirected to the English page. ## Reproduction Steps Just clicking the link of documentation
{ "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/5518/reactions" }
https://api.github.com/repos/psf/requests/issues/5518/timeline
null
completed
null
null
false
[ "i tried a few other links including https://requests.readthedocs.io/jp/latest/ and https://requests.readthedocs.io/zh_JP/latest/,\r\nseems like it's just not ready yet.", "Hi @senbeiman, thank you for reaching out about this. The doc translations have all been owned by separate maintainers since their inception....
https://api.github.com/repos/psf/requests/issues/5517
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5517/labels{/name}
https://api.github.com/repos/psf/requests/issues/5517/comments
https://api.github.com/repos/psf/requests/issues/5517/events
https://github.com/psf/requests/issues/5517
645,551,672
MDU6SXNzdWU2NDU1NTE2NzI=
5,517
Read timeout errors are converted to connection errors by adapter
{ "avatar_url": "https://avatars.githubusercontent.com/u/30312167?v=4", "events_url": "https://api.github.com/users/janheindejong/events{/privacy}", "followers_url": "https://api.github.com/users/janheindejong/followers", "following_url": "https://api.github.com/users/janheindejong/following{/other_user}", "gists_url": "https://api.github.com/users/janheindejong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janheindejong", "id": 30312167, "login": "janheindejong", "node_id": "MDQ6VXNlcjMwMzEyMTY3", "organizations_url": "https://api.github.com/users/janheindejong/orgs", "received_events_url": "https://api.github.com/users/janheindejong/received_events", "repos_url": "https://api.github.com/users/janheindejong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janheindejong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janheindejong/subscriptions", "type": "User", "url": "https://api.github.com/users/janheindejong", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-25T13:12:24Z
2021-11-05T03:00:27Z
2021-08-07T02:43:03Z
NONE
resolved
When adding an adapter with a retry object to a session, read timeout errors are converted to connection errors. ```python >>> s = requests.Session() >>> s.get("http://whatever.com", timeout=(3.05, 0.001)) Timeout: HTTPConnectionPool(host='whatever.com', port=80): Read timed out. (read timeout=0.001) >>> a = HTTPAdapter(max_retries=Retry(total=3)) >>> s.mount("http://", a) >>> s.get("http://whatever.com", timeout=(3.05, 0.001)) ConnectionError: HTTPConnectionPool(host='whatever.com', port=80): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPConnectionPool(host='whatever.com', port=80): Read timed out. (read timeout=0.001)")) ``` Is this intentional? If so, what's the reasoning behind it? I'd like to catch these errors, but handle connection errors differently (e.g. warn the user to check his internet connection) from timeout errors (e.g. inform the user that the requested resource is possibly overloaded). Wouldn't it make more sense to raise the original error type once the max number of retries is exceeded?
{ "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/5517/reactions" }
https://api.github.com/repos/psf/requests/issues/5517/timeline
null
completed
null
null
false
[ "Whoops... just saw this is a duplicate of #5430. From what I understood the consensus is that it would indeed be better to change this behavior, but for backwards compatibility it will not be done before a new major release of the package (i.e. 3.0).\r\n\r\nIs there already a PR for this? I'd be happy to give it a...
https://api.github.com/repos/psf/requests/issues/5516
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5516/labels{/name}
https://api.github.com/repos/psf/requests/issues/5516/comments
https://api.github.com/repos/psf/requests/issues/5516/events
https://github.com/psf/requests/issues/5516
645,151,403
MDU6SXNzdWU2NDUxNTE0MDM=
5,516
[Question] Is there a way to get file size of downloaded(chunk) file while downloading.
{ "avatar_url": "https://avatars.githubusercontent.com/u/26339251?v=4", "events_url": "https://api.github.com/users/DEEP7696/events{/privacy}", "followers_url": "https://api.github.com/users/DEEP7696/followers", "following_url": "https://api.github.com/users/DEEP7696/following{/other_user}", "gists_url": "https://api.github.com/users/DEEP7696/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/DEEP7696", "id": 26339251, "login": "DEEP7696", "node_id": "MDQ6VXNlcjI2MzM5MjUx", "organizations_url": "https://api.github.com/users/DEEP7696/orgs", "received_events_url": "https://api.github.com/users/DEEP7696/received_events", "repos_url": "https://api.github.com/users/DEEP7696/repos", "site_admin": false, "starred_url": "https://api.github.com/users/DEEP7696/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DEEP7696/subscriptions", "type": "User", "url": "https://api.github.com/users/DEEP7696", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-25T04:56:11Z
2021-08-31T00:06:44Z
2020-06-25T17:37:51Z
NONE
resolved
How can I get size of file while downloading it in Python so that I can show downloaded size and pending size of file to download? if file size is 2GB and 700mb is downloaded then how will we get that in python. Currently using Python requests module to download file. import requests r = requests.get(download_link) with open('setup.exe','wb') as file: file.write(r.content)
{ "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/5516/reactions" }
https://api.github.com/repos/psf/requests/issues/5516/timeline
null
completed
null
null
false
[ "Hi,\r\n\r\nYou can get the total size of the file from the `Content-Length` header. \r\nAs for the the download progress, you need to pass a` stream=True` parameter to the request and then use `iter_content` method on the response to read the output in chunks. As you read the chunks you can keep track of the size...
https://api.github.com/repos/psf/requests/issues/5515
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5515/labels{/name}
https://api.github.com/repos/psf/requests/issues/5515/comments
https://api.github.com/repos/psf/requests/issues/5515/events
https://github.com/psf/requests/issues/5515
644,697,353
MDU6SXNzdWU2NDQ2OTczNTM=
5,515
Case sensitive in the URL host
{ "avatar_url": "https://avatars.githubusercontent.com/u/15377978?v=4", "events_url": "https://api.github.com/users/EmilioFigueras/events{/privacy}", "followers_url": "https://api.github.com/users/EmilioFigueras/followers", "following_url": "https://api.github.com/users/EmilioFigueras/following{/other_user}", "gists_url": "https://api.github.com/users/EmilioFigueras/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/EmilioFigueras", "id": 15377978, "login": "EmilioFigueras", "node_id": "MDQ6VXNlcjE1Mzc3OTc4", "organizations_url": "https://api.github.com/users/EmilioFigueras/orgs", "received_events_url": "https://api.github.com/users/EmilioFigueras/received_events", "repos_url": "https://api.github.com/users/EmilioFigueras/repos", "site_admin": false, "starred_url": "https://api.github.com/users/EmilioFigueras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/EmilioFigueras/subscriptions", "type": "User", "url": "https://api.github.com/users/EmilioFigueras", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-06-24T15:13:42Z
2021-08-31T00:06:44Z
2020-06-24T17:25:30Z
NONE
resolved
Hello, when making a normal requests.get I have verified that a lowercase is made to the host that is sent. Is there a way to disable this action? I am dealing with URLs where the 'host' is case sensitive (Freenet URL) and this fact causes me an error. Thank you.
{ "avatar_url": "https://avatars.githubusercontent.com/u/15377978?v=4", "events_url": "https://api.github.com/users/EmilioFigueras/events{/privacy}", "followers_url": "https://api.github.com/users/EmilioFigueras/followers", "following_url": "https://api.github.com/users/EmilioFigueras/following{/other_user}", "gists_url": "https://api.github.com/users/EmilioFigueras/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/EmilioFigueras", "id": 15377978, "login": "EmilioFigueras", "node_id": "MDQ6VXNlcjE1Mzc3OTc4", "organizations_url": "https://api.github.com/users/EmilioFigueras/orgs", "received_events_url": "https://api.github.com/users/EmilioFigueras/received_events", "repos_url": "https://api.github.com/users/EmilioFigueras/repos", "site_admin": false, "starred_url": "https://api.github.com/users/EmilioFigueras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/EmilioFigueras/subscriptions", "type": "User", "url": "https://api.github.com/users/EmilioFigueras", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5515/reactions" }
https://api.github.com/repos/psf/requests/issues/5515/timeline
null
completed
null
null
false
[ "This answer fixes it, sorry: https://stackoverflow.com/questions/55607769/uppercase-url-in-requests-returns-name-does-not-resolve" ]
https://api.github.com/repos/psf/requests/issues/5514
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5514/labels{/name}
https://api.github.com/repos/psf/requests/issues/5514/comments
https://api.github.com/repos/psf/requests/issues/5514/events
https://github.com/psf/requests/pull/5514
643,752,078
MDExOlB1bGxSZXF1ZXN0NDM4NDk5Mzk3
5,514
add handle for qop="auth-int" in auth.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/23237039?v=4", "events_url": "https://api.github.com/users/maxmokry/events{/privacy}", "followers_url": "https://api.github.com/users/maxmokry/followers", "following_url": "https://api.github.com/users/maxmokry/following{/other_user}", "gists_url": "https://api.github.com/users/maxmokry/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maxmokry", "id": 23237039, "login": "maxmokry", "node_id": "MDQ6VXNlcjIzMjM3MDM5", "organizations_url": "https://api.github.com/users/maxmokry/orgs", "received_events_url": "https://api.github.com/users/maxmokry/received_events", "repos_url": "https://api.github.com/users/maxmokry/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maxmokry/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maxmokry/subscriptions", "type": "User", "url": "https://api.github.com/users/maxmokry", "user_view_type": "public" }
[]
closed
false
null
[]
null
1
2020-06-23T11:13:11Z
2024-05-19T19:03:41Z
2024-05-19T19:03:40Z
NONE
null
add handle for qop="auth-int"
{ "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/5514/reactions" }
https://api.github.com/repos/psf/requests/issues/5514/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5514.diff", "html_url": "https://github.com/psf/requests/pull/5514", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5514.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5514" }
true
[ "I think this was covered originally in https://github.com/psf/requests/issues/2408. We don't intend to support auth-int at this time. Resolving as a non-feature for now." ]
https://api.github.com/repos/psf/requests/issues/5513
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5513/labels{/name}
https://api.github.com/repos/psf/requests/issues/5513/comments
https://api.github.com/repos/psf/requests/issues/5513/events
https://github.com/psf/requests/issues/5513
643,679,180
MDU6SXNzdWU2NDM2NzkxODA=
5,513
[requests.Session] lost headers when meet 301/302/307 redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/1326608?v=4", "events_url": "https://api.github.com/users/ShireCiel/events{/privacy}", "followers_url": "https://api.github.com/users/ShireCiel/followers", "following_url": "https://api.github.com/users/ShireCiel/following{/other_user}", "gists_url": "https://api.github.com/users/ShireCiel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ShireCiel", "id": 1326608, "login": "ShireCiel", "node_id": "MDQ6VXNlcjEzMjY2MDg=", "organizations_url": "https://api.github.com/users/ShireCiel/orgs", "received_events_url": "https://api.github.com/users/ShireCiel/received_events", "repos_url": "https://api.github.com/users/ShireCiel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ShireCiel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShireCiel/subscriptions", "type": "User", "url": "https://api.github.com/users/ShireCiel", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2020-06-23T09:26:05Z
2021-08-30T00:06:25Z
2020-07-21T05:51:53Z
NONE
resolved
Summary. Request by using [requests.Session]. If set session headers. Headers will lost When met 301/302/307 redirect. ## Expected Result My custom header should in [resp.request.headers] ```python { 'Content-Type': 'application/json;charset=UTF-8' } ``` ## Actual Result ``` DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): bing.com:80 DEBUG:urllib3.connectionpool:http://bing.com:80 "GET / HTTP/1.1" 301 0 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): cn.bing.com:80 DEBUG:urllib3.connectionpool:http://cn.bing.com:80 "GET / HTTP/1.1" 200 46302 {'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive' ``` { 'Content-Type': 'application/json;charset=UTF-8' } not in [resp.request.headers]. ## Reproduction Steps ```python import logging logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) requests_log = logging.getLogger("requests.packages.urllib3") requests_log.setLevel(logging.DEBUG) requests_log.propagate = True import requests ss = requests.Session() ss.headers.update({ 'Content-Type': 'application/json;charset=UTF-8' }) resp = ss.get('http://bing.com') print(resp.request.headers) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.6.1" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.7.3" }, "platform": { "release": "5.3.0-59-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010102f", "version": "19.0.0" }, "requests": { "version": "2.21.0" }, "system_ssl": { "version": "1010102f" }, "urllib3": { "version": "1.24.3" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5513/reactions" }
https://api.github.com/repos/psf/requests/issues/5513/timeline
null
completed
null
null
false
[ "Hello,\r\n\r\nWhy would you set the _Content-Type_ header for the **GET** request? As far as I know it's generally recommended not to set _Content-Type_ by hand, even when used correctly with **POST** or **PUT** methods. Requests will automatically generate the right value if it's not explicitly set.\r\n\r\nAnywa...
https://api.github.com/repos/psf/requests/issues/5512
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5512/labels{/name}
https://api.github.com/repos/psf/requests/issues/5512/comments
https://api.github.com/repos/psf/requests/issues/5512/events
https://github.com/psf/requests/issues/5512
643,562,441
MDU6SXNzdWU2NDM1NjI0NDE=
5,512
How can I send HTTP/1.0 request ?
{ "avatar_url": "https://avatars.githubusercontent.com/u/29891327?v=4", "events_url": "https://api.github.com/users/contactparthshah/events{/privacy}", "followers_url": "https://api.github.com/users/contactparthshah/followers", "following_url": "https://api.github.com/users/contactparthshah/following{/other_user}", "gists_url": "https://api.github.com/users/contactparthshah/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/contactparthshah", "id": 29891327, "login": "contactparthshah", "node_id": "MDQ6VXNlcjI5ODkxMzI3", "organizations_url": "https://api.github.com/users/contactparthshah/orgs", "received_events_url": "https://api.github.com/users/contactparthshah/received_events", "repos_url": "https://api.github.com/users/contactparthshah/repos", "site_admin": false, "starred_url": "https://api.github.com/users/contactparthshah/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/contactparthshah/subscriptions", "type": "User", "url": "https://api.github.com/users/contactparthshah", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-23T06:13:50Z
2021-08-31T00:06:45Z
2020-06-23T06:51:50Z
NONE
resolved
Would like to send HTTP/1.0 request using python requests library. can anyone help me here? UseCase: Need to test, proxy (Device under Test) upgrades the protocol version automatically. So let's say If I send HTTP/1.0 request, it automatically upgrades it to HTTP/1.1 and send that request to server. https://stackoverflow.com/questions/37816596/restrict-request-to-only-ask-for-http-1-0-to-prevent-chunking-error This is the only help till now I have found, apart from that anything else I can try to send HTTP/1.0 request? #python-requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5512/reactions" }
https://api.github.com/repos/psf/requests/issues/5512/timeline
null
completed
null
null
false
[ "Hi @contactparthshah,\n\nAs the issue originally stated, please avoid posting requests for assistance on this issue tracker. We try to keep it clear for defects in Requests.\n\nWe state both in the docs and in a handful of issues on StackOverflow that Requests is an http/1.1 client.\n\nhttps://stackoverflow.com/qu...
https://api.github.com/repos/psf/requests/issues/5511
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5511/labels{/name}
https://api.github.com/repos/psf/requests/issues/5511/comments
https://api.github.com/repos/psf/requests/issues/5511/events
https://github.com/psf/requests/pull/5511
642,948,827
MDExOlB1bGxSZXF1ZXN0NDM3ODQxMzcz
5,511
connection_from_url already parses and handles lower casing scheme, it also lower cases the host, for us so there is no need to perform mutations on a url when a proxy is not in use inside of HTTPAdapter.get_connection.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1684354?v=4", "events_url": "https://api.github.com/users/dbaxa/events{/privacy}", "followers_url": "https://api.github.com/users/dbaxa/followers", "following_url": "https://api.github.com/users/dbaxa/following{/other_user}", "gists_url": "https://api.github.com/users/dbaxa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dbaxa", "id": 1684354, "login": "dbaxa", "node_id": "MDQ6VXNlcjE2ODQzNTQ=", "organizations_url": "https://api.github.com/users/dbaxa/orgs", "received_events_url": "https://api.github.com/users/dbaxa/received_events", "repos_url": "https://api.github.com/users/dbaxa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dbaxa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dbaxa/subscriptions", "type": "User", "url": "https://api.github.com/users/dbaxa", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2020-06-22T10:25:12Z
2022-03-29T18:01:44Z
2021-12-29T17:50:00Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5511/reactions" }
https://api.github.com/repos/psf/requests/issues/5511/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5511.diff", "html_url": "https://github.com/psf/requests/pull/5511", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/5511.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5511" }
true
[ "cc @sigmavirus24 ", "Re: [psf/requests] connection_from_url already parses and handles lower\ncasing scheme, it also lower cases the host, for us so there is no need to\nperform mutations on a url when a proxy is not in use inside of\nHTTPAdapter.get_connection. (#5511)\n\n---------- Forwarded message ---------\...
https://api.github.com/repos/psf/requests/issues/5510
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5510/labels{/name}
https://api.github.com/repos/psf/requests/issues/5510/comments
https://api.github.com/repos/psf/requests/issues/5510/events
https://github.com/psf/requests/issues/5510
642,465,272
MDU6SXNzdWU2NDI0NjUyNzI=
5,510
incremental rest api data
{ "avatar_url": "https://avatars.githubusercontent.com/u/34449619?v=4", "events_url": "https://api.github.com/users/oguzhannkayaa/events{/privacy}", "followers_url": "https://api.github.com/users/oguzhannkayaa/followers", "following_url": "https://api.github.com/users/oguzhannkayaa/following{/other_user}", "gists_url": "https://api.github.com/users/oguzhannkayaa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/oguzhannkayaa", "id": 34449619, "login": "oguzhannkayaa", "node_id": "MDQ6VXNlcjM0NDQ5NjE5", "organizations_url": "https://api.github.com/users/oguzhannkayaa/orgs", "received_events_url": "https://api.github.com/users/oguzhannkayaa/received_events", "repos_url": "https://api.github.com/users/oguzhannkayaa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/oguzhannkayaa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/oguzhannkayaa/subscriptions", "type": "User", "url": "https://api.github.com/users/oguzhannkayaa", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-06-20T23:50:39Z
2021-08-31T00:06:45Z
2020-06-24T04:24:02Z
NONE
resolved
Hello, I am trying to fetch incremental data from localhost:8080/test url. This url has json rest api data and it has incremental data inside of it. I fetched data but When I fetch it, it finishes. When I run the code again or run the function every 5 seconds, it gets all data again. How can I get the new data? ``` import requests import json request = requests.get("http://localhost:8080/test").text a = json.loads(request) print(a['items']) ```
{ "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/5510/reactions" }
https://api.github.com/repos/psf/requests/issues/5510/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/5509
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5509/labels{/name}
https://api.github.com/repos/psf/requests/issues/5509/comments
https://api.github.com/repos/psf/requests/issues/5509/events
https://github.com/psf/requests/pull/5509
642,321,812
MDExOlB1bGxSZXF1ZXN0NDM3Mzc0MzY3
5,509
Docs: list CURL_CA_BUNDLE as supported
{ "avatar_url": "https://avatars.githubusercontent.com/u/1192780?v=4", "events_url": "https://api.github.com/users/bbodenmiller/events{/privacy}", "followers_url": "https://api.github.com/users/bbodenmiller/followers", "following_url": "https://api.github.com/users/bbodenmiller/following{/other_user}", "gists_url": "https://api.github.com/users/bbodenmiller/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bbodenmiller", "id": 1192780, "login": "bbodenmiller", "node_id": "MDQ6VXNlcjExOTI3ODA=", "organizations_url": "https://api.github.com/users/bbodenmiller/orgs", "received_events_url": "https://api.github.com/users/bbodenmiller/received_events", "repos_url": "https://api.github.com/users/bbodenmiller/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bbodenmiller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bbodenmiller/subscriptions", "type": "User", "url": "https://api.github.com/users/bbodenmiller", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-06-20T06:40:44Z
2021-08-27T00:08:51Z
2020-07-24T04:57:31Z
CONTRIBUTOR
resolved
https://github.com/psf/requests/blob/2b3436e0e7831676044b57f6f2cc9eb7c188293e/requests/sessions.py#L707 supports `CURL_CA_BUNDLE` too so lets list it in docs.
{ "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/5509/reactions" }
https://api.github.com/repos/psf/requests/issues/5509/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5509.diff", "html_url": "https://github.com/psf/requests/pull/5509", "merged_at": "2020-07-24T04:57:31Z", "patch_url": "https://github.com/psf/requests/pull/5509.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5509" }
true
[]
https://api.github.com/repos/psf/requests/issues/5508
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5508/labels{/name}
https://api.github.com/repos/psf/requests/issues/5508/comments
https://api.github.com/repos/psf/requests/issues/5508/events
https://github.com/psf/requests/issues/5508
642,109,531
MDU6SXNzdWU2NDIxMDk1MzE=
5,508
Weired behaviour (sometimes) on 401 response
{ "avatar_url": "https://avatars.githubusercontent.com/u/33808743?v=4", "events_url": "https://api.github.com/users/Coronon/events{/privacy}", "followers_url": "https://api.github.com/users/Coronon/followers", "following_url": "https://api.github.com/users/Coronon/following{/other_user}", "gists_url": "https://api.github.com/users/Coronon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Coronon", "id": 33808743, "login": "Coronon", "node_id": "MDQ6VXNlcjMzODA4NzQz", "organizations_url": "https://api.github.com/users/Coronon/orgs", "received_events_url": "https://api.github.com/users/Coronon/received_events", "repos_url": "https://api.github.com/users/Coronon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Coronon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Coronon/subscriptions", "type": "User", "url": "https://api.github.com/users/Coronon", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2020-06-19T16:57:28Z
2021-08-31T00:06:44Z
2020-06-26T19:42:44Z
NONE
resolved
So I am writing tests for my flask app at the moment and have great difficulty testing 401 UNAUTHORIZED responses as requests seems to not be able to handle them (sometimes it works interestingly [seems to be quite random though]). I am trying to access a flask webServer without a required jwt token. All browsers and rest clients I tested seem to work perfectly fine, requests for python 3 doesn't however. Python2 requests seems to not have a problem either. I have checked through wireshark, and all packets are send just as they should. ## Expected Result ``` 401 {'Content-Type': 'application/json', 'Content-Length': '30', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': '*', 'Access-Control-Allow-Methods': '*', 'Access-Control-Max-Age': '31540000', 'Server': 'Werkzeug/0.16.0 Python/3.8.0', 'Date': 'Fri, 19 Jun 2020 16:49:11 GMT'} { "msg": "TOKEN_REQUIRED" } ``` ## Actual Result ``` Traceback (most recent call last): File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse() File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1322, in getresponse response.begin() File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 327, in begin self.headers = self.msg = parse_headers(self.fp) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 212, in parse_headers line = fp.readline(_MAXLINE + 1) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 719, in urlopen retries = retries.increment( File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 400, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 734, in reraise raise value.with_traceback(tb) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse() File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1322, in getresponse response.begin() File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 327, in begin self.headers = self.msg = parse_headers(self.fp) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 212, in parse_headers line = fp.readline(_MAXLINE + 1) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".\test2.py", line 7, in <module> req = requests.post(url, headers=headers, data=body) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Users\Someone\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) ``` OR on linux ``` api/tests/test_2account.py:25: in checkResponse assert response.json()["msg"] == "TOKEN_REQUIRED" /home/coronon/.local/lib/python3.8/site-packages/requests/models.py:898: in json return complexjson.loads(self.text, **kwargs) /usr/lib/python3.8/json/__init__.py:357: in loads return _default_decoder.decode(s) /usr/lib/python3.8/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <json.decoder.JSONDecoder object at 0x7fc23da9edf0>, s = '', idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ``` ## Reproduction Steps ```python import requests url = 'http://localhost:5000/account/updatebaseinfo' headers = {'Content-Type': 'application/json','user-agent': 'advanced-rest-client','accept': '*/*','content-length': '126'} body = """{"email": "test.updatebaseinfo@pytest.com", "firstname": "Test-Testi", "lastname": "Someone", "gender": 1, "graduated": 2000}""" req = requests.post(url, headers=headers, data=body) print(req.status_code) print(req.headers) print(req.text) ``` # Flask Webserver route: I am using jwt from [flask_jwt_extended](https://flask-jwt-extended.readthedocs.io/en/stable/) ```py @mod_account.route("/updatebaseinfo", methods=['POST']) @jwt_required def updatebaseinfo() -> Tuple[Response, int]: ... ``` How I handle token missing on the backend: ```py @jwt.unauthorized_loader def unauthorized_loader(error: str) -> Tuple[Response, int]: """Handle response on missing token Arguments: error {str} -- Why token could not be found Returns: Response -- Response send to client """ return jsonify({'msg': 'TOKEN_REQUIRED'}), 401 ``` ## System Information ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.8" }, "implementation": { "name": "CPython", "version": "3.8.0" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010104f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.6" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/33808743?v=4", "events_url": "https://api.github.com/users/Coronon/events{/privacy}", "followers_url": "https://api.github.com/users/Coronon/followers", "following_url": "https://api.github.com/users/Coronon/following{/other_user}", "gists_url": "https://api.github.com/users/Coronon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Coronon", "id": 33808743, "login": "Coronon", "node_id": "MDQ6VXNlcjMzODA4NzQz", "organizations_url": "https://api.github.com/users/Coronon/orgs", "received_events_url": "https://api.github.com/users/Coronon/received_events", "repos_url": "https://api.github.com/users/Coronon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Coronon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Coronon/subscriptions", "type": "User", "url": "https://api.github.com/users/Coronon", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5508/reactions" }
https://api.github.com/repos/psf/requests/issues/5508/timeline
null
completed
null
null
false
[ "this doesn't seem to be an issue with requests, rather an issue with your webserver." ]
https://api.github.com/repos/psf/requests/issues/5507
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5507/labels{/name}
https://api.github.com/repos/psf/requests/issues/5507/comments
https://api.github.com/repos/psf/requests/issues/5507/events
https://github.com/psf/requests/issues/5507
641,912,836
MDU6SXNzdWU2NDE5MTI4MzY=
5,507
when I tried to import requests, I got the TypeError
{ "avatar_url": "https://avatars.githubusercontent.com/u/37785246?v=4", "events_url": "https://api.github.com/users/evinstar/events{/privacy}", "followers_url": "https://api.github.com/users/evinstar/followers", "following_url": "https://api.github.com/users/evinstar/following{/other_user}", "gists_url": "https://api.github.com/users/evinstar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/evinstar", "id": 37785246, "login": "evinstar", "node_id": "MDQ6VXNlcjM3Nzg1MjQ2", "organizations_url": "https://api.github.com/users/evinstar/orgs", "received_events_url": "https://api.github.com/users/evinstar/received_events", "repos_url": "https://api.github.com/users/evinstar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/evinstar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/evinstar/subscriptions", "type": "User", "url": "https://api.github.com/users/evinstar", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-19T11:48:04Z
2021-08-31T00:06:46Z
2020-06-19T16:02:41Z
NONE
resolved
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance. Env: python3.6 centos I got the following traceback Traceback (most recent call last): File "main.py", line 3, in <module> from transfer import search, strip File "/usr/src/app/transfer.py", line 5, in <module> from proxies import proxy_maintainer File "/usr/src/app/proxies.py", line 6, in <module> import requests File "/usr/local/lib/python3.6/dist-packages/requests/__init__.py", line 95, in <module> from urllib3.contrib import pyopenssl File "/usr/local/lib/python3.6/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module> import OpenSSL.SSL File "/usr/local/lib/python3.6/dist-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import crypto, SSL File "/usr/local/lib/python3.6/dist-packages/OpenSSL/crypto.py", line 12, in <module> from cryptography import x509 File "/usr/local/lib/python3.6/dist-packages/cryptography/x509/__init__.py", line 8, in <module> from cryptography.x509.base import ( File "/usr/local/lib/python3.6/dist-packages/cryptography/x509/base.py", line 16, in <module> from cryptography.x509.extensions import Extension, ExtensionType File "/usr/local/lib/python3.6/dist-packages/cryptography/x509/extensions.py", line 13, in <module> from asn1crypto.keys import PublicKeyInfo File "/usr/lib/python3/dist-packages/asn1crypto/keys.py", line 22, in <module> from ._elliptic_curve import ( File "/usr/lib/python3/dist-packages/asn1crypto/_elliptic_curve.py", line 51, in <module> from ._int import inverse_mod File "/usr/lib/python3/dist-packages/asn1crypto/_int.py", line 56, in <module> from ._perf._big_num_ctypes import libcrypto File "/usr/lib/python3/dist-packages/asn1crypto/_perf/_big_num_ctypes.py", line 35, in <module> libcrypto_path = find_library(b'crypto' if sys.version_info < (3,) else 'crypto') File "/usr/lib/python3.6/ctypes/util.py", line 313, in find_library return _findSoname_ldconfig(name) or \ File "/usr/lib/python3.6/ctypes/util.py", line 283, in _findSoname_ldconfig res = re.search(regex, p.stdout.read()) File "/usr/lib/python3.6/re.py", line 182, in search return _compile(pattern, flags).search(string) TypeError: cannot use a bytes pattern on a string-like object Please help me
{ "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/5507/reactions" }
https://api.github.com/repos/psf/requests/issues/5507/timeline
null
completed
null
null
false
[ "Hi @luckcry, as the top of your issue says we only triage bugs in Requests on this issue tracker. Usage questions should be directed to StackOverflow.\r\n\r\nThe stack trace provided isn't related to Requests, you'll need to make sure your dependencies are up to date.", "> \r\n> \r\n> Hi @luckcry, as the top of ...
https://api.github.com/repos/psf/requests/issues/5506
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5506/labels{/name}
https://api.github.com/repos/psf/requests/issues/5506/comments
https://api.github.com/repos/psf/requests/issues/5506/events
https://github.com/psf/requests/issues/5506
641,653,604
MDU6SXNzdWU2NDE2NTM2MDQ=
5,506
requests HTTP2
{ "avatar_url": "https://avatars.githubusercontent.com/u/42380415?v=4", "events_url": "https://api.github.com/users/lei375809291/events{/privacy}", "followers_url": "https://api.github.com/users/lei375809291/followers", "following_url": "https://api.github.com/users/lei375809291/following{/other_user}", "gists_url": "https://api.github.com/users/lei375809291/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lei375809291", "id": 42380415, "login": "lei375809291", "node_id": "MDQ6VXNlcjQyMzgwNDE1", "organizations_url": "https://api.github.com/users/lei375809291/orgs", "received_events_url": "https://api.github.com/users/lei375809291/received_events", "repos_url": "https://api.github.com/users/lei375809291/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lei375809291/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lei375809291/subscriptions", "type": "User", "url": "https://api.github.com/users/lei375809291", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-19T02:10:48Z
2021-08-31T00:06:46Z
2020-06-19T16:00:40Z
NONE
resolved
requests怎么发送http2版本的情求呢? How can requests send http2 request?
{ "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/5506/reactions" }
https://api.github.com/repos/psf/requests/issues/5506/timeline
null
completed
null
null
false
[ "It can't", "@lei375809291, [`hyper`](https://github.com/python-hyper/hyper) is a possible Python alternative. I believe they still support using the [Requests interface over the top of their H2 stack](https://hyper.readthedocs.io/en/latest/api.html#requests-transport-adapter).", "thanks" ]
https://api.github.com/repos/psf/requests/issues/5505
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5505/labels{/name}
https://api.github.com/repos/psf/requests/issues/5505/comments
https://api.github.com/repos/psf/requests/issues/5505/events
https://github.com/psf/requests/pull/5505
641,652,916
MDExOlB1bGxSZXF1ZXN0NDM2ODQ3NjI0
5,505
Clarify that PreparedRequests should not be manually created
{ "avatar_url": "https://avatars.githubusercontent.com/u/977151?v=4", "events_url": "https://api.github.com/users/ollien/events{/privacy}", "followers_url": "https://api.github.com/users/ollien/followers", "following_url": "https://api.github.com/users/ollien/following{/other_user}", "gists_url": "https://api.github.com/users/ollien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ollien", "id": 977151, "login": "ollien", "node_id": "MDQ6VXNlcjk3NzE1MQ==", "organizations_url": "https://api.github.com/users/ollien/orgs", "received_events_url": "https://api.github.com/users/ollien/received_events", "repos_url": "https://api.github.com/users/ollien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ollien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ollien/subscriptions", "type": "User", "url": "https://api.github.com/users/ollien", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2020-06-19T02:08:33Z
2021-08-28T00:06:27Z
2020-06-19T16:04:22Z
CONTRIBUTOR
resolved
Closes #5504
{ "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/5505/reactions" }
https://api.github.com/repos/psf/requests/issues/5505/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5505.diff", "html_url": "https://github.com/psf/requests/pull/5505", "merged_at": "2020-06-19T16:04:22Z", "patch_url": "https://github.com/psf/requests/pull/5505.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5505" }
true
[]
https://api.github.com/repos/psf/requests/issues/5504
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5504/labels{/name}
https://api.github.com/repos/psf/requests/issues/5504/comments
https://api.github.com/repos/psf/requests/issues/5504/events
https://github.com/psf/requests/issues/5504
641,438,682
MDU6SXNzdWU2NDE0Mzg2ODI=
5,504
Preparing a request body without headers throws a TypeError
{ "avatar_url": "https://avatars.githubusercontent.com/u/977151?v=4", "events_url": "https://api.github.com/users/ollien/events{/privacy}", "followers_url": "https://api.github.com/users/ollien/followers", "following_url": "https://api.github.com/users/ollien/following{/other_user}", "gists_url": "https://api.github.com/users/ollien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ollien", "id": 977151, "login": "ollien", "node_id": "MDQ6VXNlcjk3NzE1MQ==", "organizations_url": "https://api.github.com/users/ollien/orgs", "received_events_url": "https://api.github.com/users/ollien/received_events", "repos_url": "https://api.github.com/users/ollien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ollien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ollien/subscriptions", "type": "User", "url": "https://api.github.com/users/ollien", "user_view_type": "public" }
[ { "color": "fad8c7", "default": false, "description": null, "id": 136616769, "name": "Documentation", "node_id": "MDU6TGFiZWwxMzY2MTY3Njk=", "url": "https://api.github.com/repos/psf/requests/labels/Documentation" } ]
closed
true
null
[]
null
7
2020-06-18T17:47:10Z
2021-08-31T00:06:47Z
2020-06-19T16:04:22Z
CONTRIBUTOR
resolved
I have a usecase where I need to generate the body of a `PreparedRequest` without anything else known about the request. If I run `PreparedRequest.prepare_body` without any headers, it fails, citing the headers are `None`. It seems like `prepare_body` is attempting to set the `Content-Length` header. It likely shouldn't, if there are no headers. One possible solution is to create the `headers` object as needed. It would also probably work to skip this step when headers aren't present, and then when `prepare_headers` is called, analyze the `body` to insert a content length, using `prepare_content_length`. ## Expected Result I should be able to generate the body of a request on its own, without preparing headers. ## Actual Result When running the below snippet, I get ``` $ python3 main.py Traceback (most recent call last): File "main.py", line 5, in <module> req.prepare_body(data="hello world!", files=None) File "/Users/nkrichevsky/.local/lib/python3.6/site-packages/requests/models.py", line 514, in prepare_body self.prepare_content_length(body) File "/Users/nkrichevsky/.local/lib/python3.6/site-packages/requests/models.py", line 529, in prepare_content_length self.headers['Content-Length'] = builtin_str(length) TypeError: 'NoneType' object does not support item assignment ``` I can work around this by doing `req.prepare_headers(None)` before preparing the body, but this isn't documented as being required in the API reference. ## Reproduction Steps ```python import requests if __name__ == "__main__": req = requests.PreparedRequest() req.prepare_body(data="hello world!", files=None) print(req.body) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.6.5" }, "platform": { "release": "19.5.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010107f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5504/reactions" }
https://api.github.com/repos/psf/requests/issues/5504/timeline
null
completed
null
null
false
[ "Hi @ollien,\r\n\r\nWe typically try to keep usage questions to StackOverflow. We have a whole [section in the docs](https://requests.readthedocs.io/en/master/user/advanced/#prepared-requests) covering how to use PreparedRequests and the basic flow for making modifications to the body/headers. That has the info you...
https://api.github.com/repos/psf/requests/issues/5503
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5503/labels{/name}
https://api.github.com/repos/psf/requests/issues/5503/comments
https://api.github.com/repos/psf/requests/issues/5503/events
https://github.com/psf/requests/issues/5503
641,242,223
MDU6SXNzdWU2NDEyNDIyMjM=
5,503
Performance: Response.content is unnecessarily slow
{ "avatar_url": "https://avatars.githubusercontent.com/u/1963944?v=4", "events_url": "https://api.github.com/users/bmerry/events{/privacy}", "followers_url": "https://api.github.com/users/bmerry/followers", "following_url": "https://api.github.com/users/bmerry/following{/other_user}", "gists_url": "https://api.github.com/users/bmerry/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bmerry", "id": 1963944, "login": "bmerry", "node_id": "MDQ6VXNlcjE5NjM5NDQ=", "organizations_url": "https://api.github.com/users/bmerry/orgs", "received_events_url": "https://api.github.com/users/bmerry/received_events", "repos_url": "https://api.github.com/users/bmerry/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bmerry/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bmerry/subscriptions", "type": "User", "url": "https://api.github.com/users/bmerry", "user_view_type": "public" }
[]
open
false
null
[]
null
3
2020-06-18T14:13:55Z
2020-06-30T06:34:24Z
null
CONTRIBUTOR
null
The core of Response.content looks like this (where CONTENT_CHUNK_SIZE is 10KB): ```python self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b'' ``` That is suboptimal for several reasons: 1. All the data has to be read into a temporary `bytes`, then copied into the joined buffer. 2. It's also memory-inefficient: the CPython implementation of bytes.join first converts the generator to a sequence, so if the content is 1GB, you will temporarily have 2GB of memory used. 3. 10KB isn't really big enough to amortise all the overheads (increasing it significantly improves performance). It looks like this used to be done with `self.raw.read`, but it was changed to the current approach [8 years ago](https://github.com/psf/requests/commit/00b13673e32e45d2eb6517c0cf81915467331d8f). I've tried a quick test to switch back to `self.raw.read(decode_content=True)`, but it's failing some unit tests, presumably because of subtleties in handling Content-Encoding. If the maintainers agree that this is worth pursuing then I can work on dealing with the corner cases to make a PR. ## Expected Result I expect `resp.content` from a non-streamed request to have similar performance to `resp.raw.read()` from a streamed request. ## Actual Result I've benchmarked `response.content` at 590 MB/s and `response.raw.read()`see sample code below) at 3180 MB/s — 5.4x faster. With 10-25 Gb/s networking becoming pretty standard in the data centre, this represents a significant bottleneck. ```python def load_requests_naive(url: str) -> bytes: with requests.get(url) as resp: return resp.content def load_requests_stream(url: str) -> bytes: with requests.get(url, stream=True) as resp: return resp.raw.read() ``` ## Reproduction Steps You'll need to run an HTTP server that can deliver a large file at high bandwidth (I happen to have Minio+Varnish on my local machine, but I'm sure other servers e.g. Apache could be used). Then run the script below as `httpbench-requests.py all http://...`. Note that Python 3.8 (or possibly it was 3.7) improved the performance of http.client.HTTPResponse.read, so if you use an older Python version the difference in performance is less enormous, but still >2x on my machine. ```python #!/usr/bin/env python import argparse import gc import hashlib import http.client import io import socket import textwrap import time import urllib.parse from typing import Callable, Tuple, Optional import requests import numpy as np _Method = Callable[[str], bytes] METHODS = {} def method(name: str) -> Callable[[_Method], _Method]: def decorate(func: _Method) -> _Method: METHODS[name] = func return func return decorate @method('requests-naive') def load_requests_naive(url: str) -> bytes: with requests.get(url) as resp: return resp.content @method('requests-stream-read') def load_requests_stream(url: str) -> bytes: with requests.get(url, stream=True) as resp: return resp.raw.read() def measure_method(method: str, args: argparse.Namespace) -> None: rates = [] for i in range(args.passes): gc.collect() start = time.monotonic() data = METHODS[method](args.url) stop = time.monotonic() elapsed = stop - start rates.append(len(data) / elapsed) del data mean = np.mean(rates) std = np.std(rates) / np.sqrt(args.passes - 1) print('{}: {:.1f} ± {:.1f} MB/s'.format(method, mean / 1e6, std / 1e6)) def main(): parser = argparse.ArgumentParser() parser.add_argument('--passes', type=int, default=5) parser.add_argument('method') parser.add_argument('url') args = parser.parse_args() if args.method not in METHODS and args.method != 'all': parser.error('Method must be "all" or one of {}'.format(set(METHODS.keys()))) if args.method == 'all': for method in METHODS: measure_method(method, args) else: measure_method(args.method, args) if __name__ == '__main__': main() ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.8.0" }, "platform": { "release": "5.4.0-37-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010100f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": false } ```
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 1, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/5503/reactions" }
https://api.github.com/repos/psf/requests/issues/5503/timeline
null
null
null
null
false
[ "so, use BytesIO is better?", "> so, use BytesIO is better?\r\n\r\nAre you suggesting replacing `''.join` with BytesIO for joining together all the 10KB pieces? It won't avoid having two copies of all the data around at once because `BytesIO.getvalue` makes a copy. I haven't measured the performance but I'd be su...
https://api.github.com/repos/psf/requests/issues/5502
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5502/labels{/name}
https://api.github.com/repos/psf/requests/issues/5502/comments
https://api.github.com/repos/psf/requests/issues/5502/events
https://github.com/psf/requests/issues/5502
640,735,117
MDU6SXNzdWU2NDA3MzUxMTc=
5,502
2.24.0 requests and boto3 appear to be incompatible
{ "avatar_url": "https://avatars.githubusercontent.com/u/23322066?v=4", "events_url": "https://api.github.com/users/jw-maynard/events{/privacy}", "followers_url": "https://api.github.com/users/jw-maynard/followers", "following_url": "https://api.github.com/users/jw-maynard/following{/other_user}", "gists_url": "https://api.github.com/users/jw-maynard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jw-maynard", "id": 23322066, "login": "jw-maynard", "node_id": "MDQ6VXNlcjIzMzIyMDY2", "organizations_url": "https://api.github.com/users/jw-maynard/orgs", "received_events_url": "https://api.github.com/users/jw-maynard/received_events", "repos_url": "https://api.github.com/users/jw-maynard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jw-maynard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jw-maynard/subscriptions", "type": "User", "url": "https://api.github.com/users/jw-maynard", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2020-06-17T20:53:09Z
2021-08-31T00:06:47Z
2020-06-18T15:42:55Z
NONE
resolved
boto3 calls broken since upgrade to requests 2.24.0. Running `pip install 'requests<2.24.0' before installing boto3 fixes the issue. I'm not sure if this is a problem with the new version of requests or if boto3 is using requests in some unexpected way that is causing this issue. Since reverting to the old version seems to workaround the issue I thought I'd start here. ## Expected Result Calls using boto3 to succeed as they always have. ## Actual Result Get an error: `An HTTP Client raised and unhandled exception: 'SSLSocket' object has no attribute 'connection'` ## Reproduction Steps Just attempt to access S3 using boto3 ## System Information Using Docker image `python:3.7-slim` $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.9.2" }, "idna": { "version": "2.9" }, "implementation": { "name": "CPython", "version": "3.7.7" }, "platform": { "release": "5.4.0-7634-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010107f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1010104f" }, "urllib3": { "version": "1.25.9" }, "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/23322066?v=4", "events_url": "https://api.github.com/users/jw-maynard/events{/privacy}", "followers_url": "https://api.github.com/users/jw-maynard/followers", "following_url": "https://api.github.com/users/jw-maynard/following{/other_user}", "gists_url": "https://api.github.com/users/jw-maynard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jw-maynard", "id": 23322066, "login": "jw-maynard", "node_id": "MDQ6VXNlcjIzMzIyMDY2", "organizations_url": "https://api.github.com/users/jw-maynard/orgs", "received_events_url": "https://api.github.com/users/jw-maynard/received_events", "repos_url": "https://api.github.com/users/jw-maynard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jw-maynard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jw-maynard/subscriptions", "type": "User", "url": "https://api.github.com/users/jw-maynard", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/5502/reactions" }
https://api.github.com/repos/psf/requests/issues/5502/timeline
null
completed
null
null
false
[ "Hi @jw-maynard, Boto3 hasn't used Requests since 2018 and at that time was using a vendored copy. It should only be relying on urllib3 since version 1.8.0.\r\n\r\nCould you open a ticket in the [Boto3](https://github.com/boto/boto3) repository with a minimal set of steps you used to recreate the issue, including t...
https://api.github.com/repos/psf/requests/issues/5501
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5501/labels{/name}
https://api.github.com/repos/psf/requests/issues/5501/comments
https://api.github.com/repos/psf/requests/issues/5501/events
https://github.com/psf/requests/issues/5501
640,688,924
MDU6SXNzdWU2NDA2ODg5MjQ=
5,501
Fix misformatted project description in PyPI for version 2.24.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/566650?v=4", "events_url": "https://api.github.com/users/impredicative/events{/privacy}", "followers_url": "https://api.github.com/users/impredicative/followers", "following_url": "https://api.github.com/users/impredicative/following{/other_user}", "gists_url": "https://api.github.com/users/impredicative/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/impredicative", "id": 566650, "login": "impredicative", "node_id": "MDQ6VXNlcjU2NjY1MA==", "organizations_url": "https://api.github.com/users/impredicative/orgs", "received_events_url": "https://api.github.com/users/impredicative/received_events", "repos_url": "https://api.github.com/users/impredicative/repos", "site_admin": false, "starred_url": "https://api.github.com/users/impredicative/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/impredicative/subscriptions", "type": "User", "url": "https://api.github.com/users/impredicative", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2020-06-17T19:31:13Z
2021-08-28T00:06:08Z
2020-11-17T00:10:14Z
NONE
resolved
The project description used to display fine at https://pypi.org/project/requests/2.23.0/. It doesn't at https://pypi.org/project/requests/2.24.0/. It is a reasonable expectation that it displays correctly.
{ "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/5501/reactions" }
https://api.github.com/repos/psf/requests/issues/5501/timeline
null
completed
null
null
false
[ "Hi @impredicative,\r\n\r\nThanks for the ticket. We're aware there were some issues with the long description upload this morning. Some of the PyPI infrastructure changed since our last upload and we ended up with incorrectly transformed markdown.\r\n\r\nWe're working on some larger changes to the README file itse...
https://api.github.com/repos/psf/requests/issues/5500
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5500/labels{/name}
https://api.github.com/repos/psf/requests/issues/5500/comments
https://api.github.com/repos/psf/requests/issues/5500/events
https://github.com/psf/requests/pull/5500
640,541,934
MDExOlB1bGxSZXF1ZXN0NDM1OTMzNjU1
5,500
v2.24.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
2020-06-17T15:35:50Z
2021-08-28T00:06:17Z
2020-06-17T15:50:26Z
MEMBER
resolved
2.24.0 (2020-06-17) ------------------- **Improvements** - pyOpenSSL TLS implementation is now only used if Python either doesn't have an `ssl` module or doesn't support SNI. Previously pyOpenSSL was unconditionally used if available. This applies even if pyOpenSSL is installed via the `requests[security]` extra (#5443) - Redirect resolution should now only occur when `allow_redirects` is True. (#5492) - No longer perform unnecessary Content-Length calculation for requests that won't use it. (#5496)
{ "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": 1, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/5500/reactions" }
https://api.github.com/repos/psf/requests/issues/5500/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/5500.diff", "html_url": "https://github.com/psf/requests/pull/5500", "merged_at": "2020-06-17T15:50:26Z", "patch_url": "https://github.com/psf/requests/pull/5500.patch", "url": "https://api.github.com/repos/psf/requests/pulls/5500" }
true
[ "For those of you following along at home, we're having some issues with the existing README file and new linting rules PyPI is enforcing. The release may take a bit longer than expected today." ]
https://api.github.com/repos/psf/requests/issues/5499
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5499/labels{/name}
https://api.github.com/repos/psf/requests/issues/5499/comments
https://api.github.com/repos/psf/requests/issues/5499/events
https://github.com/psf/requests/issues/5499
640,256,210
MDU6SXNzdWU2NDAyNTYyMTA=
5,499
Allow TLS version used, to be discovered
{ "avatar_url": "https://avatars.githubusercontent.com/u/59476024?v=4", "events_url": "https://api.github.com/users/MikeWhittakerRyff/events{/privacy}", "followers_url": "https://api.github.com/users/MikeWhittakerRyff/followers", "following_url": "https://api.github.com/users/MikeWhittakerRyff/following{/other_user}", "gists_url": "https://api.github.com/users/MikeWhittakerRyff/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MikeWhittakerRyff", "id": 59476024, "login": "MikeWhittakerRyff", "node_id": "MDQ6VXNlcjU5NDc2MDI0", "organizations_url": "https://api.github.com/users/MikeWhittakerRyff/orgs", "received_events_url": "https://api.github.com/users/MikeWhittakerRyff/received_events", "repos_url": "https://api.github.com/users/MikeWhittakerRyff/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MikeWhittakerRyff/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MikeWhittakerRyff/subscriptions", "type": "User", "url": "https://api.github.com/users/MikeWhittakerRyff", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2020-06-17T08:42:09Z
2021-08-30T00:06:25Z
2020-07-21T05:53:08Z
NONE
resolved
It's not possible to find which version of TLS was used, or indeed any of the SSL parameters, after a transfer. Could some of this metadata be made available, perhaps only if specified in the request. Is there any indication that TLS was used at all ?
{ "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/5499/reactions" }
https://api.github.com/repos/psf/requests/issues/5499/timeline
null
completed
null
null
false
[ "In the future, please search **closed and** open issues before creating new ones that are duplicates. This has been discussed ad nauseum and is blocked on urllib3 supporting it for which there's an open issue discussing the idea and implementation.", "Apologies, thought I had searched in open issues, and could n...
https://api.github.com/repos/psf/requests/issues/5498
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/5498/labels{/name}
https://api.github.com/repos/psf/requests/issues/5498/comments
https://api.github.com/repos/psf/requests/issues/5498/events
https://github.com/psf/requests/issues/5498
639,579,432
MDU6SXNzdWU2Mzk1Nzk0MzI=
5,498
Avoid unnecessary data collection conversion by making use of urllib3's HTTPHeaderDict for request headers
{ "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" }
[]
open
false
null
[]
null
5
2020-06-16T11:11:34Z
2021-02-05T02:38:53Z
null
CONTRIBUTOR
null
Avoid unnecessary data collection conversion by making use of urllib3's [`HTTPHeaderDict`](https://github.com/urllib3/urllib3/blob/master/src/urllib3/_collections.py#L106) for request headers & response headers. Currently request http headers are placed in a [`CaseInsensitiveDict`](https://github.com/psf/requests/blob/master/requests/structures.py#L15) but before a request is made the headers are converted to urllib3's [`HTTPHeaderDict`](https://github.com/urllib3/urllib3/blob/master/src/urllib3/_collections.py#L106) & similar seems to occur for responses (in reverse).
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/5498/reactions" }
https://api.github.com/repos/psf/requests/issues/5498/timeline
null
null
null
null
false
[ "Related: \r\n* https://github.com/psf/requests/issues/4214", "I'm 99% certain it's a backwards incompatible change at the moment. Also the 3.0 PR is not active and shouldn't be considered something under active development.", "It might be possible to have a kind of container structure that wraps/resolves diffe...