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/4761
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4761/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4761/comments
|
https://api.github.com/repos/psf/requests/issues/4761/events
|
https://github.com/psf/requests/issues/4761
| 349,304,360 |
MDU6SXNzdWUzNDkzMDQzNjA=
| 4,761 |
JSON response has double-quotes replaced by single-quotes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/42220377?v=4",
"events_url": "https://api.github.com/users/DavidFriedmanAMD/events{/privacy}",
"followers_url": "https://api.github.com/users/DavidFriedmanAMD/followers",
"following_url": "https://api.github.com/users/DavidFriedmanAMD/following{/other_user}",
"gists_url": "https://api.github.com/users/DavidFriedmanAMD/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DavidFriedmanAMD",
"id": 42220377,
"login": "DavidFriedmanAMD",
"node_id": "MDQ6VXNlcjQyMjIwMzc3",
"organizations_url": "https://api.github.com/users/DavidFriedmanAMD/orgs",
"received_events_url": "https://api.github.com/users/DavidFriedmanAMD/received_events",
"repos_url": "https://api.github.com/users/DavidFriedmanAMD/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DavidFriedmanAMD/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DavidFriedmanAMD/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DavidFriedmanAMD",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-08-09T21:52:57Z
|
2021-09-01T00:11:34Z
|
2018-08-09T22:14:34Z
|
NONE
|
resolved
|
I am trying to develop a Python3 script to query GitHub for data on specific repositories, using their v4 GraphQL API with results in JSON format. I took a sample query from the GitHub developer pages, and embedded it into the attached script "github-graphql-test.py" based on a (referenced) example found in a Web search.
The expected output is in the attached file "query-result.txt".
The script produces this result with output piped thru json.tool, but only if all single-quotes are replaced by double-quotes (see commented-out "print" at end of script). Otherwise json.tool gives the error
"Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"
Evidently the JSON formatting on the output is replacing double with single quotes. Is this possibly happening in the requests module, or in another part of the Python library?
[github-graphql-test.py.txt](https://github.com/requests/requests/files/2275998/github-graphql-test.py.txt)
[query-result.txt](https://github.com/requests/requests/files/2275999/query-result.txt)
|
{
"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/4761/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4761/timeline
| null |
completed
| null | null | false |
[
"Hi @DavidFriedmanAMD, the `json()` method is going to return a python representation of the JSON data (i.e. a dictionary) which won’t use double quotes. If you need a valid JSON string with double quotes, you would need to use the json module and call json.dumps, or simply pass the response.content which should be valid json.",
"Code showing how to convert the unbelievably wrongly named 'json' (because it is NOT LEGAL JSON) response into real, proper json?"
] |
https://api.github.com/repos/psf/requests/issues/4760
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4760/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4760/comments
|
https://api.github.com/repos/psf/requests/issues/4760/events
|
https://github.com/psf/requests/issues/4760
| 348,589,198 |
MDU6SXNzdWUzNDg1ODkxOTg=
| 4,760 |
yield from waiter ConnectionResetError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26271528?v=4",
"events_url": "https://api.github.com/users/Qwcscy/events{/privacy}",
"followers_url": "https://api.github.com/users/Qwcscy/followers",
"following_url": "https://api.github.com/users/Qwcscy/following{/other_user}",
"gists_url": "https://api.github.com/users/Qwcscy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Qwcscy",
"id": 26271528,
"login": "Qwcscy",
"node_id": "MDQ6VXNlcjI2MjcxNTI4",
"organizations_url": "https://api.github.com/users/Qwcscy/orgs",
"received_events_url": "https://api.github.com/users/Qwcscy/received_events",
"repos_url": "https://api.github.com/users/Qwcscy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Qwcscy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Qwcscy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Qwcscy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-08-08T06:16:38Z
|
2018-08-11T17:27:08Z
|
2018-08-08T07:19:19Z
|
NONE
|
spam
|
asyncio+aiohttp implemnt multiple request to different domain,patrs of requets raise exception as fllows:
but when testing the single domain,the excetion disappeared.I have met the bug a few days,help!!!
Traceback (most recent call last):
File "/home/jojo/Documents/boceProject/aiohttp/connector.py", line 822, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File "/usr/lib/python3.6/asyncio/base_events.py", line 803, in create_connection
sock, protocol_factory, ssl, server_hostname)
File "/usr/lib/python3.6/asyncio/base_events.py", line 829, in _create_connection_transport
yield from waiter
ConnectionResetError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jojo/Documents/boceProject/test.py", line 57, in <module>
loop.run_until_complete(main())
File "/usr/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "/home/jojo/Documents/boceProject/test.py", line 54, in main
await asyncio.gather(*tasks)
File "/home/jojo/Documents/boceProject/test.py", line 32, in fetch
verify_ssl=False) as resp:
File "/home/jojo/Documents/boceProject/aiohttp/client.py", line 843, in __aenter__
self._resp = await self._coro
File "/home/jojo/Documents/boceProject/aiohttp/client.py", line 366, in _request
timeout=timeout
File "/home/jojo/Documents/boceProject/aiohttp/connector.py", line 445, in connect
proto = await self._create_connection(req, traces, timeout)
File "/home/jojo/Documents/boceProject/aiohttp/connector.py", line 754, in _create_connection
req, traces, timeout)
File "/home/jojo/Documents/boceProject/aiohttp/connector.py", line 961, in _create_proxy_connection
req=req)
File "/home/jojo/Documents/boceProject/aiohttp/connector.py", line 829, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 106.119.181.44:443 ssl:False [None]
my code as fllows: ‘res_connect’ is a redis connecttion
from collections import defaultdict
from config import res_connect
import requests.packages.urllib3.util.ssl_
import aiohttp, asyncio, time, ast, sys, socket
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'ALL'
THREAD_NUM = 4286
result = []
SUM = 4000
UPLOADDICT = defaultdict(list)
def get_ip():
ip = res_connect.rpop('sss')
if ip:
ip = ast.literal_eval(ip.decode())
return ip.get('url')
return None
async def fetch(client, url):
while True:
try:
async with client.get(url, timeout=5, allow_redirects=False,
verify_ssl=False) as resp:
status = resp.status
print(status)
except TimeoutError as e:
print(repr(e))
url = get_ip()
if url is None:
break
async def main():
conn = aiohttp.TCPConnector(limit=1000)
async with aiohttp.ClientSession(connector=conn) as client:
tasks = []
for _ in range(THREAD_NUM):
ip = get_ip()
if ip:
tasks.append(fetch(client, ip))
else:
break
if tasks:
await asyncio.gather(*tasks)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
|
{
"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/4760/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4760/timeline
| null |
completed
| null | null | false |
[
"Hi @Qwcscy, this appears to be a request for assistance and with a separate project (aiohttp). I would suggest either filing an issue with them or on Stackoverflow since this issue tracker is reserved for defect reports in Requests. Thanks!",
"ok,so how can I solve this problem?"
] |
https://api.github.com/repos/psf/requests/issues/4759
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4759/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4759/comments
|
https://api.github.com/repos/psf/requests/issues/4759/events
|
https://github.com/psf/requests/issues/4759
| 348,579,780 |
MDU6SXNzdWUzNDg1Nzk3ODA=
| 4,759 |
requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:645)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34479567?v=4",
"events_url": "https://api.github.com/users/xiantang/events{/privacy}",
"followers_url": "https://api.github.com/users/xiantang/followers",
"following_url": "https://api.github.com/users/xiantang/following{/other_user}",
"gists_url": "https://api.github.com/users/xiantang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xiantang",
"id": 34479567,
"login": "xiantang",
"node_id": "MDQ6VXNlcjM0NDc5NTY3",
"organizations_url": "https://api.github.com/users/xiantang/orgs",
"received_events_url": "https://api.github.com/users/xiantang/received_events",
"repos_url": "https://api.github.com/users/xiantang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xiantang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xiantang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xiantang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-08-08T05:26:19Z
|
2021-09-08T01:21:03Z
|
2018-08-08T05:30:32Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
when i open 32 threads,requets raise this exception.
|
{
"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/4759/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4759/timeline
| null |
completed
| null | null | false |
[
"{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"2.2.2\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.7\"\r\n },\r\n \"implementation\": {\r\n \"name\": \"CPython\",\r\n \"version\": \"3.5.2\"\r\n },\r\n \"platform\": {\r\n \"release\": \"4.15.0-29-generic\",\r\n \"system\": \"Linux\"\r\n },\r\n \"pyOpenSSL\": {\r\n \"openssl_version\": \"1010008f\",\r\n \"version\": \"18.0.0\"\r\n },\r\n \"requests\": {\r\n \"version\": \"2.19.1\"\r\n },\r\n \"system_ssl\": {\r\n \"version\": \"1000207f\"\r\n },\r\n \"urllib3\": {\r\n \"version\": \"1.23\"\r\n },\r\n \"using_pyopenssl\": true\r\n}\r\n",
"Hi @xiantang, it doesn't look like there is an obvious link to a specific stack overflow question. This issue tracker is specifically for defects in Requests. The error you're providing is related to a remote server closing the connection on us which we can't do anything about. It's likely you may be being forcibly throttled by the server due to the number of threads you're using.\r\n\r\nI'm going to close this for now since we don't have anything suggesting a bug in Requests. If you'd like to leave a link to the StackOverflow question, we can look at following up over there. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4758
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4758/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4758/comments
|
https://api.github.com/repos/psf/requests/issues/4758/events
|
https://github.com/psf/requests/issues/4758
| 347,712,838 |
MDU6SXNzdWUzNDc3MTI4Mzg=
| 4,758 |
encoding double backslash
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8792118?v=4",
"events_url": "https://api.github.com/users/mharol/events{/privacy}",
"followers_url": "https://api.github.com/users/mharol/followers",
"following_url": "https://api.github.com/users/mharol/following{/other_user}",
"gists_url": "https://api.github.com/users/mharol/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mharol",
"id": 8792118,
"login": "mharol",
"node_id": "MDQ6VXNlcjg3OTIxMTg=",
"organizations_url": "https://api.github.com/users/mharol/orgs",
"received_events_url": "https://api.github.com/users/mharol/received_events",
"repos_url": "https://api.github.com/users/mharol/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mharol/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mharol/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mharol",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-05T16:40:25Z
|
2021-09-08T01:21:04Z
|
2018-08-07T05:58:06Z
|
NONE
|
resolved
|
Summary.
Downloading files with \\ in query strings doesn't encode properly
## Expected Result %5C%5C
## Actual Result %5C
|
{
"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/4758/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4758/timeline
| null |
completed
| null | null | false |
[
"@mharol it sounds like you're passing double backslashes as a string to Requests. Python's native strings are going to treat this as an escape character when passing it to urlencode which is why you're seeing the single %5C. You'll need to pass a raw string (`r'\\\\'`) with the backslashes if you want them to be interpreted literally."
] |
https://api.github.com/repos/psf/requests/issues/4757
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4757/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4757/comments
|
https://api.github.com/repos/psf/requests/issues/4757/events
|
https://github.com/psf/requests/issues/4757
| 347,570,403 |
MDU6SXNzdWUzNDc1NzA0MDM=
| 4,757 |
TLSV1_ALERT_PROTOCOL_VERSION Error when requesting https sites
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9668239?v=4",
"events_url": "https://api.github.com/users/asherbig/events{/privacy}",
"followers_url": "https://api.github.com/users/asherbig/followers",
"following_url": "https://api.github.com/users/asherbig/following{/other_user}",
"gists_url": "https://api.github.com/users/asherbig/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asherbig",
"id": 9668239,
"login": "asherbig",
"node_id": "MDQ6VXNlcjk2NjgyMzk=",
"organizations_url": "https://api.github.com/users/asherbig/orgs",
"received_events_url": "https://api.github.com/users/asherbig/received_events",
"repos_url": "https://api.github.com/users/asherbig/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asherbig/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asherbig/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asherbig",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-04T00:40:03Z
|
2021-09-08T01:21:07Z
|
2018-08-04T12:25:45Z
|
NONE
|
resolved
|
I get the error "**ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:598)**" when attempting to access https sites. This is the specific site I got the error on https://www.apartments.com/westhampton-court-apartment-homes-atlanta-ga/sqpw607/ I've been stuck on this issue for over a day at this point, please help.
## Expected Result
I expect to get the data from the URL, not get an error.
## Actual Result
I get the error specified above.
## Reproduction Steps
Try accessing any https site.
requests.get(url)
## System Information
I am on OSX Yosemite 10.10.5 (14F2511)
**python --version**: Python 3.7.0
**import ssl; pprint(ssl.OPENSSL_VERSION)**: 'OpenSSL 0.9.8zg 14 July 2015' (ran from my script)
**openssl version -a**:
OpenSSL 1.0.2o 27 Mar 2018
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: clang -I. -I.. -I../include -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/etc/openssl"
**nano .bash_profile**:
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4757/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4757/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---\r\n\r\nAs an aside, your python is using openssl 0.9.8 which doesn't support anything over TLS v1.0 if I remember correctly and per [StackOverflow](http://stackoverflow.com/questions/44316292/ddg#44316583) the website wants to use a higher version of TLS which you're openssl does not support. Futhermore, 3.7.0 was supposed to require a more modern version of openssl so how you've compiled your python to use this ancient version is beyond me. Finally, you completely ignored the request for debugging information we have in the template. Further issues opened like this will be closed immediately."
] |
https://api.github.com/repos/psf/requests/issues/4756
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4756/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4756/comments
|
https://api.github.com/repos/psf/requests/issues/4756/events
|
https://github.com/psf/requests/issues/4756
| 347,305,913 |
MDU6SXNzdWUzNDczMDU5MTM=
| 4,756 |
OSError: Tunnel connection failed: 400 Bad Request
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4387347?v=4",
"events_url": "https://api.github.com/users/mughilanand/events{/privacy}",
"followers_url": "https://api.github.com/users/mughilanand/followers",
"following_url": "https://api.github.com/users/mughilanand/following{/other_user}",
"gists_url": "https://api.github.com/users/mughilanand/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mughilanand",
"id": 4387347,
"login": "mughilanand",
"node_id": "MDQ6VXNlcjQzODczNDc=",
"organizations_url": "https://api.github.com/users/mughilanand/orgs",
"received_events_url": "https://api.github.com/users/mughilanand/received_events",
"repos_url": "https://api.github.com/users/mughilanand/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mughilanand/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mughilanand/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mughilanand",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-08-03T08:28:22Z
|
2021-05-26T12:11:07Z
|
2018-08-03T14:45:56Z
|
NONE
|
off-topic
|
Python : 3.6.5 ( Anaconda)
Operating system: RHEL 6.9
I am hit by 400 Bad request error while connection attempt by https over proxy. But the same is working fine without http and curl. I have exported https_proxy and http_proxy in linux cli. Anyone advise me what to do?
>>> import requests
>>> session = requests.Session()
>>> session.get("https://pypi.python.org/simple/").content
Traceback (most recent call last):
File "/apps/bitech/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "/apps/bitech/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "/apps/bitech/python/lib/python3.6/site-packages/urllib3/connection.py", line 294, in connect
self._tunnel()
File "/apps/bitech/python/lib/python3.6/http/client.py", line 919, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 400 Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/apps/bitech/python/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/apps/bitech/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/apps/bitech/python/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request',)))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 640, in send
history = [resp for resp in gen] if allow_redirects else []
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 640, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 218, in resolve_redirects
**adapter_kwargs
File "/apps/bitech/python/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/apps/bitech/python/lib/python3.6/site-packages/requests/adapters.py", line 502, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request',)))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4756/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4756/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.",
"@mughilanand \r\n\r\nhaving the same problem, did you figure it out?"
] |
https://api.github.com/repos/psf/requests/issues/4755
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4755/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4755/comments
|
https://api.github.com/repos/psf/requests/issues/4755/events
|
https://github.com/psf/requests/pull/4755
| 346,496,342 |
MDExOlB1bGxSZXF1ZXN0MjA1MzQ0Njg3
| 4,755 |
Add return type on cookies.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9590242?v=4",
"events_url": "https://api.github.com/users/dohvis/events{/privacy}",
"followers_url": "https://api.github.com/users/dohvis/followers",
"following_url": "https://api.github.com/users/dohvis/following{/other_user}",
"gists_url": "https://api.github.com/users/dohvis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dohvis",
"id": 9590242,
"login": "dohvis",
"node_id": "MDQ6VXNlcjk1OTAyNDI=",
"organizations_url": "https://api.github.com/users/dohvis/orgs",
"received_events_url": "https://api.github.com/users/dohvis/received_events",
"repos_url": "https://api.github.com/users/dohvis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dohvis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dohvis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dohvis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-01T08:21:19Z
|
2021-09-02T00:07:36Z
|
2018-08-02T17:53:44Z
|
CONTRIBUTOR
|
resolved
|
http://docs.python-requests.org/en/master/api/#api-cookies
|
{
"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/4755/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4755/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4755.diff",
"html_url": "https://github.com/psf/requests/pull/4755",
"merged_at": "2018-08-02T17:53:44Z",
"patch_url": "https://github.com/psf/requests/pull/4755.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4755"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=h1) Report\n> Merging [#4755](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/e4d214dd763caf9a59dba0b382106cbf9938aa51?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4755 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/cookies.py](https://codecov.io/gh/requests/requests/pull/4755/diff?src=pr&el=tree#diff-cmVxdWVzdHMvY29va2llcy5weQ==) | `51.68% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=footer). Last update [e4d214d...72d96a6](https://codecov.io/gh/requests/requests/pull/4755?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4754
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4754/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4754/comments
|
https://api.github.com/repos/psf/requests/issues/4754/events
|
https://github.com/psf/requests/issues/4754
| 345,696,024 |
MDU6SXNzdWUzNDU2OTYwMjQ=
| 4,754 |
error on "pip install requests" with chardet
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/484366?v=4",
"events_url": "https://api.github.com/users/mhndm/events{/privacy}",
"followers_url": "https://api.github.com/users/mhndm/followers",
"following_url": "https://api.github.com/users/mhndm/following{/other_user}",
"gists_url": "https://api.github.com/users/mhndm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mhndm",
"id": 484366,
"login": "mhndm",
"node_id": "MDQ6VXNlcjQ4NDM2Ng==",
"organizations_url": "https://api.github.com/users/mhndm/orgs",
"received_events_url": "https://api.github.com/users/mhndm/received_events",
"repos_url": "https://api.github.com/users/mhndm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mhndm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mhndm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mhndm",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-30T10:15:42Z
|
2021-09-08T01:21:05Z
|
2018-08-04T12:33:43Z
|
NONE
|
resolved
|
Summary.
pip install requests
Collecting requests
Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Requirement already satisfied: idna<2.8,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests) (2.6)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests) (1.22)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests) (2017.11.5)
Installing collected packages: chardet, requests
Found existing installation: chardet 2.0.1
Cannot uninstall 'chardet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
## Expected Result
success install
## Actual Result
not installed
## Reproduction Steps
```python
import requests
```
## System Information
ubuntu 14.04
python 2.75
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4754/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4754/timeline
| null |
completed
| null | null | false |
[
"This is likely an issue with you having system package manager installed packages and then trying to globally reinstall those packages with pip. This is not an issue with Requests or chardet, but with what you're attempting to do. You've also not provided the information we request as part of an issue to help you debug, so there's no further work we will do here. I suggest you perform more online searching to find the appropriate solution."
] |
https://api.github.com/repos/psf/requests/issues/4753
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4753/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4753/comments
|
https://api.github.com/repos/psf/requests/issues/4753/events
|
https://github.com/psf/requests/issues/4753
| 345,571,273 |
MDU6SXNzdWUzNDU1NzEyNzM=
| 4,753 |
SSLV3_ALERT_HANDSHAKE_FAILURE in Python 3.5, works in Python 2.7
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/51596?v=4",
"events_url": "https://api.github.com/users/ghtyrant/events{/privacy}",
"followers_url": "https://api.github.com/users/ghtyrant/followers",
"following_url": "https://api.github.com/users/ghtyrant/following{/other_user}",
"gists_url": "https://api.github.com/users/ghtyrant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghtyrant",
"id": 51596,
"login": "ghtyrant",
"node_id": "MDQ6VXNlcjUxNTk2",
"organizations_url": "https://api.github.com/users/ghtyrant/orgs",
"received_events_url": "https://api.github.com/users/ghtyrant/received_events",
"repos_url": "https://api.github.com/users/ghtyrant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghtyrant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghtyrant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghtyrant",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-07-29T23:14:46Z
|
2021-08-27T00:08:35Z
|
2018-08-08T05:46:09Z
|
NONE
|
resolved
|
I'm running the following code:
```python
import requests
import ssl
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
class SSLAdapter(HTTPAdapter):
'''An HTTPS Transport Adapter that uses an arbitrary SSL version.'''
def __init__(self, ssl_version=None, **kwargs):
self.ssl_version = ssl_version
super(SSLAdapter, self).__init__(**kwargs)
def init_poolmanager(self, connections, maxsize, block=False):
self.poolmanager = PoolManager(num_pools=connections,
maxsize=maxsize,
block=block,
ssl_version=self.ssl_version)
s = requests.Session()
s.mount('https://', SSLAdapter(ssl.PROTOCOL_TLSv1_2))
print(ssl.OPENSSL_VERSION)
r = s.get('https://bibliothek.weltenbau.net/api/profile/265854176393691138')
print(r.status_code)
```
Using Python 3.5.3, I get the following errors:
```
OpenSSL 1.1.0f 25 May 2017
Traceback (most recent call last):
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/connection.py", line 356, in connect
ssl_context=context)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 359, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.5/ssl.py", line 385, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 760, in __init__
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bibliothek.weltenbau.net', port=443): Max retries exceeded with url: /api/profile/265854176393691138 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 24, in <module>
r = s.get('https://bibliothek.weltenbau.net/api/profile/265854176393691138')
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/opt/weltenbau-bot/.venv/lib/python3.5/site-packages/requests/adapters.py", line 511, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='bibliothek.weltenbau.net', port=443): Max retries exceeded with url: /api/profile/265854176393691138 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)'),))
```
Using Python 2.7.13 everything works as expected:
```
OpenSSL 1.1.0f 25 May 2017
200
```
## System Information
### Python 3.5.3
#### requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.5.3"
},
"platform": {
"release": "4.9.0-6-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
#### pip freeze
```
certifi==2018.4.16
chardet==3.0.4
idna==2.7
requests==2.19.1
urllib3==1.23
```
### Python 2.7.13:
#### requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.9.0-6-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
#### pip freeze
```
certifi==2018.4.16
chardet==3.0.4
idna==2.7
requests==2.19.1
urllib3==1.23
```
# Possible solution
Installing pyOpenSSL in the Python3 venv seems to fix this issue.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 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/4753/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4753/timeline
| null |
completed
| null | null | false |
[
"Hi @ghtyrant,\r\n\r\nIt looks like there is some variance in your SSL setup between each python install. The 3.5 interpreter is unable to negotiate an acceptable protocol with the server. The fact that installing PyOpenSSL solves this suggests that there is something wrong with your 3.5 SSL setup.\r\n\r\nI unfortunately haven't been able to reproduce this locally between installations of 2.7.13 and 3.5.3 either. I believe there were some issues originally with OpenSSL 1.1 and Python not building together nicely due to API/struct changes.\r\n\r\nThe only advice I can offer at the moment is to look at either reinstalling 3.5.3 against your system OpenSSL, or upgrading to 3.5.6. I'm not sure I see a clear link to a defect in Requests and the behaviour being observed. I'm going to close this for now but If you find further information, please feel free to reopen. Thanks!",
"Came across this when having the same problem when installing OpenSSL 1.1.1b from packages.sury.org on Debian 9. This was the easiest way to get the latest version of nginx and TLS 1.3.\r\n\r\nHowever apparently it does not play very well with the default Python install (3.5.3) and was causing this error in the Django app. Installing pyOpenSSL fixes the problem.\r\n\r\nGuess we'll have to wait for Debian 10 to get TLS 1.3 and Python working together properly ;-)",
"hey did you find a solution?",
"[This issue](https://github.com/Lawouach/WebSocket-for-Python/issues/262) from ws4py websocket implementation of TLS SNI might be relevant. Seems you need to have an ssl.py that supports SNI and ALSO ssl.wrap_socket call is deprecated and needs to be updated to ssl.SSLSocket(self.sock, **self.ssl_options), with 'server_hostname' specified (as the full hostname) in the self.ssl_options dictionary, to get a good SNI-enabled handshake."
] |
https://api.github.com/repos/psf/requests/issues/4752
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4752/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4752/comments
|
https://api.github.com/repos/psf/requests/issues/4752/events
|
https://github.com/psf/requests/issues/4752
| 344,410,456 |
MDU6SXNzdWUzNDQ0MTA0NTY=
| 4,752 |
bdist_wheel upload failes for python3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15922770?v=4",
"events_url": "https://api.github.com/users/thilo-maurer/events{/privacy}",
"followers_url": "https://api.github.com/users/thilo-maurer/followers",
"following_url": "https://api.github.com/users/thilo-maurer/following{/other_user}",
"gists_url": "https://api.github.com/users/thilo-maurer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thilo-maurer",
"id": 15922770,
"login": "thilo-maurer",
"node_id": "MDQ6VXNlcjE1OTIyNzcw",
"organizations_url": "https://api.github.com/users/thilo-maurer/orgs",
"received_events_url": "https://api.github.com/users/thilo-maurer/received_events",
"repos_url": "https://api.github.com/users/thilo-maurer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thilo-maurer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thilo-maurer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thilo-maurer",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-25T11:49:54Z
|
2021-09-08T01:21:02Z
|
2018-08-11T20:04:13Z
|
NONE
|
resolved
|
Cannot upload wheel using python3.
Reason is that in this projects's `setup.py` line 86, argument `classifiers` should be an array, not a tuple. Replacing `(` by `[` fixes the issue.
## Expected Result
Success for
```python3 setup.py bdist_wheel upload -r artifactory```
## Actual Result
```
root@host:/build/requests-2.19.1.tar.gz.extracted/requests-2.19.1# python3 setup.py bdist_wheel upload -r artifactory
running bdist_wheel
running build
running build_py
running egg_info
writing requests.egg-info/PKG-INFO
writing dependency_links to requests.egg-info/dependency_links.txt
writing requirements to requests.egg-info/requires.txt
writing top-level names to requests.egg-info/top_level.txt
reading manifest file 'requests.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'NOTICE'
warning: no files found matching 'requirements.txt'
writing manifest file 'requests.egg-info/SOURCES.txt'
installing to build/bdist.linux-ppc64le/wheel
running install
running install_lib
creating build/bdist.linux-ppc64le/wheel
creating build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/_internal_utils.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/certs.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/exceptions.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/compat.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/auth.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/structures.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/packages.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/hooks.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/adapters.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/utils.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/api.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/sessions.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/__init__.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/__version__.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/models.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/help.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/status_codes.py -> build/bdist.linux-ppc64le/wheel/requests
copying build/lib/requests/cookies.py -> build/bdist.linux-ppc64le/wheel/requests
running install_egg_info
Copying requests.egg-info to build/bdist.linux-ppc64le/wheel/requests-2.19.1-py3.6.egg-info
running install_scripts
creating build/bdist.linux-ppc64le/wheel/requests-2.19.1.dist-info/WHEEL
creating '/build/requests-2.19.1.tar.gz.extracted/requests-2.19.1/dist/requests-2.19.1-py2.py3-none-any.whl' and adding '.' to it
adding 'requests/__init__.py'
adding 'requests/__version__.py'
adding 'requests/_internal_utils.py'
adding 'requests/adapters.py'
adding 'requests/api.py'
adding 'requests/auth.py'
adding 'requests/certs.py'
adding 'requests/compat.py'
adding 'requests/cookies.py'
adding 'requests/exceptions.py'
adding 'requests/help.py'
adding 'requests/hooks.py'
adding 'requests/models.py'
adding 'requests/packages.py'
adding 'requests/sessions.py'
adding 'requests/status_codes.py'
adding 'requests/structures.py'
adding 'requests/utils.py'
adding 'requests-2.19.1.dist-info/LICENSE.txt'
adding 'requests-2.19.1.dist-info/top_level.txt'
adding 'requests-2.19.1.dist-info/WHEEL'
adding 'requests-2.19.1.dist-info/METADATA'
adding 'requests-2.19.1.dist-info/RECORD'
removing build/bdist.linux-ppc64le/wheel
running upload
Traceback (most recent call last):
File "setup.py", line 106, in <module>
'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 131, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/distutils/command/upload.py", line 64, in run
self.upload_file(command, pyversion, filename)
File "/usr/local/lib/python3.6/distutils/command/upload.py", line 162, in upload_file
body.write(value)
TypeError: a bytes-like object is required, not 'str'
```
## Reproduction Steps
After
```
pip3 download requests --no-binary :all:
```
then extracting the package, then
* build good
* upload failes, when using python3 (python2 is fine)
|
{
"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/4752/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4752/timeline
| null |
completed
| null | null | false |
[
"Hi @thilo-maurer, this should be resolved in 489f58ce. Thanks for the report!"
] |
https://api.github.com/repos/psf/requests/issues/4751
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4751/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4751/comments
|
https://api.github.com/repos/psf/requests/issues/4751/events
|
https://github.com/psf/requests/pull/4751
| 344,400,850 |
MDExOlB1bGxSZXF1ZXN0MjAzODAzNjkw
| 4,751 |
compat.py already defines unicode() as str() on Python 3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"events_url": "https://api.github.com/users/cclauss/events{/privacy}",
"followers_url": "https://api.github.com/users/cclauss/followers",
"following_url": "https://api.github.com/users/cclauss/following{/other_user}",
"gists_url": "https://api.github.com/users/cclauss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cclauss",
"id": 3709715,
"login": "cclauss",
"node_id": "MDQ6VXNlcjM3MDk3MTU=",
"organizations_url": "https://api.github.com/users/cclauss/orgs",
"received_events_url": "https://api.github.com/users/cclauss/received_events",
"repos_url": "https://api.github.com/users/cclauss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cclauss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cclauss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cclauss",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-25T11:17:06Z
|
2021-09-02T00:07:38Z
|
2018-07-25T11:31:59Z
|
CONTRIBUTOR
|
resolved
|
It is not necessary or desirable to repeat the logic that properly belongs in compat.py.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"events_url": "https://api.github.com/users/cclauss/events{/privacy}",
"followers_url": "https://api.github.com/users/cclauss/followers",
"following_url": "https://api.github.com/users/cclauss/following{/other_user}",
"gists_url": "https://api.github.com/users/cclauss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cclauss",
"id": 3709715,
"login": "cclauss",
"node_id": "MDQ6VXNlcjM3MDk3MTU=",
"organizations_url": "https://api.github.com/users/cclauss/orgs",
"received_events_url": "https://api.github.com/users/cclauss/received_events",
"repos_url": "https://api.github.com/users/cclauss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cclauss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cclauss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cclauss",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4751/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4751/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4751.diff",
"html_url": "https://github.com/psf/requests/pull/4751",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4751.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4751"
}
| true |
[
"Fails pretty miserably. "
] |
https://api.github.com/repos/psf/requests/issues/4750
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4750/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4750/comments
|
https://api.github.com/repos/psf/requests/issues/4750/events
|
https://github.com/psf/requests/pull/4750
| 344,196,341 |
MDExOlB1bGxSZXF1ZXN0MjAzNjQ5MDY3
| 4,750 |
Update all documentation to show Python 3.7 is supported
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-24T20:43:42Z
|
2021-09-02T00:07:37Z
|
2018-08-02T17:55:41Z
|
CONTRIBUTOR
|
resolved
|
Official support was added in 6686ac173011a302c26c4aedbd992f96d6e58357.
|
{
"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/4750/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4750/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4750.diff",
"html_url": "https://github.com/psf/requests/pull/4750",
"merged_at": "2018-08-02T17:55:41Z",
"patch_url": "https://github.com/psf/requests/pull/4750.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4750"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=h1) Report\n> Merging [#4750](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/e4d214dd763caf9a59dba0b382106cbf9938aa51?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4750 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=footer). Last update [e4d214d...df1cd08](https://codecov.io/gh/requests/requests/pull/4750?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4749
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4749/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4749/comments
|
https://api.github.com/repos/psf/requests/issues/4749/events
|
https://github.com/psf/requests/pull/4749
| 344,109,448 |
MDExOlB1bGxSZXF1ZXN0MjAzNTgyODMz
| 4,749 |
make content-type's charset information case-insensitive
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5463445?v=4",
"events_url": "https://api.github.com/users/derlin/events{/privacy}",
"followers_url": "https://api.github.com/users/derlin/followers",
"following_url": "https://api.github.com/users/derlin/following{/other_user}",
"gists_url": "https://api.github.com/users/derlin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/derlin",
"id": 5463445,
"login": "derlin",
"node_id": "MDQ6VXNlcjU0NjM0NDU=",
"organizations_url": "https://api.github.com/users/derlin/orgs",
"received_events_url": "https://api.github.com/users/derlin/received_events",
"repos_url": "https://api.github.com/users/derlin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/derlin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/derlin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/derlin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-24T16:18:54Z
|
2021-09-02T00:07:38Z
|
2018-07-24T16:42:28Z
|
CONTRIBUTOR
|
resolved
|
Fix bug described in https://github.com/requests/requests/issues/4748 .
|
{
"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/4749/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4749/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4749.diff",
"html_url": "https://github.com/psf/requests/pull/4749",
"merged_at": "2018-07-24T16:42:28Z",
"patch_url": "https://github.com/psf/requests/pull/4749.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4749"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=h1) Report\n> Merging [#4749](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/6686ac173011a302c26c4aedbd992f96d6e58357?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4749 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=footer). Last update [6686ac1...907c927](https://codecov.io/gh/requests/requests/pull/4749?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4748
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4748/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4748/comments
|
https://api.github.com/repos/psf/requests/issues/4748/events
|
https://github.com/psf/requests/issues/4748
| 344,062,986 |
MDU6SXNzdWUzNDQwNjI5ODY=
| 4,748 |
case-insensitive charset handling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5463445?v=4",
"events_url": "https://api.github.com/users/derlin/events{/privacy}",
"followers_url": "https://api.github.com/users/derlin/followers",
"following_url": "https://api.github.com/users/derlin/following{/other_user}",
"gists_url": "https://api.github.com/users/derlin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/derlin",
"id": 5463445,
"login": "derlin",
"node_id": "MDQ6VXNlcjU0NjM0NDU=",
"organizations_url": "https://api.github.com/users/derlin/orgs",
"received_events_url": "https://api.github.com/users/derlin/received_events",
"repos_url": "https://api.github.com/users/derlin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/derlin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/derlin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/derlin",
"user_view_type": "public"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] |
closed
| true | null |
[] | null | 4 |
2018-07-24T14:28:26Z
|
2021-09-08T01:21:09Z
|
2018-07-24T16:46:20Z
|
CONTRIBUTOR
|
resolved
|
I get encoding issues when extracting text from some URLs, for example this [one](https://zuri.net/magazin/slang/33/thema_small-talk.htm). After some digging, it seems that although the `headers` dictionary is case-insensitive, the parsing of the content-type header entry is not. For example, if the server sends:
text/html; Charset=UTF-8
Because of the uppercase `C`, `response.encoding` returns the default `ISO-8859-1` instead of `UTF-8`.
## Expected Result
`r.encoding` should return `utf-8`, as it is stated in the `content-type` header.
## Actual Result
`r.encoding` returns the default`ISO-8859-1`.
## Reproduction Steps
```python
import requests
resp = requests.get("https://zuri.net/magazin/slang/33/thema_small-talk.htm")
print(resp.encoding)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
## Suggestion
The code responsible is in `utils.py`, method `_parse_content_type_header`. Here, either use a case-insensitive dictionary, or transform the keys to lowercase (`params_dict[key.lower()] = value`).
|
{
"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/4748/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4748/timeline
| null |
completed
| null | null | false |
[
"Hi @derlin, thanks for bringing this to our attention! This definitely looks like a miss on our part.\r\n\r\nI think your suggestion of lower-casing is probably the better solution from an overhead perspective. That way we can avoid instantiating a new `CaseInsenstiveDict` every call when it's likely only going to contain a single value. Would you have any interest in providing a PR doing that?",
"+1 for .lower, in this instance.",
"@nateprewitt My pleasure. I'll do a pull request asap. ",
"Resolved in #4749."
] |
https://api.github.com/repos/psf/requests/issues/4747
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4747/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4747/comments
|
https://api.github.com/repos/psf/requests/issues/4747/events
|
https://github.com/psf/requests/issues/4747
| 343,920,747 |
MDU6SXNzdWUzNDM5MjA3NDc=
| 4,747 |
urllib3 Retry and Response Hooks (Duplicates #4514)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9652736?v=4",
"events_url": "https://api.github.com/users/belthaZornv/events{/privacy}",
"followers_url": "https://api.github.com/users/belthaZornv/followers",
"following_url": "https://api.github.com/users/belthaZornv/following{/other_user}",
"gists_url": "https://api.github.com/users/belthaZornv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/belthaZornv",
"id": 9652736,
"login": "belthaZornv",
"node_id": "MDQ6VXNlcjk2NTI3MzY=",
"organizations_url": "https://api.github.com/users/belthaZornv/orgs",
"received_events_url": "https://api.github.com/users/belthaZornv/received_events",
"repos_url": "https://api.github.com/users/belthaZornv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/belthaZornv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/belthaZornv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/belthaZornv",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 5 |
2018-07-24T07:41:46Z
|
2021-04-04T21:11:00Z
| null |
NONE
| null |
Given you have a session, and have successfully attached the auth class and the response hooks accordingly; although you'd like to add the Retry class into the picture from urllib3.
## Expected Result
I'd expect the response hooks to be honoured - at the very least on the first response (not retry).
## Actual Result
The response hooks are ignored completely.
## Reproduction Steps
```python
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
retry = Retry(total=1, read=1, connect=1, backoff_factor=0.5,
status_forcelist=(401, 500))
adapter = HTTPAdapter(max_retries=retry)
session = requests.Session()
session.hooks = {'response': response_hook}
session.mount('http://', adapter)
session.mount('https://', adapter)
def response_hook(response, *args, **kwargs):
"""
Response hook
:param response:
:return:
"""
if response.status_code == requests.codes.unauthorized:
print('Your logic here')
```
## System Information
```
Python version: 3.5
Requests version: 2.11.0
OS: Ubuntu 16.04
```
| null |
{
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4747/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4747/timeline
| null | null | null | null | false |
[
"Can anyone suggest a work around for this? (except for the standard flagging and re-doing what Retry does)",
"@belthaZornv can you share what part of our documentation misled you here?\r\n\r\n`Retry` logic from urllib3 operates at a much lower level than the response hook(s). You have specified `401` as a status code to retry which means that Requests will never see it. It will be retried by urllib3 before we can execute the hook. I thought our documentation was clear that the Retry logic operated at a very low level and caused other parts of Requests to behave differently. If I'm mistaken, please point out where you saw differently.",
"@sigmavirus24 I'm not saying you or the documentation misled me or someone else, but otherwise I'm more interested in discussing what you'd expect, would you expect the response hook to execute? (Taking into consideration that not everyone knows requests inside out) I did, I expected the hook to execute at least once; but I might have been wrong in thinking so, so my question is, what is the ideal solution when someone wants to Retry but also wants a response hook to execute? More over I believe that unless urllib3 honours the hooks than there isn't much to add. \r\n\r\nAlthough for someone new to requests, one would expect hooks and auth classes to run as by default even in Retry, after knowing the structure beneath it all, yes, I fully agree it shouldn't or even can't.. but people are and will get lost over this.. and would be nice to find the ideal solution if any exist.",
"Just got bitten by the same thing myself too. I was assuming hooks would work, until I dug deeper.",
"For anyone here getting stuck on this, reread the reply from sigmavirus24. If your use case was like mine ( a reauth hook ) if the status code 401 or 403 is in your status_forcelist urllib3 will gobble the response that you may be trying to hook on. You may only want to retry on < 403\r\n\r\n...Seems so obvious now."
] |
https://api.github.com/repos/psf/requests/issues/4746
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4746/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4746/comments
|
https://api.github.com/repos/psf/requests/issues/4746/events
|
https://github.com/psf/requests/issues/4746
| 343,560,824 |
MDU6SXNzdWUzNDM1NjA4MjQ=
| 4,746 |
urllib3 LocationParseError uncaught by requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/115884?v=4",
"events_url": "https://api.github.com/users/Arduous/events{/privacy}",
"followers_url": "https://api.github.com/users/Arduous/followers",
"following_url": "https://api.github.com/users/Arduous/following{/other_user}",
"gists_url": "https://api.github.com/users/Arduous/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Arduous",
"id": 115884,
"login": "Arduous",
"node_id": "MDQ6VXNlcjExNTg4NA==",
"organizations_url": "https://api.github.com/users/Arduous/orgs",
"received_events_url": "https://api.github.com/users/Arduous/received_events",
"repos_url": "https://api.github.com/users/Arduous/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Arduous/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Arduous/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Arduous",
"user_view_type": "public"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] |
closed
| true | null |
[] | null | 2 |
2018-07-23T09:43:33Z
|
2021-09-07T00:06:16Z
|
2018-10-01T02:25:44Z
|
NONE
|
resolved
|
When accessing a page that is not redirecting properly (in this case, port is "-1", urllib3 LocationParseError is returned without being caught by requests.
The URL _currently_ (Jul 23rd 2018) badly redirecting: https://www.fossil.com/us/en/account-dashboard/registered-products.html
## Expected Result
An exception raised by requests, like InvalidURL
## Actual Result
Exception from urllib3 is not masked
## Reproduction Steps
```python
import requests
test = requests.get("https://www.fossil.com/us/en/account-dashboard/registered-products.html")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 644, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 222, in resolve_redirects
**adapter_kwargs
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 410, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 314, in get_connection
conn = self.poolmanager.connection_from_url(url)
File "/usr/local/lib/python2.7/dist-packages/urllib3/poolmanager.py", line 277, in connection_from_url
u = parse_url(url)
File "/usr/local/lib/python2.7/dist-packages/urllib3/util/url.py", line 199, in parse_url
raise LocationParseError(url)
urllib3.exceptions.LocationParseError: Failed to parse: www.fossil.com:-1
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.9"
},
"platform": {
"release": "4.9.35-v7+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000114f",
"version": "18.0.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000114f"
},
"urllib3": {
"version": "1.23"
},
"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/4746/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4746/timeline
| null |
completed
| null | null | false |
[
"Thanks for bringing this to our attention @Arduous! We do appear to be leaking an exception when we're trying to pull a connection from the pool. We should try to identify what exceptions can be raised here and then add handling for at least `urllib3.exceptions.HTTPError`, and possibly more specific cases if appropriate.",
"Resolved with #4765."
] |
https://api.github.com/repos/psf/requests/issues/4745
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4745/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4745/comments
|
https://api.github.com/repos/psf/requests/issues/4745/events
|
https://github.com/psf/requests/issues/4745
| 343,304,930 |
MDU6SXNzdWUzNDMzMDQ5MzA=
| 4,745 |
Exceptions when using data=json.dumps(payload))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5896180?v=4",
"events_url": "https://api.github.com/users/redstoneleo/events{/privacy}",
"followers_url": "https://api.github.com/users/redstoneleo/followers",
"following_url": "https://api.github.com/users/redstoneleo/following{/other_user}",
"gists_url": "https://api.github.com/users/redstoneleo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/redstoneleo",
"id": 5896180,
"login": "redstoneleo",
"node_id": "MDQ6VXNlcjU4OTYxODA=",
"organizations_url": "https://api.github.com/users/redstoneleo/orgs",
"received_events_url": "https://api.github.com/users/redstoneleo/received_events",
"repos_url": "https://api.github.com/users/redstoneleo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/redstoneleo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/redstoneleo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/redstoneleo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-07-21T07:08:26Z
|
2021-09-08T01:21:10Z
|
2018-07-21T21:58:51Z
|
NONE
|
resolved
|
```
import json , requests
r = requests.post(
"http://httpbin.org/post",
files={'image': open(filename, 'rb')},
data=json.dumps({'wordPos': [86, 23]})
)
```
**exceptions:**
```
Traceback (most recent call last):
File "D:\BaiduYunDownload\编程\Python\Project\EngkuDict\Utils.py", line 128, in <module>
myOCR2()
File "D:\BaiduYunDownload\编程\Python\Project\EngkuDict\Utils.py", line 116, in myOCR2
data=json.dumps({'wordPos': [86, 23]})
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 498, in request
prep = self.prepare_request(req)
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 441, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\models.py", line 312, in prepare
self.prepare_body(data, files, json)
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\models.py", line 500, in prepare_body
(body, content_type) = self._encode_files(files, data)
File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\models.py", line 122, in _encode_files
raise ValueError("Data must not be a string.")
ValueError: Data must not be a string.
```
|
{
"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/4745/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4745/timeline
| null |
completed
| null | null | false |
[
"@redstoneleo it's not clear how you would be hitting this code path. `_encode_files` is only triggered when the `files` parameter isn't False-y. The code you've provided doesn't seem to reproduce the issue either.\r\n\r\nWe'll need the information we initially asked for with this issue in order to do any further debugging, but at first glance, this looks like a local misconfiguration.",
"@nateprewitt Sorry for that , I've updated the test code",
"@redstoneleo, if you're passing both data and files, they need to be key-value pairs. When you serialize the dictionary into a string with `json.dumps` we lose the semantics of the dictionary and can't map to multipart/form-data correctly.\r\n\r\nIf you remove the `json.dumps` portion, things should work as expected.",
"Thanks, as far as I know , the documentation has not covered what you have said, it would be better to add in it.\r\nBTW, since `data` could accept `json.dumps()`, while `json.dumps()` is a `str `object , but [the doc](http://docs.python-requests.org/en/master/api/#requests.Response) has not mentioned the `data` parameter could accept a `str `object, so I think this should also be added in \r\n\r\nThe current description for `data` parameter \r\n> data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request."
] |
https://api.github.com/repos/psf/requests/issues/4744
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4744/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4744/comments
|
https://api.github.com/repos/psf/requests/issues/4744/events
|
https://github.com/psf/requests/issues/4744
| 343,185,507 |
MDU6SXNzdWUzNDMxODU1MDc=
| 4,744 |
urllib3.exceptions.NewConnectionError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1474127?v=4",
"events_url": "https://api.github.com/users/pinkynrg/events{/privacy}",
"followers_url": "https://api.github.com/users/pinkynrg/followers",
"following_url": "https://api.github.com/users/pinkynrg/following{/other_user}",
"gists_url": "https://api.github.com/users/pinkynrg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pinkynrg",
"id": 1474127,
"login": "pinkynrg",
"node_id": "MDQ6VXNlcjE0NzQxMjc=",
"organizations_url": "https://api.github.com/users/pinkynrg/orgs",
"received_events_url": "https://api.github.com/users/pinkynrg/received_events",
"repos_url": "https://api.github.com/users/pinkynrg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pinkynrg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pinkynrg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pinkynrg",
"user_view_type": "public"
}
|
[
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 2 |
2018-07-20T17:20:08Z
|
2021-09-08T01:21:07Z
|
2018-08-04T12:29:43Z
|
NONE
|
resolved
|
It seems like I'm getting an Exception from urllib3: urllib3.exceptions.NewConnectionError.
## Expected Result
I am expecting to catch the exception using requests.exceptions.RequestException
## Actual Result
The exception in not getting caught.
## Reproduction Steps
```python
import requests
try:
response = requests.post('http://0.0.0.0:8080', data = {'token': 'some_token'})
if response.status_code == 200:
data = json.loads(response.text)
if ('user' in data):
user = User.objects.get(username=data['user']['username'])
except requests.exceptions.RequestException as e:
result = {"error": e}
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "17.5.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ef"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 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/4744/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4744/timeline
| null |
completed
| null | null | false |
[
"Hi @pinkynrg, can we please get the full stack trace you’re seeing and a minimum viable reproduction?\r\n\r\nA simplified version of what you’ve supplied returns a `requests.exception.ConnectionError` which wraps the `NewConnectionError`.\r\n\r\n```python\r\nimport requests\r\n\r\nrequests.post(‘http://0.0.0.0:8080’, data={‘test’: ‘data’})\r\n```",
"Closing due to lack of information or ability to reproduce."
] |
https://api.github.com/repos/psf/requests/issues/4743
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4743/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4743/comments
|
https://api.github.com/repos/psf/requests/issues/4743/events
|
https://github.com/psf/requests/issues/4743
| 342,932,917 |
MDU6SXNzdWUzNDI5MzI5MTc=
| 4,743 |
Link to donate for requests for py3 isn't working
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/265677?v=4",
"events_url": "https://api.github.com/users/cgthayer/events{/privacy}",
"followers_url": "https://api.github.com/users/cgthayer/followers",
"following_url": "https://api.github.com/users/cgthayer/following{/other_user}",
"gists_url": "https://api.github.com/users/cgthayer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cgthayer",
"id": 265677,
"login": "cgthayer",
"node_id": "MDQ6VXNlcjI2NTY3Nw==",
"organizations_url": "https://api.github.com/users/cgthayer/orgs",
"received_events_url": "https://api.github.com/users/cgthayer/received_events",
"repos_url": "https://api.github.com/users/cgthayer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cgthayer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cgthayer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cgthayer",
"user_view_type": "public"
}
|
[] |
closed
| true |
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
] | null | 3 |
2018-07-20T00:27:36Z
|
2021-09-07T00:06:23Z
|
2018-09-10T15:22:27Z
|
NONE
|
resolved
|
Summary.
link to support requests for py3 isn't working at the top of
http://docs.python-requests.org/en/master/
leads to https://www.kennethreitz.org/requests3
What you expected.
a website
What happened instead.
404
```python
import requests
```
## System Information
$ python -m requests.help
```
404
```
Thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 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/4743/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4743/timeline
| null |
completed
| null | null | false |
[
"@kennethreitz this is a bug in your website redesign and URL routing",
"Need to bring the death clock back — or remove the banner entirely.\n\nSent from my iPhone\n\n> On Jul 20, 2018, at 11:09 AM, Ian Stapleton Cordasco <[email protected]> wrote:\n> \n> @kennethreitz this is a bug in your website redesign and URL routing\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n",
"@kennethreitz #4767 because people are still looking for that page. I've also received emails asking for updates on the progress and spend of that money. I can't answer to either of those. Please either bring the page back and add updates or figure something else out."
] |
https://api.github.com/repos/psf/requests/issues/4742
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4742/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4742/comments
|
https://api.github.com/repos/psf/requests/issues/4742/events
|
https://github.com/psf/requests/issues/4742
| 342,597,079 |
MDU6SXNzdWUzNDI1OTcwNzk=
| 4,742 |
Response.content returns the gzip compressed file
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29884752?v=4",
"events_url": "https://api.github.com/users/xqs42b/events{/privacy}",
"followers_url": "https://api.github.com/users/xqs42b/followers",
"following_url": "https://api.github.com/users/xqs42b/following{/other_user}",
"gists_url": "https://api.github.com/users/xqs42b/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xqs42b",
"id": 29884752,
"login": "xqs42b",
"node_id": "MDQ6VXNlcjI5ODg0NzUy",
"organizations_url": "https://api.github.com/users/xqs42b/orgs",
"received_events_url": "https://api.github.com/users/xqs42b/received_events",
"repos_url": "https://api.github.com/users/xqs42b/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xqs42b/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xqs42b/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xqs42b",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-07-19T06:38:03Z
|
2018-11-20T13:00:05Z
|
2018-07-19T13:37:21Z
|
NONE
|
resolved
|
Response.content has not been unzip
Response.content has not been unzip
Hello, please ask a question, other website requests are basically decompressed, but when you request this URL(https://www.betburger.com/users/sigin_in), you return the compressed string.
=======================code============================
# coding=utf-8
import requests
url = 'https://www.betburger.com/users/sign_in'
headers = {
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'zh-CN,zh;q=0.9',
'cookie': '__cfduid=dc9505fc253be4d1f40fc6158900b6cb11531922677; cookieconsent_dismissed=yes; abb_web_session=7a9d700e75ad796a695cfad024c93989; _ga=GA1.2.1097857175.1531980113; _gid=GA1.2.765234195.1531980113; _gat_UA-113146417-2=1; _gat_UA-35300177-2=1',
'referer': 'https://www.betburger.com/',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'
}
rp = requests.get(url, headers=headers)
print rp.content
================================================
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4742/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4742/timeline
| null |
completed
| null | null | false |
[
"sos",
"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.",
"@sigmavirus24 The response header content(content encoding:gzip) is missing\r\nConstruct a request by requests moudle,the response header is : \r\n{\r\n \"Server\":\"nginx\",\r\n \"Date\":\"Mon, 19 Nov 2018 07:10:00 GMT\",\r\n \"Content-Type\":\"text/html; charset=UTF-8\",\r\n \"Transfer-Encoding\":\"chunked\",\r\n \"Connection\":\"keep-alive\",\r\n \"Vary\":\"Accept-Encoding\",\r\n \"Access-Control-Allow-Origin\":\"http://runapi.showdoc.cc\"\r\n}\r\n\r\nbut,The original response header is : \r\nHTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Mon, 19 Nov 2018 07:15:20 GMT\r\nContent-Type: text/html; charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nVary: Accept-Encoding\r\nAccess-Control-Allow-Origin: http://runapi.showdoc.cc\r\nAccess-Control-Allow-Credentials : true\r\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\r\nCache-Control: no-store, no-cache, must-revalidate\r\nPragma: no-cache\r\nContent-Encoding: gzip\r\n\r\nContent-Encoding:gizp is missing,The gzip file cannot be decompressed automatically,so response.text is garbage characters"
] |
https://api.github.com/repos/psf/requests/issues/4741
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4741/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4741/comments
|
https://api.github.com/repos/psf/requests/issues/4741/events
|
https://github.com/psf/requests/issues/4741
| 342,162,413 |
MDU6SXNzdWUzNDIxNjI0MTM=
| 4,741 |
Proxy password contains square bracket "[" will failed with error "Invalid IPv6 URL" from urllib3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/892870?v=4",
"events_url": "https://api.github.com/users/Hugh----/events{/privacy}",
"followers_url": "https://api.github.com/users/Hugh----/followers",
"following_url": "https://api.github.com/users/Hugh----/following{/other_user}",
"gists_url": "https://api.github.com/users/Hugh----/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Hugh----",
"id": 892870,
"login": "Hugh----",
"node_id": "MDQ6VXNlcjg5Mjg3MA==",
"organizations_url": "https://api.github.com/users/Hugh----/orgs",
"received_events_url": "https://api.github.com/users/Hugh----/received_events",
"repos_url": "https://api.github.com/users/Hugh----/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Hugh----/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Hugh----/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Hugh----",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-18T03:22:40Z
|
2021-09-08T01:21:10Z
|
2018-07-18T05:59:44Z
|
NONE
|
resolved
|
Summary.
## Expected Result
When I have passed a proxy with square bracket "[" in the password, the request session should work.
## Actual Result
There will be error "Invalid IPv6 URL" generated by urllib3 which requests is based on.
## Reproduction Steps
```python
from requests import Request, Session
proxies = {
'http': 'http://username:passw[[email protected]',
'https': 'http://username:passw[ord@proxy-server:8081',
}
s = Session()
req = Request('POST', auth_url, data=login_data)
prepped = s.prepare_request(req)
resp = s.send(prepped, proxies=proxies)
print(resp.cookies)
======The error message======
resp = s.send(prepped, proxies=proxies)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 410, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 303, in get_connection
proxy = prepend_scheme_if_needed(proxy, 'http')
File "/usr/local/lib/python3.7/site-packages/requests/utils.py", line 894, in prepend_scheme_if_needed
scheme, netloc, path, params, query, fragment = urlparse(url, new_scheme)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 368, in urlparse
splitresult = urlsplit(url, scheme, allow_fragments)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 417, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
======End of the error message======
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.0"
},
"platform": {
"release": "17.5.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "18.0.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/4741/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4741/timeline
| null |
completed
| null | null | false |
[
"Hi @Hugh----, the stacktrace you provided shows this error is from the standard library `urllib` module rather than urllib3. [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.2.1) states the allowable ABNF for a URI's authority component which doesn't include gen-delims (i.e. square brackets).\r\n\r\nYou'll need to percent-encode the password before using it in the URI in order to get things working as expected."
] |
https://api.github.com/repos/psf/requests/issues/4740
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4740/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4740/comments
|
https://api.github.com/repos/psf/requests/issues/4740/events
|
https://github.com/psf/requests/issues/4740
| 341,733,560 |
MDU6SXNzdWUzNDE3MzM1NjA=
| 4,740 |
Cant't get correct response (post multipart/form-data including file)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37398286?v=4",
"events_url": "https://api.github.com/users/wangyujieitcast/events{/privacy}",
"followers_url": "https://api.github.com/users/wangyujieitcast/followers",
"following_url": "https://api.github.com/users/wangyujieitcast/following{/other_user}",
"gists_url": "https://api.github.com/users/wangyujieitcast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangyujieitcast",
"id": 37398286,
"login": "wangyujieitcast",
"node_id": "MDQ6VXNlcjM3Mzk4Mjg2",
"organizations_url": "https://api.github.com/users/wangyujieitcast/orgs",
"received_events_url": "https://api.github.com/users/wangyujieitcast/received_events",
"repos_url": "https://api.github.com/users/wangyujieitcast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangyujieitcast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangyujieitcast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangyujieitcast",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-07-17T01:33:10Z
|
2021-09-08T01:21:11Z
|
2018-07-17T03:04:11Z
|
NONE
|
resolved
|
URL=“http://recognition.image.myqcloud.com/ocr/general”
When I used postman(Uploading screenshot file failed multiple times):
headers
Authorization:my_key
form-data:
appid:1257121697
image:local_file(File Type)
It's working! But when I used requests:
headers = {
"Host": 'recognition.image.myqcloud.com',
"Content-type": 'multipart/form-data',
"Authorization": my_key ,
}
data = {
"appid": "1257121697",
}
files = {'image': (img_file, open(img_file, 'rb'))}
response = requests.post(URL, data=data, headers=headers, files=files)
response status_code is 400.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37398286?v=4",
"events_url": "https://api.github.com/users/wangyujieitcast/events{/privacy}",
"followers_url": "https://api.github.com/users/wangyujieitcast/followers",
"following_url": "https://api.github.com/users/wangyujieitcast/following{/other_user}",
"gists_url": "https://api.github.com/users/wangyujieitcast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangyujieitcast",
"id": 37398286,
"login": "wangyujieitcast",
"node_id": "MDQ6VXNlcjM3Mzk4Mjg2",
"organizations_url": "https://api.github.com/users/wangyujieitcast/orgs",
"received_events_url": "https://api.github.com/users/wangyujieitcast/received_events",
"repos_url": "https://api.github.com/users/wangyujieitcast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangyujieitcast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangyujieitcast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangyujieitcast",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4740/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4740/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4739
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4739/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4739/comments
|
https://api.github.com/repos/psf/requests/issues/4739/events
|
https://github.com/psf/requests/pull/4739
| 340,954,294 |
MDExOlB1bGxSZXF1ZXN0MjAxMjQwOTk3
| 4,739 |
Document that params and data can be list of tuples everywhere
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14709?v=4",
"events_url": "https://api.github.com/users/moy/events{/privacy}",
"followers_url": "https://api.github.com/users/moy/followers",
"following_url": "https://api.github.com/users/moy/following{/other_user}",
"gists_url": "https://api.github.com/users/moy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moy",
"id": 14709,
"login": "moy",
"node_id": "MDQ6VXNlcjE0NzA5",
"organizations_url": "https://api.github.com/users/moy/orgs",
"received_events_url": "https://api.github.com/users/moy/received_events",
"repos_url": "https://api.github.com/users/moy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2018-07-13T09:49:48Z
|
2021-09-01T00:11:42Z
|
2018-07-17T22:16:03Z
|
CONTRIBUTOR
|
resolved
|
Fix a few inconsistencies in the doc found while working on [MechanicalSoup](https://github.com/MechanicalSoup/MechanicalSoup/pull/219).
|
{
"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/4739/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4739/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4739.diff",
"html_url": "https://github.com/psf/requests/pull/4739",
"merged_at": "2018-07-17T22:16:03Z",
"patch_url": "https://github.com/psf/requests/pull/4739.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4739"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=h1) Report\n> Merging [#4739](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/f6e13ccfc4b50dc458ee374e5dba347205b9a2da?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4739 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4739/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.57% <ø> (ø)` | :arrow_up: |\n| [requests/api.py](https://codecov.io/gh/requests/requests/pull/4739/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYXBpLnB5) | `36.36% <ø> (ø)` | :arrow_up: |\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4739/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.27% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=footer). Last update [f6e13cc...c008bf3](https://codecov.io/gh/requests/requests/pull/4739?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"> As for the others, it feels unnecessarily redundant for a smaller edge case.\r\n\r\nI find it strange to have a parameter with exactly the same behavior in different functions and different documentations. If you want to avoid redundancy, then factoring the docs with links (stg like \"Parameters to be sent in the query string for the :class:`Request`. See <link to proper doc> for details.\") would be IMHO better.\r\n\r\nIn the existing doc, the string is already precise enough to discourage the user from trying to find another doc (it already documents the \"dictionary\" and \"bytes\" case). When I found the doc for [Session.request](http://docs.python-requests.org/en/master/api/#requests.Session.request), it didn't occur to me that the actual doc for the `params` parameter should be searched for elsewhere.",
"@moy, how about we go with the below single-line copy then for the non-`request` entries.\r\n\r\n```(optional) Dictionary, list of tuples, or bytes to be sent in the query string for the :class:`Request`.```",
"I'm fine with the single line, but I'm not sure everyone would understand. I would add a link to the doc of requests.request for details.",
"@moy, these are thin wrappers around a single call which is for a well documented function. If users have a use case where they need tuples, we have documentation around this. If they're only looking at the code, it's a single click in most IDEs to determine its usage.\r\n\r\nThe main thing we're trying to avoid here in unnecessary bloat and having several places that need to be updated for the same information. As I said above, I'm happy to make this information clearer, but would prefer we do it without establishing a pattern of copy-pasting to every function any time we make a tweak.",
"> If they're only looking at the code, it's a single click in most IDEs to determine its usage.\r\n\r\nI did have to dig into the code to find this, yes. But to me, the point of autogenerated documentation (http://docs.python-requests.org/en/master/api/) is precisely to avoid asking the user to read the code. Why do you publish this autogenerated documentation online if the recommended way to read it is within the code with an IDE?\r\n\r\n> would prefer we do it without establishing a pattern of copy-pasting to every function any time we make a tweak.\r\n\r\nThat's precisely why I suggest a link: to avoid duplicating, and to let the user find the centralized place more easily.",
"> That's precisely why I suggest a link: to avoid duplicating, and to let the user find the centralized place more easily.\r\n\r\nI think we may be going in circles now. I believe we agreed on your initial suggestion to linking to the `:class:Request` (with minor wording tweaks). In your current commits, this has the same effective copy as `requests.request`. Adding two links that provide the same information, and have the potential to drift, isn't ideal.\r\n\r\n\r\nTo summarize the steps I'm proposing:\r\n* The `params` string in `requests.request` should be consistent with the `data` string.\r\n* The `Request` class docstring references the list of tuples. Ideally something like:\r\n```\r\n :param data: the body to attach to the request. If a dictionary or list of\r\n tuples ``[(key, value)]`` is provided, form-encoding will take place.\r\n [...]\r\n :param params: Dictionary, list of tuples, or bytes to be sent in the query string for\r\n the :class:`Request`.\r\n```\r\n* Everything else:\r\n```\r\n:param params: (optional) Dictionary, list of tuples, or bytes to be sent in the query string for the :class:`Request`.\r\n:param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`.\r\n```",
"OK, I read you too quickly.\r\n\r\nI pushed essentially what you're proposing. I just kept a bit more details in Request's `:param params:`.",
"Weird, my local version was correct, but apparently I pushed a version with incorrect cut-and-paste. #4910 should fix this."
] |
https://api.github.com/repos/psf/requests/issues/4738
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4738/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4738/comments
|
https://api.github.com/repos/psf/requests/issues/4738/events
|
https://github.com/psf/requests/issues/4738
| 340,744,005 |
MDU6SXNzdWUzNDA3NDQwMDU=
| 4,738 |
Add Status Code Constants As A Module
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31661703?v=4",
"events_url": "https://api.github.com/users/ndibari-sp/events{/privacy}",
"followers_url": "https://api.github.com/users/ndibari-sp/followers",
"following_url": "https://api.github.com/users/ndibari-sp/following{/other_user}",
"gists_url": "https://api.github.com/users/ndibari-sp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ndibari-sp",
"id": 31661703,
"login": "ndibari-sp",
"node_id": "MDQ6VXNlcjMxNjYxNzAz",
"organizations_url": "https://api.github.com/users/ndibari-sp/orgs",
"received_events_url": "https://api.github.com/users/ndibari-sp/received_events",
"repos_url": "https://api.github.com/users/ndibari-sp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ndibari-sp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ndibari-sp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ndibari-sp",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-12T18:13:17Z
|
2021-09-08T01:21:12Z
|
2018-07-12T18:15:09Z
|
NONE
|
resolved
|
It would be nice if requests had a module that housed all the possible status codes for an HTTP request in the package. That way users can utilize the constants defined in the module instead of hard coding magic numbers for testing/status code checking/etc. The django rest framework library has a similar feature to this, http://www.django-rest-framework.org/api-guide/status-codes/
This could be called something like `requests.status`, with the `status` module providing human-readable names for the different status codes:
```python
HTTP_OK = 200
HTTP_NOT_FOUND = 404
HTTP_SERVER_ERROR = 500
# You get the idea
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4738/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4738/timeline
| null |
completed
| null | null | false |
[
"`requests.codes`.",
"Thanks @kennethreitz I didn't know that was a thing"
] |
https://api.github.com/repos/psf/requests/issues/4737
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4737/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4737/comments
|
https://api.github.com/repos/psf/requests/issues/4737/events
|
https://github.com/psf/requests/issues/4737
| 340,689,787 |
MDU6SXNzdWUzNDA2ODk3ODc=
| 4,737 |
no_proxy is not compatible with urls without hostname
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7490006?v=4",
"events_url": "https://api.github.com/users/vxgmichel/events{/privacy}",
"followers_url": "https://api.github.com/users/vxgmichel/followers",
"following_url": "https://api.github.com/users/vxgmichel/following{/other_user}",
"gists_url": "https://api.github.com/users/vxgmichel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vxgmichel",
"id": 7490006,
"login": "vxgmichel",
"node_id": "MDQ6VXNlcjc0OTAwMDY=",
"organizations_url": "https://api.github.com/users/vxgmichel/orgs",
"received_events_url": "https://api.github.com/users/vxgmichel/received_events",
"repos_url": "https://api.github.com/users/vxgmichel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vxgmichel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vxgmichel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vxgmichel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-12T15:32:05Z
|
2021-09-07T00:06:16Z
|
2018-10-01T02:16:21Z
|
NONE
|
resolved
|
The `no_proxy` environment variable causes an exception when a url without a hostname is used.
This happens with conda local file system adapter for instance.
## Reproduction Steps
Consider the following example:
```python
import requests
from requests.models import Response
from requests.adapters import BaseAdapter
class LocalFSAdapter(BaseAdapter):
"""Simplified version of
'conda.gateways.connection.adapters.localfs.LocalFSAdapter'.
"""
def send(self, request, **kwargs):
_, pathname = request.url.split('file://')
resp = Response()
resp.raw = open(pathname, "rb")
return resp
def close(self):
pass
with requests.Session() as s:
s.mount("file://", LocalFSAdapter())
print(s.get('file:///tmp/test').text)
```
Running with the `no_proxy` environment variable set:
```bash
$ no_proxy=nope python test.py
```
## Expected Result
```
<the content of '/tmp/test'>
```
## Actual Result
```python
Traceback (most recent call last):
File "test.py", line 23, in <module>
print(s.get('file:///tmp/test').text)
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/sessions.py", line 503, in request
prep.url, proxies, stream, verify, cert
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/sessions.py", line 676, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/utils.py", line 760, in get_environ_proxies
if should_bypass_proxies(url, no_proxy=no_proxy):
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/utils.py", line 716, in should_bypass_proxies
if is_ipv4_address(parsed.hostname):
File "/home/vimiche/miniconda/lib/python3.6/site-packages/requests/utils.py", line 640, in is_ipv4_address
socket.inet_aton(string_ip)
TypeError: inet_aton() argument 1 must be str, not None
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.15.0-24-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020ff",
"version": "18.0.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/4737/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4737/timeline
| null |
completed
| null | null | false |
[
"Hi @vxgmichel, we have an initial proposal in #4723 to resolve this. We’re still reviewing options to address the problem, but are aiming to have the issue resolved within the next week or so.",
"Resolved with #4723."
] |
https://api.github.com/repos/psf/requests/issues/4736
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4736/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4736/comments
|
https://api.github.com/repos/psf/requests/issues/4736/events
|
https://github.com/psf/requests/pull/4736
| 340,589,689 |
MDExOlB1bGxSZXF1ZXN0MjAwOTY0MDM0
| 4,736 |
HTTPAdapter set response.peercert to keep SSL certificate details before connection release
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/19931768?v=4",
"events_url": "https://api.github.com/users/ZuZuD/events{/privacy}",
"followers_url": "https://api.github.com/users/ZuZuD/followers",
"following_url": "https://api.github.com/users/ZuZuD/following{/other_user}",
"gists_url": "https://api.github.com/users/ZuZuD/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ZuZuD",
"id": 19931768,
"login": "ZuZuD",
"node_id": "MDQ6VXNlcjE5OTMxNzY4",
"organizations_url": "https://api.github.com/users/ZuZuD/orgs",
"received_events_url": "https://api.github.com/users/ZuZuD/received_events",
"repos_url": "https://api.github.com/users/ZuZuD/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ZuZuD/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZuZuD/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ZuZuD",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-12T11:00:04Z
|
2021-09-02T00:07:36Z
|
2018-08-06T12:48:26Z
|
NONE
|
resolved
|
Hi guys,
To troubleshoot requests queries, I found useful to be able to access the connection SSL certificate details. Once the connection is closed, urllib3 call release_conn() and this information is not available afterwards, therefore I suggest to set a new attribute peercert in Response and set it in the HTTPAdapter.
Python 3.6
```python
(Pdb) type(response.raw._connection)
<class 'urllib3.connection.VerifiedHTTPSConnection'>
(Pdb) type(response.raw._connection.sock)
<class 'ssl.SSLSocket'>
````
```python
>>> resp = requests.get('https://s3.eu-west-1.amazonaws.com/')
>>> resp.peercert
{'subject': ((('commonName', 'aws.amazon.com'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Amazon'),), (('organizationalUnitName', 'Server CA 1B'),), (('commonName', 'Amazon'),)), 'version': 3, 'serialNumber': '0E9C9BE31387FA07A147D4406982B417', 'notBefore': 'Mar 28 00:00:00 2018 GMT', 'notAfter': 'Mar 28 12:00:00 2019 GMT', 'subjectAltName': (('DNS', 'aws.amazon.com'), ('DNS', 'www.aws.amazon.com'), ('DNS', 'aws-us-east-1.amazon.com'), ('DNS', 'aws-us-west-2.amazon.com'), ('DNS', 'amazonaws-china.com'), ('DNS', 'www.amazonaws-china.com')), 'OCSP': ('http://ocsp.sca1b.amazontrust.com',), 'caIssuers': ('http://crt.sca1b.amazontrust.com/sca1b.crt',), 'crlDistributionPoints': ('http://crl.sca1b.amazontrust.com/sca1b.crl',)}
```
With python 2.7 information are based on pyopenssl and less details are available though:
```
>>> resp = requests.get('https://s3.eu-west-1.amazonaws.com/')
>>> resp.peercert
{'subject': ((('commonName', u'aws.amazon.com'),),),
'subjectAltName': [('DNS', 'aws.amazon.com'),
('DNS', 'www.aws.amazon.com'),
('DNS', 'aws-us-east-1.amazon.com'),
('DNS', 'aws-us-west-2.amazon.com'),
('DNS', 'amazonaws-china.com'),
('DNS', 'www.amazonaws-china.com')]}
```
```python
Pdb) type(response.raw._connection.sock)
<class 'urllib3.contrib.pyopenssl.WrappedSocket'>
(Pdb) type(response.raw._connection)
<class 'urllib3.connection.VerifiedHTTPSConnection'>
```
I also found people interested by this on [stackoverflow](https://stackoverflow.com/questions/16903528/how-to-get-response-ssl-certificate-from-requests-in-python)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4736/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4736/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4736.diff",
"html_url": "https://github.com/psf/requests/pull/4736",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4736.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4736"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=h1) Report\n> Merging [#4736](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/4499401a55dedea27831fd9b3c6249b9679f3a2d?src=pr&el=desc) will **increase** coverage by `0.1%`.\n> The diff coverage is `100%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4736 +/- ##\n========================================\n+ Coverage 66.79% 66.9% +0.1% \n========================================\n Files 15 15 \n Lines 1563 1568 +5 \n========================================\n+ Hits 1044 1049 +5 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4736/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.62% <100%> (+0.05%)` | :arrow_up: |\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4736/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `70.72% <100%> (+0.53%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=footer). Last update [4499401...ce2465d](https://codecov.io/gh/requests/requests/pull/4736?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi there, \r\n\r\nThanks for taking the time to put together this PR. Unfortunately, Requests is not accepting new features at the moment. Given that this is a customization to our existing HTTPAdapter, you should be able to make your own adapter that sub-classes it and add this to it.\r\n\r\nCheers"
] |
https://api.github.com/repos/psf/requests/issues/4735
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4735/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4735/comments
|
https://api.github.com/repos/psf/requests/issues/4735/events
|
https://github.com/psf/requests/pull/4735
| 340,546,481 |
MDExOlB1bGxSZXF1ZXN0MjAwOTMwNjI5
| 4,735 |
Add field "last_response" in Session object.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28260580?v=4",
"events_url": "https://api.github.com/users/Sk0fa/events{/privacy}",
"followers_url": "https://api.github.com/users/Sk0fa/followers",
"following_url": "https://api.github.com/users/Sk0fa/following{/other_user}",
"gists_url": "https://api.github.com/users/Sk0fa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Sk0fa",
"id": 28260580,
"login": "Sk0fa",
"node_id": "MDQ6VXNlcjI4MjYwNTgw",
"organizations_url": "https://api.github.com/users/Sk0fa/orgs",
"received_events_url": "https://api.github.com/users/Sk0fa/received_events",
"repos_url": "https://api.github.com/users/Sk0fa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Sk0fa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Sk0fa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Sk0fa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-12T08:53:35Z
|
2021-09-02T00:07:39Z
|
2018-07-12T13:35:37Z
|
NONE
|
resolved
|
I want to create logger for pytest in my project. And logging last response from session. This field is necessary for me ;)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4735/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4735/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4735.diff",
"html_url": "https://github.com/psf/requests/pull/4735",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4735.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4735"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=h1) Report\n> Merging [#4735](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/4499401a55dedea27831fd9b3c6249b9679f3a2d?src=pr&el=desc) will **increase** coverage by `0.08%`.\n> The diff coverage is `80%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4735 +/- ##\n==========================================\n+ Coverage 66.79% 66.87% +0.08% \n==========================================\n Files 15 15 \n Lines 1563 1567 +4 \n==========================================\n+ Hits 1044 1048 +4 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4735/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.61% <80%> (+0.34%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=footer). Last update [4499401...c3dc892](https://codecov.io/gh/requests/requests/pull/4735?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Quoting [our feature request documentation](https://github.com/requests/requests/blob/4499401a55dedea27831fd9b3c6249b9679f3a2d/.github/ISSUE_TEMPLATE/Feature_request.md)\r\n\r\n> Requests is not accepting feature requests at this time."
] |
https://api.github.com/repos/psf/requests/issues/4734
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4734/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4734/comments
|
https://api.github.com/repos/psf/requests/issues/4734/events
|
https://github.com/psf/requests/issues/4734
| 340,360,788 |
MDU6SXNzdWUzNDAzNjA3ODg=
| 4,734 |
Why does Python not use the system certs?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/106150?v=4",
"events_url": "https://api.github.com/users/mark0978/events{/privacy}",
"followers_url": "https://api.github.com/users/mark0978/followers",
"following_url": "https://api.github.com/users/mark0978/following{/other_user}",
"gists_url": "https://api.github.com/users/mark0978/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mark0978",
"id": 106150,
"login": "mark0978",
"node_id": "MDQ6VXNlcjEwNjE1MA==",
"organizations_url": "https://api.github.com/users/mark0978/orgs",
"received_events_url": "https://api.github.com/users/mark0978/received_events",
"repos_url": "https://api.github.com/users/mark0978/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mark0978/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mark0978/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mark0978",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-11T18:44:09Z
|
2021-09-08T01:21:04Z
|
2018-08-04T12:40:04Z
|
NONE
|
resolved
|
I've seen https://github.com/requests/requests/issues/4463 but I'm wondering why the system level certs are not used. I know it has "never" done it, but why? Is the problem related to supporting multiple platforms, or is there another reason?
I've just run into a problem where the IT dept was doing a MITM on their workers, and had loaded a cert that Chrome was using. I could export that cert and put it in a linux vm pretty easily and fix CURL, but putting that same cert into the certifi file generated errors about the issuer and serial number.
This might be an question for a different package, if so, just let me know and I'll happily quiz them. I'm torn as to whether this is a urllib3 issue or a requests issue.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4734/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4734/timeline
| null |
completed
| null | null | false |
[
"https://github.com/requests/requests/issues/2966"
] |
https://api.github.com/repos/psf/requests/issues/4733
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4733/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4733/comments
|
https://api.github.com/repos/psf/requests/issues/4733/events
|
https://github.com/psf/requests/pull/4733
| 340,285,635 |
MDExOlB1bGxSZXF1ZXN0MjAwNzMzNzg4
| 4,733 |
fix cookie management bug
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2161266?v=4",
"events_url": "https://api.github.com/users/fx-kirin/events{/privacy}",
"followers_url": "https://api.github.com/users/fx-kirin/followers",
"following_url": "https://api.github.com/users/fx-kirin/following{/other_user}",
"gists_url": "https://api.github.com/users/fx-kirin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fx-kirin",
"id": 2161266,
"login": "fx-kirin",
"node_id": "MDQ6VXNlcjIxNjEyNjY=",
"organizations_url": "https://api.github.com/users/fx-kirin/orgs",
"received_events_url": "https://api.github.com/users/fx-kirin/received_events",
"repos_url": "https://api.github.com/users/fx-kirin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fx-kirin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fx-kirin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fx-kirin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-07-11T15:08:46Z
|
2023-05-12T00:03:10Z
|
2022-05-11T00:26:08Z
|
NONE
|
resolved
|
Even I used custom cookie jar class to manage cookie values, redirecting link only used default `RequestCookieJar` class and it seemed there was not work around.
|
{
"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/4733/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4733/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4733.diff",
"html_url": "https://github.com/psf/requests/pull/4733",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4733.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4733"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=h1) Report\n> Merging [#4733](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/4499401a55dedea27831fd9b3c6249b9679f3a2d?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4733 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4733/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.27% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=footer). Last update [4499401...d44d8d4](https://codecov.io/gh/requests/requests/pull/4733?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi @fx-kirin, thanks for contributing to Requests! Could we get a test for this so we don’t accidentally regress it in the future?",
"We're going to close this out since it's been pending feedback for quite some time. I think the idea is correct long term but may be breaking as the current interface always returns a RequestsCookieJar which may be relied on. Feel free to open an issue to track this if you'd like."
] |
https://api.github.com/repos/psf/requests/issues/4732
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4732/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4732/comments
|
https://api.github.com/repos/psf/requests/issues/4732/events
|
https://github.com/psf/requests/issues/4732
| 340,067,854 |
MDU6SXNzdWUzNDAwNjc4NTQ=
| 4,732 |
help.py get a error when i run it alone
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13884292?v=4",
"events_url": "https://api.github.com/users/songyingxin/events{/privacy}",
"followers_url": "https://api.github.com/users/songyingxin/followers",
"following_url": "https://api.github.com/users/songyingxin/following{/other_user}",
"gists_url": "https://api.github.com/users/songyingxin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/songyingxin",
"id": 13884292,
"login": "songyingxin",
"node_id": "MDQ6VXNlcjEzODg0Mjky",
"organizations_url": "https://api.github.com/users/songyingxin/orgs",
"received_events_url": "https://api.github.com/users/songyingxin/received_events",
"repos_url": "https://api.github.com/users/songyingxin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/songyingxin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/songyingxin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/songyingxin",
"user_view_type": "public"
}
|
[
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
},
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 3 |
2018-07-11T02:20:06Z
|
2021-09-08T01:21:06Z
|
2018-08-04T12:30:15Z
|
NONE
|
resolved
|
Summary.
## Expected Result
```
{
"chardet":{
"version":"3.0.4"
},
"cryptography":{
"version":"2.1.4"
},
"idna":{
"version":"2.6"
},
"implementation":{
"name":"CPython",
"version":"3.6.4"
},
"platform":{
"release":"4.15.0-24-generic",
"system":"Linux"
},
"pyOpenSSL":{
"openssl_version":"100020df",
"version":"17.5.0"
},
"requests":{
"version":{
}
},
"system_ssl":{
"version":"100020ff"
},
"urllib3":{
"version":"1.22"
},
"using_pyopenssl":true
}
```
## Actual Result
```
Traceback (most recent call last):
File "/home/songyingxin/Code/Github/requests/requests/help.py", line 119, in <module>
main()
File "/home/songyingxin/Code/Github/requests/requests/help.py", line 115, in main
print(json.dumps(info(), sort_keys=True, indent=2))
File "/home/songyingxin/anaconda3/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 201, in encode
chunks = list(chunks)
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 430, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict
yield from chunks
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict
yield from chunks
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 437, in _iterencode
o = _default(o)
File "/home/songyingxin/anaconda3/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'module' is not JSON serializable
```
## Reproduction Steps
the error is because the json , when i change it as `import ujson as json` , everything is ok. I think there maybe some bug in different platform . my OS is 'Linux' , 'Ubuntu16.04", python-version: "Cpython", "3.6.4".
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4732/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4732/timeline
| null |
completed
| null | null | false |
[
"Hi @songyingxin, it looks like you may have a file named requests.py in your project that is hijacking the namespace we’re expecting. Alternatively, you may have two different versions of requests installed, one of which is older and doesn’t support help.",
"Also, what does \"run it alone\" mean?",
"No information provided for reproduction. Closing."
] |
https://api.github.com/repos/psf/requests/issues/4731
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4731/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4731/comments
|
https://api.github.com/repos/psf/requests/issues/4731/events
|
https://github.com/psf/requests/issues/4731
| 339,749,987 |
MDU6SXNzdWUzMzk3NDk5ODc=
| 4,731 |
socket.timeout: timed out
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/38598597?v=4",
"events_url": "https://api.github.com/users/daisywx/events{/privacy}",
"followers_url": "https://api.github.com/users/daisywx/followers",
"following_url": "https://api.github.com/users/daisywx/following{/other_user}",
"gists_url": "https://api.github.com/users/daisywx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daisywx",
"id": 38598597,
"login": "daisywx",
"node_id": "MDQ6VXNlcjM4NTk4NTk3",
"organizations_url": "https://api.github.com/users/daisywx/orgs",
"received_events_url": "https://api.github.com/users/daisywx/received_events",
"repos_url": "https://api.github.com/users/daisywx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daisywx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daisywx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daisywx",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-07-10T08:52:42Z
|
2021-09-08T01:21:13Z
|
2018-07-10T09:29:37Z
|
NONE
|
resolved
|
Traceback (most recent call last):
File "E:/Python-Code/crawler/okex/Client.py", line 20, in <module>
print (okcoinSpot.ticker('btc_usdt'))
File "E:\Python-Code\crawler\okex\OkcoinSpotAPI.py", line 19, in ticker
return httpGet(self.__url,TICKER_RESOURCE,params)
File "E:\Python-Code\crawler\okex\HttpMD5Util.py", line 22, in httpGet
conn.request("GET", resource + '?' + params)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 1082, in _send_request
self.endheaders(body)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 882, in _send_output
self.send(msg)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 844, in send
self.connect()
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 1255, in connect
HTTPConnection.connect(self)
File "D:\Program Files (x86)\Python\Lib\httplib.py", line 821, in connect
self.timeout, self.source_address)
File "D:\Program Files (x86)\Python\Lib\socket.py", line 575, in create_connection
raise err
socket.timeout: timed out
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/38598597?v=4",
"events_url": "https://api.github.com/users/daisywx/events{/privacy}",
"followers_url": "https://api.github.com/users/daisywx/followers",
"following_url": "https://api.github.com/users/daisywx/following{/other_user}",
"gists_url": "https://api.github.com/users/daisywx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daisywx",
"id": 38598597,
"login": "daisywx",
"node_id": "MDQ6VXNlcjM4NTk4NTk3",
"organizations_url": "https://api.github.com/users/daisywx/orgs",
"received_events_url": "https://api.github.com/users/daisywx/received_events",
"repos_url": "https://api.github.com/users/daisywx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daisywx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daisywx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daisywx",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4731/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4731/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4730
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4730/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4730/comments
|
https://api.github.com/repos/psf/requests/issues/4730/events
|
https://github.com/psf/requests/issues/4730
| 339,479,519 |
MDU6SXNzdWUzMzk0Nzk1MTk=
| 4,730 |
Requests toolbelt HostHeaderSSL Adapter has issues with non-standard ports.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1930065?v=4",
"events_url": "https://api.github.com/users/JohnOmernik/events{/privacy}",
"followers_url": "https://api.github.com/users/JohnOmernik/followers",
"following_url": "https://api.github.com/users/JohnOmernik/following{/other_user}",
"gists_url": "https://api.github.com/users/JohnOmernik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JohnOmernik",
"id": 1930065,
"login": "JohnOmernik",
"node_id": "MDQ6VXNlcjE5MzAwNjU=",
"organizations_url": "https://api.github.com/users/JohnOmernik/orgs",
"received_events_url": "https://api.github.com/users/JohnOmernik/received_events",
"repos_url": "https://api.github.com/users/JohnOmernik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JohnOmernik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JohnOmernik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JohnOmernik",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 4 |
2018-07-09T14:43:35Z
|
2020-03-26T05:06:12Z
| null |
NONE
| null |
Summary.
I've posted this in the requests.toolbelt issues as well as urlib3 issues. My challenge is following what is happening from from requests.toolbelt all the way to urllib3 is beyond my capabilities right now and I am looking for help.
The original issue on requests toolbelt is here:
https://github.com/requests/toolbelt/issues/189
The problem is shown in completeness here:
https://github.com/JohnOmernik/jupyter_drill/blob/master/issue.md
I also opened up an issue in URLLIB3:
https://github.com/urllib3/urllib3/issues/1411
However, here I was requested to show just with urllib3 the issue with assert_hostname (what the HostHeaderSSLAdapter is using) and here, urlib3 returned as expected. However, requests is using a pool manager, and I am unclear how to utilize that at the urllib3 level (with understanding of what is happening enough to recreate the problem... my testing with urllib3 was just using the test scripts included with urllib3 that references assert_hostname.)
## Expected Result
I expect that using the HostHeaderSSL Adapter, I should be able to connect to an IP address, but pass the hostname to the SSL verification allowing a sticky connection to specific IP while validating the SSL certificate.
## Actual Result
When I assert a new hostname, the non-standard port is rewritten to be the https default of 443. While the certificate host is correct, the connection fails because of instead of port 20004 it connects on port 443 when using assert_hostname
## Reproduction Steps
Please see above posted URLs and issues, the best way to describe this is here:
https://github.com/JohnOmernik/jupyter_drill/blob/master/issue.md
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.3"
},
"cryptography": {
"version": "1.8.1"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "4.4.0-127-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "17.0.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| 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/4730/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4730/timeline
| null | null | null | null | false |
[
"As I posed in urllib3 (I am not sure who owns this issue) \r\n\r\nhttps://github.com/urllib3/urllib3/issues/1411\r\n\r\nBasically the issue is by setting the hostheader to a name, if the webserver provides a 303 redirect, it will use that host, and sessions follows redirects by default. Thus, allow_redirects causes the odd port 443 behaivior. Not sure which project this can be fixed in, will also post in reqests_toolbelt. ",
"Hi @JohnOmernik, we implement our own redirect logic, so it’s likely this is related to Requests. I haven’t had a chance to look yet, so I haven’t been able to confirm that.\r\n\r\nThis *looks* like it is something that needs to be tracked in the tool belt repository, but we can wait until a maintainer has a chance to verify that. I’ll hopefully be able to get to this towards the end of the week.",
"@nateprewitt this is being tracked there but the problem is that Requests seems to decide to override ports. The HostHeader adapter is doing all the right things. Something is going wrong elsewhere.",
"Any update?"
] |
https://api.github.com/repos/psf/requests/issues/4729
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4729/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4729/comments
|
https://api.github.com/repos/psf/requests/issues/4729/events
|
https://github.com/psf/requests/issues/4729
| 339,472,061 |
MDU6SXNzdWUzMzk0NzIwNjE=
| 4,729 |
Header string values are changed to lower-case even though required to be case-sensitive by RFC-2017
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7488035?v=4",
"events_url": "https://api.github.com/users/klindt/events{/privacy}",
"followers_url": "https://api.github.com/users/klindt/followers",
"following_url": "https://api.github.com/users/klindt/following{/other_user}",
"gists_url": "https://api.github.com/users/klindt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/klindt",
"id": 7488035,
"login": "klindt",
"node_id": "MDQ6VXNlcjc0ODgwMzU=",
"organizations_url": "https://api.github.com/users/klindt/orgs",
"received_events_url": "https://api.github.com/users/klindt/received_events",
"repos_url": "https://api.github.com/users/klindt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/klindt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/klindt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/klindt",
"user_view_type": "public"
}
|
[
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 1 |
2018-07-09T14:25:29Z
|
2021-09-08T01:21:08Z
|
2018-07-25T15:21:05Z
|
NONE
|
resolved
|
Summary.
To create a redirect resource within a Fedora4 Common repository (https://wiki.duraspace.org/display/FEDORA4x/RESTful+HTTP+API#RESTfulHTTPAPI-external-content) you'll have to use a PUT header involving Content-Type header "message/external-body" (defined in https://tools.ietf.org/html/rfc2017).
Request changes the character case of the Content-Type header "message/external-body". The URL Parameters must be send in upper-case form but request changes it to lower-case.
## Expected Result
Header will be send as _stated_:
{'Content-Type': 'message/external-body; access-type=URL; URL="http://example.com"'}
## Actual Result
The string "URL=" in the header has been changed to "url=":
_Server Response_
Invalid Content Type message/external-body;access-type=URL;url="http://example.com"
## Reproduction Steps
```python
import requests
headers = {
'Content-Type': 'message/external-body; access-type=URL; URL="http://example.com"'
}
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-124-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4729/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4729/timeline
| null |
completed
| null | null | false |
[
"Hi @klindt,\r\n\r\nI don't believe this is the product of Requests. We shouldn't be doing any mutating of the header values, only keys which is allowable for normalization.\r\n\r\nHere's a simple repro showing we maintain the casing:\r\n```python\r\nimport requests\r\n\r\nheaders = {\r\n 'Content-Type': 'message/external-body; access-type=URL; URL=\"http://example.com\"'\r\n}\r\nr = requests.get('https://httpbin.org/get', headers=headers)\r\nprint(r.json()['headers']['Content-Type'])\r\n```\r\n\r\nMy guess would be that you either have a proxy between you and your target server which is manipulating the request, or something else in your code base is tampering with the values. Without other information pointing towards a defect in Requests, I don't know if we can go much further here."
] |
https://api.github.com/repos/psf/requests/issues/4728
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4728/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4728/comments
|
https://api.github.com/repos/psf/requests/issues/4728/events
|
https://github.com/psf/requests/pull/4728
| 339,241,646 |
MDExOlB1bGxSZXF1ZXN0MTk5OTUxNDY4
| 4,728 |
Fix an invalid escape sequence
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1937689?v=4",
"events_url": "https://api.github.com/users/yan12125/events{/privacy}",
"followers_url": "https://api.github.com/users/yan12125/followers",
"following_url": "https://api.github.com/users/yan12125/following{/other_user}",
"gists_url": "https://api.github.com/users/yan12125/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yan12125",
"id": 1937689,
"login": "yan12125",
"node_id": "MDQ6VXNlcjE5Mzc2ODk=",
"organizations_url": "https://api.github.com/users/yan12125/orgs",
"received_events_url": "https://api.github.com/users/yan12125/received_events",
"repos_url": "https://api.github.com/users/yan12125/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yan12125/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yan12125/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yan12125",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-08T17:12:29Z
|
2021-09-02T00:07:39Z
|
2018-07-09T12:19:50Z
|
CONTRIBUTOR
|
resolved
|
Fix errors like this:
```
$ python -W error -c 'import requests'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/yen/Projects/requests/requests/__init__.py", line 114, in <module>
from .models import Request, Response, PreparedRequest
File "/Users/yen/Projects/requests/requests/models.py", line 43, in <module>
from .status_codes import codes
File "/Users/yen/Projects/requests/requests/status_codes.py", line 18
"""
SyntaxError: invalid escape sequence \o
```
Context: the [buildbot](https://github.com/buildbot/buildbot) test suite treats all warnings as errors.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/4728/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4728/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4728.diff",
"html_url": "https://github.com/psf/requests/pull/4728",
"merged_at": "2018-07-09T12:19:50Z",
"patch_url": "https://github.com/psf/requests/pull/4728.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4728"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=h1) Report\n> Merging [#4728](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/ef88b9faa6d73bc83a07ddebc424c551d2ee671c?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `0%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4728 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/status\\_codes.py](https://codecov.io/gh/requests/requests/pull/4728/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc3RhdHVzX2NvZGVzLnB5) | `0% <0%> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=footer). Last update [ef88b9f...b1a360c](https://codecov.io/gh/requests/requests/pull/4728?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4727
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4727/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4727/comments
|
https://api.github.com/repos/psf/requests/issues/4727/events
|
https://github.com/psf/requests/issues/4727
| 339,216,642 |
MDU6SXNzdWUzMzkyMTY2NDI=
| 4,727 |
Which project is prefer to use?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14233969?v=4",
"events_url": "https://api.github.com/users/karambaq/events{/privacy}",
"followers_url": "https://api.github.com/users/karambaq/followers",
"following_url": "https://api.github.com/users/karambaq/following{/other_user}",
"gists_url": "https://api.github.com/users/karambaq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/karambaq",
"id": 14233969,
"login": "karambaq",
"node_id": "MDQ6VXNlcjE0MjMzOTY5",
"organizations_url": "https://api.github.com/users/karambaq/orgs",
"received_events_url": "https://api.github.com/users/karambaq/received_events",
"repos_url": "https://api.github.com/users/karambaq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/karambaq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/karambaq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/karambaq",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-08T11:00:25Z
|
2021-09-08T01:21:13Z
|
2018-07-08T14:16:12Z
|
NONE
|
resolved
|
Hello, which projects is prefer to use? This or requests-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/4727/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4727/timeline
| null |
completed
| null | null | false |
[
"Hi @karambaq, that’s entirely dependent on your use case. This appears to be a question though, which we would prefer you direct to [StackOverflow](https://stackoveflow.com). This issue tracker is reserved for tracking defects in Requests. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4726
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4726/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4726/comments
|
https://api.github.com/repos/psf/requests/issues/4726/events
|
https://github.com/psf/requests/issues/4726
| 338,944,914 |
MDU6SXNzdWUzMzg5NDQ5MTQ=
| 4,726 |
Session.verify is ignored when REQUESTS_CA_BUNDLE is set in environment
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/979026?v=4",
"events_url": "https://api.github.com/users/schlenk/events{/privacy}",
"followers_url": "https://api.github.com/users/schlenk/followers",
"following_url": "https://api.github.com/users/schlenk/following{/other_user}",
"gists_url": "https://api.github.com/users/schlenk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schlenk",
"id": 979026,
"login": "schlenk",
"node_id": "MDQ6VXNlcjk3OTAyNg==",
"organizations_url": "https://api.github.com/users/schlenk/orgs",
"received_events_url": "https://api.github.com/users/schlenk/received_events",
"repos_url": "https://api.github.com/users/schlenk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schlenk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schlenk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schlenk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-06T13:43:51Z
|
2021-09-08T01:21:14Z
|
2018-07-06T16:14:08Z
|
NONE
|
resolved
|
Trying to use a Session object to have a common TLS verify option for a bunch of calls in a CI environment for test with self signed certificates.
This works all right when no environment variable is set, but once REQUESTS_CA_BUNDLE or the equivalent curl var is set up, it fails.
This probably happens due to the logic in `merge_environment_settings()` and the merge logic for settings.
## Expected Result
Verify works, the explicitly configured ca path on the Session object is used.
<Response [200]>
## Actual Result
Verify fails, the implicitly configured environment setting overrides the explicit setting on the Session.
SSLError: HTTPSConnectionPool(host='example.org', port=8443): Max retries exceeded with url: /login (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED]
## Reproduction Steps
```python
import requests, os
# One of the many linux default locations for a ca bundle
os.environ['REQUESTS_CA_BUNDLE'] = '/etc/ssl/certs/ca-bundle.crt'
ca = "/home/schlenk/sqlite/certs/ca.crt"
print requests.get('https://myhost.example.org:8443/', verify=ca)
# This gives a <Response [200]>
# Now try with Session
s = requests.Session()
s.verify = ca
s.get('https://myhost.example.org:8443/')
# This throws an SSLError exception
# SSLError: HTTPSConnectionPool(host='myhost.example.org', port=8443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),))
# But this works just fine
s.get('https://myhost.example.org:8443/', verify=ca)
<Response [200]>
```
## System Information
$ python -m requests.help
```
d:\code\trunk64>win32\debug\img\python.exe -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.15"
},
"platform": {
"release": "2012ServerR2",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "100020df",
"version": "18.0.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
Same issue happens on Linux with identical versions.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4726/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4726/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/4725
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4725/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4725/comments
|
https://api.github.com/repos/psf/requests/issues/4725/events
|
https://github.com/psf/requests/pull/4725
| 338,873,959 |
MDExOlB1bGxSZXF1ZXN0MTk5Njk2MzAx
| 4,725 |
Fix print output of content
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29581152?v=4",
"events_url": "https://api.github.com/users/shiveshabhishek/events{/privacy}",
"followers_url": "https://api.github.com/users/shiveshabhishek/followers",
"following_url": "https://api.github.com/users/shiveshabhishek/following{/other_user}",
"gists_url": "https://api.github.com/users/shiveshabhishek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shiveshabhishek",
"id": 29581152,
"login": "shiveshabhishek",
"node_id": "MDQ6VXNlcjI5NTgxMTUy",
"organizations_url": "https://api.github.com/users/shiveshabhishek/orgs",
"received_events_url": "https://api.github.com/users/shiveshabhishek/received_events",
"repos_url": "https://api.github.com/users/shiveshabhishek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shiveshabhishek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shiveshabhishek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shiveshabhishek",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-07-06T09:42:24Z
|
2021-09-02T00:07:40Z
|
2018-07-06T12:49:34Z
|
NONE
|
resolved
|
-- Removed b at the beginning of printing of content of a response
Fixes to Issue: #4724
Signed-off-by: Shivesh <[email protected]>
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4725/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4725/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4725.diff",
"html_url": "https://github.com/psf/requests/pull/4725",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4725.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4725"
}
| true |
[
"This is not a fix for #4724"
] |
https://api.github.com/repos/psf/requests/issues/4724
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4724/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4724/comments
|
https://api.github.com/repos/psf/requests/issues/4724/events
|
https://github.com/psf/requests/issues/4724
| 338,872,166 |
MDU6SXNzdWUzMzg4NzIxNjY=
| 4,724 |
Getting response content starting with b
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29581152?v=4",
"events_url": "https://api.github.com/users/shiveshabhishek/events{/privacy}",
"followers_url": "https://api.github.com/users/shiveshabhishek/followers",
"following_url": "https://api.github.com/users/shiveshabhishek/following{/other_user}",
"gists_url": "https://api.github.com/users/shiveshabhishek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shiveshabhishek",
"id": 29581152,
"login": "shiveshabhishek",
"node_id": "MDQ6VXNlcjI5NTgxMTUy",
"organizations_url": "https://api.github.com/users/shiveshabhishek/orgs",
"received_events_url": "https://api.github.com/users/shiveshabhishek/received_events",
"repos_url": "https://api.github.com/users/shiveshabhishek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shiveshabhishek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shiveshabhishek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shiveshabhishek",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-06T09:36:50Z
|
2021-09-08T01:21:14Z
|
2018-07-06T12:50:11Z
|
NONE
|
resolved
|
Summary.
In output of content of a response , it is getting printed with starting as **b**
## Expected Result
No **b** at the starting of output
What you expected.
No **b** at the starting of output
## Actual Result
output without **b** at the beginning
What happened instead.

## Reproduction Steps
Just print any output like : response.content
```python
import requests
```
## System Information
Linux Ubuntu 18.06
python version:3.6.5
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4724/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4724/timeline
| null |
completed
| null | null | false |
[
"You likely want `response.text` then if you don't want the content as raw bytes but instead as a string.\r\n\r\nThis is not a bug.",
"ohh, i see.. I thought that it's showing improper response.\r\nThanks for correcting my issue @sigmavirus24"
] |
https://api.github.com/repos/psf/requests/issues/4723
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4723/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4723/comments
|
https://api.github.com/repos/psf/requests/issues/4723/events
|
https://github.com/psf/requests/pull/4723
| 338,753,329 |
MDExOlB1bGxSZXF1ZXN0MTk5NjA3OTE3
| 4,723 |
Fix assumed hostname when using a 'file' URI scheme adapter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1418419?v=4",
"events_url": "https://api.github.com/users/kalefranz/events{/privacy}",
"followers_url": "https://api.github.com/users/kalefranz/followers",
"following_url": "https://api.github.com/users/kalefranz/following{/other_user}",
"gists_url": "https://api.github.com/users/kalefranz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kalefranz",
"id": 1418419,
"login": "kalefranz",
"node_id": "MDQ6VXNlcjE0MTg0MTk=",
"organizations_url": "https://api.github.com/users/kalefranz/orgs",
"received_events_url": "https://api.github.com/users/kalefranz/received_events",
"repos_url": "https://api.github.com/users/kalefranz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kalefranz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kalefranz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kalefranz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2018-07-05T23:04:26Z
|
2021-09-02T00:07:33Z
|
2018-08-13T16:54:33Z
|
CONTRIBUTOR
|
resolved
|
Commit 2255c34a65b5b1353004dc8d49cc397cd794ec15 in https://github.com/requests/requests/pull/4427 makes the assumption that all URLs have hostnames. Or perhaps the assumption was that `urlparse()` returns an empty string for the `hostname` attribute rather than `None`. Either way, the assumption blows up both for `is_ipv4_address(parsed.hostname)` and also for
```python
host_with_port = parsed.hostname
if parsed.port:
host_with_port += ':{0}'.format(parsed.port)
```
when `parsed.hostname` is `None`. Example circumstances of where this all blows up is when a `NO_PROXY` environment variable is set during use of something like conda's [adapter](https://github.com/conda/conda/blob/4.5.5/conda/gateways/connection/adapters/localfs.py) to handle `file:///` urls. It results in a stack trace like
```
Traceback (most recent call last):
File "/home/circleci/conda/tests/gateways/test_connection.py", line 62, in test_local_file_adapter_200
r = session.get(test_url)
File "/opt/conda/lib/python3.6/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/requests/sessions.py", line 503, in request
prep.url, proxies, stream, verify, cert
File "/opt/conda/lib/python3.6/site-packages/requests/sessions.py", line 676, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
File "/opt/conda/lib/python3.6/site-packages/requests/utils.py", line 760, in get_environ_proxies
if should_bypass_proxies(url, no_proxy=no_proxy):
File "/opt/conda/lib/python3.6/site-packages/requests/utils.py", line 716, in should_bypass_proxies
if is_ipv4_address(parsed.hostname):
File "/opt/conda/lib/python3.6/site-packages/requests/utils.py", line 640, in is_ipv4_address
socket.inet_aton(string_ip)
TypeError: inet_aton() argument 1 must be str, not None
```
I *think* the correct solution here is to just return `True` in the `should_bypass_proxies()` function when there is no hostname in the URL. Definitely know that sending `None` to `inet_aton(string_ip)` or trying to add `None` to a port string definitely isn't correct.
|
{
"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/4723/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4723/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4723.diff",
"html_url": "https://github.com/psf/requests/pull/4723",
"merged_at": "2018-08-13T16:54:33Z",
"patch_url": "https://github.com/psf/requests/pull/4723.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4723"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=h1) Report\n> Merging [#4723](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/dffd5d435e2d51958af1ccc9fd5e0f8f9df2fdfe?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4723 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=footer). Last update [dffd5d4...8023a01](https://codecov.io/gh/requests/requests/pull/4723?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Alright, I think this should work @kalefranz. Thanks for putting this together! I'd like @sigmavirus24 to give it a glance before we merge, if possible though.",
"Hi @kalefranz, would you mind rebasing this onto the master branch? Thanks!",
"Rebased.",
"Thanks @kalefranz! We’ll merge once the tests wrap."
] |
https://api.github.com/repos/psf/requests/issues/4722
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4722/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4722/comments
|
https://api.github.com/repos/psf/requests/issues/4722/events
|
https://github.com/psf/requests/pull/4722
| 338,364,927 |
MDExOlB1bGxSZXF1ZXN0MTk5MzE2MTMz
| 4,722 |
Fixed pep8 issues in tests/test_help.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8190677?v=4",
"events_url": "https://api.github.com/users/phanikiranthaticharla/events{/privacy}",
"followers_url": "https://api.github.com/users/phanikiranthaticharla/followers",
"following_url": "https://api.github.com/users/phanikiranthaticharla/following{/other_user}",
"gists_url": "https://api.github.com/users/phanikiranthaticharla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phanikiranthaticharla",
"id": 8190677,
"login": "phanikiranthaticharla",
"node_id": "MDQ6VXNlcjgxOTA2Nzc=",
"organizations_url": "https://api.github.com/users/phanikiranthaticharla/orgs",
"received_events_url": "https://api.github.com/users/phanikiranthaticharla/received_events",
"repos_url": "https://api.github.com/users/phanikiranthaticharla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phanikiranthaticharla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phanikiranthaticharla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phanikiranthaticharla",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-07-04T19:51:40Z
|
2021-09-02T00:07:40Z
|
2018-07-04T23:04:22Z
|
NONE
|
resolved
|
Fixed pep8 issues below:
test_help.py:10:47: E231 missing whitespace after ','
test_help.py:10:80: E501 line too long (83 > 79 characters)
test_help.py:18:42: E231 missing whitespace after ','
test_help.py:38:80: E501 line too long (81 > 79 characters)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4722/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4722/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4722.diff",
"html_url": "https://github.com/psf/requests/pull/4722",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4722.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4722"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=h1) Report\n> Merging [#4722](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/ef88b9faa6d73bc83a07ddebc424c551d2ee671c?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4722 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=footer). Last update [ef88b9f...8be665a](https://codecov.io/gh/requests/requests/pull/4722?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"This project doesn't use pep8, flake8 or any of those style guide tools. We appreciate the effort you've spent on this, but we're not going to accept this pull request. Searching past issues and pull requests point out that this is a consistent standpoint."
] |
https://api.github.com/repos/psf/requests/issues/4721
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4721/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4721/comments
|
https://api.github.com/repos/psf/requests/issues/4721/events
|
https://github.com/psf/requests/issues/4721
| 338,121,067 |
MDU6SXNzdWUzMzgxMjEwNjc=
| 4,721 |
Session baseUrl?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10343470?v=4",
"events_url": "https://api.github.com/users/NoahCardoza/events{/privacy}",
"followers_url": "https://api.github.com/users/NoahCardoza/followers",
"following_url": "https://api.github.com/users/NoahCardoza/following{/other_user}",
"gists_url": "https://api.github.com/users/NoahCardoza/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NoahCardoza",
"id": 10343470,
"login": "NoahCardoza",
"node_id": "MDQ6VXNlcjEwMzQzNDcw",
"organizations_url": "https://api.github.com/users/NoahCardoza/orgs",
"received_events_url": "https://api.github.com/users/NoahCardoza/received_events",
"repos_url": "https://api.github.com/users/NoahCardoza/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NoahCardoza/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NoahCardoza/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NoahCardoza",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-07-04T03:47:51Z
|
2018-07-04T19:19:17Z
|
2018-07-04T13:31:05Z
|
NONE
|
resolved
|
"Requests is not accepting feature requests at this time." I see.
But really guys, would it be too much to ask to get this implemented into the Sessions? I could submit a PR. Axios and many other libraries support this already, and it comes it really handy.
I know there are workarounds, subclass it and what not but that is so ugly when it could be built into the module with ~5 lines of code.
Please 💯
Thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4721/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4721/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"I am aware there have been [previous requests](https://github.com/requests/requests/issues/133), but obviously, they *haven't been answered*... Hence me opening a new issue. \r\n\r\nThere wasn't even a discussion, that thread was killed instantly, kind of like **this** one.\r\n\r\n~~I get that hooks can be used, but~~ It seems like `baseUrl` would be much cleaner and much more readable.\r\n\r\nActually, after further testing it, `hooks` cannot be used like in the above issue. From what I have seen, you now can only hook the `response`, but not the `args`. \r\n\r\nhttp://docs.python-requests.org/en/master/user/advanced/#event-hooks",
"Hi @NoahCardoza, I believe what @sigmavirus24 is pointing out is that we've already done the work for this and it's freely available in the [Requests toolbelt](https://github.com/requests/toolbelt/blob/master/requests_toolbelt/sessions.py#L6) as detailed in those other issues.\r\n\r\nWe cannot feasibly support every possible knob and whistle people want in Requests, so we provided the ability to either implement them yourself, or use our implementations of them in the toolbelt. We have dozens of messages discussing this topic, so I'm not sure what you feel is unanswered here.",
"Further, there's more than just one issue discussing this. Others have had full discussions. You're not so special as to receive that precious time of mine or Nate's to have another full discussion."
] |
https://api.github.com/repos/psf/requests/issues/4720
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4720/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4720/comments
|
https://api.github.com/repos/psf/requests/issues/4720/events
|
https://github.com/psf/requests/issues/4720
| 337,723,799 |
MDU6SXNzdWUzMzc3MjM3OTk=
| 4,720 |
requests get using proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4375111?v=4",
"events_url": "https://api.github.com/users/wangshuai666/events{/privacy}",
"followers_url": "https://api.github.com/users/wangshuai666/followers",
"following_url": "https://api.github.com/users/wangshuai666/following{/other_user}",
"gists_url": "https://api.github.com/users/wangshuai666/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangshuai666",
"id": 4375111,
"login": "wangshuai666",
"node_id": "MDQ6VXNlcjQzNzUxMTE=",
"organizations_url": "https://api.github.com/users/wangshuai666/orgs",
"received_events_url": "https://api.github.com/users/wangshuai666/received_events",
"repos_url": "https://api.github.com/users/wangshuai666/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangshuai666/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangshuai666/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangshuai666",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-07-03T02:30:29Z
|
2021-09-08T01:21:16Z
|
2018-07-03T02:57:26Z
|
NONE
|
resolved
|
Summary.
## Expected Result
What you expected.
utils.py proxy = proxies[proxy_key]
proxies is a set
What happened instead.
ip = random.choice(p_list)
proxy = {'http', 'http://{0}:{1}'.format(ip, port)}
req = requests.get(url=target, proxies=proxy)
```python
Traceback (most recent call last):
File "d:\spider\main.py", line 53, in get_list
req = requests.get(url=target, proxies=proxy)
File "C:\Python27\lib\site-packages\requests\api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 390, in send
conn = self.get_connection(request.url, proxies)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 286, in get_connection
proxy = select_proxy(url, proxies)
File "C:\Python27\lib\site-packages\requests\utils.py", line 643, in select_proxy
proxy = proxies[proxy_key]
TypeError: 'set' object has no attribute '__getitem__'
```
## System Information
python 2.7 win10
$ python -m requests.help
```
```
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/4375111?v=4",
"events_url": "https://api.github.com/users/wangshuai666/events{/privacy}",
"followers_url": "https://api.github.com/users/wangshuai666/followers",
"following_url": "https://api.github.com/users/wangshuai666/following{/other_user}",
"gists_url": "https://api.github.com/users/wangshuai666/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wangshuai666",
"id": 4375111,
"login": "wangshuai666",
"node_id": "MDQ6VXNlcjQzNzUxMTE=",
"organizations_url": "https://api.github.com/users/wangshuai666/orgs",
"received_events_url": "https://api.github.com/users/wangshuai666/received_events",
"repos_url": "https://api.github.com/users/wangshuai666/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wangshuai666/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wangshuai666/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wangshuai666",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4720/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4720/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4719
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4719/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4719/comments
|
https://api.github.com/repos/psf/requests/issues/4719/events
|
https://github.com/psf/requests/issues/4719
| 337,562,968 |
MDU6SXNzdWUzMzc1NjI5Njg=
| 4,719 |
Running tests with tarball from PyPi fails due to missing Pipfile
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1158848?v=4",
"events_url": "https://api.github.com/users/StefanBruens/events{/privacy}",
"followers_url": "https://api.github.com/users/StefanBruens/followers",
"following_url": "https://api.github.com/users/StefanBruens/following{/other_user}",
"gists_url": "https://api.github.com/users/StefanBruens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/StefanBruens",
"id": 1158848,
"login": "StefanBruens",
"node_id": "MDQ6VXNlcjExNTg4NDg=",
"organizations_url": "https://api.github.com/users/StefanBruens/orgs",
"received_events_url": "https://api.github.com/users/StefanBruens/received_events",
"repos_url": "https://api.github.com/users/StefanBruens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/StefanBruens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/StefanBruens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/StefanBruens",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-07-02T15:22:42Z
|
2021-09-08T01:21:12Z
|
2018-07-12T18:15:47Z
|
NONE
|
resolved
|
Summary.
## Expected Result
Tests complete successfully
## Actual Result
```
[ 109s] ______________ TestRequests.test_POSTBIN_GET_POST_FILES_WITH_DATA ______________
[ 109s]
[ 109s] self = <tests.test_requests.TestRequests instance at 0xb623c18c>
[ 109s] httpbin = <function inner at 0xb691609c>
[ 109s]
[ 109s] def test_POSTBIN_GET_POST_FILES_WITH_DATA(self, httpbin):
[ 109s]
[ 109s] url = httpbin('post')
[ 109s] requests.post(url).raise_for_status()
[ 109s]
[ 109s] post1 = requests.post(url, data={'some': 'data'})
[ 109s] assert post1.status_code == 200
[ 109s]
[ 109s] > with open('Pipfile') as f:
[ 109s] E IOError: [Errno 2] No such file or directory: 'Pipfile'
[ 109s]
[ 109s] tests/test_requests.py:738: IOError
```
## Reproduction Steps
Download tarball from PyPi:
https://pypi.org/project/requests/#files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4719/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4719/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4718
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4718/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4718/comments
|
https://api.github.com/repos/psf/requests/issues/4718/events
|
https://github.com/psf/requests/pull/4718
| 336,654,286 |
MDExOlB1bGxSZXF1ZXN0MTk4MDU1NDg3
| 4,718 |
Strip Authorization header whenever root URL changes
|
{
"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"
}
|
[] |
closed
| true | null |
[] | null | 16 |
2018-06-28T14:48:34Z
|
2021-09-01T00:11:53Z
|
2018-09-14T12:08:05Z
|
CONTRIBUTOR
|
resolved
|
Previously the header was stripped only if the hostname changed, but in
an https -> http redirect that can leak the credentials on the wire
(#4716). Based on with RFC 7235 section 2.2, the header is now stripped
if the "canonical root URL" (scheme+authority) has changed.
Closes #4716.
|
{
"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/4718/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4718/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4718.diff",
"html_url": "https://github.com/psf/requests/pull/4718",
"merged_at": "2018-09-14T12:08:05Z",
"patch_url": "https://github.com/psf/requests/pull/4718.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4718"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=h1) Report\n> Merging [#4718](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/33b41c7880a02166d12915ca9c4cfc13de2d9fb7?src=pr&el=desc) will **decrease** coverage by `0.02%`.\n> The diff coverage is `90%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4718 +/- ##\n==========================================\n- Coverage 66.79% 66.77% -0.03% \n==========================================\n Files 15 15 \n Lines 1563 1568 +5 \n==========================================\n+ Hits 1044 1047 +3 \n- Misses 519 521 +2\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4718/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.34% <90%> (+0.06%)` | :arrow_up: |\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4718/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.35% <0%> (-0.23%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=footer). Last update [33b41c7...2f24e02](https://codecov.io/gh/requests/requests/pull/4718?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"> While I’m inclined to merge this, there’s likely some concern about breaking users relying on us not doing the right thing here.\r\n\r\nTotally understood. There is always [someone](https://xkcd.com/1172/).",
"I'll just leave this here: urllib3/urllib3#1346",
"@SethMichaelLarson we currently perform the redirects manually because we’ve got a few more steps we perform. I’ve looked at moving to urllib3 with 1.23 but don’t know if I see an easy route that guarantees we maintain our 2.X expectations.",
"@nateprewitt TIL! Thanks for teaching me that. :)",
"@nateprewitt I've made the changes you suggested.\r\n\r\n@SethMichaelLarson so what behaviour does urllib3 have on https->http redirects to the same host?",
"@nateprewitt this shouldn't break too many people. The major breaking change already happened years ago. I'm 100% 👍 on this. I haven't reviewed the code though.",
"@nateprewitt is there anything still outstanding here?",
"Actually sorry @bmerry, it looks like this isn’t rebased onto master. Would you mind rebasing really quickly and then we can get this merged.",
"Ok, I've rebased.",
"And I've rebased again.",
"Are there plans to release this security fix soon?",
"@ofek, it’d be preferable to coordinate with urllib3 to avoid having to do multiple releases. I don’t think we have a timeline to commit to, but we may be able to do something in the next 3-8 weeks. If it’s going to go beyond that, we can look at cutting a Requests release without urllib3.",
"@nateprewitt feel free to ping one of us if ya'll want to make a release with us, we've been due for a release as well. Reminder: the next release of urllib3 will have dropped Python 2.6 support.",
"@SethMichaelLarson Yep, we’ll make sure that’s surfaced in the release notes. I’ll ping you and/or Thea this weekend and we can work out a timeline.",
"This has been assigned CVE-2018-18074"
] |
https://api.github.com/repos/psf/requests/issues/4717
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4717/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4717/comments
|
https://api.github.com/repos/psf/requests/issues/4717/events
|
https://github.com/psf/requests/pull/4717
| 336,490,674 |
MDExOlB1bGxSZXF1ZXN0MTk3OTI5NDcy
| 4,717 |
Add official Python 3.7 support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5316833?v=4",
"events_url": "https://api.github.com/users/ericwb/events{/privacy}",
"followers_url": "https://api.github.com/users/ericwb/followers",
"following_url": "https://api.github.com/users/ericwb/following{/other_user}",
"gists_url": "https://api.github.com/users/ericwb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ericwb",
"id": 5316833,
"login": "ericwb",
"node_id": "MDQ6VXNlcjUzMTY4MzM=",
"organizations_url": "https://api.github.com/users/ericwb/orgs",
"received_events_url": "https://api.github.com/users/ericwb/received_events",
"repos_url": "https://api.github.com/users/ericwb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ericwb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ericwb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ericwb",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 12 |
2018-06-28T06:32:11Z
|
2021-09-02T00:07:35Z
|
2018-07-24T14:44:38Z
|
CONTRIBUTOR
|
resolved
|
Python 3.7 was just released [1]. This is a small change to
enable support in requests.
[1] https://docs.python.org/3.7/whatsnew/3.7.html
Signed-off-by: Eric Brown <[email protected]>
|
{
"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/4717/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4717/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4717.diff",
"html_url": "https://github.com/psf/requests/pull/4717",
"merged_at": "2018-07-24T14:44:38Z",
"patch_url": "https://github.com/psf/requests/pull/4717.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4717"
}
| true |
[
"Travis doesnt' appear to support 3.7 yet: https://travis-ci.org/requests/requests/jobs/397660384",
"Looks like it's being worked: https://github.com/travis-ci/travis-ci/issues/9815",
"I see nothing indicating that it's in progress on Travis' part other than an issue that non-Travis-CI employees are commenting on.",
"Hey @ericwb, we’ll likely want this enabled for appveyor as well before we claim support for 3.7.\r\n\r\nI haven’t seen an update from them but that’d be something to look into before we merge this.",
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=h1) Report\n> Merging [#4717](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/4d51e6d20179bdc906c45506c0817b6b677589ae?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4717 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=footer). Last update [4d51e6d...2aa29f8](https://codecov.io/gh/requests/requests/pull/4717?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"According to https://github.com/appveyor/ci/issues/2475, Appveyor now supports Python 3.7.",
"@jdufresne great to hear! Once we get a working build with that, I’m happy to merge.",
"Hey @ericwb, wanted to check in on this again if you get a minute. Otherwise, I'm going to look at cherry picking these onto master with the appveyor integration later this week. Thanks!",
"@ericwb would you be willing to rebase this?",
"And squash the commits too if you wouldn’t mind. Thanks!",
"@nateprewitt any release coming soon with python3.7 support?\r\nThanks in advance!",
"@mrkz, 2.19.1 should already support 3.7. This was just adding documentation stating that."
] |
https://api.github.com/repos/psf/requests/issues/4716
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4716/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4716/comments
|
https://api.github.com/repos/psf/requests/issues/4716/events
|
https://github.com/psf/requests/issues/4716
| 336,140,577 |
MDU6SXNzdWUzMzYxNDA1Nzc=
| 4,716 |
Should Authorization header be cleared in https -> http redirect?
|
{
"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"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] |
closed
| true | null |
[] | null | 4 |
2018-06-27T09:06:49Z
|
2021-09-07T00:06:10Z
|
2018-09-14T12:08:05Z
|
CONTRIBUTOR
|
resolved
|
This may be considered intentional behaviour (in which case feel free to close this), but if a request is made to an https endpoint with authorization and it redirects to http on the same host, the Authorization header is not stripped and will be exposed on the wire.
## Expected Result
rebuild_auth would strip the Authorization header if the scheme is changed from https to http.
## Actual Result
The credentials that were intended to be sent over TLS were transmitted in plaintext with the redirected request.
## Reproduction Steps
Run an HTTPS server on localhost:4443 that replies with a 302 redirect to `http://localhost:8000`, and a plain HTTP server (or netcat) on localhost:8000. Then run
```python
import requests
requests.get('https://localhost:4443', auth=('hello', 'world'), verify=False)
```
The basic auth credentials are sent in plaintext to `http://localhost:8000` (the `verify=False` is just because I had a self-signed cert).
Here's the code I used for the SSL server:
```python
import BaseHTTPServer
import ssl
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(302)
self.send_header('Location', 'http://localhost:8000/')
self.end_headers()
self.wfile.write('')
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), Handler)
httpd.socket = ssl.wrap_socket (httpd.socket, server_side=True,
certfile='yourpemfile.pem')
httpd.serve_forever()
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "4.15.0-23-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "18.0.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.23"
},
"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": 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/4716/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4716/timeline
| null |
completed
| null | null | false |
[
"From what I can tell by experiment, Firefox and Chromium treat http and https versions of a site as separate authentication realms, and don't automatically reuse basic credentials on either a redirect or manual browsing between the two. Two http URLs with the same host (localhost) and different port numbers also seem to be treated as independent realms.",
"Found something about it in [RFC 7235, section 2.2](https://tools.ietf.org/html/rfc7235#section-2.2).\r\n> A protection space is defined by the canonical root URI (the scheme and authority components of the effective request URI; see Section 5.5 of [RFC7230]) of the server being accessed, in combination with the realm value if present.\r\n\r\nwhich suggests that both the scheme and port number should be considered (and in theory one should also check the realm, but that doesn't really fit into request's model that basic credentials are supplied unconditionally rather than in response to WWW-Authentication).",
"is this going to get a release?",
"Yes @thinkt4nk, we’re currently coordinating a release with the urllib3 team."
] |
https://api.github.com/repos/psf/requests/issues/4715
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4715/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4715/comments
|
https://api.github.com/repos/psf/requests/issues/4715/events
|
https://github.com/psf/requests/issues/4715
| 336,112,791 |
MDU6SXNzdWUzMzYxMTI3OTE=
| 4,715 |
SessionRedirectMixin.get_redirect_target got an error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 8: invalid continuation byte"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1303581?v=4",
"events_url": "https://api.github.com/users/sumous/events{/privacy}",
"followers_url": "https://api.github.com/users/sumous/followers",
"following_url": "https://api.github.com/users/sumous/following{/other_user}",
"gists_url": "https://api.github.com/users/sumous/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sumous",
"id": 1303581,
"login": "sumous",
"node_id": "MDQ6VXNlcjEzMDM1ODE=",
"organizations_url": "https://api.github.com/users/sumous/orgs",
"received_events_url": "https://api.github.com/users/sumous/received_events",
"repos_url": "https://api.github.com/users/sumous/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sumous/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sumous/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sumous",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-27T07:43:32Z
|
2021-09-08T01:21:09Z
|
2018-07-25T15:20:40Z
|
NONE
|
resolved
|
Summary.
curl -d 'vpsname=111&vpspassword=222' 'http://admin.yunkv.com/vpsadm/selfvpslogin.asp'
works.
When I use python2+, it also works.
```#!/usr/bin/env python2
import requests
import json
data = {'vpsname':'111', 'vppassword':'222'}
url = 'http://admin.yunkv.com/vpsadm/selfvpslogin.asp'
req = requests.post(url, data=data)
print(req.history)
```
But I got error when I use python3.
## Expected Result
Success redirect to the location.
## Actual Result
got error:
```
Traceback (most recent call last):
File "run.py", line 52, in <module>
cli()
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "run.py", line 39, in reset_unreacheable
vps_handler = VpsHandler(hostname, vps_dict[hostname])
File "/Users/guoguo/Documents/code/vps_monitor/handler.py", line 19, in __init__
self._login(vps_name, vps_password)
File "/Users/guoguo/Documents/code/vps_monitor/handler.py", line 29, in _login
r = self.session.post(url, data=data)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 556, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 509, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 641, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 641, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 126, in resolve_redirects
url = self.get_redirect_target(resp)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 117, in get_redirect_target
return to_native_string(location, 'utf8')
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/_internal_utils.py", line 25, in to_native_string
out = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 8: invalid continuation byte
```
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.5.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "17.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "100020af",
"version": "16.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4715/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4715/timeline
| null |
completed
| null | null | false |
[
"Hi @sumous,\r\n\r\nThe values you've provided in the example don't include the byte range or sequence from the traceback. My guess is there's a user name or password that's encoded in something other than UTF-8, perhaps ISO-8859-5 or KOI8-R if those are the OS default on your machine. We'd need a more accurate example to determine the precise issue here.\r\n\r\nAs a general case though, we usually suggest manually encoding the data yourself and passing Requests binary. This removes any guess work on our part, and prevents accidental data corruption."
] |
https://api.github.com/repos/psf/requests/issues/4714
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4714/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4714/comments
|
https://api.github.com/repos/psf/requests/issues/4714/events
|
https://github.com/psf/requests/issues/4714
| 336,011,831 |
MDU6SXNzdWUzMzYwMTE4MzE=
| 4,714 |
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/36957166?v=4",
"events_url": "https://api.github.com/users/ikrambennasrbennasr/events{/privacy}",
"followers_url": "https://api.github.com/users/ikrambennasrbennasr/followers",
"following_url": "https://api.github.com/users/ikrambennasrbennasr/following{/other_user}",
"gists_url": "https://api.github.com/users/ikrambennasrbennasr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ikrambennasrbennasr",
"id": 36957166,
"login": "ikrambennasrbennasr",
"node_id": "MDQ6VXNlcjM2OTU3MTY2",
"organizations_url": "https://api.github.com/users/ikrambennasrbennasr/orgs",
"received_events_url": "https://api.github.com/users/ikrambennasrbennasr/received_events",
"repos_url": "https://api.github.com/users/ikrambennasrbennasr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ikrambennasrbennasr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ikrambennasrbennasr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ikrambennasrbennasr",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-26T22:20:08Z
|
2021-09-08T01:21:16Z
|
2018-06-30T18:42:22Z
|
NONE
|
resolved
|
Hello ; please i run this code :
import json
import requests
url = "http://add_server"
data = json.dumps({'sl':5.84,'sw':3.0,'pl':3.75,'pw':1.1})
r = requests.post(url,data)
print(r.json)
and i get this error :
<bound method Response.json of <Response [500]>>
and when i run this code :
import json
from pprint import pprint
import requests
url = "http://add_server"
data = json.dumps({'sl':5.84,'sw':3.0,'pl':3.75,'pw':1.1})
r = requests.post(url,data)
pprint(r.json)
i get this error:
JSONDecodeError Traceback (most recent call last)
in ()
4 data = json.dumps({'sl':5.84,'sw':3.0,'pl':3.75,'pw':1.1})
5 r = requests.post(url,data)
----> 6 print(r.json())
~/anaconda3/lib/python3.6/site-packages/requests/models.py in json(self, **kwargs)
890 # used.
891 pass
--> 892 return complexjson.loads(self.text, **kwargs)
893
894 @property
~/anaconda3/lib/python3.6/json/init.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
352 parse_int is None and parse_float is None and
353 parse_constant is None and object_pairs_hook is None and not kw):
--> 354 return _default_decoder.decode(s)
355 if cls is None:
356 cls = JSONDecoder
~/anaconda3/lib/python3.6/json/decoder.py in decode(self, s, _w)
337
338 """
--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
340 end = _w(s, end).end()
341 if end != len(s):
~/anaconda3/lib/python3.6/json/decoder.py in raw_decode(self, s, idx)
355 obj, end = self.scan_once(s, idx)
356 except StopIteration as err:
--> 357 raise JSONDecodeError("Expecting value", s, err.value) from None
358 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Any help please. Thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4714/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4714/timeline
| null |
completed
| null | null | false |
[
"Hey, I'll address both of the problems.\r\n1. You write `print(r.json)` but `r.json` is a method, so instead you should write `print(r.json())`.\r\n2. I got a little confused with what's going on here, but the thing is that the response is not a valid json (HTTP status code of 500), therefore you can't access `r.json()`.\r\n**I think an informative exception should be raised in this case.**\r\n\r\nTry to get a response with the HTTP status code of 200 and see if it works.",
"> I think an informative exception should be raised in this case.\r\n\r\nWhat's more informative than `JSONDecodeError` meaning we literally can not decode any JSON from this.\r\n\r\nA response with a status code of 500 may return valid JSON. It may not. It's up to the user to know whether that's the case and call `response.json()` accordingly. `response.json()` being called with reckless abandon is about as likely to work as the user doing `import json; json.loads(response.text)` with the same amount of though."
] |
https://api.github.com/repos/psf/requests/issues/4713
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4713/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4713/comments
|
https://api.github.com/repos/psf/requests/issues/4713/events
|
https://github.com/psf/requests/pull/4713
| 335,950,422 |
MDExOlB1bGxSZXF1ZXN0MTk3NTIwMTQw
| 4,713 |
Misspelled 'proxy' parameter in docstring
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-26T18:58:55Z
|
2021-09-02T00:07:41Z
|
2018-06-26T20:32:33Z
|
CONTRIBUTOR
|
resolved
|
The 'proxy' parameter was misspelled as 'proxies' in the 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/4713/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4713/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4713.diff",
"html_url": "https://github.com/psf/requests/pull/4713",
"merged_at": "2018-06-26T20:32:33Z",
"patch_url": "https://github.com/psf/requests/pull/4713.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4713"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=h1) Report\n> Merging [#4713](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/9fc639d0306a8068057c9f5bcd34adf5f20fb083?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4713 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4713/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `70.18% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=footer). Last update [9fc639d...5d90638](https://codecov.io/gh/requests/requests/pull/4713?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4712
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4712/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4712/comments
|
https://api.github.com/repos/psf/requests/issues/4712/events
|
https://github.com/psf/requests/pull/4712
| 335,941,754 |
MDExOlB1bGxSZXF1ZXN0MTk3NTEzNTc2
| 4,712 |
Remove unused httpbin parameters
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-26T18:32:35Z
|
2021-09-02T00:07:39Z
|
2018-07-18T02:39:19Z
|
CONTRIBUTOR
|
resolved
|
httpbin is used to mock HTTP endpoints. In these methods, the parameter goes unused.
|
{
"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/4712/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4712/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4712.diff",
"html_url": "https://github.com/psf/requests/pull/4712",
"merged_at": "2018-07-18T02:39:19Z",
"patch_url": "https://github.com/psf/requests/pull/4712.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4712"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=h1) Report\n> Merging [#4712](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/9fc639d0306a8068057c9f5bcd34adf5f20fb083?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4712 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=footer). Last update [9fc639d...d54aca4](https://codecov.io/gh/requests/requests/pull/4712?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4711
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4711/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4711/comments
|
https://api.github.com/repos/psf/requests/issues/4711/events
|
https://github.com/psf/requests/pull/4711
| 335,913,758 |
MDExOlB1bGxSZXF1ZXN0MTk3NDkyMTI5
| 4,711 |
Simplify chained comparison
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-26T17:07:07Z
|
2021-09-02T00:07:42Z
|
2018-06-26T17:15:17Z
|
CONTRIBUTOR
|
resolved
|
Improve code readability by simplifying logic for a chained comparison.
|
{
"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/4711/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4711/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4711.diff",
"html_url": "https://github.com/psf/requests/pull/4711",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4711.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4711"
}
| true |
[
"Hi @Stevoisiak, just to reiterate again, if there isn’t a compelling reason to change something that provides noticeable benefit to the user or fixes something wrong in the code, we’re unlikely to accept it. This is a stylistic change that doesn’t really fit that criteria so I believe we’re going to pass on this. Thanks for the suggestion!"
] |
https://api.github.com/repos/psf/requests/issues/4710
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4710/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4710/comments
|
https://api.github.com/repos/psf/requests/issues/4710/events
|
https://github.com/psf/requests/pull/4710
| 335,902,787 |
MDExOlB1bGxSZXF1ZXN0MTk3NDgzODQ5
| 4,710 |
Remove unused session variables
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-26T16:35:25Z
|
2021-09-02T00:07:42Z
|
2018-06-26T16:50:41Z
|
CONTRIBUTOR
|
resolved
|
Removed local session variables that go unused during testing.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4710/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4710/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4710.diff",
"html_url": "https://github.com/psf/requests/pull/4710",
"merged_at": "2018-06-26T16:50:41Z",
"patch_url": "https://github.com/psf/requests/pull/4710.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4710"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=h1) Report\n> Merging [#4710](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/943a5c8e89db1758ae24adbbedacb3b05c32df4a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4710 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=footer). Last update [943a5c8...28da72b](https://codecov.io/gh/requests/requests/pull/4710?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4709
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4709/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4709/comments
|
https://api.github.com/repos/psf/requests/issues/4709/events
|
https://github.com/psf/requests/pull/4709
| 335,489,081 |
MDExOlB1bGxSZXF1ZXN0MTk3MTc1OTM0
| 4,709 |
Update max Twitter characters to 280
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-25T16:56:33Z
|
2021-09-02T00:07:43Z
|
2018-06-25T18:11:40Z
|
CONTRIBUTOR
|
resolved
|
Twitter expanded the maximum character count per tweet from 140 to 280 in November 2017.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4709/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4709/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4709.diff",
"html_url": "https://github.com/psf/requests/pull/4709",
"merged_at": "2018-06-25T18:11:40Z",
"patch_url": "https://github.com/psf/requests/pull/4709.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4709"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=h1) Report\n> Merging [#4709](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d79187143ffa8e05a6cfb518b949954e1208bdfe?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4709 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=footer). Last update [d791871...0c036fe](https://codecov.io/gh/requests/requests/pull/4709?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4708
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4708/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4708/comments
|
https://api.github.com/repos/psf/requests/issues/4708/events
|
https://github.com/psf/requests/pull/4708
| 335,464,653 |
MDExOlB1bGxSZXF1ZXN0MTk3MTU3MTY2
| 4,708 |
Change "StackOverflow" to "Stack Overflow"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-06-25T15:46:48Z
|
2021-08-31T00:07:21Z
|
2018-06-25T15:48:06Z
|
CONTRIBUTOR
|
resolved
|
Add a missing space when referring to [Stack Overflow](https://stackoverflow.com).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4708/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4708/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4708.diff",
"html_url": "https://github.com/psf/requests/pull/4708",
"merged_at": "2018-06-25T15:48:05Z",
"patch_url": "https://github.com/psf/requests/pull/4708.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4708"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4707
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4707/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4707/comments
|
https://api.github.com/repos/psf/requests/issues/4707/events
|
https://github.com/psf/requests/pull/4707
| 335,107,136 |
MDExOlB1bGxSZXF1ZXN0MTk2OTA2MTI5
| 4,707 |
Add SemVer stability badge to README
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144873?v=4",
"events_url": "https://api.github.com/users/greysteil/events{/privacy}",
"followers_url": "https://api.github.com/users/greysteil/followers",
"following_url": "https://api.github.com/users/greysteil/following{/other_user}",
"gists_url": "https://api.github.com/users/greysteil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/greysteil",
"id": 1144873,
"login": "greysteil",
"node_id": "MDQ6VXNlcjExNDQ4NzM=",
"organizations_url": "https://api.github.com/users/greysteil/orgs",
"received_events_url": "https://api.github.com/users/greysteil/received_events",
"repos_url": "https://api.github.com/users/greysteil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/greysteil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/greysteil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/greysteil",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2018-06-23T15:02:21Z
|
2021-09-02T00:07:41Z
|
2018-07-04T19:31:04Z
|
CONTRIBUTOR
|
resolved
|
First of all, thanks for Requests!
Would you be up for adding a badge that shows how SemVer compliant / bug free new releases are? I was looking through the data we gather at Dependabot and realised we could put one together, so threw together the below:
[](https://dependabot.com/compatibility-score.html?dependency-name=requests&package-manager=pip&version-scheme=semver)
If you click through then there's a description of how it's calculated - basically it takes all of the relevant updates Dependabot has done for projects that use Requests and checks what percentage of the time specs pass on the upgrade PR.
The score is slightly lower than 100% because some projects have flaky specs, but I'm working on filtering them out from the data, too :octocat:.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144873?v=4",
"events_url": "https://api.github.com/users/greysteil/events{/privacy}",
"followers_url": "https://api.github.com/users/greysteil/followers",
"following_url": "https://api.github.com/users/greysteil/following{/other_user}",
"gists_url": "https://api.github.com/users/greysteil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/greysteil",
"id": 1144873,
"login": "greysteil",
"node_id": "MDQ6VXNlcjExNDQ4NzM=",
"organizations_url": "https://api.github.com/users/greysteil/orgs",
"received_events_url": "https://api.github.com/users/greysteil/received_events",
"repos_url": "https://api.github.com/users/greysteil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/greysteil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/greysteil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/greysteil",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4707/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4707/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4707.diff",
"html_url": "https://github.com/psf/requests/pull/4707",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4707.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4707"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=h1) Report\n> Merging [#4707](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/cd97ce90ba04156a4aae2fd05aa22c790bec1a5c?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4707 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=footer). Last update [cd97ce9...790e244](https://codecov.io/gh/requests/requests/pull/4707?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi there @greysteil \r\n\r\nI'm not sure I fully understand the value of this badge. Could you share more what people should understand when they see this?\r\n\r\nAs it stands, I'm not familiar with dependabot and since it's not a service the project uses, I'm not sure if we should be including it.",
"@sigmavirus24 - of course.\r\n\r\nThe idea is to show users how stable / bug-free new releases are. Dependabot creates update PRs for lots of Requests users (you can see them [here](https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Aapp%2Fdependabot+is%3Aclosed+requests+in%3Atitle)), and we can use the data on whether their CI passes on the PR base and head branches to check whether new versions of Requests are backwards compatible and/or bug-free.\r\n\r\nThe information is hopefully useful for a couple of reasons:\r\n1) It's obviously a good thing to aim for for new releases to be bug free and backwards compatible if they're non-major. Measuring what happens when users update is a good way to check it.\r\n2) With Pipenv it's possible (and sensible) to specify [compatible release requirements](https://www.python.org/dev/peps/pep-0440/#compatible-release), but you probably want to know what the backwards compatibility strategy of the library is before doing so. Having a badge showing that compatibility strategy is SemVer, and that it's stuck to, lets users specify better requirements.\r\n\r\nShouldn't matter at all that Requests doesn't use Dependabot itself - it's just the data source. 🙂 ",
"Interesting. That data sounds helpful. I'm wondering if you can share what aggregation and tracking you perform on your API endpoint.\r\n\r\nOur downstream redistributors will care about this and any security minded users will ask this as well. Keep in mind, most of them will attempt to discover it themselves and will tell us, very rudely, if you're tracking anything.\r\n\r\nFurther more, it sounds like Dependabot is a company that could easily disappear tomorrow (as most start-ups and companies are want to do). To indicate SemVer (which isn't strictly correct anyway), we could just as easily use a shields.io badge and I'm sure most dependabot users can look up the stability of Requests on your website.\r\n\r\nAll of this is to say that I'm leaning against adding the badge for my own future peace of mind.",
"@sigmavirus24 - sorry, it sounds like I've not been clear about where the data is coming from. No data comes from badge endpoint itself. When people sign up for Dependabot they give us permission to create pull requests for them and to monitor the status of those pull requests - that's where we get the data from. Looking at the badge on Request's readme, or clicking through to it to get a description of what it means, doesn't produce any data that we're interested in (although to fully answer your question, we do have Google Analytics on the show view that the badge links to).\r\n\r\nI've not heard anyone complain that this in unclear, and the badge is included on several high-profile repos for other languages (webpack, sinatra, jest, rubocop). Hopefully it's clearly explained by the first paragraph if you click on the badge?\r\n\r\n> Dependabot has updated requests between SemVer compatible versions 121 times across 70 projects so far. 98% of those updates passed CI.\r\n\r\nOn our backend we're using shields.io to generate the badges, and then caching them for a week to reduce load on their servers. That said, we're planning to move the URLs to be shields.io ones as soon as they're able to deploy again (the PR to add Dependabot to shields.io is [merged here](https://github.com/badges/shields/pull/1734). Unfortunately their resources are limited and they've been unable to deploy for the last few months.)\r\n\r\nFinally, on Dependabot disappearing, we're a bootstrapped, profitable company, but I can of course understand your concern. The worst thing that would happen if we did, however, would that this badge stopped working and that I or some other contributor put in a PR to remove it. Hopefully that's not too serious a worry.\r\n\r\nWould you be happier with this badge if the link was a shields.io one? I can understand the concern that introducing an image from a foreign source to your README might allow us to be doing some nefarious tracking of your README views that using the shields.io link, when deployed, would fix.",
"Hi @greysteil, thanks for reaching out about this and the detailed responses. I took a look over Dependabot but wasn't able to find much beyond the number of passing/failing builds. It doesn't look like information about the failures are included, so it's hard to determine *why* a project may not be SemVer compliant. The current data seems to be measuring the robustness of users build pipelines rather than the backwards compatibility of a project, which may be misleading or abusable.\r\n\r\nI think I'm leaning against adding this for now unless @sigmavirus24 sees benefit I'm missing. Perhaps we can revisit as the project evolves.",
"👍 - the next thing I'm planning to add to the view is a way to see the PRs on which the update has broken CI. I'll put in a new PR then. Also planning to add a way for it to be used for beta releases (where Dependabot won't generate PRs for users, but will generate a commit on a new branch and check their CI) - so you'd be able to see whether a pre-release is breaking anyone's tests before releasing a new version."
] |
https://api.github.com/repos/psf/requests/issues/4706
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4706/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4706/comments
|
https://api.github.com/repos/psf/requests/issues/4706/events
|
https://github.com/psf/requests/issues/4706
| 334,858,197 |
MDU6SXNzdWUzMzQ4NTgxOTc=
| 4,706 |
SSLError when using requests.session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/567893?v=4",
"events_url": "https://api.github.com/users/masoom/events{/privacy}",
"followers_url": "https://api.github.com/users/masoom/followers",
"following_url": "https://api.github.com/users/masoom/following{/other_user}",
"gists_url": "https://api.github.com/users/masoom/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/masoom",
"id": 567893,
"login": "masoom",
"node_id": "MDQ6VXNlcjU2Nzg5Mw==",
"organizations_url": "https://api.github.com/users/masoom/orgs",
"received_events_url": "https://api.github.com/users/masoom/received_events",
"repos_url": "https://api.github.com/users/masoom/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/masoom/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/masoom/subscriptions",
"type": "User",
"url": "https://api.github.com/users/masoom",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-22T12:20:02Z
|
2021-09-08T01:21:04Z
|
2018-08-04T12:41:41Z
|
NONE
|
resolved
|
Summary.
Getting a SSLError while using requests.session to send a POST Request. OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to dev.domain.nl:443
When using requests sessions to connect to a https url , requests throws a SSLError
Some background
- I have not added any certificates
- The project works locally but after deployment to kubernetes, from inside the container - the post request is not being sent to the url
- verify=false does not work either
What I am using:
Python 2.7.12
Flask==0.12.2
Kubernetes
requests latest
## Expected Result
Get HTTP Response code 200 after sending a POST request
## Actual Result
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 1073, in run
self.function(*self.args, **self.kwargs)
File "app.py", line 136, in main
generatePost()
File "app.py", line 127, in generatePost
resp = testlibrary.test_post()
File "/web/testlibrary.py", line 138, in test_post
response = sess.post(url, headers= header, params= getpara, data= json.dumps(data),verify=False)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 559, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 511, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='dev.domain.nl', port=443): Max retries exceeded with url: /ingestion?LrnDevEui=0059AC0000152A03&LrnFPort=1&LrnInfos=TWA_100006356.873.AS-1-135680630&AS_ID=testserver&Time=2018-06-22T11%3A41%3A08.163%2B02%3A00&Token=1765b08354dfdec (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:661)'),))
## Reproduction Steps
``
```
import requests
from flask import Flask, request, jsonify
from requests import Request, Session
sess = requests.Session()
adapter = requests.adapters.HTTPAdapter(max_retries = 200)
sess.mount('http://', adapter)
sess.mount('https://', adapter)
sess.cert ='/usr/local/lib/python2.7/site-packages/certifi/cacert.pem'
def test_post():
url = 'https://dev.domain.nl/ingestion/?'
header = {'Content-Type': 'application/json', 'Accept': 'application/json'}
response = sess.post(url, headers= header, params= somepara, data= json.dumps(data))
print response.status_code
return response.status_code
def main():
threading.Timer(10.0, main).start()
test_post()
if __name__ == '__main__':
main()
app.run(host="0.0.0.0", debug=True, port=5001, threaded=True)
```
```
System Info
```
Python 2.7.12
Flask==0.12.2
Kubernetes
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4706/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4706/timeline
| null |
completed
| null | null | false |
[
"@Lukasa Do you think you can help me? :) ",
"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---\r\n\r\nAs indicated by\r\n\r\n```\r\nCaused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:661)')\r\n```\r\n\r\nThis is not a Requests bug. Something about your container networking is causing this violation of the protocol."
] |
https://api.github.com/repos/psf/requests/issues/4705
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4705/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4705/comments
|
https://api.github.com/repos/psf/requests/issues/4705/events
|
https://github.com/psf/requests/pull/4705
| 334,653,109 |
MDExOlB1bGxSZXF1ZXN0MTk2NTcyMTc2
| 4,705 |
Remove test for Python 2.6
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-21T20:52:08Z
|
2021-09-02T00:07:44Z
|
2018-06-21T21:00:54Z
|
CONTRIBUTOR
|
resolved
|
Requests does not officially support 2.6, meaning this test is no longer needed.
|
{
"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/4705/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4705/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4705.diff",
"html_url": "https://github.com/psf/requests/pull/4705",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4705.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4705"
}
| true |
[
"Even if we don’t actively support 2.6 anymore, we don’t need to remove visibility on issues or intentionally break 2.6 at this time. We’ve intentionally deferred removing 2.6 specific code until the Requests 3.0 release."
] |
https://api.github.com/repos/psf/requests/issues/4704
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4704/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4704/comments
|
https://api.github.com/repos/psf/requests/issues/4704/events
|
https://github.com/psf/requests/pull/4704
| 334,648,283 |
MDExOlB1bGxSZXF1ZXN0MTk2NTY4NTQz
| 4,704 |
Don't use depreciated `session()` method
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-21T20:37:34Z
|
2021-09-02T00:07:35Z
|
2018-08-11T18:27:49Z
|
CONTRIBUTOR
|
resolved
|
- References to depreciated method `session()` now initialize `Session()` directly.
- Added test for depreciated `session()` method.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4704/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4704/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4704.diff",
"html_url": "https://github.com/psf/requests/pull/4704",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4704.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4704"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=h1) Report\n> Merging [#4704](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/cd97ce90ba04156a4aae2fd05aa22c790bec1a5c?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4704 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=footer). Last update [cd97ce9...93ab15e](https://codecov.io/gh/requests/requests/pull/4704?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"I don’t think this will necessarily hurt anything to migrate, but if we’re going to have the `session` method left in the API we should have at least some tests exercising it. If the day comes that we ever do remove `session` we will know very quickly that these tests need to be updated.\r\n\r\nI’ll leave final judgement here to @sigmavirus24 but I’m not sure we need to do this now.",
"@nateprewitt In that case, I can add a test specifically for `session()` to ensure backwards compatibility."
] |
https://api.github.com/repos/psf/requests/issues/4703
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4703/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4703/comments
|
https://api.github.com/repos/psf/requests/issues/4703/events
|
https://github.com/psf/requests/issues/4703
| 334,345,512 |
MDU6SXNzdWUzMzQzNDU1MTI=
| 4,703 |
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF') error for Visual Recognition Watson API
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39694460?v=4",
"events_url": "https://api.github.com/users/abhishekkumar123090/events{/privacy}",
"followers_url": "https://api.github.com/users/abhishekkumar123090/followers",
"following_url": "https://api.github.com/users/abhishekkumar123090/following{/other_user}",
"gists_url": "https://api.github.com/users/abhishekkumar123090/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abhishekkumar123090",
"id": 39694460,
"login": "abhishekkumar123090",
"node_id": "MDQ6VXNlcjM5Njk0NDYw",
"organizations_url": "https://api.github.com/users/abhishekkumar123090/orgs",
"received_events_url": "https://api.github.com/users/abhishekkumar123090/received_events",
"repos_url": "https://api.github.com/users/abhishekkumar123090/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abhishekkumar123090/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abhishekkumar123090/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abhishekkumar123090",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-21T05:38:03Z
|
2021-09-08T01:21:18Z
|
2018-06-21T13:42:14Z
|
NONE
|
resolved
|
Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 304, in _send_until_done
return self.connection.send(data)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\OpenSSL\SSL.py", line 1729, in send
self._raise_ssl_error(self._ssl, result)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\OpenSSL\SSL.py", line 1632, in _raise_ssl_error
raise SysCallError(-1, "Unexpected EOF")
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1065, in _send_output
self.send(chunk)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 986, in send
self.sock.sendall(data)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 316, in sendall
sent = self._send_until_done(data[total_sent:total_sent + SSL_WRITE_BLOCKSIZE])
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 311, in _send_until_done
raise SocketError(str(e))
OSError: (-1, 'Unexpected EOF')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\packages\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1065, in _send_output
self.send(chunk)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 986, in send
self.sock.sendall(data)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 316, in sendall
sent = self._send_until_done(data[total_sent:total_sent + SSL_WRITE_BLOCKSIZE])
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 311, in _send_until_done
raise SocketError(str(e))
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError("(-1, 'Unexpected EOF')",))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Latest_Python_Commands.py", line 7, in <module>
model = visual_recognition.create_classifier('images',normal_positive_examples=normal,pneumonia_positive_examples=pneumonia)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\watson_developer_cloud\visual_recognition_v3.py", line 259, in create_classifier
accept_json=True)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\watson_developer_cloud\watson_service.py", line 434, in request
**kwargs)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(-1, 'Unexpected EOF')",))
**I am getting the above error when I am trying to call Watson API for Visual Recognition for creating classifier.
Below is the code:**
import watson_developer_cloud
import json
from watson_developer_cloud import VisualRecognitionV3
visual_recognition = VisualRecognitionV3( version='.......................',api_key='...........................................................................')
from os import listdir
with open('C:\\Users\\Asus\\Downloads\\normal.zip', 'rb') as normal, open('C:\\Users\\Asus\\Downloads\\pneumonia.zip', 'rb') as pneumonia:
model = visual_recognition.create_classifier('images',normal_positive_examples=normal,pneumonia_positive_examples=pneumonia)
print(json.dumps(model, indent=2))
classifiers = visual_recognition.list_classifiers(verbose=True)
print(json.dumps(classifiers, indent=2))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4703/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4703/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\nThis is not a bug. The remote server is closing the file unexpectedly and we're telling you as much.\r\n\r\nThere's also no detail about the version of Requests used here. I suggest you bring this up with the Watson API developers."
] |
https://api.github.com/repos/psf/requests/issues/4702
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4702/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4702/comments
|
https://api.github.com/repos/psf/requests/issues/4702/events
|
https://github.com/psf/requests/issues/4702
| 334,320,253 |
MDU6SXNzdWUzMzQzMjAyNTM=
| 4,702 |
response.json() is failing enconding for non ascii characters
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12054748?v=4",
"events_url": "https://api.github.com/users/maufonfa/events{/privacy}",
"followers_url": "https://api.github.com/users/maufonfa/followers",
"following_url": "https://api.github.com/users/maufonfa/following{/other_user}",
"gists_url": "https://api.github.com/users/maufonfa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maufonfa",
"id": 12054748,
"login": "maufonfa",
"node_id": "MDQ6VXNlcjEyMDU0NzQ4",
"organizations_url": "https://api.github.com/users/maufonfa/orgs",
"received_events_url": "https://api.github.com/users/maufonfa/received_events",
"repos_url": "https://api.github.com/users/maufonfa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maufonfa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maufonfa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maufonfa",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-21T03:01:41Z
|
2021-09-08T01:21:17Z
|
2018-06-21T13:43:58Z
|
NONE
|
resolved
|
Summary.
I'm executing a simple GET request with a list of data. But the .json() fails because there's a non ascii character and it can't encode it.
## Expected Result
[
{
"key": "value"
}
]
## Actual Result
*** UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 329: ordinal not in range(128)
## Reproduction Steps
Try to pass this type of character (In this case is the "ü") in a request and then try to convert the response to json using response.json()
```python
import requests
response = requests.request("GET", ulr, headers=headers)
response.json()
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "3.10.0-327.13.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000114f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4702/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4702/timeline
| null |
completed
| null | null | false |
[
"Requests uses the standard `json` library. Your alternative here is to do\r\n\r\n```py\r\njson.loads(response.text)\r\n```\r\n\r\nThat should exhibit exactly the same problem. This is not a bug in requests. Note that the `json()` method on a `Response` allows you to pass in extra keyword arguments. Those correspond to arguments one might pass to `json.loads()`."
] |
https://api.github.com/repos/psf/requests/issues/4701
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4701/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4701/comments
|
https://api.github.com/repos/psf/requests/issues/4701/events
|
https://github.com/psf/requests/pull/4701
| 334,216,936 |
MDExOlB1bGxSZXF1ZXN0MTk2MjQ3NDk3
| 4,701 |
Documentation and tests for form-encoded multivalued elements as lists
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13725?v=4",
"events_url": "https://api.github.com/users/akaihola/events{/privacy}",
"followers_url": "https://api.github.com/users/akaihola/followers",
"following_url": "https://api.github.com/users/akaihola/following{/other_user}",
"gists_url": "https://api.github.com/users/akaihola/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akaihola",
"id": 13725,
"login": "akaihola",
"node_id": "MDQ6VXNlcjEzNzI1",
"organizations_url": "https://api.github.com/users/akaihola/orgs",
"received_events_url": "https://api.github.com/users/akaihola/received_events",
"repos_url": "https://api.github.com/users/akaihola/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akaihola/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akaihola/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akaihola",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-20T19:26:18Z
|
2021-09-02T00:07:38Z
|
2018-07-20T16:56:29Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4701/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4701/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4701.diff",
"html_url": "https://github.com/psf/requests/pull/4701",
"merged_at": "2018-07-20T16:56:28Z",
"patch_url": "https://github.com/psf/requests/pull/4701.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4701"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=h1) Report\n> Merging [#4701](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/4d51e6d20179bdc906c45506c0817b6b677589ae?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4701 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=footer). Last update [4d51e6d...9c92f75](https://codecov.io/gh/requests/requests/pull/4701?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Alright, I think I'm happy with this. Would you mind rebasing onto the master branch and then we can look at merging. Thanks @akaihola!",
"@nateprewitt, I now rebased on master."
] |
|
https://api.github.com/repos/psf/requests/issues/4700
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4700/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4700/comments
|
https://api.github.com/repos/psf/requests/issues/4700/events
|
https://github.com/psf/requests/issues/4700
| 334,208,974 |
MDU6SXNzdWUzMzQyMDg5NzQ=
| 4,700 |
Multivalued `data=` works when given as a list, but is not documented nor tested
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13725?v=4",
"events_url": "https://api.github.com/users/akaihola/events{/privacy}",
"followers_url": "https://api.github.com/users/akaihola/followers",
"following_url": "https://api.github.com/users/akaihola/following{/other_user}",
"gists_url": "https://api.github.com/users/akaihola/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akaihola",
"id": 13725,
"login": "akaihola",
"node_id": "MDQ6VXNlcjEzNzI1",
"organizations_url": "https://api.github.com/users/akaihola/orgs",
"received_events_url": "https://api.github.com/users/akaihola/received_events",
"repos_url": "https://api.github.com/users/akaihola/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akaihola/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akaihola/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akaihola",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-20T19:00:42Z
|
2021-09-08T01:21:10Z
|
2018-07-20T16:57:21Z
|
NONE
|
resolved
|
For the `params=` request argument, [the documentation](http://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls) explains how multivalued query parameters can be expressed as lists in the dictionary:
>You can also pass a list of items as a value:
>```python
>>>> payload = {'key1': 'value1', 'key2': ['value2', 'value3']}
>>>> r = requests.get('http://httpbin.org/get', params=payload)
>```
There's also a unit test for this:
```python
def test_urlencoded_get_query_multivalued_param(self, httpbin):
r = requests.get(httpbin('get'), params=dict(test=['foo', 'baz']))
```
For the `data=` request argument, only the "list of tuples" method for multivalued form-encoded values is shown in [the documentation](http://docs.python-requests.org/en/master/user/quickstart/#more-complicated-post-requests):
>You can also pass a list of tuples to the data argument. This is particularly useful when the form has multiple elements that use the same key:
>```python
>>>> payload = (('key1', 'value1'), ('key1', 'value2'))
>>>> r = requests.post('http://httpbin.org/post', data=payload)
>```
However, both `params=` and `data=` use the same `RequestEncodingMixin._encode_params()` helper for encoding the query parameters or form-encoded values. Indeed, using a list also works for `data=`:
```python
>>> requests.Request(url='http://foo', method='POST', data={'a': ['b', 'c']}).prepare().body
'a=b&a=c'
```
## Expected Result
The "list of items" method for specifying multivalued POST parameters should be documented and tested in the unit test suite.
## Actual Result
I couldn't find documentation or unit tests for the "list of items" method.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4700/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4700/timeline
| null |
completed
| null | null | false |
[
"Resolved in #4701."
] |
https://api.github.com/repos/psf/requests/issues/4699
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4699/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4699/comments
|
https://api.github.com/repos/psf/requests/issues/4699/events
|
https://github.com/psf/requests/pull/4699
| 334,198,976 |
MDExOlB1bGxSZXF1ZXN0MTk2MjMzODEw
| 4,699 |
Test multi-class inheritance for BaseAdapter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-20T18:29:16Z
|
2021-09-02T00:07:44Z
|
2018-06-21T02:43:30Z
|
CONTRIBUTOR
|
resolved
|
Ensure that `BaseAdapter` supports multi-class inheritance. This means a subclass of `BaseAdapter` will invoke all parent classes when inheriting from multiple classes.
See: https://github.com/requests/requests/pull/4697#issuecomment-398814166
class BaseAdapter(object): # pass
def __init__(self):
super(BaseAdapter, self).__init__()
class BaseAdapter(object): # pass
pass
class BaseAdapter(object): # fail
def __init__(self):
BaseAdapter.__init__(self)
class BaseAdapter(object): # fail
def __init__(self):
object.__init__(self)
class BaseAdapter(object): # fail
def __init__(self):
pass
|
{
"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/4699/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4699/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4699.diff",
"html_url": "https://github.com/psf/requests/pull/4699",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4699.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4699"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=h1) Report\n> Merging [#4699](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/883caaf145fbe93bd0d208a6b864de9146087312?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4699 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=footer). Last update [883caaf...f043b4c](https://codecov.io/gh/requests/requests/pull/4699?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi @Stevoisiak, it looks like this test passes regardless of the existence of `__init__`. If that's the case, we're effectively testing a behaviour of the Python interpreter rather than any Requests code. I don't think we're likely to accept a patch around that unless there's a compelling reason to do so.\r\n\r\nAs I tried to state in the last PR, we really appreciate contributions to Requests but need to make sure they're providing benefit to our users and the code base. Test coverage is definitely an area we can do better in, but the tests should be focused on behaviours of Requests.\r\n\r\nI'm going to close this out since I think it's unlikely to be merged."
] |
https://api.github.com/repos/psf/requests/issues/4698
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4698/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4698/comments
|
https://api.github.com/repos/psf/requests/issues/4698/events
|
https://github.com/psf/requests/pull/4698
| 333,941,376 |
MDExOlB1bGxSZXF1ZXN0MTk2MDM0NDM3
| 4,698 |
Issue #4690: Fixing problems when you post something like {'some-var':None}
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/545094?v=4",
"events_url": "https://api.github.com/users/jion/events{/privacy}",
"followers_url": "https://api.github.com/users/jion/followers",
"following_url": "https://api.github.com/users/jion/following{/other_user}",
"gists_url": "https://api.github.com/users/jion/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jion",
"id": 545094,
"login": "jion",
"node_id": "MDQ6VXNlcjU0NTA5NA==",
"organizations_url": "https://api.github.com/users/jion/orgs",
"received_events_url": "https://api.github.com/users/jion/received_events",
"repos_url": "https://api.github.com/users/jion/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jion/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jion/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jion",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-06-20T06:33:39Z
|
2021-09-02T00:07:41Z
|
2018-07-02T20:45:51Z
|
NONE
|
resolved
|
In #4690, an scenario is provided where if you make a post using as `data` a dictionary with empty values, the request library will treat this post as a chunked request. (More detail explanaition in my comment in the issue)
This PR fix that problem, creating the encoded data first to check if there is really data to sent in the data dictionary.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/545094?v=4",
"events_url": "https://api.github.com/users/jion/events{/privacy}",
"followers_url": "https://api.github.com/users/jion/followers",
"following_url": "https://api.github.com/users/jion/following{/other_user}",
"gists_url": "https://api.github.com/users/jion/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jion",
"id": 545094,
"login": "jion",
"node_id": "MDQ6VXNlcjU0NTA5NA==",
"organizations_url": "https://api.github.com/users/jion/orgs",
"received_events_url": "https://api.github.com/users/jion/received_events",
"repos_url": "https://api.github.com/users/jion/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jion/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jion/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jion",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4698/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4698/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4698.diff",
"html_url": "https://github.com/psf/requests/pull/4698",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4698.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4698"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4697
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4697/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4697/comments
|
https://api.github.com/repos/psf/requests/issues/4697/events
|
https://github.com/psf/requests/pull/4697
| 333,798,976 |
MDExOlB1bGxSZXF1ZXN0MTk1OTI2ODU4
| 4,697 |
Remove redundant __init__ for BaseAdapter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2018-06-19T19:02:10Z
|
2018-06-26T14:50:10Z
|
2018-06-19T19:43:27Z
|
CONTRIBUTOR
|
resolved
|
`BaseAdapter.__init__()` overrides the default `__init__` method in an unnecessary way. Pylint classifies this code with `useless-super-delegation`.
> `useless-super-delegation` [is] used whenever we can detect that an
> overridden method is useless, relying on `super()` delegation to do the
> same thing as another method from the MRO.
>
>
> class Impl(Base):
> def __init__(self, param1, param2):
> super(Impl, self).__init__(param1, param2)
>
> <sup>[What's New In Pylint 1.7](http://pylint.pycqa.org/en/latest/whatsnew/1.7.html)</sup>
Personal testing shows this change improves performance when initializing `BaseAdapter`.
|
{
"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/4697/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4697/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4697.diff",
"html_url": "https://github.com/psf/requests/pull/4697",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4697.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4697"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=h1) Report\n> Merging [#4697](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/883caaf145fbe93bd0d208a6b864de9146087312?src=pr&el=desc) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4697 +/- ##\n==========================================\n+ Coverage 66.79% 66.81% +0.02% \n==========================================\n Files 15 15 \n Lines 1563 1561 -2 \n==========================================\n- Hits 1044 1043 -1 \n+ Misses 519 518 -1\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4697/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `70.37% <ø> (+0.18%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=footer). Last update [883caaf...663796a](https://codecov.io/gh/requests/requests/pull/4697?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"@Steviosiak, I don’t know if I understand why you feel this is redundant. This is the base class that can be used for creating custom adapters.\r\n\r\nWe usually avoid making changes in the code unless they solve a specific problem and make the user experience better.\r\n\r\nI don’t think we’re likely to accept this at this time.",
"@nateprewitt I was under the impression that `BaseAdapter` was initializing an instance of itself, which is something objects do by default.\r\n\r\nI'm not sure what purpose `__init__` is serving in this case.",
"@nateprewitt \r\n\r\n<s>To illustrate, each of the following examples would be functionally identical.</s>\r\n\r\n```Python\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n super(BaseAdapter, self).__init__()\r\n```\r\n```Python\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n object.__init__(self)\r\n```\r\n```Python\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n pass\r\n```\r\n\r\nPylint warns about the first example with [`useless-super-delegation`](https://github.com/PyCQA/pylint/issues/1567)",
"It seems my [previous subclass assumptions](https://github.com/requests/requests/pull/4697#issuecomment-398533573) were incorrect.\r\n\r\nThe examples I provided will behave differently if a subclass inherits from more than one parent class.\r\n\r\n```Python\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n super(BaseAdapter, self).__init__()\r\n\r\nclass BaseAdapter2(object):\r\n def __init__(self):\r\n object.__init__(self)\r\n\r\nclass BaseAdapter3(object):\r\n def __init__(self):\r\n pass\r\n\r\nclass Second:\r\n def __init__(self):\r\n print(\"second\")\r\n super().__init__()\r\n\r\nclass Other1(BaseAdapter, Second):\r\n def __init__(self):\r\n print(\"other1 init\")\r\n super().__init__()\r\n\r\nclass Other2(BaseAdapter2, Second):\r\n def __init__(self):\r\n print(\"other2 init\")\r\n super().__init__()\r\n\r\nclass Other3(BaseAdapter3, Second):\r\n def __init__(self):\r\n print(\"other3 init\")\r\n super().__init__()\r\n\r\nOther1()\r\nOther2()\r\nOther3()\r\n```\r\n\r\nOutput:\r\n\r\n```\r\nother1 init\r\nsecond\r\nother2 init\r\nother3 init\r\n```\r\n\r\nHowever, removing `__init__` does seem to have the same output.\r\n\r\n```Python\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n super(BaseAdapter, self).__init__()\r\n\r\nclass BaseAdapter4(object):\r\n pass\r\n\r\nclass Second:\r\n def __init__(self):\r\n print(\"second\")\r\n super().__init__()\r\n\r\nclass Other1(BaseAdapter, Second):\r\n def __init__(self):\r\n print(\"other1 init\")\r\n super().__init__()\r\n\r\nclass Other4(BaseAdapter4, Second):\r\n def __init__(self):\r\n print(\"other4 init\")\r\n super().__init__()\r\n\r\nOther1()\r\nOther4()\r\n```\r\n\r\nOutput:\r\n\r\n```\r\nother1 init\r\nsecond\r\nother4 init\r\nsecond\r\n```\r\n\r\nRelated: \r\n\r\n- [Stack Overflow: How does Python's super() work with multiple inheritance?](https://stackoverflow.com/q/3277367/3357935)\r\n- [Stack Overflow: Calling parent class \\_\\_init__ with multiple inheritance, what's the right way?](https://stackoverflow.com/a/9575426/3357935)\r\n- [Scott Lobdell: Multiple Inheritance in Python](http://scottlobdell.me/2015/06/multiple-inheritance-python/)",
"Personal testing indicates this change would improve performance when initializing BaseAdapter. (0.57 seconds vs 0.11 seconds)\r\n\r\n```Python\r\nimport timeit\r\n\r\nsetup = \"\"\"\r\nclass BaseAdapter(object):\r\n def __init__(self):\r\n super(BaseAdapter, self).__init__()\r\n\"\"\"\r\nprint(timeit.timeit('BaseAdapter()', setup=setup))\r\n\r\nsetup = \"\"\"\r\nclass BaseAdapter(object):\r\n pass\r\n\"\"\"\r\nprint(timeit.timeit('BaseAdapter()', setup=setup))\r\n```\r\n\r\nOutput\r\n\r\n```\r\n0.5758354471040419\r\n0.10679823940642941\r\n```\r\n",
"@Stevoisiak I believe the benchmark you’re providing is showing the total run time of 1,000,000 runs. That means we’re measuring an initialization variation of .4 microseconds which is an incredibly small amount of time for what is likely a one time operation in someone’s code.\r\n\r\nAs was stated earlier in the PR, we usually don’t remove code unless there’s a compelling reason to do so. I’m not convinced we need this init but it’s nearly impossible to know how people are using this BaseAdapter and I’d rather not risk breaking things.",
"@nateprewitt Ah, the timings did seem a bit large. Thank you for taking the time to explain."
] |
https://api.github.com/repos/psf/requests/issues/4696
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4696/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4696/comments
|
https://api.github.com/repos/psf/requests/issues/4696/events
|
https://github.com/psf/requests/pull/4696
| 333,756,796 |
MDExOlB1bGxSZXF1ZXN0MTk1ODk0MDI0
| 4,696 |
Ignore '.idea' folder (PyCharm Settings)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-19T16:54:56Z
|
2021-09-02T00:07:45Z
|
2018-06-19T17:39:38Z
|
CONTRIBUTOR
|
resolved
|
When a project is opened in PyCharm, a '.idea' folder is automatically created to store user-specific settings. This can be safely ignored.
See https://rider-support.jetbrains.com/hc/en-us/articles/207097529-What-is-the-idea-folder-
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4696/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4696/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4696.diff",
"html_url": "https://github.com/psf/requests/pull/4696",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4696.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4696"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=h1) Report\n> Merging [#4696](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/883caaf145fbe93bd0d208a6b864de9146087312?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4696 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=footer). Last update [883caaf...f287261](https://codecov.io/gh/requests/requests/pull/4696?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Please use a global gitignore. This has been proposed before and has been rejected. In the future please search open, closed, and merged PRs before opening new ones."
] |
https://api.github.com/repos/psf/requests/issues/4695
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4695/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4695/comments
|
https://api.github.com/repos/psf/requests/issues/4695/events
|
https://github.com/psf/requests/issues/4695
| 333,615,116 |
MDU6SXNzdWUzMzM2MTUxMTY=
| 4,695 |
Documentation for response.json() wrong
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4580051?v=4",
"events_url": "https://api.github.com/users/l0rb/events{/privacy}",
"followers_url": "https://api.github.com/users/l0rb/followers",
"following_url": "https://api.github.com/users/l0rb/following{/other_user}",
"gists_url": "https://api.github.com/users/l0rb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/l0rb",
"id": 4580051,
"login": "l0rb",
"node_id": "MDQ6VXNlcjQ1ODAwNTE=",
"organizations_url": "https://api.github.com/users/l0rb/orgs",
"received_events_url": "https://api.github.com/users/l0rb/received_events",
"repos_url": "https://api.github.com/users/l0rb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/l0rb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/l0rb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/l0rb",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-19T10:39:30Z
|
2021-09-08T01:21:20Z
|
2018-06-19T14:05:21Z
|
NONE
|
resolved
|
## Summary
When calling response.json() on a response where the content is not valid json a JSONDecodeError bubbles up from the json library, although the documentation claims a ValueError should occur for that
## Expected Result
ValueError
## Actual Result
JSONDecodeError
## Reproduction Steps
```python
import requests
response = requests.Response()
response.json()
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.3"
},
"platform": {
"release": "4.9.0-6-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.22"
},
"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/4695/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4695/timeline
| null |
completed
| null | null | false |
[
"Hi @l0rb,\r\n\r\n`JSONDecodeError` is a subclass of `ValueError`. It will be returned by the `json` module response in Python3 in some cases, but doesn't exist in Python2. For code compatible across both versions, or Python 3 code that's compatible in all cases, you'd want to be excepting the `ValueError`."
] |
https://api.github.com/repos/psf/requests/issues/4694
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4694/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4694/comments
|
https://api.github.com/repos/psf/requests/issues/4694/events
|
https://github.com/psf/requests/issues/4694
| 333,612,618 |
MDU6SXNzdWUzMzM2MTI2MTg=
| 4,694 |
Getting size of performed request
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1589986?v=4",
"events_url": "https://api.github.com/users/pbaranski/events{/privacy}",
"followers_url": "https://api.github.com/users/pbaranski/followers",
"following_url": "https://api.github.com/users/pbaranski/following{/other_user}",
"gists_url": "https://api.github.com/users/pbaranski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pbaranski",
"id": 1589986,
"login": "pbaranski",
"node_id": "MDQ6VXNlcjE1ODk5ODY=",
"organizations_url": "https://api.github.com/users/pbaranski/orgs",
"received_events_url": "https://api.github.com/users/pbaranski/received_events",
"repos_url": "https://api.github.com/users/pbaranski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pbaranski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pbaranski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pbaranski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-19T10:31:58Z
|
2021-09-08T01:21:18Z
|
2018-06-19T14:31:41Z
|
NONE
|
resolved
|
I want to find out what is the size of performed request - is it possible in requests library?
## Expected Result
in my dreams:
```
response.request.size()
```
## Actual Result
not apply
## Reproduction Steps
What I should consider manually computing this value. Header, querystring, body (if apply)?
Does below cod reflect bytes sent to server
```
sys.getsizeof(response.request)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"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/4694/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4694/timeline
| null |
completed
| null | null | false |
[
"Hi @pbaranski,\r\n\r\nRequests is in a feature freeze, so I don't know if we'd introduce a `size()` method to the `Request` object.\r\n\r\nIf your definition of \"size\" is bytes sent over the wire, I'm not sure that `sys.getsizeof(response.request)` expresses that. You can find the definition/layout of an http message in [RFC7230 section 3](https://tools.ietf.org/html/rfc7230#section-3). This is what will be sent when you issue the Request. A rough outline is:\r\n\r\n```\r\nGET /path/to/my/resource HTTP/1.1\\r\\n\r\nAccept: */*\\r\\n\r\nContent-Type: text/plain\\r\\n\r\nContent-Length: 43\\r\\n\r\nConnection: keep-alive\\r\\n\r\nUser-Agent: MyUserAgent1.2.3\\r\\n\r\n\\r\\n\r\nDear Server,\r\n\r\nI hate your stinking guts...\r\n```\r\n\r\nThat should be 193 bytes across the wire including the request line, headers, and uncompressed body. There are a few different ways you could slice this depending on what you're trying to measure, but this is the general idea.\r\n\r\nIf you have further questions, let's move this to [StackOverflow](https://stackoverflow.com) with the `python-requests` tag. We typically reserve the github tracker for reports about defects in Requests. Thanks!",
"@nateprewitt Thanks for answer, is partially explains what I was after. Before i posted question here I made SO question what is available here [https://stackoverflow.com/questions/50908813/python-requests-figuring-out-request-full-size](https://stackoverflow.com/questions/50908813/python-requests-figuring-out-request-full-size ) . I will try to post findings from your response to SO thread.\r\nCheers"
] |
https://api.github.com/repos/psf/requests/issues/4693
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4693/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4693/comments
|
https://api.github.com/repos/psf/requests/issues/4693/events
|
https://github.com/psf/requests/issues/4693
| 333,568,122 |
MDU6SXNzdWUzMzM1NjgxMjI=
| 4,693 |
Backslash char in Unicode encoded characters becomes a double backslash
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/77923?v=4",
"events_url": "https://api.github.com/users/ringods/events{/privacy}",
"followers_url": "https://api.github.com/users/ringods/followers",
"following_url": "https://api.github.com/users/ringods/following{/other_user}",
"gists_url": "https://api.github.com/users/ringods/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ringods",
"id": 77923,
"login": "ringods",
"node_id": "MDQ6VXNlcjc3OTIz",
"organizations_url": "https://api.github.com/users/ringods/orgs",
"received_events_url": "https://api.github.com/users/ringods/received_events",
"repos_url": "https://api.github.com/users/ringods/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ringods/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ringods/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ringods",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-19T08:26:32Z
|
2021-09-08T01:21:20Z
|
2018-06-19T10:44:46Z
|
NONE
|
resolved
|
We have an application which returns JSON responses. In such a response document, some string values could have encoded Unicode characters like `\u003C` (<) or `\u003E` (>). But `requests` seems to "process" this return value.
## Expected Result
Simplified version of my response JSON:
```
{ "key": "\u003CSome Text Here\u003E" }
```
## Actual Result
```
{ "key": "\\u003CSome Text Here\\u003E" }
```
The single backslash becomes a double backslash. I don't have this with plain `curl` or the Insomnia Mac REST client app.
## Reproduction Steps
Set up an nginx server serving document `encoded.json` with content:
```json
{
"key": "\u003CSome text here\u003E"
}
```
Instructions:
```
$ docker pull nginx
$ docker run --name json-server -p:8080:80 -v `pwd`:/usr/share/nginx/html:ro -d nginx
```
In a Python shell:
```python
>>> import requests
>>> r = requests.Session()
>>> response = r.get('http://localhost:8080/encoded.json')
>>> response.headers
{'Server': 'nginx/1.15.0', 'Date': 'Tue, 19 Jun 2018 08:21:05 GMT', 'Content-Type': 'application/json', 'Content-Length': '44', 'Last-Modified': 'Tue, 19 Jun 2018 08:07:58 GMT', 'Connection': 'keep-alive', 'ETag': '"5b28b9de-2c"', 'Accept-Ranges': 'bytes'}
>>> response.encoding
>>> response.content
b'{\n "key": "\\u003CSome text here\\u003E"\n}\n'
>>> response.text
'{\n "key": "\\u003CSome text here\\u003E"\n}\n'
```
Note that `response.encoding` is not set.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "17.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
Also doesn't work with urllib 1.22 and requests 2.18.4.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/77923?v=4",
"events_url": "https://api.github.com/users/ringods/events{/privacy}",
"followers_url": "https://api.github.com/users/ringods/followers",
"following_url": "https://api.github.com/users/ringods/following{/other_user}",
"gists_url": "https://api.github.com/users/ringods/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ringods",
"id": 77923,
"login": "ringods",
"node_id": "MDQ6VXNlcjc3OTIz",
"organizations_url": "https://api.github.com/users/ringods/orgs",
"received_events_url": "https://api.github.com/users/ringods/received_events",
"repos_url": "https://api.github.com/users/ringods/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ringods/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ringods/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ringods",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4693/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4693/timeline
| null |
completed
| null | null | false |
[
"well, that's not requests's fault, that's because you `print` it out, python escape that if you print it.\r\njust write the content to file and you will get what you want.",
"@AndCycle thanks for putting me on the right track.\r\n\r\nFirst of all, I find it very confusing that Python prints the double escaped version. This put me on the wrong track.\r\n\r\nBut eventually, I am using `response.content.decode('unicode-escape')` as my solution. `response.text` does not perform this type of decoding it seems."
] |
https://api.github.com/repos/psf/requests/issues/4692
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4692/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4692/comments
|
https://api.github.com/repos/psf/requests/issues/4692/events
|
https://github.com/psf/requests/issues/4692
| 333,501,758 |
MDU6SXNzdWUzMzM1MDE3NTg=
| 4,692 |
`RequestException` does not contain `request` as a field in some situation.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13601247?v=4",
"events_url": "https://api.github.com/users/dong-zeyu/events{/privacy}",
"followers_url": "https://api.github.com/users/dong-zeyu/followers",
"following_url": "https://api.github.com/users/dong-zeyu/following{/other_user}",
"gists_url": "https://api.github.com/users/dong-zeyu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dong-zeyu",
"id": 13601247,
"login": "dong-zeyu",
"node_id": "MDQ6VXNlcjEzNjAxMjQ3",
"organizations_url": "https://api.github.com/users/dong-zeyu/orgs",
"received_events_url": "https://api.github.com/users/dong-zeyu/received_events",
"repos_url": "https://api.github.com/users/dong-zeyu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dong-zeyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dong-zeyu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dong-zeyu",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-19T02:55:12Z
|
2022-05-03T17:11:18Z
|
2022-02-02T17:09:35Z
|
NONE
|
resolved
|
`RequestException` does not contain `request` as a field in some situation.
## Expected Result
A `RequestException` (or its subclass) should contain a field named `request` if possible.
## Actual Result
I did not see any in
https://github.com/requests/requests/blob/883caaf145fbe93bd0d208a6b864de9146087312/requests/models.py#L751-L756
Actually, I think it should be written like
```python
ChunkedEncodingError(e, request=self.request)
```
```python
ContentDecodingError(e, request=self.request)
```
```python
ConnectionError(e, request=self.request)
```
(Actually, the third line has another problem and had a fix in #4468 on version 3.0)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13601247?v=4",
"events_url": "https://api.github.com/users/dong-zeyu/events{/privacy}",
"followers_url": "https://api.github.com/users/dong-zeyu/followers",
"following_url": "https://api.github.com/users/dong-zeyu/following{/other_user}",
"gists_url": "https://api.github.com/users/dong-zeyu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dong-zeyu",
"id": 13601247,
"login": "dong-zeyu",
"node_id": "MDQ6VXNlcjEzNjAxMjQ3",
"organizations_url": "https://api.github.com/users/dong-zeyu/orgs",
"received_events_url": "https://api.github.com/users/dong-zeyu/received_events",
"repos_url": "https://api.github.com/users/dong-zeyu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dong-zeyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dong-zeyu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dong-zeyu",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4692/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4692/timeline
| null |
completed
| null | null | false |
[
"We omit it in these cases as you have a `response` which has `response.request` so if you're iterating over content you have the request that you can munge yourself if you're handling exceptions close to that response.\r\n\r\nOn top of that, those really aren't specific to a request as it is. Those happen after the response has been started so including the request may be misleading in those exceptions.",
"You are right since `RequestException.request` will be assigned in the following code if I already have `response` \r\n\r\nhttps://github.com/requests/requests/blob/883caaf145fbe93bd0d208a6b864de9146087312/requests/exceptions.py#L22-L24\r\n\r\nHowever, what I want to do is just to log the information when an exception was raised. For example, when I trying to run the code like this\r\n```python\r\ntry:\r\n requests.get(\"https://github.com/\")\r\n requests.get(\"https://www.google.com/\")\r\nexcept RequestException as err:\r\n logging.warn('Failed in %s - %s', err.request.method, err.request.url)\r\n```\r\nAll thing will work fine if `RequestException` was caused by `NewConnectionError` or `ConnectTimeoutError` in `urllib3`, but it will raise `AttributeError: 'NoneType' object has no attribute 'method'` if it was caused by `ReadTimeoutError` since `RequestException.request` was not initialized in such case.\r\n\r\nWhat I want to express is that\r\n\r\n- If a request was failed **in sending the request**, then I can get `RequestException.request` for logging\r\n\r\n- If a request was failed **after receiving a bad response**, then I can get `RequestException.request` for logging\r\n\r\n- However, if a request was failed **during the time receiving the content of a response**, then I get nothing but a `RequestException`\r\n\r\nI don't know if it is reasonable, but I think in any case, I should get `RequestException.request` for logging or debugging"
] |
https://api.github.com/repos/psf/requests/issues/4691
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4691/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4691/comments
|
https://api.github.com/repos/psf/requests/issues/4691/events
|
https://github.com/psf/requests/issues/4691
| 333,497,921 |
MDU6SXNzdWUzMzM0OTc5MjE=
| 4,691 |
Multiple POST requests, second request gets a 404 error code
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28879144?v=4",
"events_url": "https://api.github.com/users/nwadeit/events{/privacy}",
"followers_url": "https://api.github.com/users/nwadeit/followers",
"following_url": "https://api.github.com/users/nwadeit/following{/other_user}",
"gists_url": "https://api.github.com/users/nwadeit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nwadeit",
"id": 28879144,
"login": "nwadeit",
"node_id": "MDQ6VXNlcjI4ODc5MTQ0",
"organizations_url": "https://api.github.com/users/nwadeit/orgs",
"received_events_url": "https://api.github.com/users/nwadeit/received_events",
"repos_url": "https://api.github.com/users/nwadeit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nwadeit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nwadeit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nwadeit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-19T02:29:53Z
|
2021-09-08T01:21:19Z
|
2018-06-19T02:44:15Z
|
NONE
|
resolved
|
Hello, I am new to python and am having this same issue. I am trying to authenticate to a website that redirects you to a security question after the initial login. Both the initial login and subsequent page use the same "action URL" and on the second post request I am receiving a 404, here is my code, any help would be greatly appreciated:
```python
from bs4 import BeautifulSoup as bs
import requests
import time
sources = ["https://www.dandh.com/v4/view?pageReq=dhMainNS"]
req = requests.Session()
def login():
authentication_url = "https://www.dandh.com/v4/dh"
header = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:60.0) Gecko/20100101 Firefox/60.0"}
payload = {"Login": "12345",
"PW": "12345",
"Request": "Login"}
payload2 = {"securityAnswer": "12345",
"Request": "postForm"}
req.post(authentication_url, data=payload, headers=header)
time.sleep(3)
req.post(authentication_url, data=payload2, headers=header)
time.sleep(3)
def print_object(sources):
for url in sources:
soup_object = bs(req.get(url).text, "html.parser")
print(soup_object.get_text())
def main():
login()
print_object(sources)
main()
```
|
{
"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/4691/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4691/timeline
| null |
completed
| null | null | false |
[
"Hi @mwadiet,\r\n\r\nThis looks like it’s a request for help rather than a report of a defect in Requests. What you’re describing is a behavior of the server which isn’t related to Requests. If you open a question on [StackOverflow](https://stackoverflow.com), you should be able to get some guidance on how to approach the problem.\r\n\r\nThanks!",
"I appreciate the response, i only posted it on their because there was a previous post that the developers acknowledged as a bug in requests. Where doing a get or post would return a 200 status code and then a 404 immediately after on the second request\n\nSent from my iPhone\n\n> On Jun 18, 2018, at 10:44 PM, Nate Prewitt <[email protected]> wrote:\n> \n> Hi @mwadiet,\n> \n> This looks like it’s a request for help rather than a report of a defect in Requests. What you’re describing is a behavior of the server which isn’t related to Requests. If you open a question on StackOverflow, you should be able to get some guidance on how to approach the problem.\n> \n> Thanks!\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n",
"Nope. It was never acknowledged as a bug. That was a thing we were tracking and found a work around for with the specific service. This is likely a problem with the service you're talking to"
] |
https://api.github.com/repos/psf/requests/issues/4690
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4690/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4690/comments
|
https://api.github.com/repos/psf/requests/issues/4690/events
|
https://github.com/psf/requests/issues/4690
| 332,869,943 |
MDU6SXNzdWUzMzI4Njk5NDM=
| 4,690 |
Request with single form parameter evaluating to `None` duplicates `Host` headers
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/472488?v=4",
"events_url": "https://api.github.com/users/pirogoeth/events{/privacy}",
"followers_url": "https://api.github.com/users/pirogoeth/followers",
"following_url": "https://api.github.com/users/pirogoeth/following{/other_user}",
"gists_url": "https://api.github.com/users/pirogoeth/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pirogoeth",
"id": 472488,
"login": "pirogoeth",
"node_id": "MDQ6VXNlcjQ3MjQ4OA==",
"organizations_url": "https://api.github.com/users/pirogoeth/orgs",
"received_events_url": "https://api.github.com/users/pirogoeth/received_events",
"repos_url": "https://api.github.com/users/pirogoeth/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pirogoeth/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pirogoeth/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pirogoeth",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] |
{
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
}
| 3 |
2018-06-15T18:15:30Z
|
2024-05-20T14:37:11Z
|
2024-05-20T14:37:11Z
|
NONE
| null |
Somehow, performing a `POST` request where the body is encoded as `application/x-www-form-urlencoded` with the body containing a single field which evaluates to `None` (a la `{'param': None}`) submits a request containing *two* `Host` headers, one of which is the provided override and the other which is built from the `netloc` of the request URL.
## Expected Result
```
POST / HTTP/1.1
Host: localhost
User-Agent: python-requests/2.19.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
```
## Actual Result
```
POST / HTTP/1.1
Host: localhost:4000
User-Agent: python-requests/2.19.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Host: localhost
Content-Type: application/x-www-form-urlencoded
0
```
## Reproduction Steps
Open up a `netcat` session to view the request content:
```sh
nc -l 127.0.0.1 4000
```
Make the request:
```python
import requests
requests.post('http://localhost:4000/test', headers={'Host': 'localhost'}, data={'some_param': None})
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "17.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
We have also been able to reproduce this on Ubuntu machines using `requests==2.13.0` and `python==2.7.6`:
```
### Request
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.__version__
'2.13.0'
>>> requests.post('http://localhost:4000/', headers={'Host': 'localhost'}, data={'param': None})
### Response
POST / HTTP/1.1
Host: localhost:4000
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.13.0
Host: localhost
Content-Type: application/x-www-form-urlencoded
0
```
|
{
"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/4690/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4690/timeline
| null |
completed
| null | null | false |
[
"Problem is that when you put `{'some_value': None}` in the data parameter, the body of the prepared request (made by the request library from your input data) is filled with `''` (empty string) and also not 'ContentLength' pair is added in its header dictionary:\r\n\r\n| How you fill your post data | `prepared_req.body` | `'Content-Length' in prepared_req.headers` |\r\n| ---- | --------------- | ------------ |\r\n| `data={'some_parameter': None}` | `''` | `False` |\r\n| `data={'foo': 'bar'}` | `'foo=bar'` | `True` (7) |\r\n| `data={}` | `None` | `True` (0) |\r\n\r\nSo, because `Content-Length` is not set and body is not Empty (is `''` but is not `None`) [this line of code](https://github.com/requests/requests/blob/v2.19.1/requests/adapters.py#L416) understand that your request is a chunked request, and instead of use the public and friendly interface of urllib3 ([here](https://github.com/requests/requests/blob/v2.19.1/requests/adapters.py#L435)) its get a \"low level\" connection ([here](https://github.com/requests/requests/blob/v2.19.1/requests/adapters.py#L453)) and deals with the bare [httplib](https://github.com/python/cpython/blob/2.7/Lib/httplib.py). Problem with this? Well, the library only allows to \"append headers\" but no to \"add or replace in case that exists\". So when requestlib does [this](https://github.com/requests/requests/blob/v2.19.1/requests/adapters.py#L461) it is actually appending the 'Host' header that you specify but without removing the existing one (previously added by `netloc` ([here](https://github.com/python/cpython/blob/2.7/Lib/httplib.py#L961)).\r\n\r\nSo.. solution to this? I think is to change prepared request behavior in order to fill body with None and adding the 'Content-Lenght' header with a 0 value. I can create a pull request, just want to know if this would be the expected behavior\r\n\r\n(note that for an actual chunked request, we'll be still not able to override headers)",
"@jion Thanks for taking a look! Let me talk with my team and see what they think the expected request would be, or if they'd rather work around it downstream instead.",
"In an effort to clean up the issue tracker to only have issues that are still relevant to the project we've done a quick pass and decided this issue may no longer be relevant for a variety of potential reasons, including:\r\n\r\n* Applies to a much older version, unclear whether the issue still applies.\r\n* Change requires a backwards incompatible release and it's unclear if the benefits are worth the migration effort from the community.\r\n* There isn't a clear demand from the community on the change landing in Requests.\r\n\r\nIf you think the issue should remain open, please comment so below or open a new issue and link back to the original issue. Again, thank you for opening the issue and for the discussion, it's much appreciated."
] |
https://api.github.com/repos/psf/requests/issues/4689
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4689/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4689/comments
|
https://api.github.com/repos/psf/requests/issues/4689/events
|
https://github.com/psf/requests/issues/4689
| 332,825,374 |
MDU6SXNzdWUzMzI4MjUzNzQ=
| 4,689 |
requests.get is very slow while fetching websites
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24193921?v=4",
"events_url": "https://api.github.com/users/statnihilist/events{/privacy}",
"followers_url": "https://api.github.com/users/statnihilist/followers",
"following_url": "https://api.github.com/users/statnihilist/following{/other_user}",
"gists_url": "https://api.github.com/users/statnihilist/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/statnihilist",
"id": 24193921,
"login": "statnihilist",
"node_id": "MDQ6VXNlcjI0MTkzOTIx",
"organizations_url": "https://api.github.com/users/statnihilist/orgs",
"received_events_url": "https://api.github.com/users/statnihilist/received_events",
"repos_url": "https://api.github.com/users/statnihilist/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/statnihilist/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/statnihilist/subscriptions",
"type": "User",
"url": "https://api.github.com/users/statnihilist",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-15T15:46:21Z
|
2021-09-08T01:21:21Z
|
2018-06-15T17:26:04Z
|
NONE
|
resolved
|
I am trying to build a simple terminal app to search stuff online through the terminal.
When I submit get requests through the library, I get very large wall times. I can't seem to pinpoint the problem.
Its fast when I directly type into the browser.

|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4689/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4689/timeline
| null |
completed
| null | null | false |
[
"Hi there @sky-lynx \r\n\r\nYour output tells me that requests itself is plenty fast. The amount of CPU time it's taking to perform the syscalls (including opening a brand new socket) is taking less than 1/5th of a second. The rest of that time would appear to be coming from the network time. Unfortunately, we are not magical enough to improve the speed of the network you're using. Some of that time may be spent retrieving DNS records and some of it may be spent actually communicating with the external website. This slowness can also be aggravated by proxies sitting between you and the site. Sadly, there's little we can do here to help you and since this is not a bug in Requests itself, I'm afraid I'll be closing this issue.\r\n\r\nCheers",
"Apart from trying to get higher network speeds somehow, could you suggest some methods to deal with speeding up DNS records and proxies? \r\nWould skipping proxies help?"
] |
https://api.github.com/repos/psf/requests/issues/4688
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4688/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4688/comments
|
https://api.github.com/repos/psf/requests/issues/4688/events
|
https://github.com/psf/requests/issues/4688
| 332,777,031 |
MDU6SXNzdWUzMzI3NzcwMzE=
| 4,688 |
Set-Cookie header sets cookie in response but not session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3901743?v=4",
"events_url": "https://api.github.com/users/Audace/events{/privacy}",
"followers_url": "https://api.github.com/users/Audace/followers",
"following_url": "https://api.github.com/users/Audace/following{/other_user}",
"gists_url": "https://api.github.com/users/Audace/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Audace",
"id": 3901743,
"login": "Audace",
"node_id": "MDQ6VXNlcjM5MDE3NDM=",
"organizations_url": "https://api.github.com/users/Audace/orgs",
"received_events_url": "https://api.github.com/users/Audace/received_events",
"repos_url": "https://api.github.com/users/Audace/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Audace/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Audace/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Audace",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2018-06-15T13:39:43Z
|
2021-09-08T01:21:21Z
|
2018-06-15T15:23:16Z
|
NONE
|
resolved
|
When requesting a resource that responds with a `Set-Cookie` header, the `response.cookies` returns a `RequestsCookierJar` with the cookies set in the header, however, the `session.cookies` returns an empty `RequestsCookieJar`.
## Expected Result
When requesting a resource that responds with the following headers: `{'Content-Type': 'text/plain', 'set-cookie': 'foo=bar;'}`, the `response.cookies` should include the `foo=bar` cookie and the `session.cookies` should include the `foor=bar` cookie.
E.g. both should be `<RequestsCookieJar[<Cookie foo=bar for />]>`
## Actual Result
When requesting a resource that responds with the following headers: `{'Content-Type': 'text/plain', 'set-cookie': 'foo=bar;'}`, the `response.cookies` does include the `foo=bar` cookie but the `session.cookies` remains empty.
`response.cookies` yields `<RequestsCookieJar[<Cookie foo=bar for />]>`
`session.cookies` yields `<RequestsCookieJar[]>`
## Reproduction Steps
```python
import requests
session = requests.Session()
response = session.get('http://www.blah.com/')
print(response.cookies)
print(session.cookies)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.3.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"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/4688/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4688/timeline
| null |
completed
| null | null | false |
[
"Hey again @Audace, I put together a little more in depth test. Using the headers you've provided, we can still see the cookie being set on both `Session` and `Response`. We're going to need to see a few things.\r\n* The exact headers you're being sent.\r\n* What platform/server stack they're being generated on.\r\n* What your `response.history` looks like.\r\n* Output of `requests.__version__` when running your test code.\r\n\r\n```python\r\nimport threading\r\nimport requests\r\n\r\nfrom tests.testserver.server import Server, consume_socket_content\r\n\r\ndef test_session_cookies_are_set():\r\n def response_handler(sock):\r\n consume_socket_content(sock, timeout=0.5)\r\n sock.send(\r\n b'HTTP/1.1 200 OK\\r\\n'\r\n b'Content-Length: 0\\r\\n'\r\n b'Content-Type: text/plain\\r\\n'\r\n b'set-cookie: foo=bar;\\r\\n\\r\\n'\r\n )\r\n\r\n close_server = threading.Event()\r\n server = Server(response_handler, wait_to_close_event=close_server)\r\n\r\n with server as (host, port):\r\n url = 'http://{0}:{1}/path'.format(host, port)\r\n s = requests.Session()\r\n r = s.get(url)\r\n\r\n assert r.status_code == 200\r\n assert 'Set-Cookie' in r.headers\r\n assert 'foo' in s.cookies\r\n assert 'foo' in r.cookies\r\n print(s.cookies)\r\n print(r.cookies)\r\n print(requests.__version__)\r\n\r\n close_server.set()\r\n```\r\n** This is using the `tests` directory in Requests\r\n",
"Hi @nateprewitt,\r\n\r\nSure, the exact headers are the following: `{'Content-Type': 'text/plain', 'set-cookie': 'foo=bar;'}`.\r\n\r\nThe platform is MacOS High Sierra v10.13.2. \r\n\r\nThe `response.history` yields `[]`.\r\n\r\nThe `requests.__version__` is `2.19.1`.",
"For clarity, this is my test code:\r\n```python\r\nimport requests\r\nimport responses\r\n\r\n\r\nresponses.add(responses.GET, 'http://blah.com',\r\n json={},\r\n adding_headers={\r\n \"set-cookie\": 'foo=bar;'\r\n })\r\nsession = requests.Session()\r\nresponse = session.get('http://blah.com')\r\nprint(response.cookies)\r\nprint(session.cookies)\r\n```",
"@Audace, if the server is claiming a Content-Type and doesn't specify a Transfer-Encoding or Content-Length, those are either incomplete headers, or the server isn't functioning properly.\r\n\r\nLooking at your test code, it's not clear what is being done. I'm not familiar with `responses` as a module, and it's not clear how you're interacting with it via Requests. We will need test code that can actually be run, rather than using placeholders. Is this example actually performing network IO? My hunch here is this is likely an incomplete setup in your mocking environment which we'd want to debug on [StackOverflow](https://www.stackoverflow.com), rather than here on the issue tracker.",
"@nateprewitt got it. No this isn't performing network IO - it's a mocked response. I added a `Content-Length` to no avail. That being said, why would there be a difference between `response.cookies` and `session.cookies`? Is there a fundamental difference in the cookie extractor for these two jars?",
"@Audace it's the same process but performed in two separate places. [Here](https://github.com/requests/requests/blob/883caaf145fbe93bd0d208a6b864de9146087312/requests/sessions.py#L631-L638) for `Session` and [here](https://github.com/requests/requests/blob/883caaf145fbe93bd0d208a6b864de9146087312/requests/adapters.py#L282-L283) for `Response`.\r\n\r\nIt would appear something on your mocked response isn't populating what we're expecting in `r.raw`. As I said above, since this doesn't appear to be a defect in Requests but rather an issue in the mocking setup, we should probably move this to StackOverflow. That will avoid constantly pinging 1300 people watching the issue tracker for bugs in Requests. Feel free to ping the link here, or use the `python-requests` tag if you create a SO question. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4687
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4687/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4687/comments
|
https://api.github.com/repos/psf/requests/issues/4687/events
|
https://github.com/psf/requests/issues/4687
| 332,556,014 |
MDU6SXNzdWUzMzI1NTYwMTQ=
| 4,687 |
Response.content is wasteful in time and memory for large inputs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7489847?v=4",
"events_url": "https://api.github.com/users/tzickel/events{/privacy}",
"followers_url": "https://api.github.com/users/tzickel/followers",
"following_url": "https://api.github.com/users/tzickel/following{/other_user}",
"gists_url": "https://api.github.com/users/tzickel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tzickel",
"id": 7489847,
"login": "tzickel",
"node_id": "MDQ6VXNlcjc0ODk4NDc=",
"organizations_url": "https://api.github.com/users/tzickel/orgs",
"received_events_url": "https://api.github.com/users/tzickel/received_events",
"repos_url": "https://api.github.com/users/tzickel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tzickel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tzickel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tzickel",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2018-06-14T20:39:24Z
|
2018-06-16T17:01:14Z
| null |
NONE
| null |
https://github.com/requests/requests/blob/883caaf145fbe93bd0d208a6b864de9146087312/requests/models.py#L827
iter chunk is 10K, let's say we have binary content that is about 10MB, the .join first converts the iter_content to a list of 1000 items of 10K each (if it's not chunked), then it creates a new large 10MB string, copies all of them to it, then returns it.
This both creates pressure on the allocator and at the peak takes * 2 the memory of the input.
Without resorting to C, and if we know the input size (i.e. not chunked), we can create a bytearray and fill it with one iteration at a time. On my computer it is about *2-3 faster, takes half the memory and causes 1/2 of page reclaims.
The problem is that is of course that it returns a bytearray and not a bytes type, maybe this should be a helper method for large inputs if people care about this stuff ?
```python
arr = bytearray(totalsize)
i = 0
for item in self.iter_content(CONTENT_CHUNK_SIZE):
l = len(item)
arr[i:i + l] = item
i += l
return arr
```
| 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/4687/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4687/timeline
| null | null | null | null | false |
[
"Thanks for taking the time start this discussion, @tzickel! My initial thoughts here are mostly about usability and expectations around Requests' API. We deal predominantly in byte strings and strings when handling data. Implementing the suggested change would break that, and converting the `bytesarray` back to `bytes` nullifies the memory savings.\r\n\r\nThe general idea here is correct though, this is what we recommended for large body content. Using `iter_content` on streamed responses is much faster/more efficient. This approach also allows the user to choose whatever data structure or allocation best fits their needs. We could look at adding a helper function to the [Requests toolbelt](https://github.com/requests/toolbelt), but since this is a 5-line function that can be optimized for different use cases, it may be easier to leave this to users to implement.",
"My main issue is that I'm passing a large input (between a few MB to a few GB) to request toolbelt MultipartDecoder (because if it's not multipart I don't use .content, but stream it anyhow) and I'm looking for ways to optimize that workflow (considering I don't need the real input and that I need all the data in-memory). MultipartDecoder uses the request.content\r\n\r\nhttps://github.com/requests/toolbelt/blob/6d74296f0f267d9e06ba7828585dac61276d4e2b/requests_toolbelt/multipart/decoder.py#L156\r\n\r\nSo I'm looking for ways to optimize it (without maintaining code outside).\r\n\r\nI guess I should be using something like this:\r\nhttps://github.com/requests/toolbelt/pull/222\r\nAnd when I know the size of a part, I can directly stream into a preallocated bytearray (almost)"
] |
https://api.github.com/repos/psf/requests/issues/4686
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4686/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4686/comments
|
https://api.github.com/repos/psf/requests/issues/4686/events
|
https://github.com/psf/requests/issues/4686
| 332,227,389 |
MDU6SXNzdWUzMzIyMjczODk=
| 4,686 |
requests.exceptions.RequestException can't catch urllib3.exceptions.ReadTimeoutError
|
{
"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"
}
|
[
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 3 |
2018-06-14T02:17:12Z
|
2021-09-08T01:21:21Z
|
2018-06-15T01:32:39Z
|
NONE
|
resolved
|
I used RequestException catch requests.get exception,But I found it can't catch ReadTimeoutError in urllib3,How can I catch exception raised by requests.get
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4686/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4686/timeline
| null |
completed
| null | null | false |
[
"Hi @beruhan, [a quick glance](https://github.com/requests/requests/blob/2530323faf576def7f3f5bde636962c23f4b187f/requests/adapters.py#L525-L526) suggests we should be catching this and raising a `ReadTimeout` from the requests namespace.\r\n\r\nWould you mind providing the information originally requested with the ticket (`python -m requests.help`) and a copy of the traceback you're seeing this with? We'll need those things to help determine if we're leaking this somewhere else. Thanks!",
"`python -m requests.help` result is :\r\n `{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.7\"\r\n },\r\n \"implementation\": {\r\n \"name\": \"CPython\",\r\n \"version\": \"3.6.4\"\r\n },\r\n \"platform\": {\r\n \"release\": \"10\",\r\n \"system\": \"Windows\"\r\n },\r\n \"pyOpenSSL\": {\r\n \"openssl_version\": \"\",\r\n \"version\": null\r\n },\r\n \"requests\": {\r\n \"version\": \"2.19.0\"\r\n },\r\n \"system_ssl\": {\r\n \"version\": \"100020bf\"\r\n },\r\n \"urllib3\": {\r\n \"version\": \"1.23\"\r\n },\r\n \"using_pyopenssl\": false\r\n}`,\r\ntraceback as follows:\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Python36\\lib\\site-packages\\urllib3\\response.py\", line 331, in _error_catcher\r\n yield\r\n File \"C:\\Python36\\lib\\site-packages\\urllib3\\response.py\", line 413, in read\r\n data = self._fp.read(amt)\r\n File \"C:\\Python36\\lib\\http\\client.py\", line 449, in read\r\n n = self.readinto(b)\r\n File \"C:\\Python36\\lib\\http\\client.py\", line 493, in readinto\r\n n = self.fp.readinto(b)\r\n File \"C:\\Python36\\lib\\socket.py\", line 586, in readinto\r\n return self._sock.recv_into(b)\r\nsocket.timeout: timed out\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"D:/work/project/iot_exploit/examples/requests_test.py\", line 19, in <module>\r\n first_len = len(req.raw.read(200))\r\n File \"C:\\Python36\\lib\\site-packages\\urllib3\\response.py\", line 430, in read\r\n raise IncompleteRead(self._fp_bytes_read, self.length_remaining)\r\n File \"C:\\Python36\\lib\\contextlib.py\", line 99, in __exit__\r\n self.gen.throw(type, value, traceback)\r\n File \"C:\\Python36\\lib\\site-packages\\urllib3\\response.py\", line 336, in _error_catcher\r\n raise ReadTimeoutError(self._pool, None, 'Read timed out.')\r\nurllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='201.211.180.4', port=9001): Read timed out.\r\n```\r\nsource code:\r\n```\r\nimport requests\r\n\r\nurl = 'http://201.211.180.4:9001/cgi-bin/guest/Video.cgi?media=MJPEG&channel=1'\r\nreq = None\r\ntry:\r\n req = requests.get(url, stream=True, auth=('admin', 'admin'), headers={\"Connection\": \"close\"}, timeout=5,\r\n verify=False)\r\n print(req.status_code)\r\n if req.status_code == 200:\r\n first_len = len(req.raw.read(200))\r\n if first_len == 200 and \"image\" in req.headers[\"content-type\"]:\r\n print(\"success\")\r\nexcept requests.RequestException as e:\r\n print(e)\r\nfinally:\r\n if req:\r\n req.close()\r\n```\r\n",
"@beruhan, if you look at your supplied traceback you can see the exception is raised on the `first_len = len(req.raw.read(200))` line. This is a call directly to a urllib3 object and doesn’t touch Requests in the traceback. You’ll need to either use `iter_content` or handle possible urllib3 exceptions that read may raise."
] |
https://api.github.com/repos/psf/requests/issues/4685
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4685/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4685/comments
|
https://api.github.com/repos/psf/requests/issues/4685/events
|
https://github.com/psf/requests/pull/4685
| 332,076,587 |
MDExOlB1bGxSZXF1ZXN0MTk0NjQ4ODY0
| 4,685 |
Note that session() should not be used
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330770?v=4",
"events_url": "https://api.github.com/users/Stevoisiak/events{/privacy}",
"followers_url": "https://api.github.com/users/Stevoisiak/followers",
"following_url": "https://api.github.com/users/Stevoisiak/following{/other_user}",
"gists_url": "https://api.github.com/users/Stevoisiak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Stevoisiak",
"id": 1330770,
"login": "Stevoisiak",
"node_id": "MDQ6VXNlcjEzMzA3NzA=",
"organizations_url": "https://api.github.com/users/Stevoisiak/orgs",
"received_events_url": "https://api.github.com/users/Stevoisiak/received_events",
"repos_url": "https://api.github.com/users/Stevoisiak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Stevoisiak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Stevoisiak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Stevoisiak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2018-06-13T16:43:14Z
|
2021-09-02T00:07:44Z
|
2018-06-21T19:09:06Z
|
CONTRIBUTOR
|
resolved
|
According to requests/api.rst, the `Session` class was originally named session in 0.x. [When the class name was capitalized in 1.x](https://github.com/requests/requests/blob/265ef609d5903151374fba480aa81aafe68126ff/docs/api.rst#migrating-to-1x), the `session()` method was added for backwards compatibility.
This adds a docstring note that `requests.Session` should be used instead
|
{
"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/4685/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4685/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4685.diff",
"html_url": "https://github.com/psf/requests/pull/4685",
"merged_at": "2018-06-21T19:09:06Z",
"patch_url": "https://github.com/psf/requests/pull/4685.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4685"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=h1) Report\n> Merging [#4685](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/883caaf145fbe93bd0d208a6b864de9146087312?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4685 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4685/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.27% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=footer). Last update [883caaf...1c13c5e](https://codecov.io/gh/requests/requests/pull/4685?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"@nateprewitt In that case, I'll add a [`DepreciationWarning`](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) telling users to use `Session` instead.\r\n\r\nI tried to track down when `Session` was added, but it seems to have been [sometime before `v0.8.4`](https://github.com/requests/requests/blob/v0.8.4/requests/sessions.py#L50), the oldest tagged version on GitHub.",
"On closer inspection, it seems `session` was created one day *after* `Session`. ([Aug 16, 2011](https://github.com/requests/requests/commit/519b9cee969e7364654a05ed466db253d35370d3) vs [Aug 15, 2011](https://github.com/requests/requests/commit/ca428504d485b0495b5e794cdd1b47bbb0bd890f))",
"@nateprewitt I've reverted the docstring changes in favor of a `DepreciationWarning`.",
"I'm not sure this is worth the grief we'll receive for adding this DeprecationWarning.",
"I’m in agreement with @sigmavirus24. The DeprecationWarning will likely be more of a harassment for existing users than deterrent for new users.\r\n\r\nI think the initial scope of a minor docstring change is likely the extent of what we’d want in this PR.",
"Noted. I've removed the depreciation warning and updated the docstring.",
"Should I squash these commits together?",
"@Stevoisiak, please.",
"@nateprewitt Squashed and rebased against master.",
"This looks good to me, thanks @Stevoisiak!"
] |
https://api.github.com/repos/psf/requests/issues/4684
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4684/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4684/comments
|
https://api.github.com/repos/psf/requests/issues/4684/events
|
https://github.com/psf/requests/issues/4684
| 331,896,237 |
MDU6SXNzdWUzMzE4OTYyMzc=
| 4,684 |
2.19.0 - TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5378995?v=4",
"events_url": "https://api.github.com/users/akalex/events{/privacy}",
"followers_url": "https://api.github.com/users/akalex/followers",
"following_url": "https://api.github.com/users/akalex/following{/other_user}",
"gists_url": "https://api.github.com/users/akalex/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akalex",
"id": 5378995,
"login": "akalex",
"node_id": "MDQ6VXNlcjUzNzg5OTU=",
"organizations_url": "https://api.github.com/users/akalex/orgs",
"received_events_url": "https://api.github.com/users/akalex/received_events",
"repos_url": "https://api.github.com/users/akalex/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akalex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akalex/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akalex",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-13T08:40:05Z
|
2021-09-08T01:21:22Z
|
2018-06-14T13:43:52Z
|
NONE
|
resolved
|
When running python program with command line arguments **-OO** the exception occurs. That issue can be reproduced since **requests** version **2.19.0**, since the logic inside module **requests/status_codes.py** has changed.
## Expected Result
python3.6 -OO -m my_script.py runs without any exceptions
## Actual Result
**TypeError** exception raises
```
Traceback (most recent call last):
File "/Users/alexandromyshev/Downloads/send_requests.py", line 1, in <module>
import requests
File "/Users/alexandromyshev/venvs/rtest/lib/python3.6/site-packages/requests/__init__.py", line 114, in <module>
from .models import Request, Response, PreparedRequest
File "/Users/alexandromyshev/venvs/rtest/lib/python3.6/site-packages/requests/models.py", line 43, in <module>
from .status_codes import codes
File "/Users/alexandromyshev/venvs/rtest/lib/python3.6/site-packages/requests/status_codes.py", line 119, in <module>
_init()
File "/Users/alexandromyshev/venvs/rtest/lib/python3.6/site-packages/requests/status_codes.py", line 116, in _init
__doc__ = (__doc__ + '\n' +
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```
## Reproduction Steps
1) Create some simple script like
```import requests
def main():
response = requests.get('http://google.com')
print(response.status_code)
return response
if __name__ == '__main__':
main()
```
2) Run the command
```
python3.6 -OO send_requests.py
```
## System Information
$ python3.6 -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "17.5.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.0"
},
"system_ssl": {
"version": "100020df"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4684/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4684/timeline
| null |
completed
| null | null | false |
[
"Fixed in #4683",
"2.19.1 is pushed to pypi, so this should be resolved now. Thanks everyone!"
] |
https://api.github.com/repos/psf/requests/issues/4683
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4683/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4683/comments
|
https://api.github.com/repos/psf/requests/issues/4683/events
|
https://github.com/psf/requests/pull/4683
| 331,768,289 |
MDExOlB1bGxSZXF1ZXN0MTk0NDE4ODg4
| 4,683 |
Do not alter status_codes docstring if it is None
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6042212?v=4",
"events_url": "https://api.github.com/users/martindurant/events{/privacy}",
"followers_url": "https://api.github.com/users/martindurant/followers",
"following_url": "https://api.github.com/users/martindurant/following{/other_user}",
"gists_url": "https://api.github.com/users/martindurant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/martindurant",
"id": 6042212,
"login": "martindurant",
"node_id": "MDQ6VXNlcjYwNDIyMTI=",
"organizations_url": "https://api.github.com/users/martindurant/orgs",
"received_events_url": "https://api.github.com/users/martindurant/received_events",
"repos_url": "https://api.github.com/users/martindurant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/martindurant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martindurant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/martindurant",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-12T21:55:41Z
|
2021-09-02T00:07:46Z
|
2018-06-13T15:24:46Z
|
CONTRIBUTOR
|
resolved
|
Following https://github.com/requests/requests/pull/4394/files, with PYTHONOPTIMIZE=2, the current code breaks with TypeError due to None as the docstring. This broke dask tests https://github.com/dask/dask/pull/3594 .
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4683/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4683/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4683.diff",
"html_url": "https://github.com/psf/requests/pull/4683",
"merged_at": "2018-06-13T15:24:46Z",
"patch_url": "https://github.com/psf/requests/pull/4683.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4683"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=h1) Report\n> Merging [#4683](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/991e8b76b7a9d21f698b24fa0058d3d5968721bc?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4683 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/status\\_codes.py](https://codecov.io/gh/requests/requests/pull/4683/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc3RhdHVzX2NvZGVzLnB5) | `0% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=footer). Last update [991e8b7...8031ec7](https://codecov.io/gh/requests/requests/pull/4683?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"@nateprewitt please release at your earliest convenience"
] |
https://api.github.com/repos/psf/requests/issues/4682
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4682/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4682/comments
|
https://api.github.com/repos/psf/requests/issues/4682/events
|
https://github.com/psf/requests/pull/4682
| 331,596,791 |
MDExOlB1bGxSZXF1ZXN0MTk0Mjg2OTQx
| 4,682 |
v2.19.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 |
2018-06-12T13:50:42Z
|
2021-09-02T00:07:46Z
|
2018-06-12T14:38:11Z
|
MEMBER
|
resolved
|
363 days later, final prep steps for release.
* Updated HISTORY.rst.
* Moved version pin for idna to allow recent 2.7 release.
* Updated version warning for urllib3 to allow 1.23.
* Updated metadata dunders in __version__.py.
* Remove Python 2.6 trove classifier.
|
{
"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/4682/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4682/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4682.diff",
"html_url": "https://github.com/psf/requests/pull/4682",
"merged_at": "2018-06-12T14:38:11Z",
"patch_url": "https://github.com/psf/requests/pull/4682.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4682"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=h1) Report\n> Merging [#4682](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/7e297ed95bdbd1018657f5d6000379ecdfa54423?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `0%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4682 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/\\_\\_version\\_\\_.py](https://codecov.io/gh/requests/requests/pull/4682/diff?src=pr&el=tree#diff-cmVxdWVzdHMvX192ZXJzaW9uX18ucHk=) | `0% <0%> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=footer). Last update [7e297ed...100dc40](https://codecov.io/gh/requests/requests/pull/4682?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4681
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4681/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4681/comments
|
https://api.github.com/repos/psf/requests/issues/4681/events
|
https://github.com/psf/requests/issues/4681
| 331,208,533 |
MDU6SXNzdWUzMzEyMDg1MzM=
| 4,681 |
idna version pin does not allow version 2.7
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/862794?v=4",
"events_url": "https://api.github.com/users/jakul/events{/privacy}",
"followers_url": "https://api.github.com/users/jakul/followers",
"following_url": "https://api.github.com/users/jakul/following{/other_user}",
"gists_url": "https://api.github.com/users/jakul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jakul",
"id": 862794,
"login": "jakul",
"node_id": "MDQ6VXNlcjg2Mjc5NA==",
"organizations_url": "https://api.github.com/users/jakul/orgs",
"received_events_url": "https://api.github.com/users/jakul/received_events",
"repos_url": "https://api.github.com/users/jakul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jakul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jakul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jakul",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-11T14:17:06Z
|
2021-09-08T01:21:23Z
|
2018-06-12T14:54:24Z
|
NONE
|
resolved
|
`idna` have just released 2.7. `requests` is pinned to `idna>=2.5,<2.7`
https://github.com/requests/requests/blob/d1aeb7ea8cec833e61ea390a6c19ef8b7ac3e4e7/setup.py#L53
Can the pin be updated to allow v2.7?
|
{
"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/4681/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4681/timeline
| null |
completed
| null | null | false |
[
"Hi @jakul, this is addressed (generally, replace \"urllib3\" with \"idna\") in https://github.com/requests/requests/issues/4673#issuecomment-395069592. We'll update our version pins in the next release of Requests (which will likely be this week). Thanks for letting us know!",
"hitting it in openstack as well now.\r\n\r\nhttp://logs.openstack.org/40/574140/2/check/requirements-tox-py27-check-uc/7a0ed61/job-output.txt.gz#_2018-06-11_17_06_11_715280",
"Alright, 2.19.0 is out the door! Closing this out since it should be resolved now."
] |
https://api.github.com/repos/psf/requests/issues/4680
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4680/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4680/comments
|
https://api.github.com/repos/psf/requests/issues/4680/events
|
https://github.com/psf/requests/issues/4680
| 331,139,015 |
MDU6SXNzdWUzMzExMzkwMTU=
| 4,680 |
The conflict between proxies and TLSv1.2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22391643?v=4",
"events_url": "https://api.github.com/users/ytig/events{/privacy}",
"followers_url": "https://api.github.com/users/ytig/followers",
"following_url": "https://api.github.com/users/ytig/following{/other_user}",
"gists_url": "https://api.github.com/users/ytig/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ytig",
"id": 22391643,
"login": "ytig",
"node_id": "MDQ6VXNlcjIyMzkxNjQz",
"organizations_url": "https://api.github.com/users/ytig/orgs",
"received_events_url": "https://api.github.com/users/ytig/received_events",
"repos_url": "https://api.github.com/users/ytig/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ytig/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ytig/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ytig",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-11T10:52:36Z
|
2021-09-05T00:07:01Z
|
2019-02-14T14:55:04Z
|
NONE
|
resolved
|
I want to use the HTTPS proxy, the first request is success, but all subsequent requests failed.
the crash log is:
> HTTPSConnectionPool(host='***', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert unexpected message')],)",),))
I used Wireshark to view the raw packets, the first request all packets protocol is TLSv1.2, the subsequent requests failed at **Client Hello** which protocol is TLSv1. (When i using other language never appear TLSv1)
And i aslo set ssl_version to be ssl.PROTOCOL_TLSv1_2 with requests.adapters, but it doesn't work.
Finally i check up urllib.
> request = urllib.request.Request(url)
request.set_proxy('host:port', 'https')
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
response = urllib.request.urlopen(request, context=context)
response.read().decode('utf-8')
when i using TLSv1.2 the crash log is:
> <urlopen error [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:777)>
when i using TLSv1 the crash log is: (not every subsequent requests crash)
> <urlopen error [SSL: SSLV3_ALERT_UNEXPECTED_MESSAGE] sslv3 alert unexpected message (_ssl.c:777)>
Version list:
- python: 3.6.3
- requests: 2.18.4
- openssl: stable 1.0.2o
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6740665?v=4",
"events_url": "https://api.github.com/users/lmiguelvargasf/events{/privacy}",
"followers_url": "https://api.github.com/users/lmiguelvargasf/followers",
"following_url": "https://api.github.com/users/lmiguelvargasf/following{/other_user}",
"gists_url": "https://api.github.com/users/lmiguelvargasf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmiguelvargasf",
"id": 6740665,
"login": "lmiguelvargasf",
"node_id": "MDQ6VXNlcjY3NDA2NjU=",
"organizations_url": "https://api.github.com/users/lmiguelvargasf/orgs",
"received_events_url": "https://api.github.com/users/lmiguelvargasf/received_events",
"repos_url": "https://api.github.com/users/lmiguelvargasf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmiguelvargasf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmiguelvargasf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmiguelvargasf",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4680/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4680/timeline
| null |
completed
| null | null | false |
[
"Closed due to inactivity."
] |
https://api.github.com/repos/psf/requests/issues/4679
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4679/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4679/comments
|
https://api.github.com/repos/psf/requests/issues/4679/events
|
https://github.com/psf/requests/pull/4679
| 331,036,424 |
MDExOlB1bGxSZXF1ZXN0MTkzODY4MDU2
| 4,679 |
idna had a release
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/909098?v=4",
"events_url": "https://api.github.com/users/russellballestrini/events{/privacy}",
"followers_url": "https://api.github.com/users/russellballestrini/followers",
"following_url": "https://api.github.com/users/russellballestrini/following{/other_user}",
"gists_url": "https://api.github.com/users/russellballestrini/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/russellballestrini",
"id": 909098,
"login": "russellballestrini",
"node_id": "MDQ6VXNlcjkwOTA5OA==",
"organizations_url": "https://api.github.com/users/russellballestrini/orgs",
"received_events_url": "https://api.github.com/users/russellballestrini/received_events",
"repos_url": "https://api.github.com/users/russellballestrini/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/russellballestrini/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/russellballestrini/subscriptions",
"type": "User",
"url": "https://api.github.com/users/russellballestrini",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-06-11T03:43:26Z
|
2021-09-02T00:07:48Z
|
2018-06-11T03:49:20Z
|
NONE
|
resolved
|
we should upgrade our bounds to avoid people running into trouble.
https://github.com/kjd/idna/commit/f8389a87092e5a5eb2f92aabf4fbcef4fc9e9499
|
{
"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/4679/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4679/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4679.diff",
"html_url": "https://github.com/psf/requests/pull/4679",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4679.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4679"
}
| true |
[
"Hi @russellballestrini, thanks for letting us know! This is something we’ll handle in our release process for the next formal Requests release.",
"This breakes most installations of 2.18.4. We fixed it in our case by adding `idna==2.6` to our `requirements.txt` before `requests`, in case someone else has this problem."
] |
https://api.github.com/repos/psf/requests/issues/4678
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4678/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4678/comments
|
https://api.github.com/repos/psf/requests/issues/4678/events
|
https://github.com/psf/requests/pull/4678
| 330,988,671 |
MDExOlB1bGxSZXF1ZXN0MTkzODM4MTU1
| 4,678 |
In docs, use intersphinx to link to Python documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-06-10T17:52:04Z
|
2021-09-02T00:07:34Z
|
2018-08-12T03:35:00Z
|
CONTRIBUTOR
|
resolved
|
The intersphinx extension can generate automatic links to the documentation of objects in other projects. It was already used for urllib3. For complete details on intersphinx, see:
http://www.sphinx-doc.org/en/master/ext/intersphinx.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/4678/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4678/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4678.diff",
"html_url": "https://github.com/psf/requests/pull/4678",
"merged_at": "2018-08-12T03:35:00Z",
"patch_url": "https://github.com/psf/requests/pull/4678.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4678"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=h1) Report\n> Merging [#4678](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/922aa406b53f14a67264e07d12fb042704be7374?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4678 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=footer). Last update [922aa40...5aa6a9b](https://codecov.io/gh/requests/requests/pull/4678?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hey @jdufresne, thanks for helping simplify this. Would you mind rebasing this onto the current tip of master?",
"Rebased. Thanks",
"Rebased, thanks"
] |
https://api.github.com/repos/psf/requests/issues/4677
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4677/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4677/comments
|
https://api.github.com/repos/psf/requests/issues/4677/events
|
https://github.com/psf/requests/pull/4677
| 330,968,424 |
MDExOlB1bGxSZXF1ZXN0MTkzODI2MTYy
| 4,677 |
Fix unicode auth url bug in py3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18254803?v=4",
"events_url": "https://api.github.com/users/mecforlove/events{/privacy}",
"followers_url": "https://api.github.com/users/mecforlove/followers",
"following_url": "https://api.github.com/users/mecforlove/following{/other_user}",
"gists_url": "https://api.github.com/users/mecforlove/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mecforlove",
"id": 18254803,
"login": "mecforlove",
"node_id": "MDQ6VXNlcjE4MjU0ODAz",
"organizations_url": "https://api.github.com/users/mecforlove/orgs",
"received_events_url": "https://api.github.com/users/mecforlove/received_events",
"repos_url": "https://api.github.com/users/mecforlove/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mecforlove/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mecforlove/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mecforlove",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-10T13:24:41Z
|
2021-09-02T00:07:48Z
|
2018-06-11T13:12:37Z
|
NONE
|
resolved
|
Just Fixed bug in [issue4649](https://github.com/requests/requests/issues/4649)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4677/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4677/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4677.diff",
"html_url": "https://github.com/psf/requests/pull/4677",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4677.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4677"
}
| true |
[
"I just updated one file, but why the ci can't pass?",
"Hi @mecforlove, thanks for contributing to Requests! The issue here is that you can't call `encode` on all valid inputs for username and password, specifically bytes. We're going to need a solution that works for all the inputs we test, as well as some new/updated tests to ensure this doesn't end up regressed later.",
"Further, as explained in my last comment, we can not fix this in Requests 2. Requests 3 will be Python 3 only and will make this fixable."
] |
https://api.github.com/repos/psf/requests/issues/4676
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4676/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4676/comments
|
https://api.github.com/repos/psf/requests/issues/4676/events
|
https://github.com/psf/requests/pull/4676
| 330,937,340 |
MDExOlB1bGxSZXF1ZXN0MTkzODA3MDE2
| 4,676 |
Update Python 2 doc links to Python 3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-10T03:34:44Z
|
2021-09-02T00:07:50Z
|
2018-06-10T15:37:09Z
|
CONTRIBUTOR
|
resolved
|
The Python 3 docs are better maintained and are the future of Python development.
|
{
"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/4676/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4676/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4676.diff",
"html_url": "https://github.com/psf/requests/pull/4676",
"merged_at": "2018-06-10T15:37:09Z",
"patch_url": "https://github.com/psf/requests/pull/4676.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4676"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=h1) Report\n> Merging [#4676](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d98f881118993483e4e9e2be384286ac2f90bb0a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4676 +/- ##\n=======================================\n Coverage 66.62% 66.62% \n=======================================\n Files 15 15 \n Lines 1564 1564 \n=======================================\n Hits 1042 1042 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=footer). Last update [d98f881...35a1874](https://codecov.io/gh/requests/requests/pull/4676?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4675
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4675/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4675/comments
|
https://api.github.com/repos/psf/requests/issues/4675/events
|
https://github.com/psf/requests/pull/4675
| 330,338,787 |
MDExOlB1bGxSZXF1ZXN0MTkzMzczMTIw
| 4,675 |
Don't warn about compatibility with urllib3 v1.23
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4",
"events_url": "https://api.github.com/users/jeremycline/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremycline/followers",
"following_url": "https://api.github.com/users/jeremycline/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremycline",
"id": 1977525,
"login": "jeremycline",
"node_id": "MDQ6VXNlcjE5Nzc1MjU=",
"organizations_url": "https://api.github.com/users/jeremycline/orgs",
"received_events_url": "https://api.github.com/users/jeremycline/received_events",
"repos_url": "https://api.github.com/users/jeremycline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremycline",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-06-07T16:03:49Z
|
2021-09-02T00:07:51Z
|
2018-06-07T16:37:28Z
|
CONTRIBUTOR
|
resolved
|
Requests allows v1.23 in #4669, but the compatibility check at import
time still looks for 22. Bump the version to 23.
edit: I do wonder if these checks should just be removed since it's pinned in setup.py and pip doesn't let you install 23 anyway without #4669.
Signed-off-by: Jeremy Cline <[email protected]>
|
{
"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/4675/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4675/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4675.diff",
"html_url": "https://github.com/psf/requests/pull/4675",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4675.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4675"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=h1) Report\n> Merging [#4675](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d98f881118993483e4e9e2be384286ac2f90bb0a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4675 +/- ##\n=======================================\n Coverage 66.62% 66.62% \n=======================================\n Files 15 15 \n Lines 1564 1564 \n=======================================\n Hits 1042 1042 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=footer). Last update [d98f881...015347e](https://codecov.io/gh/requests/requests/pull/4675?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"FYI: similar patches at https://github.com/requests/requests/pull/4671 and https://github.com/requests/requests/pull/4674 were rejected.",
"Hey @jeremycline, thanks for putting this together. We’re aware the tip of master is inconsistent and merging #4669 was a bit premature. In order to prevent multiple follow up PRs for other things we missed, we (maybe just I) decided we’d just wait to do all of the upgrade steps at once with the 2.19 release as per our usual release process.\r\n\r\nWe’ve addressed this a few times in a few other PRs and issues (#4671, #4673, #4674).",
"Ah cool. I should have checked closed PRs, sorry for the noise."
] |
https://api.github.com/repos/psf/requests/issues/4674
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4674/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4674/comments
|
https://api.github.com/repos/psf/requests/issues/4674/events
|
https://github.com/psf/requests/pull/4674
| 329,977,739 |
MDExOlB1bGxSZXF1ZXN0MTkzMDk3OTY1
| 4,674 |
fixed urllib3 version dependency issue
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2791325?v=4",
"events_url": "https://api.github.com/users/nmante/events{/privacy}",
"followers_url": "https://api.github.com/users/nmante/followers",
"following_url": "https://api.github.com/users/nmante/following{/other_user}",
"gists_url": "https://api.github.com/users/nmante/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nmante",
"id": 2791325,
"login": "nmante",
"node_id": "MDQ6VXNlcjI3OTEzMjU=",
"organizations_url": "https://api.github.com/users/nmante/orgs",
"received_events_url": "https://api.github.com/users/nmante/received_events",
"repos_url": "https://api.github.com/users/nmante/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nmante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nmante/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nmante",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-06-06T18:15:49Z
|
2021-09-02T00:07:51Z
|
2018-06-06T18:23:43Z
|
NONE
|
resolved
|
The `requests` setup.py file allows this version range for `urllib3` `>=1.21.1,<1.24`. However, the `__init__.py` has assertion statements that only allow up to (and including) version `1.22`. In this PR, I'm updating the `assert` statements in `__init__.py` to be inline with the `setup.py` `requires`
|
{
"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/4674/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4674/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4674.diff",
"html_url": "https://github.com/psf/requests/pull/4674",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4674.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4674"
}
| true |
[
"Hi @nmante, thanks for the contribution to Requests! We’re aware of the recent release of urllib3 and the current pin discrepancy at the tip of master. The current mismatch between the __init__.py doesn’t affect a current release but only the master branch which will be updated.\r\n\r\nThis issue has been addressed a few times in #4669, #4671, and #4673. It will be addressed with the release of Requests 2.19. ",
"@nateprewitt got it! I was working with release 2.18.4 which was causing issues because of the mismatch. ",
"Just to reiterate what’s in the other threads in case someone stumbles on this. The release of 2.18.4 has an intentional requirement for urllib3 < 1.23. If your environment modifies the dependency requirements after Requests is installed, we emit a warning stating the dependencies no longer match the installation requirements and things are no longer guaranteed to work as expected.\r\n\r\nEverything should work fine with Requests 2.18.4 as long as the correct dependencies are installed. Thanks again @nmante for checking in!"
] |
https://api.github.com/repos/psf/requests/issues/4673
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4673/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4673/comments
|
https://api.github.com/repos/psf/requests/issues/4673/events
|
https://github.com/psf/requests/issues/4673
| 329,770,929 |
MDU6SXNzdWUzMjk3NzA5Mjk=
| 4,673 |
Inconsistent urllib3 version requirements between setup.py and __init__.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20167491?v=4",
"events_url": "https://api.github.com/users/GPMueller/events{/privacy}",
"followers_url": "https://api.github.com/users/GPMueller/followers",
"following_url": "https://api.github.com/users/GPMueller/following{/other_user}",
"gists_url": "https://api.github.com/users/GPMueller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/GPMueller",
"id": 20167491,
"login": "GPMueller",
"node_id": "MDQ6VXNlcjIwMTY3NDkx",
"organizations_url": "https://api.github.com/users/GPMueller/orgs",
"received_events_url": "https://api.github.com/users/GPMueller/received_events",
"repos_url": "https://api.github.com/users/GPMueller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/GPMueller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/GPMueller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/GPMueller",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 24 |
2018-06-06T08:45:24Z
|
2018-11-07T17:40:05Z
|
2018-06-12T14:54:36Z
|
NONE
|
resolved
|
With https://github.com/requests/requests/commit/ac944b7439009ffbf7a10dfee35202f1ac090e76 the maximum allowed version of urllib3 in [setup.py](https://github.com/requests/requests/blob/master/setup.py) was increased to `1.23`.
However, in https://github.com/requests/requests/blob/master/requests/__init__.py#L57-L63 the version is still required to be `<= 1.22`.
This is a bug since the release of requests 1.23 yesterday: https://pypi.org/project/urllib3/#history
## Expected Result
Installation of `requests` via `pip` should work with urllib3 version `1.23`
## Actual Result
e.g.
```
/usr/local/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
ContextualVersionConflict: urllib3 1.23
```
## Reproduction Steps
```
pip install urllib3==1.23
pip install requests
```
```python
import 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": 8,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 8,
"url": "https://api.github.com/repos/psf/requests/issues/4673/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4673/timeline
| null |
completed
| null | null | false |
[
"Maybe #4669 should be reverted until urllib3 is fully supported.",
"It looks to me like it should suffice to simply change the [`__init__.py`](https://github.com/requests/requests/blob/master/requests/__init__.py) to allow v1.23 of urllib3, but I'm not sure since I have not tested it.",
"Just tested changing `__init__.py:63: assert minor <= 22` to `<= 23` and then tested with `aurman -Syu` to see if the error came back.\r\n\r\nThere's no error anymore, however I'm not sure if just simply incrementing that value could cause errors further down the road.\r\n\r\n**Edit:** I'll update this if I encounter any errors. So far, I haven't come across anything.",
"Hey everyone, to be clear this isn't a bug but rather a specific design decision. We cannot guarantee support for new releases of urllib3 before they've been tested with the Requests code base. In the event of a new release we haven't tested you will see a warning message informing you about the issue.\r\n\r\nWe are currently slated to release Requests 2.19 in the next week or two which will move the warning pin. Our standard procedure is to wait a week or so and see if any major bugs are raised in urllib3's new release. Things will continue to work fine with 1.22 in the meantime.",
"My program relied on stdout output, and requests warning broke it. Good to know that issue is known and will be fixed soon :)",
"Happens on my server too and worse, it's breaking my crontab to automatically generate certificates (certbot). The sooner we can fix and publish the better ...",
"I totally understand the motivation of this design decision to generate warnings on untested `urllib3` versions... but this behavior is definitely *breaking* in some cases (and not just a warning).\r\n\r\nSimple test case; create a distribution with an `entry_point`. For example:\r\n\r\n```\r\n#!/usr/bin/env python\r\nfrom setuptools import find_packages, setup\r\n\r\nsetup(\r\n name=\"test\",\r\n version=\"0.1.0\",\r\n packages=find_packages(),\r\n install_requires=[\r\n \"requests==2.18.4\",\r\n \"urllib3==1.23\",\r\n ],\r\n entry_points={\r\n \"example\": [\r\n # it doesn't matter if test.foo exists\r\n \"foo = test.foo\",\r\n ],\r\n },\r\n)\r\n```\r\n\r\nCreate a test program that *resolves* this entry point (we don't even have to load it):\r\n\r\n```\r\n#!/usr/bin/env python\r\nfrom pkg_resources import iter_entry_points\r\n\r\n\r\nfor entry_point in iter_entry_points(group=\"example\"):\r\n entry_point.require()\r\n```\r\n\r\nThen install the distribution:\r\n\r\n```\r\npython3 -m venv test\r\nsource test/bin/activate\r\npip install -U -e\r\n```\r\n\r\nThis works fine. Even though we have version conflicts, `pip` lets us continue.\r\n\r\nBut then try to ask setuptools to resolve the entry point:\r\n\r\n```\r\n> python3 ./test.py\r\nTraceback (most recent call last):\r\n File \"./test.py\", line 6, in <module>\r\n entry_point.require()\r\n File \"/private/tmp/test/test/lib/python3.6/site-packages/pkg_resources/__init__.py\", line 2346, in require\r\n items = working_set.resolve(reqs, env, installer, extras=self.extras)\r\n File \"/private/tmp/test/test/lib/python3.6/site-packages/pkg_resources/__init__.py\", line 783, in resolve\r\n raise VersionConflict(dist, req).with_context(dependent_req)\r\npkg_resources.ContextualVersionConflict: (urllib3 1.23 (/private/tmp/test/test/lib/python3.6/site-packages), Requirement.parse('urllib3<1.23,>=1.21.1'), {'requests'})\r\n```\r\n\r\nTL/DR; putting an upper bound on `urllib3` versions is breaking for any application that uses entry points in this way and \"happens\" to upgrade dependencies. That might be your intention, but this behavior definitely goes beyond \"warnings\" and definitely breaks some workflows (e.g. ours).",
"Hi @jessemyers, thanks for taking the time to present your case. While we definitely want to be sensitive to breaking anyone's code, I'm not sure this constitutes as \"breaking\". At least not any more so than choosing to pass an invalid parameter to a function is breaking.\r\n\r\nWe haven't changed anything about the requirements with Requests 2.18.4. They state Requests requires a urllib3 version between 1.21.1 and 1.22.x to function as expected. Having an upper bound pin isn't an uncommon occurrence in libraries for compatibility purposes.\r\n\r\nThe example provided is a case of a user choosing to change input parameters (by specifying a hard requirement for a non-compatible version) and pkg_resources correctly failing because the given requirements aren't compatible. When you call `require` on an `EntryPoint`, you're invoking a specific contract to resolve the `extras` associated with it, and in turn, resolve the top level requirements as well. No code in Requests is breaking at this point, so I'm not sure we can do much about that for a general case. The same thing would happen if you chose to install urllib3==1.20 or any other two conflicting packages with any library.\r\n\r\nThe reason pip doesn't fail in this case is because it doesn't have an internal resolver, which is being tracked in pypa/pip#988.",
"Thanks for the prompt response @nateprewitt \r\n\r\nMy primary point was that pinning an upper bound on a dependency version goes beyond \"a warning message\" as was described above in your explanation of policy.\r\n\r\nTo be more specific, we use the following workflow:\r\n\r\n - Release all of our software on a regular cadence (currently: weekly)\r\n - As part of the release process, create release branches in which dependencies are frozen to the last known good version, unless explicitly changed\r\n - As part of our regular (non-release) process, resolve all dependencies to the most recent version compatible with `pip` unless explicitly forbidden\r\n\r\nThis workflow works very well in practice as it means we have stable, reproducible releases and stay on top of the latest changes to all of our dependencies. It obviously does not prevent several of our dependencies introducing conflicting transitive dependencies. We are quite used to addressing this sort of error across many tens of applications at once, but that doesn't mean that it is a pleasant experience. (And we see this sort of error most frequently with `requests`)\r\n\r\nFrom our point of view, any library that pins a version upper bound for a common library can be breaking. We don't seriously expect every (any?) open source project to adapt to our needs here, though we would certainly encourage anyone who will listen to rely on functional tests instead of version upper bounds to prevent regressions.\r\n\r\nTL/DR I completely understand that our preference is not your policy. I hope you understand why we see pinned version upper bounds as something more serious than a \"warning\".",
"@jessemyers, yeah, this is the first time in almost a year, and the third time ever we've had a release with this process. We previously owned both the release of urllib3 and Requests so it was a bit easier to sync these things. We'll take your suggestions into account if we review the policy with recent changes. Thanks again for clarifying your issues, it's appreciated feedback!",
"Good to see this is getting fixed soon, but I'm wondering about one thing. If the \\_\\_init\\_\\_.py defines that version 1.21.1 or 1.22.x is required, why does [setup.py](https://github.com/requests/requests/blob/master/setup.py#L48) basically say 1.23.x is ok as well? Shouldn't that say `<1.23` then instead of `<1.24`?\r\n\r\nSome of our code relied on stdout, we caught this in our test environment now, but it took a while to debug because the DependencyWarning didn't mention which version it depends on, so naturally I checked setup.py to confirm we had the right version, which we seemed to have. Maybe include the version the `check_compatibility` function checks for in the DependencyWarning?",
"@teuneboon, we have all of our individual releases tagged ([2.18.4](https://github.com/requests/requests/tree/v2.18.4)) so you can see the state of the code at that point, or look at it locally in site-packages where it's installed.\r\n\r\nWe can definitely look at making the exception message clearer, since there may not be an immediately obvious way to determine how to fix the conflict.",
"To be clear, @jessemyers our position is the following:\r\n\r\n- Requests is critical infrastructure for many projects and the larger Python community (pip, pipenv, twine, and so many other core workflows rely on it).\r\n\r\n- urllib3 has the right to make minorly breaking changes to itself in between releases. Requests digs into urllib3 in certain places for certain workflows. Given that, we have to ensure things don't break when a new version of urllib3 came out, and we no longer vendor urllib3 into Requests, we need to be certain that the rest of the world won't burst into flames.\r\n\r\nNo software can guarantee future proof compatibility. We're very explicitly stating what we support. We could leave the upper bound off but we'd be implicitly supporting everything urllib3 releases. And when that would break, it would inevitably end up with us being painted as the worst people in the world.\r\n\r\nFurthermore, there are two of us working on this project actively and both of us have very little time to keep up with other projects' release schedules. The most honest way we can communicate what we are capable of supporting at a given time is with these version constraints. We're far from the only open source project to take this stance. It would seem, then, that the more projects your project(s) use, the more they will encounter this and the more you will need to take a more measured approach to upgrading your dependencies.\r\n\r\nThat would be easier if there was a real dependency resolver in pip, but I don't think we should compromise the stability of the project because there isn't a real dependency resolver in pip.",
"@nateprewitt it seems like the timing we upgraded our packages in was unfortunate, and the issues we had didn't have anything to do with requests in the end. When I saw that our code was giving warnings about dependencies of requests and I went to the Github issues page and I saw this issue I (wrongly) assumed this was our issue as well(and I checked the master branch instead of the tagged release which made the confusion greater).\r\n\r\nIn the end we only had an issue with pip dependency resolving and the order in which we installed packages which gave us urllib 1.23 for requests 2.18.4.\r\n\r\nMaking the warning clearer would be great though, thanks!",
"Another issue with this upper-version-bound pin is that it causes services like @requires to generate pull requests that fail tests, since they upgrade urllib3 in downstream requires.txt files even though requests may not be ready for it. Arguably this is a bug in @requires and it should have its own sat solver to generate the most recent possible viable set of versions, but practically speaking it can block security updates on other projects trying to use modern tooling.",
"> practically speaking it can block security updates on other projects trying to use modern tooling.\r\n\r\nCan you explain a bit more about this? Do you mean that the update for urllib3 is being included in a batch of other updates in the same PR and that's blocking those somehow?",
"Alright, 2.19.0 is out the door! Closing this out since it should be resolved now.",
"Thank you again to @nateprewitt and @sigmavirus24 for the careful balancing act here, both in navigating the updates to urllib3 without vendoring and for your community support here.\r\n",
"Sometimes it's because of (for example) Kaspersky... Turn it off, and `pip install` the package",
"Seems like this issue broke installation of `awscli`",
"Hi @kirillgroshkov, this has been fixed for a few months now. Please make sure you’ve updated Requests to the latest version.",
"> Seems like this issue broke installation of `awscli`\r\n\r\nAlso has been experiencing this with `awsebcli` on my CircleCI instances since 2-3 weeks ago. Upgrading `pip` and `requests` before installing `awsebcli` solved the issue.\r\n\r\nHere’s what my CI script was doing before:\r\n\r\n```sh\r\nsudo apt-get update && sudo apt-get install -y python-pip python-dev build-essential\r\npip install awsebcli --user\r\n```\r\n\r\nHere’s what it’s doing now:\r\n\r\n```sh\r\nsudo apt-get update && sudo apt-get install -y python-pip python-dev build-essential\r\nexport PATH=~/.local/bin:$PATH\r\nsudo pip install --upgrade pip\r\nsudo pip install --upgrade requests\r\npip install awsebcli --upgrade --user\r\n```",
"Here's how I solved it yesterday:\r\n\r\n`pip install --upgrade \"urllib3==1.22\" awscli awsebcli`",
"> pip install --upgrade \"urllib3==1.22\" awscli awsebcli\r\n\r\nWorked for me, had to add `--user`to the end to make it work"
] |
https://api.github.com/repos/psf/requests/issues/4672
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4672/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4672/comments
|
https://api.github.com/repos/psf/requests/issues/4672/events
|
https://github.com/psf/requests/pull/4672
| 329,712,116 |
MDExOlB1bGxSZXF1ZXN0MTkyOTAwODIz
| 4,672 |
remove references to 2.6 support in 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"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-06T05:07:17Z
|
2021-09-02T00:07:47Z
|
2018-06-11T14:13:14Z
|
MEMBER
|
resolved
|
This will remove our "official" support for 2.6 from the documentation only. We'll keep the work done to remove Python 2.6 code from the Requests code base (#4118) in the Requests3 branch so we don't forcibly break users installs with the 2.19.0 release.
@sigmavirus24 I looked at moving to urllib3's `secure` options, but wasn't immediately able to get ` 'security': ['urllib3[secure]>=1.23']` working in our setup.py. That's likely the last step to close out #4659 if we're ok with urllib3 managing the security dependencies. I'll try to look closer later this week.
|
{
"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/4672/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4672/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4672.diff",
"html_url": "https://github.com/psf/requests/pull/4672",
"merged_at": "2018-06-11T14:13:14Z",
"patch_url": "https://github.com/psf/requests/pull/4672.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4672"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=h1) Report\n> Merging [#4672](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/16fd7e03a980bea2dfa0f64c80bbda7cd7834d0f?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4672 +/- ##\n=======================================\n Coverage 66.62% 66.62% \n=======================================\n Files 15 15 \n Lines 1564 1564 \n=======================================\n Hits 1042 1042 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=footer). Last update [16fd7e0...de64f0f](https://codecov.io/gh/requests/requests/pull/4672?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4671
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4671/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4671/comments
|
https://api.github.com/repos/psf/requests/issues/4671/events
|
https://github.com/psf/requests/pull/4671
| 329,533,548 |
MDExOlB1bGxSZXF1ZXN0MTkyNzY2NTQ0
| 4,671 |
Allow urllib 1.23 (part 2)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1937689?v=4",
"events_url": "https://api.github.com/users/yan12125/events{/privacy}",
"followers_url": "https://api.github.com/users/yan12125/followers",
"following_url": "https://api.github.com/users/yan12125/following{/other_user}",
"gists_url": "https://api.github.com/users/yan12125/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yan12125",
"id": 1937689,
"login": "yan12125",
"node_id": "MDQ6VXNlcjE5Mzc2ODk=",
"organizations_url": "https://api.github.com/users/yan12125/orgs",
"received_events_url": "https://api.github.com/users/yan12125/received_events",
"repos_url": "https://api.github.com/users/yan12125/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yan12125/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yan12125/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yan12125",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-06-05T16:28:58Z
|
2021-08-30T00:06:37Z
|
2018-06-05T16:40:23Z
|
CONTRIBUTOR
|
resolved
|
Follow-up of https://github.com/requests/requests/pull/4669
This eliminates the following warning:
```
$ python -c 'import requests'
/usr/lib/python3.6/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
```
|
{
"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/4671/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4671/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4671.diff",
"html_url": "https://github.com/psf/requests/pull/4671",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4671.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4671"
}
| true |
[
"Hmm, thanks @yan12125. This is why we usually do all of these steps at once. I may have jumped the gun this morning by merging th first PR. Rather than merge multiple follow ups, I think we’ll wait until we’re ready to release, likely next week to get everything wrapped up. I’ll try to go through this tonight and get things tidied with the urllib3 upgrade.",
"No problem and thanks for the awesome work! Indeed most likely there will be more follow-ups - I just tried to run tests locally and some of them failed with urllib3 1.23. Not sure why Travis CI and AppVeyor didn't catch them, though.",
"when would this get released to pypi?",
"@maxnbk: According to this comment: https://github.com/requests/requests/issues/4673#issuecomment-395069592 - a week or so"
] |
https://api.github.com/repos/psf/requests/issues/4670
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4670/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4670/comments
|
https://api.github.com/repos/psf/requests/issues/4670/events
|
https://github.com/psf/requests/issues/4670
| 329,491,721 |
MDU6SXNzdWUzMjk0OTE3MjE=
| 4,670 |
Add current request url tip when ConnectionError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22490739?v=4",
"events_url": "https://api.github.com/users/ChandlerBent/events{/privacy}",
"followers_url": "https://api.github.com/users/ChandlerBent/followers",
"following_url": "https://api.github.com/users/ChandlerBent/following{/other_user}",
"gists_url": "https://api.github.com/users/ChandlerBent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ChandlerBent",
"id": 22490739,
"login": "ChandlerBent",
"node_id": "MDQ6VXNlcjIyNDkwNzM5",
"organizations_url": "https://api.github.com/users/ChandlerBent/orgs",
"received_events_url": "https://api.github.com/users/ChandlerBent/received_events",
"repos_url": "https://api.github.com/users/ChandlerBent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ChandlerBent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ChandlerBent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ChandlerBent",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-05T14:48:09Z
|
2021-09-08T02:09:51Z
|
2018-06-05T15:21:21Z
|
NONE
|
resolved
|
I got an error about "ConnectionError" when I using thirdparty sdk to request server.
The thirdparty sdk is using requests to request server.
`
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
`
I spent a long time looking for the error.
I print the request url from sdk source code, finally know why I get the error.
The sdk server domain has changed "https", but sdk source code still use "http".
Error message never tell me current url is "http" or "https".
If I can get the request url from error message, I will know how to fix that as soon as.
|
{
"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/4670/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4670/timeline
| null |
completed
| null | null | false |
[
"Hi @ChandlerBent, thanks for the suggestion! There are a host of reasons a server might close the connection prematurely, many of which are not specific to the scheme choice. We are raising this exception from an underlying library (urllib3, which raises it from the standard lib) and don't modify its contents in Requests.\r\n\r\nMy hunch is that you don't have `requests[security]` installed and which is possibly why you're having issues connecting. It's hard to tell without the information requested when opening these issues. I'm not sure that adding the url into the exception message would provide an obvious answer in the common case. Many times people are specifically requesting an https url in this case, rather than receiving a redirect.\r\n\r\nGiven that there's answers to this readily available in the closed issues section or with a quick google search for the exception message, I'm not sure there's much more to do here in Requests."
] |
https://api.github.com/repos/psf/requests/issues/4669
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4669/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4669/comments
|
https://api.github.com/repos/psf/requests/issues/4669/events
|
https://github.com/psf/requests/pull/4669
| 329,426,060 |
MDExOlB1bGxSZXF1ZXN0MTkyNjg0MTAz
| 4,669 |
Allow urllib3 1.23
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/152008?v=4",
"events_url": "https://api.github.com/users/michael-k/events{/privacy}",
"followers_url": "https://api.github.com/users/michael-k/followers",
"following_url": "https://api.github.com/users/michael-k/following{/other_user}",
"gists_url": "https://api.github.com/users/michael-k/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michael-k",
"id": 152008,
"login": "michael-k",
"node_id": "MDQ6VXNlcjE1MjAwOA==",
"organizations_url": "https://api.github.com/users/michael-k/orgs",
"received_events_url": "https://api.github.com/users/michael-k/received_events",
"repos_url": "https://api.github.com/users/michael-k/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michael-k/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michael-k/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michael-k",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-06-05T12:06:27Z
|
2021-09-03T00:10:55Z
|
2018-06-05T13:35:09Z
|
CONTRIBUTOR
|
resolved
|
Changelog: https://github.com/urllib3/urllib3/blob/1.23/CHANGES.rst#123-2018-06-04
|
{
"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/4669/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4669/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4669.diff",
"html_url": "https://github.com/psf/requests/pull/4669",
"merged_at": "2018-06-05T13:35:09Z",
"patch_url": "https://github.com/psf/requests/pull/4669.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4669"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=h1) Report\n> Merging [#4669](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/00fd4c8eb4ac0fd7b8f8d76bbf15ab06351c052c?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4669 +/- ##\n=======================================\n Coverage 66.62% 66.62% \n=======================================\n Files 15 15 \n Lines 1564 1564 \n=======================================\n Hits 1042 1042 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=footer). Last update [00fd4c8...ac944b7](https://codecov.io/gh/requests/requests/pull/4669?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Can you please bump `requests` with this fix so we can fix the current version conflicts?\r\n\r\nThere are a lot of other libs out there that don't cap `urllib3` meaning they are failing due to this cap",
"Hi @bar, I’ve just commented on a PR to address this. We usually won’t modify this until we are ready for a release. It shouldn’t break anything, but simply emits a warning.\r\n\r\nWe’ll have a release out in the next week or two once urllib3’s new version has had a chance to settle. I’ll try to get master a bit cleaner this evening. ",
"Lots of warning emails send me here. I'm going to edit the local code now because I don't like the coming thousands of emails."
] |
https://api.github.com/repos/psf/requests/issues/4668
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4668/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4668/comments
|
https://api.github.com/repos/psf/requests/issues/4668/events
|
https://github.com/psf/requests/issues/4668
| 328,803,874 |
MDU6SXNzdWUzMjg4MDM4NzQ=
| 4,668 |
'requests' with proxy not working
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33561873?v=4",
"events_url": "https://api.github.com/users/BirdeeChen/events{/privacy}",
"followers_url": "https://api.github.com/users/BirdeeChen/followers",
"following_url": "https://api.github.com/users/BirdeeChen/following{/other_user}",
"gists_url": "https://api.github.com/users/BirdeeChen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/BirdeeChen",
"id": 33561873,
"login": "BirdeeChen",
"node_id": "MDQ6VXNlcjMzNTYxODcz",
"organizations_url": "https://api.github.com/users/BirdeeChen/orgs",
"received_events_url": "https://api.github.com/users/BirdeeChen/received_events",
"repos_url": "https://api.github.com/users/BirdeeChen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/BirdeeChen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BirdeeChen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/BirdeeChen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-03T06:36:34Z
|
2021-09-08T02:09:52Z
|
2018-06-03T14:24:36Z
|
NONE
|
resolved
|
Here are my test code:
` import requests
url = 'https://api.ipify.org/'
proxyapi = 'http://ip.11jsq.com/index.php/api/entry?method=proxyServer.generate_api_url&packid=1&fa=0&fetch_key=&qty=1&time=1&pro=&city=&port=1&format=txt&ss=1&css=&dt=1'
proxy = {'http' : 'http://{}'.format(requests.get(proxyapi).text)}
print ('Downloading with fresh proxy.', proxy)
resp = requests.get(url, proxies = proxy_new)
print ('Fresh proxy response status.', resp.status_code)
print (resp.text)
#terminal output
Downloading with fresh proxy. {'http': 'http://49.84.152.176:30311'}
Fresh proxy response status. 200
222.68.154.34#my public ip address`
with no error message and seems that the requests lib never apply this proxy settings. The proxyapi is valid for I've checked the proxy in my web browser, and by visiting https://api.ipify.org/, it returns the desired proxy server's ip address.
I am using python 3.6.4 and requests 2.18.4.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33561873?v=4",
"events_url": "https://api.github.com/users/BirdeeChen/events{/privacy}",
"followers_url": "https://api.github.com/users/BirdeeChen/followers",
"following_url": "https://api.github.com/users/BirdeeChen/following{/other_user}",
"gists_url": "https://api.github.com/users/BirdeeChen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/BirdeeChen",
"id": 33561873,
"login": "BirdeeChen",
"node_id": "MDQ6VXNlcjMzNTYxODcz",
"organizations_url": "https://api.github.com/users/BirdeeChen/orgs",
"received_events_url": "https://api.github.com/users/BirdeeChen/received_events",
"repos_url": "https://api.github.com/users/BirdeeChen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/BirdeeChen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BirdeeChen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/BirdeeChen",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4668/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4668/timeline
| null |
completed
| null | null | false |
[
"Found that the reason is about the proxy protocol, visit https websites with https proxy."
] |
https://api.github.com/repos/psf/requests/issues/4667
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4667/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4667/comments
|
https://api.github.com/repos/psf/requests/issues/4667/events
|
https://github.com/psf/requests/issues/4667
| 328,432,054 |
MDU6SXNzdWUzMjg0MzIwNTQ=
| 4,667 |
Best practices around logging and error handling of HTTP request failures
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/159414?v=4",
"events_url": "https://api.github.com/users/hheimbuerger/events{/privacy}",
"followers_url": "https://api.github.com/users/hheimbuerger/followers",
"following_url": "https://api.github.com/users/hheimbuerger/following{/other_user}",
"gists_url": "https://api.github.com/users/hheimbuerger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hheimbuerger",
"id": 159414,
"login": "hheimbuerger",
"node_id": "MDQ6VXNlcjE1OTQxNA==",
"organizations_url": "https://api.github.com/users/hheimbuerger/orgs",
"received_events_url": "https://api.github.com/users/hheimbuerger/received_events",
"repos_url": "https://api.github.com/users/hheimbuerger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hheimbuerger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hheimbuerger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hheimbuerger",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-06-01T08:46:11Z
|
2021-09-05T00:07:00Z
|
2019-02-14T14:56:05Z
|
NONE
|
resolved
|
This is a request for best practices, or possibly an improvement of the documentation. I'm aware that I was referred to the [StackOverflow tag](https://stackoverflow.com/questions/tagged/python-requests), but anything around best practices seems quite likely to be "closed as subjective" there.
I'm wondering what the best practices are around requests and urllib3 for logging HTTP request failures.
Concretely, I'm making calls to a 3rdparty API with requests in background tasks (non-UI). Of course I leave `verify` on and I *want* all API connections to fail if the certificate isn't valid.
urllib3 seems to have the policy of logging on WARN or even ERROR when something fails, right before raising the exception. My monitoring systems generally notify me when WARNINGs or ERRORs occur, but this immediate logging means I'm losing the distinction between a caught exception and an uncaught exception.
Does that mean that it is considered "okay" and a safe practice to silence the `urllib3.connections` logger all the way? It just feels wrong...
```
'loggers': {
'urllib3.connection': {
'level': 'CRITICAL',
},
},
```
Is there a design decision to never log anything on ERROR that doesn't also raise an exception? (I can see how this probably should be asked on the urllib3 project.)
How do other requests users who run tasks in the background handle this balance?
---
On a related note, I think the documentation of how to handle these (specific) exceptions could be improved. To handle the certificate issue, here's what I managed to do:
```
except requests.exceptions.SSLError as sslexc: # NOT urllib3.exceptions.SSLError!!!
if isinstance(sslexc.message, MaxRetryError):
maxretryexc = sslexc.message
if isinstance(maxretryexc.reason, urllib3.exceptions.SSLError): # NOT requests.exceptions.SSLError!!!
innersslexc = maxretryexc.reason
if isinstance(innersslexc.message, urllib3.packages.ssl_match_hostname._implementation.CertificateError): # NOT ssl.CertificateError!
certexc = innersslexc.message
msg = certexc.message
logger.info('Certificate validation failed for customer %s: %s' % (customer, msg))
raise
```
Is there a better way to do this? I found [Quickstart: Errors and Exceptions](http://docs.python-requests.org/en/master/user/quickstart/#errors-and-exceptions), but not much else, and it doesn't really deal with how to handle fine-grained exceptions.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6740665?v=4",
"events_url": "https://api.github.com/users/lmiguelvargasf/events{/privacy}",
"followers_url": "https://api.github.com/users/lmiguelvargasf/followers",
"following_url": "https://api.github.com/users/lmiguelvargasf/following{/other_user}",
"gists_url": "https://api.github.com/users/lmiguelvargasf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmiguelvargasf",
"id": 6740665,
"login": "lmiguelvargasf",
"node_id": "MDQ6VXNlcjY3NDA2NjU=",
"organizations_url": "https://api.github.com/users/lmiguelvargasf/orgs",
"received_events_url": "https://api.github.com/users/lmiguelvargasf/received_events",
"repos_url": "https://api.github.com/users/lmiguelvargasf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmiguelvargasf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmiguelvargasf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmiguelvargasf",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4667/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4667/timeline
| null |
completed
| null | null | false |
[
"Closed due to inactivity."
] |
https://api.github.com/repos/psf/requests/issues/4666
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4666/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4666/comments
|
https://api.github.com/repos/psf/requests/issues/4666/events
|
https://github.com/psf/requests/issues/4666
| 327,585,017 |
MDU6SXNzdWUzMjc1ODUwMTc=
| 4,666 |
ConnectionError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39755725?v=4",
"events_url": "https://api.github.com/users/janitabose/events{/privacy}",
"followers_url": "https://api.github.com/users/janitabose/followers",
"following_url": "https://api.github.com/users/janitabose/following{/other_user}",
"gists_url": "https://api.github.com/users/janitabose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/janitabose",
"id": 39755725,
"login": "janitabose",
"node_id": "MDQ6VXNlcjM5NzU1NzI1",
"organizations_url": "https://api.github.com/users/janitabose/orgs",
"received_events_url": "https://api.github.com/users/janitabose/received_events",
"repos_url": "https://api.github.com/users/janitabose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/janitabose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janitabose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/janitabose",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-05-30T06:03:04Z
|
2021-09-08T02:09:52Z
|
2018-05-30T11:57:41Z
|
NONE
|
resolved
|
i get this error every time i try to extract tweets. Can anyone please help:
ConnectionError: HTTPSConnectionPool(host='stream.twitter.com', port=443): Max retries exceeded with url: /1.1/statuses/filter.json?delimited=length (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000205A1A33DA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4666/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4666/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/4665
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4665/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4665/comments
|
https://api.github.com/repos/psf/requests/issues/4665/events
|
https://github.com/psf/requests/issues/4665
| 327,243,510 |
MDU6SXNzdWUzMjcyNDM1MTA=
| 4,665 |
requests follow 302 redirection but didn't change the 'Host' header accordingly.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11310589?v=4",
"events_url": "https://api.github.com/users/1600/events{/privacy}",
"followers_url": "https://api.github.com/users/1600/followers",
"following_url": "https://api.github.com/users/1600/following{/other_user}",
"gists_url": "https://api.github.com/users/1600/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1600",
"id": 11310589,
"login": "1600",
"node_id": "MDQ6VXNlcjExMzEwNTg5",
"organizations_url": "https://api.github.com/users/1600/orgs",
"received_events_url": "https://api.github.com/users/1600/received_events",
"repos_url": "https://api.github.com/users/1600/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1600/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1600/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1600",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-05-29T09:39:59Z
|
2021-09-07T00:06:18Z
|
2018-05-29T11:57:34Z
|
NONE
|
resolved
|
when using requests with sites that returns a 302 Moved Temporarily, and in the response header there will be a 'Location' header given the target redirect domain.
Now if you also defined the 'Host' header in a headers parameter to be some fixed domain, the redirect won't be correctly performed.
for example:
## Expected Result
using requests to access https://login.website.com, while customizing headers= {'Host':'login.website.com'}
website returns 302 with 'Location' header > 'https://someothersubdomain.website.com/1.html'
at this moment I expected it redirects correctly to https://someothersubdomain.website.com
## Actual Result
it follows redirect to "https://login.website.com/1.html" rather than the correct someothersubdomain.website.com
inspecting the second http requests automatically sent by 'requests' we can see that the host header is incorrectly persisted to 'login.website.com'
## Reproduction Steps
like I described above.
```python
import requests
url = 'some url that redirect to another subdomain'
headers= {'Host':'login.website.com'}
res = requests.get(url,headers=headers)
```
## System Information
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.8.1"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "17.0.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4665/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4665/timeline
| null |
completed
| null | null | false |
[
"Hi there @1600 \r\n\r\nI went looking in our documentation for where we have this clearly explained and am having trouble finding it right now. The short answer is:\r\n\r\nThere are headers (`Host`) included that if the user specifies, Requests does not alter. This means if you want the right thing to be done with your request involving the `Host` header, you have to take full control over the redirect process yourself. We will not change that out without your consent.\r\n\r\nThis is not a bug, as not stepping on users' toes is a intentional design choice.\r\n\r\nCheers,\r\nIan",
"I think maybe someone wants to be redirected to the same domain, but most of the time they don't.",
"@1600 not so much a feature as much as \"We handle that for you, so when you want to specify it we don't know exactly what you want us to do\" because there are a few behaviours people expect. So we make the decision of not forcing one and giving everyone the ability to do a little more work to get exactly what they expect."
] |
https://api.github.com/repos/psf/requests/issues/4664
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4664/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4664/comments
|
https://api.github.com/repos/psf/requests/issues/4664/events
|
https://github.com/psf/requests/issues/4664
| 327,141,477 |
MDU6SXNzdWUzMjcxNDE0Nzc=
| 4,664 |
requests.Session doesn't properly handle closed keep-alive sessions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/212279?v=4",
"events_url": "https://api.github.com/users/eriol/events{/privacy}",
"followers_url": "https://api.github.com/users/eriol/followers",
"following_url": "https://api.github.com/users/eriol/following{/other_user}",
"gists_url": "https://api.github.com/users/eriol/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eriol",
"id": 212279,
"login": "eriol",
"node_id": "MDQ6VXNlcjIxMjI3OQ==",
"organizations_url": "https://api.github.com/users/eriol/orgs",
"received_events_url": "https://api.github.com/users/eriol/received_events",
"repos_url": "https://api.github.com/users/eriol/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eriol/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eriol/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eriol",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 17 |
2018-05-29T01:10:35Z
|
2024-02-22T15:49:48Z
| null |
CONTRIBUTOR
| null |
Hello,
this was reported for requests 2.18.4 on Debian BTS[¹] by Jonathan Lynch, since it's not Debian specific I'm forwarding here:
>When a server reaps a keep-alive session it sends a FIN packet to the
client. Normally, requests handles this fine and rebuilds the session on
the next request. However, there is an edge case involving network latency
that is not properly handled:
>If python sends a request at roughly the same time as the server closes the
session, then the server will send a RST (as the session is closed). Python
receives this RST on what it thought was a valid session and throws an
error:
```
requests.exceptions.ConnectionError: ('Connection aborted.',
RemoteDisconnected('Remote end closed connection without response',))
```
>The reason I consider this a bug is because python received the FIN packet
before it received the RST. As a result, it shouldn't be surprised when the
connection is subsequently aborted. It is an edge case, but the client has
enough information available to it that it could have handled it correctly.
>The workaround is to set max_retries on the Session via an HTTPAdaptor, but
I believe the correct behavior when the FIN is received is to rebuild the
session and re-send any requests that were in-flight (rather than throwing
an error). Requests correctly handles the FIN packet if there are no
in-flight requests, but if there are in-flight requests it ignores it and
instead throws an error.
I will ask Jonathan to continue the discussion here. Thanks!
[¹] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=899406
| null |
{
"+1": 13,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 13,
"url": "https://api.github.com/repos/psf/requests/issues/4664/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4664/timeline
| null | null | null | null | false |
[
"Hi there @eriol, Thanks for passing this on. Can you share links to any custom patches Debian has written and is applying to Requests at this time?\r\n\r\nJonathan, can you share your system information (as requested from all bug reporters) as well as the full traceback of what you're trying to do.\r\n\r\nThe short answer may be that we can't help in this particular case since we're so far removed from the networking stack, unfortunately.",
"Hi @sigmavirus24 , I was able to reproduce this on multiple systems. It first surfaced in our dockerized automated test environment (not sure what OS the containers are based on), and I was able to reproduce it running the same code locally on my Mac. I was able to eventually simply the repro down to:\r\n\r\n```\r\nimport requests\r\nfrom time import sleep\r\n\r\nimport logging\r\nlogging.basicConfig(level=logging.DEBUG)\r\n\r\ns = requests.Session()\r\ns.verify = False # self-signed cert\r\n\r\nwhile True:\r\n s.get('https://the-server:8443')\r\n sleep(5)\r\n```\r\n\r\nThe (nodejs) server being hit by the code prunes keepalives older than 5 seconds, so having python hit it at 5 second intervals with only ~30ms of network latency was able to consistently reproduce the issue in only a few loops.\r\n\r\nSetting the sleep to either 4 seconds or 6 seconds removed the issue: at 4 seconds, the session was always refreshed before the server's prune interval, and at 6 seconds the server always pruned the session before the next request, causing python to (correctly) rebuild it. It was when the server pruned the session at the \"same time\" (as defined by network latency) as python reused it that trouble arose.",
"Right, so that makes me suspect this is an issue in urllib3 more specifically than in Requests. It would still be helpful to have the traceback from that exception if you can share it @jimethn ",
"Sorry @sigmavirus24 , I think you are right in that the underlying urllib3 is responsible. Here is the stack trace, as requested:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 601, in urlopen\r\n chunked=chunked)\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 387, in _make_request\r\n six.raise_from(e, None)\r\n File \"<string>\", line 2, in raise_from\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 383, in _make_request\r\n httplib_response = conn.getresponse()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 1331, in getresponse\r\n response.begin()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 297, in begin\r\n version, status, reason = self._read_status()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 266, in _read_status\r\n raise RemoteDisconnected(\"Remote end closed connection without\"\r\nhttp.client.RemoteDisconnected: Remote end closed connection without response\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/usr/local/lib/python3.6/site-packages/requests/adapters.py\", line 440, in send\r\n timeout=timeout\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 639, in urlopen\r\n _stacktrace=sys.exc_info()[2])\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py\", line 357, in increment\r\n raise six.reraise(type(error), error, _stacktrace)\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/packages/six.py\", line 685, in reraise\r\n raise value.with_traceback(tb)\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 601, in urlopen\r\n chunked=chunked)\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 387, in _make_request\r\n six.raise_from(e, None)\r\n File \"<string>\", line 2, in raise_from\r\n File \"/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 383, in _make_request\r\n httplib_response = conn.getresponse()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 1331, in getresponse\r\n response.begin()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 297, in begin\r\n version, status, reason = self._read_status()\r\n File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py\", line 266, in _read_status\r\n raise RemoteDisconnected(\"Remote end closed connection without\"\r\nurllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 2, in <module>\r\n File \"/usr/local/lib/python3.6/site-packages/requests/sessions.py\", line 521, in get\r\n return self.request('GET', url, **kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/requests/sessions.py\", line 508, in request\r\n resp = self.send(prep, **send_kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/requests/sessions.py\", line 618, in send\r\n r = adapter.send(request, **kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/requests/adapters.py\", line 490, in send\r\n raise ConnectionError(err, request=request)\r\nrequests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))\r\n```",
"Hello @sigmavirus24, many thanks for the fast reply and sorry if I did not manage to reply earlier. Since version 2.18.1-1 I dropped all the patches for requests, but I still have some patches on urllib3:\r\n\r\nhttps://sources.debian.org/patches/python-urllib3/1.22-1/\r\n\r\nthe biggest one is to not use the vendored six module. \r\n",
"@eriol is that patch the solution to this issue? If not, what did you do to get the code to work?",
"@bluworld unfortunately no, the mentioned patches are unrelated to this issue.",
"Maybe this is not the best place to ask but do you know if anybody submitted the issue to urllib3? I personally couldn't find anything. I'm being hit by this issue quite a lot with apache2 web server where the default keep-alive timeout is 5 seconds.",
"For what it's worth, I don't think there's any workaround to this besides catching the `ConnectionError` explicitly - `urllib3.Retry` has never retried on a `ConnectionError` (as far I can tell) cf https://github.com/urllib3/urllib3/blob/master/src/urllib3/util/retry.py#L9 cc @eriol ",
"Hi,\r\n\r\nI think i found a solution and created pull requests for urllib3 -> urllib3/urllib3#1911\r\nAfter it will be merged ( I hope ) , requests should raise MaxRetries error as it should , because they are setting max_retries = 0 to retry object of urllib3 by default - > this should be discussed if better not to leave default urllib3 value which is 3 , or pass 1.\r\n\r\nMore info -> https://bugs.python.org/issue3566 , https://hg.python.org/cpython/rev/eba80326ba53 , https://bugs.python.org/issue41345",
"It is because the OS doent have the tcp keep alive enabled, causing that the server drop the connection\r\n\r\nI did this in Linux\r\n\r\n\r\n **import socket\r\n from urllib3.connection import HTTPConnection\r\n HTTPConnection.default_socket_options = HTTPConnection.default_socket_options + [\r\n (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)\r\n ,(socket.SOL_TCP, socket.TCP_KEEPIDLE, 45)\r\n ,(socket.SOL_TCP, socket.TCP_KEEPINTVL, 10)\r\n ,(socket.SOL_TCP, socket.TCP_KEEPCNT, 6)\r\n ]**\r\n\r\n from requests import session\r\n self.session = session()\r\n\r\nAnd no more ConnectionReset, ConnectionTimeOut or Even ConnectionReadTimeOut",
"@jakermx yes – but your TCP Keep-Alive settings can only reduce the issue, not completely do away with it (there is always a window, however small, where the connection might be closed).",
"@malthe Well, so, is this issue \"somehow\" resolveable ? In openstack where tons of requests are send to API, from time to time there is an issue related to this ..\r\n\r\nI'm not saying it's regular bug, but how can be this fixed , is it possible ? \r\n\r\nEven if this issue (for example) in openstack is in small amount, from time to time something just fail ..",
"@keuko short of writing a custom `HTTPAdapter` (overriding the `send` method) – I don't know.\r\n\r\nI use code such as the following and attach the adapter using `Session.mount` (see https://requests.readthedocs.io/en/master/user/advanced/#transport-adapters).\r\n\r\n```python\r\nclass CustomHTTPAdapter(HTTPAdapter):\r\n def send(self, *args, **kwargs):\r\n for attempt in range(ATTEMPTS):\r\n if attempt > 0:\r\n LOGGER.info(\"Retrying after connection error\")\r\n try:\r\n return super().send(*args, **kwargs)\r\n except ConnectionError as exc:\r\n LOGGER.info(\"Connection error: %s\", exc)\r\n saved = exc\r\n continue\r\n\r\n raise saved\r\n```",
"I agree when you said that the Session is not handling as should the connections, and I think that the reasson of the adapters...the RFC for \"Persistent\" Connections is very weird...it defines that the client should start sending tcp keep alive packets after 2 hours of no data received.. for a Service Oriented Server....it is not costable having idle sessions. I.E. A video Streming server...chaturbate for say something.... or netflix, users navigate throu the options and then picjk a video or room, but too many times , we a, as userrs let the video playing and fall asleep..so...we are consuming resourses that at the end we are causining our provider to spend more so they will increaase thier prices and so on....\r\n\r\nSo in the case, you software raise an exception instead of handling as should the connection...it is because the server side, maybe no the server software it, the load balancers, sanboxes or any other box in tyhe middle.\r\n\r\nThats Why I SUGGESTED to enable a lower layer connection guard that wull ensure that the session...well the last request, keep open until the server says....WTF and clloses thw connection properly instead of just dropping it.\r\n\r\nso...it is work of no just Requests team...it really depens on 7 teams...one per OSI layer, actually 4, heheh.\r\n\r\nSoI am just tryiong to let you know that we can be creatives and find solutinos, and try to understnad that is the Module is called Request , they handle requests...and suport itself on other specific modules.... \r\n\r\nXD",
"> @keuko short of writing a custom `HTTPAdapter` (overriding the `send` method) – I don't know.\r\n> \r\n> I use code such as the following and attach the adapter using `Session.mount` (see https://requests.readthedocs.io/en/master/user/advanced/#transport-adapters).\r\n> \r\n> ```python\r\n> class CustomHTTPAdapter(HTTPAdapter):\r\n> def send(self, *args, **kwargs):\r\n> for attempt in range(ATTEMPTS):\r\n> if attempt > 0:\r\n> LOGGER.info(\"Retrying after connection error\")\r\n> try:\r\n> return super().send(*args, **kwargs)\r\n> except ConnectionError as exc:\r\n> LOGGER.info(\"Connection error: %s\", exc)\r\n> saved = exc\r\n> continue\r\n> \r\n> raise saved\r\n> ```\r\n\r\nBe careful with this workaround. Because ConnectionError is [just a wrapped](https://github.com/psf/requests/blob/3.0/requests/adapters.py#L545) for MaxRetryError and MaxRetryError can contain connection timeout error and read timeout error and others. If you want to set different retries for connection and read errors or other errors this workaround cannot help you.",
"@sigmavirus24 \r\ncan anyone help me with the below error\r\nError occurred ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))\r\nI am using requests==2.28.2 version and while logging into tableau server using rest api the error is coming.\r\nAs I am first creating the session and then doing the post request.\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4663
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4663/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4663/comments
|
https://api.github.com/repos/psf/requests/issues/4663/events
|
https://github.com/psf/requests/issues/4663
| 326,955,722 |
MDU6SXNzdWUzMjY5NTU3MjI=
| 4,663 |
requests package issue in pip10 version
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7158481?v=4",
"events_url": "https://api.github.com/users/felsen/events{/privacy}",
"followers_url": "https://api.github.com/users/felsen/followers",
"following_url": "https://api.github.com/users/felsen/following{/other_user}",
"gists_url": "https://api.github.com/users/felsen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/felsen",
"id": 7158481,
"login": "felsen",
"node_id": "MDQ6VXNlcjcxNTg0ODE=",
"organizations_url": "https://api.github.com/users/felsen/orgs",
"received_events_url": "https://api.github.com/users/felsen/received_events",
"repos_url": "https://api.github.com/users/felsen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/felsen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/felsen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/felsen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-05-28T09:13:36Z
|
2021-09-08T02:09:53Z
|
2018-05-30T05:30:57Z
|
NONE
|
resolved
|
When I try to uninstall requests package using pip10, below error I am getting.
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7158481?v=4",
"events_url": "https://api.github.com/users/felsen/events{/privacy}",
"followers_url": "https://api.github.com/users/felsen/followers",
"following_url": "https://api.github.com/users/felsen/following{/other_user}",
"gists_url": "https://api.github.com/users/felsen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/felsen",
"id": 7158481,
"login": "felsen",
"node_id": "MDQ6VXNlcjcxNTg0ODE=",
"organizations_url": "https://api.github.com/users/felsen/orgs",
"received_events_url": "https://api.github.com/users/felsen/received_events",
"repos_url": "https://api.github.com/users/felsen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/felsen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/felsen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/felsen",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4663/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4663/timeline
| null |
completed
| null | null | false |
[
"That's interesting given that requests uses [setuptools](https://github.com/requests/requests/blob/00fd4c8eb4ac0fd7b8f8d76bbf15ab06351c052c/setup.py#L10) and has for years now. It sounds like the version of requests you have must be incredibly old. ",
"Yes, It works in the latest version of requests==2.18.4."
] |
https://api.github.com/repos/psf/requests/issues/4662
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4662/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4662/comments
|
https://api.github.com/repos/psf/requests/issues/4662/events
|
https://github.com/psf/requests/issues/4662
| 326,807,890 |
MDU6SXNzdWUzMjY4MDc4OTA=
| 4,662 |
KeyError: 'csrf' or 'csrftoken' on python3 with osx
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39561770?v=4",
"events_url": "https://api.github.com/users/hamadberlin/events{/privacy}",
"followers_url": "https://api.github.com/users/hamadberlin/followers",
"following_url": "https://api.github.com/users/hamadberlin/following{/other_user}",
"gists_url": "https://api.github.com/users/hamadberlin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hamadberlin",
"id": 39561770,
"login": "hamadberlin",
"node_id": "MDQ6VXNlcjM5NTYxNzcw",
"organizations_url": "https://api.github.com/users/hamadberlin/orgs",
"received_events_url": "https://api.github.com/users/hamadberlin/received_events",
"repos_url": "https://api.github.com/users/hamadberlin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hamadberlin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hamadberlin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hamadberlin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2018-05-27T11:20:58Z
|
2020-08-07T16:28:42Z
|
2018-05-27T13:33:08Z
|
NONE
| null |
hey folks,
tying to run this command with python3:
#update csrf token for the first time
sess.headers.update({'X-CSRFToken' : sess.get('https://www.instagram.com/accounts/login').cookies.get_dict()['csrf']})
or
#update csrf token for the first time
sess.headers.update({'X-CSRFToken' : sess.get('https://www.instagram.com/accounts/login').cookies.get_dict()['csrftoken']})
i changed it many times but it wont work... even not with url 'www.instagram.com'
Result:
[*] Loading proxies
[*] Proxy: <Proxy IE 0.19s [HTTP: Transparent, HTTPS] 54.36.31.204:3128>
[*] 43113 passwords loaded successfully
Traceback (most recent call last):
File "hackinsta.py", line 178, in <module>
bruteforce.login()
File "hackinsta.py", line 128, in login
sess.headers.update({'X-CSRFToken' : sess.get('https://www.instagram.com/accounts/login').cookies.get_dict()['csrf']})
KeyError: 'csrf'
how can i fix that?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 3,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4662/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4662/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\nHow to solve this..?? Pls help me",
"> hey folks,\r\n> \r\n> tying to run this command with python3:\r\n> \r\n> #update csrf token for the first time\r\n> sess.headers.update({'X-CSRFToken' : sess.get('[https://www.instagram.com/accounts/login').cookies.get_dict()['csrf']}](https://www.instagram.com/accounts/login').cookies.get_dict()%5B'csrf'%5D%7D))\r\n> \r\n> or\r\n> \r\n> #update csrf token for the first time\r\n> sess.headers.update({'X-CSRFToken' : sess.get('[https://www.instagram.com/accounts/login').cookies.get_dict()['csrftoken']}](https://www.instagram.com/accounts/login').cookies.get_dict()%5B'csrftoken'%5D%7D))\r\n> \r\n> i changed it many times but it wont work... even not with url 'www.instagram.com'\r\n> \r\n> Result:\r\n> [_] Loading proxies [_] Proxy: <Proxy IE 0.19s [HTTP: Transparent, HTTPS] 54.36.31.204:3128>\r\n> [*] 43113 passwords loaded successfully\r\n> Traceback (most recent call last):\r\n> File \"hackinsta.py\", line 178, in \r\n> bruteforce.login()\r\n> File \"hackinsta.py\", line 128, in login\r\n> sess.headers.update({'X-CSRFToken' : sess.get('[https://www.instagram.com/accounts/login').cookies.get_dict()['csrf']}](https://www.instagram.com/accounts/login').cookies.get_dict()%5B'csrf'%5D%7D))\r\n> KeyError: 'csrf'\r\n> \r\n> how can i fix that?\r\n\r\n",
"> \r\n> How to solve this..?? Pls help me\r\n\r\nHey, send me your Instagram ID I'll explain it their ",
"Please find another place to have this discussion."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.