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/5283
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5283/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5283/comments
|
https://api.github.com/repos/psf/requests/issues/5283/events
|
https://github.com/psf/requests/issues/5283
| 533,474,762 |
MDU6SXNzdWU1MzM0NzQ3NjI=
| 5,283 |
mypy is failing on type checking Response
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1688249?v=4",
"events_url": "https://api.github.com/users/mateusduboli/events{/privacy}",
"followers_url": "https://api.github.com/users/mateusduboli/followers",
"following_url": "https://api.github.com/users/mateusduboli/following{/other_user}",
"gists_url": "https://api.github.com/users/mateusduboli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mateusduboli",
"id": 1688249,
"login": "mateusduboli",
"node_id": "MDQ6VXNlcjE2ODgyNDk=",
"organizations_url": "https://api.github.com/users/mateusduboli/orgs",
"received_events_url": "https://api.github.com/users/mateusduboli/received_events",
"repos_url": "https://api.github.com/users/mateusduboli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mateusduboli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mateusduboli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mateusduboli",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-12-05T16:56:14Z
|
2021-09-03T00:10:45Z
|
2020-01-03T09:48:48Z
|
CONTRIBUTOR
|
resolved
|
We're using mypy internally to check for type errors, on an specific interaction with `requests.models.Response` object it gives you an error about a missing attribute, which is declared on the class.
Minimal example
## Expected Result
Type check successful
## Actual Result
```
$ python3.6 -m mypy test.py
test.py:3: error: "Response" has no attribute "next"
```
## Reproduction Steps
```txt
# requirements.txt
certifi==2019.11.28
chardet==3.0.4
idna==2.8
mypy==0.720
mypy-extensions==0.4.1
psutil==5.4.3
requests==2.22.0
typed-ast==1.4.0
typing==3.7.4.1
typing-extensions==3.7.4
urllib3==1.25.7
```
```python
# test.py
import requests
response = requests.get('https://google.com')
print(response.next)
```
Running:
```
python3.6 -m mypy test.py
```
## System Information
$ python -m requests.help
```
$ python3.6 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.9"
},
"platform": {
"release": "3.10.0-862.14.4.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1688249?v=4",
"events_url": "https://api.github.com/users/mateusduboli/events{/privacy}",
"followers_url": "https://api.github.com/users/mateusduboli/followers",
"following_url": "https://api.github.com/users/mateusduboli/following{/other_user}",
"gists_url": "https://api.github.com/users/mateusduboli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mateusduboli",
"id": 1688249,
"login": "mateusduboli",
"node_id": "MDQ6VXNlcjE2ODgyNDk=",
"organizations_url": "https://api.github.com/users/mateusduboli/orgs",
"received_events_url": "https://api.github.com/users/mateusduboli/received_events",
"repos_url": "https://api.github.com/users/mateusduboli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mateusduboli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mateusduboli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mateusduboli",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5283/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5283/timeline
| null |
completed
| null | null | false |
[
"This was fixed in typeshed on October 18th in this commit: https://github.com/python/typeshed/commit/bf862d907957e46b97419565a5bb90314d074ee4\r\n\r\nThe requests repo doesn't maintain it's own type hints. Maybe you need to upgrade your MyPy version to get a newer typeshed version? Not sure.",
"Yes, upgrade resolved thanks for info!"
] |
https://api.github.com/repos/psf/requests/issues/5282
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5282/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5282/comments
|
https://api.github.com/repos/psf/requests/issues/5282/events
|
https://github.com/psf/requests/issues/5282
| 533,233,099 |
MDU6SXNzdWU1MzMyMzMwOTk=
| 5,282 |
incorrect coding of location under 302 response
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29330285?v=4",
"events_url": "https://api.github.com/users/billwyy/events{/privacy}",
"followers_url": "https://api.github.com/users/billwyy/followers",
"following_url": "https://api.github.com/users/billwyy/following{/other_user}",
"gists_url": "https://api.github.com/users/billwyy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/billwyy",
"id": 29330285,
"login": "billwyy",
"node_id": "MDQ6VXNlcjI5MzMwMjg1",
"organizations_url": "https://api.github.com/users/billwyy/orgs",
"received_events_url": "https://api.github.com/users/billwyy/received_events",
"repos_url": "https://api.github.com/users/billwyy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/billwyy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/billwyy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/billwyy",
"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 | 2 |
2019-12-05T09:40:03Z
|
2021-09-01T00:11:30Z
|
2020-04-10T18:59:32Z
|
NONE
|
resolved
|
When I use headers.get('location') I got http://xxx.xxx.xxx/2019/é????°????1????????-|?????3?o????????-|?????|?±????è??.[è?±] ???????·é????·???..2018-1.epub
Obviously there is problem of encoding. It should be Chinese after '/2019/'
What shall I do to sovle this problem?
HTTP/1.1 302 Found
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 04 Dec 2019 08:36:48 GMT
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Set-Cookie: advanced-frontend=4lo57sauj74js561pjth714bq2; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
location: http://xxx.xxx.xxx/2019/é????°????1????????-|?????3?o????????-|?????|?±????è??.[è?±] ???????·é????·???..2018-1.epub
Connection: keep-alive
|
{
"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/5282/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5282/timeline
| null |
completed
| null | null | false |
[
"Hi @billwyy, can you clarify if the server is returning an indiscernible location or if Requests is performing incorrect decoding on it?\r\n\r\nWe want to do the best we can with non-english encodings, but we'd only expect iso-8859-1 and utf-8 with the current HTTP RFCs for headers.",
"Resolving since we haven't heard back."
] |
https://api.github.com/repos/psf/requests/issues/5281
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5281/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5281/comments
|
https://api.github.com/repos/psf/requests/issues/5281/events
|
https://github.com/psf/requests/pull/5281
| 530,826,159 |
MDExOlB1bGxSZXF1ZXN0MzQ3MzkxMTM2
| 5,281 |
Unified check version compatibility
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11872712?v=4",
"events_url": "https://api.github.com/users/Mellcap/events{/privacy}",
"followers_url": "https://api.github.com/users/Mellcap/followers",
"following_url": "https://api.github.com/users/Mellcap/following{/other_user}",
"gists_url": "https://api.github.com/users/Mellcap/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Mellcap",
"id": 11872712,
"login": "Mellcap",
"node_id": "MDQ6VXNlcjExODcyNzEy",
"organizations_url": "https://api.github.com/users/Mellcap/orgs",
"received_events_url": "https://api.github.com/users/Mellcap/received_events",
"repos_url": "https://api.github.com/users/Mellcap/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Mellcap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Mellcap/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Mellcap",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-02T00:31:15Z
|
2021-08-29T00:06:54Z
|
2020-05-09T05:23:46Z
|
NONE
|
resolved
|
I have noticed that there is a `# noqa: F811` comment at `__init__.py` when we check the version compatibility of urllib3.
And there exist duplicate code to check the compatibility of different packages.
So I write a method to handle it.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5281/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5281/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5281.diff",
"html_url": "https://github.com/psf/requests/pull/5281",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5281.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5281"
}
| true |
[
"Hi @Mellcap,\r\n\r\nThanks for contributing to Requests! This is an internal implementation detail that we're using to validate a limited number of dependencies. While I think this is a reasonable abstraction, we don't intend to increase the number of dependencies we use. I'm a bit worried this may adds too many constraints on us modifying things going forward. I think we'll pass on this for now."
] |
https://api.github.com/repos/psf/requests/issues/5280
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5280/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5280/comments
|
https://api.github.com/repos/psf/requests/issues/5280/events
|
https://github.com/psf/requests/pull/5280
| 529,833,669 |
MDExOlB1bGxSZXF1ZXN0MzQ2NjM1MzMw
| 5,280 |
Fix test case, test_total_timeout_connect_failed #5279
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1667596?v=4",
"events_url": "https://api.github.com/users/templetontsai/events{/privacy}",
"followers_url": "https://api.github.com/users/templetontsai/followers",
"following_url": "https://api.github.com/users/templetontsai/following{/other_user}",
"gists_url": "https://api.github.com/users/templetontsai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/templetontsai",
"id": 1667596,
"login": "templetontsai",
"node_id": "MDQ6VXNlcjE2Njc1OTY=",
"organizations_url": "https://api.github.com/users/templetontsai/orgs",
"received_events_url": "https://api.github.com/users/templetontsai/received_events",
"repos_url": "https://api.github.com/users/templetontsai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/templetontsai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/templetontsai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/templetontsai",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-11-28T10:44:02Z
|
2021-08-29T00:07:07Z
|
2020-02-18T06:27:23Z
|
NONE
|
resolved
|
This pr is to fix the test case fail regarding ConnecTimeout, #5279.
|
{
"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/5280/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5280/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5280.diff",
"html_url": "https://github.com/psf/requests/pull/5280",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5280.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5280"
}
| true |
[
"Hi @templetontsai,\r\n\r\nAs I said in #5279, the exception here is what we're expecting. I'd validate your local network setup to resolve the issue you're seeing."
] |
https://api.github.com/repos/psf/requests/issues/5279
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5279/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5279/comments
|
https://api.github.com/repos/psf/requests/issues/5279/events
|
https://github.com/psf/requests/issues/5279
| 529,819,693 |
MDU6SXNzdWU1Mjk4MTk2OTM=
| 5,279 |
Test case, test_total_timeout_connect failed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1667596?v=4",
"events_url": "https://api.github.com/users/templetontsai/events{/privacy}",
"followers_url": "https://api.github.com/users/templetontsai/followers",
"following_url": "https://api.github.com/users/templetontsai/following{/other_user}",
"gists_url": "https://api.github.com/users/templetontsai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/templetontsai",
"id": 1667596,
"login": "templetontsai",
"node_id": "MDQ6VXNlcjE2Njc1OTY=",
"organizations_url": "https://api.github.com/users/templetontsai/orgs",
"received_events_url": "https://api.github.com/users/templetontsai/received_events",
"repos_url": "https://api.github.com/users/templetontsai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/templetontsai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/templetontsai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/templetontsai",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-28T10:19:02Z
|
2021-09-02T00:07:21Z
|
2020-02-18T06:26:40Z
|
NONE
|
resolved
|
Summary.
When getting the latest release, v2.20, and run the test case it failed in the case test_total_timeout_connect. The test case is expecting, ConnectTimeout exception but instead it gets ConnectionError. The error message is as follows:
```
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
```
## Expected Result
I would expect all the test cases should be passed without any modification.
## Actual Result
4 test case fail.
Error message is consistent with the following:
```
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
```
## Reproduction Steps
It seems a symptom only happens when using WiFi. You need to make sure to use WiFi not landline.
Run the following test case:
pytest tests/test_requests.py::TestTimeout::test_total_timeout_connect
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.7.5"
},
"platform": {
"release": "4.15.0-70-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5279/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5279/timeline
| null |
completed
| null | null | false |
[
"Upon investigation, it is a mismatch of exception is thrown and the expected exception of test case.\r\n\r\nException thrown: requests.exceptions.ConnectionError\r\nExpected exception in the test case: ConnectTimeout\r\n\r\n```\r\n def test_total_timeout_connect(self, timeout):\r\n try:\r\n requests.get(TARPIT, timeout=timeout)\r\n pytest.fail('The connect() request should time out.')\r\n except ConnectTimeout:\r\n pass\r\n```\r\n\r\nFurthermore, ConnectionTimeout is child class of ConnectionError.\r\n\r\n```\r\nclass ConnectTimeout(ConnectionError, Timeout): \r\n```\r\n\r\nThis is the root cause. A fix can be throwing ConnectTimeout specifically as follow:\r\n\r\n```\r\n except (ProtocolError, socket.error) as err:\r\n raise ConnectTimeout(err, request=request)\r\n```",
"Hi @templetontsai, this appears to be something on your wireless connection is either blocking the connection or routing it to another endpoint. It may be a firewall, proxy or the symptom of a MITM. The exception we're expecting for these test cases is correct (a timeout). The exception you're getting is the connection being forcibly closed by whatever server receiving the request.\r\n\r\nI'd double check your host/network configuration, and maybe see which host you're connecting to on your wireless network."
] |
https://api.github.com/repos/psf/requests/issues/5278
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5278/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5278/comments
|
https://api.github.com/repos/psf/requests/issues/5278/events
|
https://github.com/psf/requests/issues/5278
| 529,735,341 |
MDU6SXNzdWU1Mjk3MzUzNDE=
| 5,278 |
Cannot keep 302 using session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17807236?v=4",
"events_url": "https://api.github.com/users/navysummer/events{/privacy}",
"followers_url": "https://api.github.com/users/navysummer/followers",
"following_url": "https://api.github.com/users/navysummer/following{/other_user}",
"gists_url": "https://api.github.com/users/navysummer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/navysummer",
"id": 17807236,
"login": "navysummer",
"node_id": "MDQ6VXNlcjE3ODA3MjM2",
"organizations_url": "https://api.github.com/users/navysummer/orgs",
"received_events_url": "https://api.github.com/users/navysummer/received_events",
"repos_url": "https://api.github.com/users/navysummer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/navysummer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/navysummer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/navysummer",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-28T07:17:30Z
|
2021-09-02T00:07:27Z
|
2020-02-10T05:44:37Z
|
NONE
|
resolved
|
Requests can not keep 302 using session,I need to get some cookies in 302
`s = requests.Session()
response = s.post(__login_url,data=__login_data,headers=__login_headers,allow_redirects=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/5278/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5278/timeline
| null |
completed
| null | null | false |
[
"@navysummer `s.cookies` will give you the cookie for that request made to `login_url`.",
"@navysummer you can access the `history` variable on your response object to see all of the redirects. They will each have the cookies for that stage attached to them."
] |
https://api.github.com/repos/psf/requests/issues/5277
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5277/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5277/comments
|
https://api.github.com/repos/psf/requests/issues/5277/events
|
https://github.com/psf/requests/issues/5277
| 529,648,221 |
MDU6SXNzdWU1Mjk2NDgyMjE=
| 5,277 |
requests can't handle http response header correctly
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4",
"events_url": "https://api.github.com/users/beruhan/events{/privacy}",
"followers_url": "https://api.github.com/users/beruhan/followers",
"following_url": "https://api.github.com/users/beruhan/following{/other_user}",
"gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/beruhan",
"id": 7598892,
"login": "beruhan",
"node_id": "MDQ6VXNlcjc1OTg4OTI=",
"organizations_url": "https://api.github.com/users/beruhan/orgs",
"received_events_url": "https://api.github.com/users/beruhan/received_events",
"repos_url": "https://api.github.com/users/beruhan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/beruhan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/beruhan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-11-28T01:41:57Z
|
2021-09-02T00:07:31Z
|
2020-02-01T01:36:55Z
|
NONE
|
resolved
|
when there were two status lines in http response,for example
```
HTTP/1.0 200 OK
Date: Thu, 28 Nov 2019 01:27:10 GMT
Server: Boa/0.94.13
Connection: close
HTTP/1.0 200 OK
Connection: close
Content-Length: 75746
Content-Type: image/jpeg
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
The requests lib can only parsed the headers before the second status line as follows,
```
import requests
req = requests.get("http://121.156.161.92/cgi-bin/get_jpeg?ch=1")
print(req.headers)
{'Date': 'Thu, 28 Nov 2019 01:22:44 GMT', 'Server': 'Boa/0.94.13', 'Connection': 'close'}
```
is there a way to parse all http headers and skip the bad http status line?
|
{
"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/5277/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5277/timeline
| null |
completed
| null | null | false |
[
"This is a malformed http response if you’re expecting the headers to occur in a single request. Interpreting that response any differently would be incorrect in this case.\r\n\r\nYou can reach out to the owner of the server to see what’s going on with the responses they’re emitting."
] |
https://api.github.com/repos/psf/requests/issues/5276
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5276/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5276/comments
|
https://api.github.com/repos/psf/requests/issues/5276/events
|
https://github.com/psf/requests/pull/5276
| 529,369,939 |
MDExOlB1bGxSZXF1ZXN0MzQ2MjU5NTYx
| 5,276 |
Fix the syntax highlighting in the example
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2760196?v=4",
"events_url": "https://api.github.com/users/ZhukovAlexander/events{/privacy}",
"followers_url": "https://api.github.com/users/ZhukovAlexander/followers",
"following_url": "https://api.github.com/users/ZhukovAlexander/following{/other_user}",
"gists_url": "https://api.github.com/users/ZhukovAlexander/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ZhukovAlexander",
"id": 2760196,
"login": "ZhukovAlexander",
"node_id": "MDQ6VXNlcjI3NjAxOTY=",
"organizations_url": "https://api.github.com/users/ZhukovAlexander/orgs",
"received_events_url": "https://api.github.com/users/ZhukovAlexander/received_events",
"repos_url": "https://api.github.com/users/ZhukovAlexander/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ZhukovAlexander/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZhukovAlexander/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ZhukovAlexander",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-11-27T14:09:40Z
|
2021-08-29T00:07:06Z
|
2020-02-18T07:19:39Z
|
CONTRIBUTOR
|
resolved
|
Previously, dots were not included, which was breaking multiline syntax highlighting in for example in interactive mode. Example:

Here is how it looks after the fix:

|
{
"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/5276/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5276/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5276.diff",
"html_url": "https://github.com/psf/requests/pull/5276",
"merged_at": "2020-02-18T07:19:39Z",
"patch_url": "https://github.com/psf/requests/pull/5276.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5276"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5275
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5275/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5275/comments
|
https://api.github.com/repos/psf/requests/issues/5275/events
|
https://github.com/psf/requests/issues/5275
| 528,490,705 |
MDU6SXNzdWU1Mjg0OTA3MDU=
| 5,275 |
How to use Session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29891327?v=4",
"events_url": "https://api.github.com/users/contactparthshah/events{/privacy}",
"followers_url": "https://api.github.com/users/contactparthshah/followers",
"following_url": "https://api.github.com/users/contactparthshah/following{/other_user}",
"gists_url": "https://api.github.com/users/contactparthshah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/contactparthshah",
"id": 29891327,
"login": "contactparthshah",
"node_id": "MDQ6VXNlcjI5ODkxMzI3",
"organizations_url": "https://api.github.com/users/contactparthshah/orgs",
"received_events_url": "https://api.github.com/users/contactparthshah/received_events",
"repos_url": "https://api.github.com/users/contactparthshah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/contactparthshah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/contactparthshah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/contactparthshah",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-26T05:05:35Z
|
2021-09-02T00:07:27Z
|
2020-02-10T05:45:28Z
|
NONE
|
resolved
|
```
import requests
import time
from requests.packages import urllib3
#Disable https insecure warnings for verify=False
urllib3.disable_warnings()
with open('1.ts','rb') as fh:
file_data = fh.read()
def chunk_trans():
for i in range(0, 3):
time.sleep(0.1)
yield file_data
req = requests.Request('POST', 'http://192.168.123.151/1.ts', data=chunk_trans(), headers={'Host':'a.b.c.d'})
prep = req.prepare()
s = requests.Session()
s.send(prep, timeout=2, verify=False, allow_redirects=False)
```
On Server, I am seeing two "Host" headers are being sent. is that expected or I am not doing it correctly?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5275/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5275/timeline
| null |
completed
| null | null | false |
[
"can anyone look into this please and help?",
"Closing as duplicate of #5274."
] |
https://api.github.com/repos/psf/requests/issues/5274
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5274/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5274/comments
|
https://api.github.com/repos/psf/requests/issues/5274/events
|
https://github.com/psf/requests/issues/5274
| 528,431,790 |
MDU6SXNzdWU1Mjg0MzE3OTA=
| 5,274 |
Two Host header are being sent when doing chunk transfer with Session
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29891327?v=4",
"events_url": "https://api.github.com/users/contactparthshah/events{/privacy}",
"followers_url": "https://api.github.com/users/contactparthshah/followers",
"following_url": "https://api.github.com/users/contactparthshah/following{/other_user}",
"gists_url": "https://api.github.com/users/contactparthshah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/contactparthshah",
"id": 29891327,
"login": "contactparthshah",
"node_id": "MDQ6VXNlcjI5ODkxMzI3",
"organizations_url": "https://api.github.com/users/contactparthshah/orgs",
"received_events_url": "https://api.github.com/users/contactparthshah/received_events",
"repos_url": "https://api.github.com/users/contactparthshah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/contactparthshah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/contactparthshah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/contactparthshah",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-26T01:27:43Z
|
2022-02-27T16:00:27Z
|
2021-11-29T15:58:32Z
|
NONE
|
resolved
|
Two Host header are being sent when doing chunk transfer with Session
---------------
>>> import requests
>>> requests.__version__
'2.22.0'
```
import requests
import time
from requests.packages import urllib3
#Disable https insecure warnings for verify=False
urllib3.disable_warnings()
with open('1.ts','rb') as fh:
file_data = fh.read()
def chunk_trans():
for i in range(0, 3):
time.sleep(0.1)
yield file_data
req = requests.Request('POST', 'http://192.168.123.151/1.ts', data=chunk_trans(), headers={'Host':'a.b.c.d'})
prep = req.prepare()
s = requests.Session()
s.send(prep, timeout=2, verify=False, allow_redirects=False)
```
Actual Output: Two host headers are seen on server side.
```
Host: 192.168.123.151
Host: a.b.c.d
Transfer-Encoding: chunked
```
-------------
only "a.b.c.d" host header should come.
|
{
"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/5274/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5274/timeline
| null |
completed
| null | null | false |
[
"can anyone look into this and help?",
"I see that there is a PR for this (and has been for a while) but it is not yet merged.\r\n\r\nI am also having this issue. I can apply the patch on my own fork, but is there any reason this hasn't been merged? Just forgotten about maybe?\r\n\r\nI guess it is kind of an edge-case.."
] |
https://api.github.com/repos/psf/requests/issues/5273
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5273/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5273/comments
|
https://api.github.com/repos/psf/requests/issues/5273/events
|
https://github.com/psf/requests/issues/5273
| 525,906,975 |
MDU6SXNzdWU1MjU5MDY5NzU=
| 5,273 |
Sending chunked data with proxy fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1154133?v=4",
"events_url": "https://api.github.com/users/splashx/events{/privacy}",
"followers_url": "https://api.github.com/users/splashx/followers",
"following_url": "https://api.github.com/users/splashx/following{/other_user}",
"gists_url": "https://api.github.com/users/splashx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/splashx",
"id": 1154133,
"login": "splashx",
"node_id": "MDQ6VXNlcjExNTQxMzM=",
"organizations_url": "https://api.github.com/users/splashx/orgs",
"received_events_url": "https://api.github.com/users/splashx/received_events",
"repos_url": "https://api.github.com/users/splashx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/splashx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/splashx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/splashx",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-11-20T16:13:16Z
|
2021-09-03T00:10:50Z
|
2019-11-20T16:55:37Z
|
NONE
|
resolved
|
> Disclaimer: this has been seen while using `python-glanceclient`.
When sending chunked data using `requests` and proxy settings, it fails.
This should have been fixed in #5128 / #3844 but apparently it's not 🤔
This has not been solved in `3.0` - for example, when adding:
```
pip install git+https://github.com/psf/[email protected] pysocks
```
## Expected Result
`requests` should be able to handle the request using chunked data and no `Exception` should be thrown.
## Actual Result
* When using pyOpenSSL
```
requests.exceptions.ConnectionError: ("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",)
```
* When using urllib3 built-in SSL:
```
requests.exceptions.ConnectionError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)
```
## Reproduction Steps
* Create `requests_chunked_proxy.py`
```python
# Run squid
# docker run --name squid -d --restart=always \
# --publish 3128:3128 \
# sameersbn/squid:3.5.27-2
import requests
# in case you want to switch to pyopenssl, comment the lines below
# from urllib3.contrib import pyopenssl
# pyopenssl.extract_from_urllib3()
CHUNKSIZE = 1024 * 64 # 64kB
def _chunk_body(body):
chunk = body
while chunk:
chunk = body.read(CHUNKSIZE)
if not chunk:
break
yield chunk
s = requests.Session()
proxies = {
"http": "http://localhost:3128",
"https": "http://localhost:3128",
}
# test file should be created, any file will do
# e.g.: dd if=/dev/zero of=file.txt count=1024 bs=1024
data = open("file.txt", 'rb')
headers = { 'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'application/octet-stream'}
resp = s.request("PUT","https://jsonplaceholder.typicode.com/posts/1",
headers=headers,
data=_chunk_body(data),
proxies=proxies,
timeout=600)
print(resp.text)
```
On a Mac:
```
pip install requests==2.22.0
unset http_proxy
unset https_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
export | grep -i proxy
dd if=/dev/zero of=file.txt count=1024 bs=1024
docker run --name squid -d --restart=always -p 3128:3128 sameersbn/squid:3.5.27-2
python requests_chunked_proxy.py
```
* Cleanup
```
docker stop squid
docker rm squid
```
## System Information
### `requests==2.x`
```
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "19.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
### `requests==3.0`
```
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "19.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "3.0.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1154133?v=4",
"events_url": "https://api.github.com/users/splashx/events{/privacy}",
"followers_url": "https://api.github.com/users/splashx/followers",
"following_url": "https://api.github.com/users/splashx/following{/other_user}",
"gists_url": "https://api.github.com/users/splashx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/splashx",
"id": 1154133,
"login": "splashx",
"node_id": "MDQ6VXNlcjExNTQxMzM=",
"organizations_url": "https://api.github.com/users/splashx/orgs",
"received_events_url": "https://api.github.com/users/splashx/received_events",
"repos_url": "https://api.github.com/users/splashx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/splashx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/splashx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/splashx",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5273/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5273/timeline
| null |
completed
| null | null | false |
[
"I'm closing this as I'm unable to replicate on `master` branch:\r\n\r\n```\r\npip install --upgrade --force-reinstall git+https://github.com/psf/requests.git@master\r\n```\r\n\r\nor, more specifically:\r\n\r\n```\r\npip install --upgrade --force-reinstall git+https://github.com/psf/requests.git@d2590ee46c0641958b6d4792a206bd5171cb247d\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/5272
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5272/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5272/comments
|
https://api.github.com/repos/psf/requests/issues/5272/events
|
https://github.com/psf/requests/issues/5272
| 525,730,440 |
MDU6SXNzdWU1MjU3MzA0NDA=
| 5,272 |
Requests supports urllib3 v1.25.7 ?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/474255?v=4",
"events_url": "https://api.github.com/users/Rogacz/events{/privacy}",
"followers_url": "https://api.github.com/users/Rogacz/followers",
"following_url": "https://api.github.com/users/Rogacz/following{/other_user}",
"gists_url": "https://api.github.com/users/Rogacz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rogacz",
"id": 474255,
"login": "Rogacz",
"node_id": "MDQ6VXNlcjQ3NDI1NQ==",
"organizations_url": "https://api.github.com/users/Rogacz/orgs",
"received_events_url": "https://api.github.com/users/Rogacz/received_events",
"repos_url": "https://api.github.com/users/Rogacz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rogacz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rogacz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rogacz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-20T11:00:59Z
|
2021-09-03T00:10:50Z
|
2019-11-21T08:04:12Z
|
NONE
|
resolved
|
Hi Guys,
based on [https://2.python-requests.org/en/master/community/updates/#id1](https://2.python-requests.org/en/master/community/updates/#id1) requests should support urllib3 v1.25.2 and greater(?)
The `__init__.py` file doesn't reflect that.
## Expected Result
Support for urllib3 v1.25.7
## Actual Result
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (2.2.1) doesn't match a supported version!
## Reproduction Steps
```python
import requests
```
## System Information
```
python -m requests.help
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
{
"chardet": {
"version": "2.2.1"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.5"
},
"platform": {
"release": "3.10.0-1062.4.3.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "0.13.1"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/474255?v=4",
"events_url": "https://api.github.com/users/Rogacz/events{/privacy}",
"followers_url": "https://api.github.com/users/Rogacz/followers",
"following_url": "https://api.github.com/users/Rogacz/following{/other_user}",
"gists_url": "https://api.github.com/users/Rogacz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rogacz",
"id": 474255,
"login": "Rogacz",
"node_id": "MDQ6VXNlcjQ3NDI1NQ==",
"organizations_url": "https://api.github.com/users/Rogacz/orgs",
"received_events_url": "https://api.github.com/users/Rogacz/received_events",
"repos_url": "https://api.github.com/users/Rogacz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rogacz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rogacz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rogacz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5272/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5272/timeline
| null |
completed
| null | null | false |
[
"It's your chardet version that isn't valid, should be >=3.0.2.\r\n\r\nFix with `$ python -m pip install chardet>=3.0.2`",
"Thanks, pip list was showing chardet as 3.0.4 so that's why I thought it's fine. I did force reinstall it and now there is no error."
] |
https://api.github.com/repos/psf/requests/issues/5271
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5271/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5271/comments
|
https://api.github.com/repos/psf/requests/issues/5271/events
|
https://github.com/psf/requests/issues/5271
| 525,679,323 |
MDU6SXNzdWU1MjU2NzkzMjM=
| 5,271 |
what is the type of data ? json or dict
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/35610039?v=4",
"events_url": "https://api.github.com/users/mmdaz/events{/privacy}",
"followers_url": "https://api.github.com/users/mmdaz/followers",
"following_url": "https://api.github.com/users/mmdaz/following{/other_user}",
"gists_url": "https://api.github.com/users/mmdaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmdaz",
"id": 35610039,
"login": "mmdaz",
"node_id": "MDQ6VXNlcjM1NjEwMDM5",
"organizations_url": "https://api.github.com/users/mmdaz/orgs",
"received_events_url": "https://api.github.com/users/mmdaz/received_events",
"repos_url": "https://api.github.com/users/mmdaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmdaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmdaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmdaz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2019-11-20T09:28:48Z
|
2021-08-28T00:06:09Z
|
2019-11-23T03:00:42Z
|
NONE
|
resolved
|
Hey!
I am using this library and when I wanted to use ``` request.post() ``` method I was taking data parameter as a dictionary to it and I got some errors, so I read the documentation of this method that says ``` :param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`. ```
I change my dictionary to a json string and it was ok!
why this method doesn't accept a dictionary data type?
|
{
"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/5271/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5271/timeline
| null |
completed
| null | null | false |
[
"Requests does support dicts . My guess is the application your trying to post to requires JSON and you need to specify the correct Content-Type header. ",
"> Hey!\r\n> I am using this library and when I wanted to use `request.post()` method I was taking data parameter as a dictionary to it and I got some errors, so I read the documentation of this method that says `` :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`. ``\r\n> I change my dictionary to a json string and it was ok!\r\n> why this method doesn't accept a dictionary data type?\r\n\r\nIt does, but giving `data` a dict [is for form-encoded data](https://requests.readthedocs.io/en/master/user/quickstart/#more-complicated-post-requests). This should probably be clarified in the API doc though.\r\n\r\nAs you can see from the third paragraph of the link above, if you want to send JSON data as the request entity-body, you can either encoded it manually or use the `json` keyword argument, which basically does that for you, and furthermore automatically sets the request's content-type to `application/json` (if it's not set explicitly):\r\n\r\n> There are times that you may want to send data that is not form-encoded. If you pass in a string instead of a dict, that data will be posted directly.\r\n> \r\n> For example, the GitHub API v3 accepts JSON-Encoded POST/PATCH data:\r\n> \r\n> ```\r\n> >>> import json\r\n> \r\n> >>> url = 'https://api.github.com/some/endpoint'\r\n> >>> payload = {'some': 'data'}\r\n> \r\n> >>> r = requests.post(url, data=json.dumps(payload))\r\n> ```\r\n> Instead of encoding the dict yourself, you can also pass it directly using the json parameter (added in version 2.4.2) and it will be encoded automatically:\r\n> ```\r\n> >>> url = 'https://api.github.com/some/endpoint'\r\n> >>> payload = {'some': 'data'}\r\n> \r\n> >>> r = requests.post(url, json=payload)\r\n> ```\r\n> Note, the json parameter is ignored if either data or files is passed.\r\n> \r\n> Using the json parameter in the request will change the Content-Type in the header to application/json.\r\n\r\nIt's hard to know for sure as you're not providing the relevant information, but I'm guessing the errors were because the application you were posting to tried to decode the form-encoded entity-body as json and that obviously failed.",
"@xmo-odoo is correct, if you’re attempting to send JSON data, you’ll need to either manually encode it or use the json parameter. The semantics of a dictionary being passed to `data` are that it will be form-encoded.",
"> > Hey!\r\n> > I am using this library and when I wanted to use `request.post()` method I was taking data parameter as a dictionary to it and I got some errors, so I read the documentation of this method that says `` :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`. ``\r\n> > I change my dictionary to a json string and it was ok!\r\n> > why this method doesn't accept a dictionary data type?\r\n> \r\n> It does, but giving `data` a dict [is for form-encoded data](https://requests.readthedocs.io/en/master/user/quickstart/#more-complicated-post-requests). This should probably be clarified in the API doc though.\r\n> \r\n> As you can see from the third paragraph of the link above, if you want to send JSON data as the request entity-body, you can either encoded it manually or use the `json` keyword argument, which basically does that for you, and furthermore automatically sets the request's content-type to `application/json` (if it's not set explicitly):\r\n> \r\n> > There are times that you may want to send data that is not form-encoded. If you pass in a string instead of a dict, that data will be posted directly.\r\n> > For example, the GitHub API v3 accepts JSON-Encoded POST/PATCH data:\r\n> > ```\r\n> > >>> import json\r\n> > \r\n> > >>> url = 'https://api.github.com/some/endpoint'\r\n> > >>> payload = {'some': 'data'}\r\n> > \r\n> > >>> r = requests.post(url, data=json.dumps(payload))\r\n> > ```\r\n> > \r\n> > \r\n> > Instead of encoding the dict yourself, you can also pass it directly using the json parameter (added in version 2.4.2) and it will be encoded automatically:\r\n> > ```\r\n> > >>> url = 'https://api.github.com/some/endpoint'\r\n> > >>> payload = {'some': 'data'}\r\n> > \r\n> > >>> r = requests.post(url, json=payload)\r\n> > ```\r\n> > \r\n> > \r\n> > Note, the json parameter is ignored if either data or files is passed.\r\n> > Using the json parameter in the request will change the Content-Type in the header to application/json.\r\n> \r\n> It's hard to know for sure as you're not providing the relevant information, but I'm guessing the errors were because the application you were posting to tried to decode the form-encoded entity-body as json and that obviously failed.\r\n\r\nI'm sorry for delaying,\r\nyes, I realized what you said, and In my idea, the documentation should be clarified.\r\nThanks",
"I second what @mmdaz says about the documentation needing to be clarified. I just spent a lot of time trying to figure out why I could successfully pass a dict to the `json` parameter, but not to the `data` parameter, and a `json-formatted` structure to the `data` parameter, but not to `json`. Nowhere in the docstring is form-encoded data mentioned.\r\n\r\n<img width=\"657\" alt=\"Screen Shot 2020-11-13 at 22 34 07\" src=\"https://user-images.githubusercontent.com/12277715/99189685-469a7680-275a-11eb-83bd-a6dd33cbcc46.png\">\r\n"
] |
https://api.github.com/repos/psf/requests/issues/5270
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5270/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5270/comments
|
https://api.github.com/repos/psf/requests/issues/5270/events
|
https://github.com/psf/requests/issues/5270
| 525,595,925 |
MDU6SXNzdWU1MjU1OTU5MjU=
| 5,270 |
Using the request library to match the requests_toolbelt library request to upload a file, the second request cannot be passed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22344864?v=4",
"events_url": "https://api.github.com/users/longweiqiang/events{/privacy}",
"followers_url": "https://api.github.com/users/longweiqiang/followers",
"following_url": "https://api.github.com/users/longweiqiang/following{/other_user}",
"gists_url": "https://api.github.com/users/longweiqiang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/longweiqiang",
"id": 22344864,
"login": "longweiqiang",
"node_id": "MDQ6VXNlcjIyMzQ0ODY0",
"organizations_url": "https://api.github.com/users/longweiqiang/orgs",
"received_events_url": "https://api.github.com/users/longweiqiang/received_events",
"repos_url": "https://api.github.com/users/longweiqiang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/longweiqiang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/longweiqiang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/longweiqiang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-11-20T06:07:46Z
|
2021-09-03T00:10:49Z
|
2019-11-23T03:03:22Z
|
NONE
|
resolved
|
# Using the request library to match the requests_toolbelt library request to upload a file, the second request cannot be passed.
```python
from requests_toolbelt import MultipartEncoder
import requests
m = MultipartEncoder(fields={'upload': open('test.txt', 'rb')},
boundary='----WebKitFormBoundarytZTJQrWcjjcJIMVQ')
params = {'path': 'test.txt',
'token': '123456',
'num': 0, 'offset': 0,
'limit': 8}
response = requests.post('http://httpbin.org/post',
params=params,
data=m,
headers={'Content-Type': m.content_type})
# print("1: ", response.text)
# print("2: ", response.request.body)
# print("3: ", response.request.headers)
print(2)
response1 = requests.post('http://httpbin.org/post',
params=params,
data=m,
headers={'Content-Type': m.content_type})
```
- Note:The request for the response1 variable cannot be completed, where test.txt is an empty file
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5270/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5270/timeline
| null |
completed
| null | null | false |
[
"Using the fiddler grab package, you find that after the second request, the body is missing after you enter the requests library",
"First request:\r\n\r\n\r\nSecond request:\r\n\r\n\r\n",
"Hi @longweiqiang, I believe the issue you’re seeing here is that you’re trying to resend a file after you’ve already read to the end. If the toolbelt isn’t automatically doing this, you’ll either need to move the pointer to the beginning of the file or reopen it.",
"> Hi @longweiqiang, I believe the issue you’re seeing here is that you’re trying to resend a file after you’ve already read to the end. If the toolbelt isn’t automatically doing this, you’ll either need to move the pointer to the beginning of the file or reopen it.\r\n\r\nthanks,It's working fine"
] |
https://api.github.com/repos/psf/requests/issues/5269
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5269/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5269/comments
|
https://api.github.com/repos/psf/requests/issues/5269/events
|
https://github.com/psf/requests/issues/5269
| 525,295,434 |
MDU6SXNzdWU1MjUyOTU0MzQ=
| 5,269 |
Requests fail from Docker Container application
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47762713?v=4",
"events_url": "https://api.github.com/users/adrianlzr/events{/privacy}",
"followers_url": "https://api.github.com/users/adrianlzr/followers",
"following_url": "https://api.github.com/users/adrianlzr/following{/other_user}",
"gists_url": "https://api.github.com/users/adrianlzr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adrianlzr",
"id": 47762713,
"login": "adrianlzr",
"node_id": "MDQ6VXNlcjQ3NzYyNzEz",
"organizations_url": "https://api.github.com/users/adrianlzr/orgs",
"received_events_url": "https://api.github.com/users/adrianlzr/received_events",
"repos_url": "https://api.github.com/users/adrianlzr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adrianlzr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adrianlzr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adrianlzr",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-19T22:05:17Z
|
2021-09-03T00:10:49Z
|
2019-11-23T03:05:30Z
|
NONE
|
resolved
|
Using the requests library (v 2.20.0) from within a docker container(any python release for docker containers) of a flask application, requests.get operations fails. This is also applicable for cases where a web framework is not used - just a simple python script.
**Stack trace**:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6a5677c910>: Failed to establish a new connection: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='adrian.localhost', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6a5677c910>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/src/run.py", line 67, in get_user_groups
return core.get_user_groups(orgId, orgName, userId)
File "/app/src/core/__init__.py", line 119, in get_user_groups
groups = session.get("http://adrian.localhost/")
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='adrian.localhost', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6a5677c910>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
Running the same request outised of the docker container works just 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/5269/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5269/timeline
| null |
completed
| null | null | false |
[
"To add to the above, same issue occurs even with urllib3 or without using requests session.\r\n\r\nExample code with urllib3:\r\n\r\nimport urllib3\r\nfrom json import loads\r\n\r\nhttp = urllib3.PoolManager()\r\n\r\nres = http.request(\"GET\",\"http://adrian.localhost/\")\r\n\r\nfinal = loads(res.data)\r\n\r\nprint(final)",
"@adrianlzr the error you’re getting is saying that your container is unable to resolve the url. You’ll need to workout the networking issues before any of these requests will succeed. I’m going to resolve this since it isn’t an issue with Requests. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5268
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5268/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5268/comments
|
https://api.github.com/repos/psf/requests/issues/5268/events
|
https://github.com/psf/requests/issues/5268
| 524,614,821 |
MDU6SXNzdWU1MjQ2MTQ4MjE=
| 5,268 |
Session module taking much longer than expected
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/57504380?v=4",
"events_url": "https://api.github.com/users/unthinkman/events{/privacy}",
"followers_url": "https://api.github.com/users/unthinkman/followers",
"following_url": "https://api.github.com/users/unthinkman/following{/other_user}",
"gists_url": "https://api.github.com/users/unthinkman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/unthinkman",
"id": 57504380,
"login": "unthinkman",
"node_id": "MDQ6VXNlcjU3NTA0Mzgw",
"organizations_url": "https://api.github.com/users/unthinkman/orgs",
"received_events_url": "https://api.github.com/users/unthinkman/received_events",
"repos_url": "https://api.github.com/users/unthinkman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/unthinkman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/unthinkman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/unthinkman",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-11-18T20:56:43Z
|
2021-09-03T00:10:38Z
|
2020-02-01T01:17:26Z
|
NONE
|
resolved
|
Session module is running slower than normal requests.
No errors logged on either side and everything functions properly, but its consistantly 17.5 times slower.
## Expected Result
s.head(addr) returns in under .01 seconds
## Actual Result
s.head(addr) takes around .1 seconds
## Reproduction Steps
```python
import requests
s=requests.Session()
s.head('http://192.168.0.1:8080/')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.9"
},
"platform": {
"release": "12.0-RELEASE-p10",
"system": "FreeBSD"
},
"pyOpenSSL": {
"openssl_version": "1010101f",
"version": "19.0.0"
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010101f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
send: b'HEAD / HTTP/1.1\r\nHost: 192.168.1.76:8080\r\nUser-Agent: python-requests/2.21.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep
-alive\r\n
session_id=303c361737b70c6a6aacb86896a4900091da7555\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html;charset=utf-8
header: Server: CherryPy/18.3.0
header: Date: Mon, 18 Nov 2019 20:51:08 GMT
header: Allow: GET, HEAD, POST, PUT
header: Content-Length: 2
DEBUG:urllib3.connectionpool:http://192.168.1.76:8080 "HEAD / HTTP/1.1" 200 0
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5268/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5268/timeline
| null |
completed
| null | null | false |
[
"Hi @unthinkman,\r\n\r\nWe'd need a lot more information here to see what is going on. If you're looking at [`Requests.head()`](https://github.com/psf/requests/blob/master/requests/api.py#L60-L61) for comparison, it's effectively identical to the code you're using.\r\n\r\nIf you're trying to compare Requests to another library, we're not actively working on improving Requests speed. Its primary focus is ease of use and has extra overhead to provide that.\r\n\r\nI'm going to resolve this for now since there doesn't appear to be anything actionable."
] |
https://api.github.com/repos/psf/requests/issues/5267
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5267/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5267/comments
|
https://api.github.com/repos/psf/requests/issues/5267/events
|
https://github.com/psf/requests/issues/5267
| 524,071,476 |
MDU6SXNzdWU1MjQwNzE0NzY=
| 5,267 |
requests[security] / PyOpenSSL does not make requests more secure but more brittle
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/444071?v=4",
"events_url": "https://api.github.com/users/tiran/events{/privacy}",
"followers_url": "https://api.github.com/users/tiran/followers",
"following_url": "https://api.github.com/users/tiran/following{/other_user}",
"gists_url": "https://api.github.com/users/tiran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tiran",
"id": 444071,
"login": "tiran",
"node_id": "MDQ6VXNlcjQ0NDA3MQ==",
"organizations_url": "https://api.github.com/users/tiran/orgs",
"received_events_url": "https://api.github.com/users/tiran/received_events",
"repos_url": "https://api.github.com/users/tiran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tiran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tiran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tiran",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-11-18T00:06:02Z
|
2021-08-28T00:06:11Z
|
2020-11-10T19:28:45Z
|
CONTRIBUTOR
|
resolved
|
Requests added the ``requests[security]`` dependency many, many years ago because the ssl module in Python's stdlib was lacking some features. Since PEP 466 has been implemented in Python 2.7.9, the ssl module supports hostname verification and SNI. 2.7.9 was released in 2014. Python 3.7.0 improved the situation even further by delegating hostname verification to OpenSSL. The PyOpenSSL compatibility layer in urllib3 uses the deprecated ``ssl.match_hostname`` function or a backport.
Unconditional monkey-patching of urllib3 with ``urllib3.contrib.pyopenssl.inject_into_urllib3`` is causing issues, too.
PyOpenSSL uses dynamic libffi callbacks (also known as cffi old-style callbacks). The callbacks are implemented with trampolines and dynamic creation of native machine code. This either uses executable and writeable memory pages or some hacks with shared mmap() regions. Dynamic callbacks are a security risk and blocked by security frameworks like SELinux for good reasons (deny_execmem). Armin Rigo and I explored various ways to work around these problems, but there is simply solution. Eventually Armin implemented a new callback system for cffi. Some of the issues with old callbacks are documented at https://cffi.readthedocs.io/en/latest/using.html#callbacks-old-style .
PyOpenSSL currently pulls in a versions of cryptography, which itself depends on asn1crypto. A problem with asn1crypto and ctypes causes Python to segfault on recent macOS, https://github.com/pyca/pyopenssl/issues/874 and https://github.com/wbond/asn1crypto/issues/158 .
Due to bugs like https://bugzilla.redhat.com/show_bug.cgi?id=1535689 I convinced the Fedora and RHEL maintainers to patch requests and drop ``inject_into_urllib3`` a while ago. The distros have been running with patch https://src.fedoraproject.org/rpms/python-requests/blob/master/f/Don-t-inject-pyopenssl-into-urllib3.patch for over a year without any reported issues.
I propose to:
1) Remove ``requests[security]`` extra requires.
2) Remove unconditionally monkey-patch of urllib3 from 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": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/5267/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5267/timeline
| null |
completed
| null | null | false |
[
"A data-point to support this direction for requests and urllib3: 91% (7,298,352 / 7,993,356) of Python 2.7.X downloads for urllib3 were on Python 2.7.9+. Taken from the public download data-set for today.",
"The ratio is even larger. Python 2.7.5 on RHEL 7 machines have a backport of PEP 466, too.\r\n\r\n```\r\n$ rpm -qa python\r\npython-2.7.5-88.el7.x86_64\r\n$ python\r\nPython 2.7.5 (default, Sep 26 2019, 13:23:47) \r\n[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import ssl\r\n>>> ssl.SSLContext(ssl.PROTOCOL_SSLv23).check_hostname\r\nFalse\r\n```",
"It looks like this wasn't closed after merging #5443. I think the only outstanding item is `requests[security]`. I'm inclined to leave it for now for whomever is still out there using < Python 2.7.9. Given we will likely be releasing a new minor version this week with urllib3, we can add a deprecation notice on the extra for the next minor release.\r\n\r\nI'll go ahead and resolve this tomorrow unless anyone has more feedback. I think the initial request is now resolved."
] |
https://api.github.com/repos/psf/requests/issues/5266
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5266/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5266/comments
|
https://api.github.com/repos/psf/requests/issues/5266/events
|
https://github.com/psf/requests/issues/5266
| 523,698,765 |
MDU6SXNzdWU1MjM2OTg3NjU=
| 5,266 |
3.python-requests.org documentation says it's for version 2.21.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5297556?v=4",
"events_url": "https://api.github.com/users/nicktimko/events{/privacy}",
"followers_url": "https://api.github.com/users/nicktimko/followers",
"following_url": "https://api.github.com/users/nicktimko/following{/other_user}",
"gists_url": "https://api.github.com/users/nicktimko/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nicktimko",
"id": 5297556,
"login": "nicktimko",
"node_id": "MDQ6VXNlcjUyOTc1NTY=",
"organizations_url": "https://api.github.com/users/nicktimko/orgs",
"received_events_url": "https://api.github.com/users/nicktimko/received_events",
"repos_url": "https://api.github.com/users/nicktimko/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nicktimko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nicktimko/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nicktimko",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-11-15T21:32:50Z
|
2021-09-02T00:07:22Z
|
2020-02-10T05:46:54Z
|
CONTRIBUTOR
|
resolved
|
Documentation at https://3.python-requests.org/ says it's for Release 2.21.0 which is confusing for users. (#5265).

It's not clear to new users that "Requests III" means "the pending 3.x release of Requests" (e.g. other libraries like urllib3 are on a 1.x release).
The version stated at the top should be 3.x.y, not an actual version to which the data doesn't correspond. I don't know what branch the 3.x docs are built from, so I don't know how to fix this.
Alternatively, a banner on all the pages mentioning it's for 3.x, a prerelease (how do you get it?)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5266/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5266/timeline
| null |
completed
| null | null | false |
[
"Also, the download link on this page leads to this Github repo, so it's not clear how you can actually download version 3 or if it's vaporware.",
"Hi @nicktimo,\r\n\r\nWe don't have access to that domain or control of the contents on it. You might be able to reach out to @kennethreitz on how it's being updated.",
"@nateprewitt what is the canonical domain/URL to be used? I'm slightly confused about it, and I often find links on StackOverflow that are broken.",
"Both http://python-requests.org and https://requests.readthedocs.io/en/master/ should point to current documentation."
] |
https://api.github.com/repos/psf/requests/issues/5265
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5265/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5265/comments
|
https://api.github.com/repos/psf/requests/issues/5265/events
|
https://github.com/psf/requests/issues/5265
| 523,344,064 |
MDU6SXNzdWU1MjMzNDQwNjQ=
| 5,265 |
raise_for_status returns None
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3991046?v=4",
"events_url": "https://api.github.com/users/llamafilm/events{/privacy}",
"followers_url": "https://api.github.com/users/llamafilm/followers",
"following_url": "https://api.github.com/users/llamafilm/following{/other_user}",
"gists_url": "https://api.github.com/users/llamafilm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/llamafilm",
"id": 3991046,
"login": "llamafilm",
"node_id": "MDQ6VXNlcjM5OTEwNDY=",
"organizations_url": "https://api.github.com/users/llamafilm/orgs",
"received_events_url": "https://api.github.com/users/llamafilm/received_events",
"repos_url": "https://api.github.com/users/llamafilm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/llamafilm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/llamafilm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/llamafilm",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2019-11-15T09:05:33Z
|
2021-09-03T00:10:51Z
|
2019-11-15T21:47:47Z
|
NONE
|
resolved
|
According to the documentation, `raise_for_status()` should return the response object for a successful response. But I am getting None.
## Expected Result
<Response [200]>
## Actual Result
None
## Reproduction Steps
```
$ python3
>>> import requests
>>> r = requests.get('http://google.com')
>>> r.raise_for_status()
>>> type(r.raise_for_status())
<class 'NoneType'>
>>> r.status_code
200
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "19.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3991046?v=4",
"events_url": "https://api.github.com/users/llamafilm/events{/privacy}",
"followers_url": "https://api.github.com/users/llamafilm/followers",
"following_url": "https://api.github.com/users/llamafilm/following{/other_user}",
"gists_url": "https://api.github.com/users/llamafilm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/llamafilm",
"id": 3991046,
"login": "llamafilm",
"node_id": "MDQ6VXNlcjM5OTEwNDY=",
"organizations_url": "https://api.github.com/users/llamafilm/orgs",
"received_events_url": "https://api.github.com/users/llamafilm/received_events",
"repos_url": "https://api.github.com/users/llamafilm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/llamafilm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/llamafilm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/llamafilm",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5265/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5265/timeline
| null |
completed
| null | null | false |
[
"The docs seem to say:\r\n> **raise_for_status()**\r\n> Raises stored HTTPError, if one occurred.\r\n>\r\n> - https://requests.kennethreitz.org/en/master/api/#requests.Response.raise_for_status\r\n> - https://github.com/psf/requests/blob/d2590ee46c06/requests/models.py#L938-L939\r\n\r\nOther mention below, which explicitly shows it returning `None`.\r\n\r\n> ## Response Status Codes\r\n> ...\r\n>\r\n>If we made a bad request (a 4XX client error or 5XX server error response), we can raise it with `Response.raise_for_status()`:\r\n>\r\n> >>> bad_r = requests.get('https://httpbin.org/status/404')\r\n> >>> bad_r.status_code\r\n> 404\r\n>\r\n> >>> bad_r.raise_for_status()\r\n> Traceback (most recent call last):\r\n> File \"requests/models.py\", line 832, in raise_for_status\r\n> raise http_error\r\n> requests.exceptions.HTTPError: 404 Client Error\r\n>\r\n>But, since our `status_code` for `r` was 200, when we call `raise_for_status()` we get:\r\n>\r\n> >>> r.raise_for_status()\r\n> None\r\n>\r\n> All is well.\r\n>\r\n> - https://requests.kennethreitz.org/en/master/user/quickstart/#response-status-codes\r\n> - https://github.com/psf/requests/blob/d2590ee46c06/docs/user/quickstart.rst#response-status-codes\r\n\r\nWhich docs are you referring to?",
"That's interesting. I was reading from here. What's the difference?\r\n\r\nhttps://3.python-requests.org/user/quickstart/#response-content\r\n\r\n> `raise_for_status` returns the response object for a successful response. This eases chaining in trivial cases, where we want bad codes to raise an exception, but use the response otherwise:\r\n> \r\n> ```\r\n> >>> value = requests.get('http://httpbin.org/ip').raise_for_status().json()['origin']\r\n> Response Headers\r\n> ```",
"That is the documentation for Requests 3.x while you have Requests 2.20.1 installed.",
"I'm confused because the page is titled \"Requests 2.21.0 documentation\" and the installation instructions link to this Github repo. So what is Requests 3?",
"Ah, yeah, https://3.python-requests.org/ says 2.21.0. That's a bug in the documentation. I'll create a separate issue. \r\n\r\nThe docs do say \"work in progress\", but the contradictory information is kinda confusing, and \"Requests III\" isn't obviously related to v3.x to someone new. (e.g. urllib3 is on version 1.x)\r\n\r\n\r\n",
"Ok thanks"
] |
https://api.github.com/repos/psf/requests/issues/5264
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5264/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5264/comments
|
https://api.github.com/repos/psf/requests/issues/5264/events
|
https://github.com/psf/requests/issues/5264
| 523,224,062 |
MDU6SXNzdWU1MjMyMjQwNjI=
| 5,264 |
Documentation for trust_env not accessible.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5836555?v=4",
"events_url": "https://api.github.com/users/chrzhang/events{/privacy}",
"followers_url": "https://api.github.com/users/chrzhang/followers",
"following_url": "https://api.github.com/users/chrzhang/following{/other_user}",
"gists_url": "https://api.github.com/users/chrzhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrzhang",
"id": 5836555,
"login": "chrzhang",
"node_id": "MDQ6VXNlcjU4MzY1NTU=",
"organizations_url": "https://api.github.com/users/chrzhang/orgs",
"received_events_url": "https://api.github.com/users/chrzhang/received_events",
"repos_url": "https://api.github.com/users/chrzhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrzhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrzhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrzhang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-15T03:01:27Z
|
2021-09-03T00:10:47Z
|
2019-12-11T04:19:53Z
|
NONE
|
resolved
|
[The link for trust_env documentation](https://2.python-requests.org//en/latest/api/#requests.Session.trust_env) fails to load.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5836555?v=4",
"events_url": "https://api.github.com/users/chrzhang/events{/privacy}",
"followers_url": "https://api.github.com/users/chrzhang/followers",
"following_url": "https://api.github.com/users/chrzhang/following{/other_user}",
"gists_url": "https://api.github.com/users/chrzhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrzhang",
"id": 5836555,
"login": "chrzhang",
"node_id": "MDQ6VXNlcjU4MzY1NTU=",
"organizations_url": "https://api.github.com/users/chrzhang/orgs",
"received_events_url": "https://api.github.com/users/chrzhang/received_events",
"repos_url": "https://api.github.com/users/chrzhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrzhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrzhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrzhang",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5264/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5264/timeline
| null |
completed
| null | null | false |
[
"Duplicate of #5214\r\n\r\n[Here's a working link](https://requests.kennethreitz.org/en/latest/api/#requests.Session.trust_env)",
"The proper / canonical link should be https://requests.readthedocs.io/en/master/api/#requests.Session.trust_env however both indexation and intra-doc linking is currently a mess."
] |
https://api.github.com/repos/psf/requests/issues/5263
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5263/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5263/comments
|
https://api.github.com/repos/psf/requests/issues/5263/events
|
https://github.com/psf/requests/issues/5263
| 522,980,865 |
MDU6SXNzdWU1MjI5ODA4NjU=
| 5,263 |
`connect` timeout is *not* a TCP connect timeout, but a TCP connect + send the whole HTTP request timeout
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1730297?v=4",
"events_url": "https://api.github.com/users/thomas-riccardi/events{/privacy}",
"followers_url": "https://api.github.com/users/thomas-riccardi/followers",
"following_url": "https://api.github.com/users/thomas-riccardi/following{/other_user}",
"gists_url": "https://api.github.com/users/thomas-riccardi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thomas-riccardi",
"id": 1730297,
"login": "thomas-riccardi",
"node_id": "MDQ6VXNlcjE3MzAyOTc=",
"organizations_url": "https://api.github.com/users/thomas-riccardi/orgs",
"received_events_url": "https://api.github.com/users/thomas-riccardi/received_events",
"repos_url": "https://api.github.com/users/thomas-riccardi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thomas-riccardi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thomas-riccardi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thomas-riccardi",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 14 |
2019-11-14T16:49:25Z
|
2021-03-11T10:22:43Z
| null |
NONE
| null |
`connect` timeout is *not* a TCP connect timeout, but a TCP connect + send the whole HTTP request timeout.
## Expected Result
I expect that the documentation is correct about `connect` timeout:
The [advanced documentation](https://requests.readthedocs.io/en/master/user/advanced/#timeouts) says:
> The connect timeout is the number of seconds Requests will wait for your client to establish a connection to a remote machine (corresponding to the connect()) call on the socket. It’s a good practice to set connect timeouts to slightly larger than a multiple of 3, which is the default TCP packet retransmission window.
## Actual Result
The `connect` timeout seems to be the TCP connect timeout + sending the whole HTTP request.
## Reproduction Steps
```bash
dd if=/dev/zero of=zero.100MB bs=100M count=1
```
```python
import requests
files = {'file': open('zero.100MB', 'rb')}
requests.post('somehost', timeout=(1, 1000), files=files)
```
(It needs a host accepting the large POST, I couldn't find any public right now...)
Result:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
self.send(message_body)
File "/usr/lib/python3.5/http/client.py", line 908, in send
self.sock.sendall(data)
File "/usr/lib/python3.5/ssl.py", line 891, in sendall
v = self.send(data[count:])
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
socket.timeout: The write operation timed out
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.8"
},
"platform": {
"release": "4.15.0-64-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
## Analysis
Digging into urllib3:
https://github.com/urllib3/urllib3/blob/37ba61a8b8120cbd866d057eaa3936f4b140dee0/src/urllib3/connectionpool.py#L370-L390
It sets the connect timeout on the connection, then validate https, then sends the full request, and only then sets the read timeout on the connection socket.
That being said I could *not* find any urllib3 doc explicitly defining the `connect` timeout as requests does...
Finally:
https://docs.python.org/3.8/library/socket.html#socket.socket.sendall
> Changed in version 3.5: The socket timeout is no more reset each time data is sent successfully. The socket timeout is now the maximum total duration to send all data.
So maybe it did work as a TCP connect timeout + write idle timeout before python 3.5 (which is still not just TCP connect timeout, but closer to it), but now it is clearly not.
| null |
{
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/5263/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5263/timeline
| null | null | null | null | false |
[
"Have you raised this on urllib3 side? That sounds like an odd behavioural change ",
"I think this is a fair criticism of the documentation @nanonyme given the changes in the standard library in 3.5",
"FWIW https://github.com/python/cpython/commit/8912d1418e6b336c21bbe21c0dd123332bbe5ab5 is the commit where functionality changed",
"The bug reference in commit is completely wrong, original issue is here https://bugs.python.org/issue23853",
"https://mail.python.org/pipermail/python-dev/2015-April/139001.html",
"It seems all in all urllib3 must be refactored not to use sendall if the original behaviour is preferred. Current situation is really bad that urllib3 timeout handling differs depending on Python version. Actually it must be refactored in either case since that is the *only* way to get same behaviour in all target Python implementations.",
"urllib3 2.0 is what is active in master and has dropped support for < 3.5 iirc so this isn't an issue as far as current development is concerned. A fix to the 1.26 branch is probably worthwhile, but wouldn't guarantee fixing this for everyone using requests who may be using a different urllib3 version",
"@nanonyme I have not traced this issue down in `requests` dependencies. I stopped at the first issue: `requests` documentation inconsistent with current behavior, as we initially wrote code based on that part of the documentation, and it didn't work as expected.\r\n\r\nIt's good to know it's due to a breaking change in python 3.5.\r\n\r\nPython 3.5 reached end-of-life in September 2020, python 3.4 before that: I think the \"different behavior depending on python version\" is not really an issue anymore.\r\n\r\nWe worked around this behavior change by stopping everywhere to use a tuple for timeout, effectively having only a total send request timeout, but the previous/documented behavior seemed better to us: more fine-grained control: we want to support low bandwidth cases where the request sending can be slow but legitimate, and still promptly fail if the TCP is really slow to connect (cannot rely on kernel timeouts which are usually pretty large). For now we gave up for the later, with large global timeouts.\r\n\r\nIf you \"fix\" this issue by going back to the previous/documented behavior, it would give us more control back.",
"I'm not really promising to fix anything. I'm just saying that if urllib3 used socket.send instead of socket.sendall (and implemented sendall-like functionality themselves), then they would not be subject to this weird interpretation of timeouts that is in modern socket module implementation. ",
"Remember that Requests are a library for getting HTTP/HTTPS Requests, so the connect time out...is a timeout for your method call...then the read timeout occours...if you are having timeouts on tcp beccause the server response is too slow you ned to keep the VC up so....have you tried to enable TCP Keep-Alive on your host? Is is disabled by default and the trigger timmer is set to high...so it is unreachable... I did some thing like this in order to enable it from the GUI, and the results were great. it have to be done before creating the session...and this is for Linux.... if you have another OS you will need another socker options.\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\n\r\nCheers!",
"If you go that route, I'd advise the adapter in the requests-toolbelt made to make setting those options easier",
"> requests-toolbelt\r\n\r\nYup,but...since it is not updated, will not appy to Windows Clients...caus Windows depreceated the winsck32 library and in order to set the KEEP_ALIVE timers ioctl usage is required.... unless you have a fork for it or an updated lib....\r\n\r\nalso...there is sys.platform response issue when ussing python 2.x ...\r\n",
"Or you could send a PR to the library to fix those issue and help the maintainers get those patches out to windows users",
"ok. I will... I am just a TS, but I can do that,,,"
] |
https://api.github.com/repos/psf/requests/issues/5262
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5262/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5262/comments
|
https://api.github.com/repos/psf/requests/issues/5262/events
|
https://github.com/psf/requests/issues/5262
| 522,629,598 |
MDU6SXNzdWU1MjI2Mjk1OTg=
| 5,262 |
License issue with requests and requests3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17051931?v=4",
"events_url": "https://api.github.com/users/CAM-Gerlach/events{/privacy}",
"followers_url": "https://api.github.com/users/CAM-Gerlach/followers",
"following_url": "https://api.github.com/users/CAM-Gerlach/following{/other_user}",
"gists_url": "https://api.github.com/users/CAM-Gerlach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CAM-Gerlach",
"id": 17051931,
"login": "CAM-Gerlach",
"node_id": "MDQ6VXNlcjE3MDUxOTMx",
"organizations_url": "https://api.github.com/users/CAM-Gerlach/orgs",
"received_events_url": "https://api.github.com/users/CAM-Gerlach/received_events",
"repos_url": "https://api.github.com/users/CAM-Gerlach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CAM-Gerlach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CAM-Gerlach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CAM-Gerlach",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-11-14T05:14:26Z
|
2022-02-26T19:00:19Z
|
2021-11-28T06:04:05Z
|
NONE
|
resolved
|
@kennethreitz @nateprewitt If this gets too long and you'd like to get streight to the point, feel free to skip the sections between `The Situation` to `Okay, but what does this all mean?` noninclusive if you just want the upshot.
**Disclaimer:** IANAL and this is not legal advice. I've worked with copyright lawyers in the past and have dealt with similar issues at length for other large permissive-licensed open-source projects I've been a part of, e.g. Spyder in spyder-ide/spyder#7785 , but I duly recommend you consult with a licensed legal professional (that I assume the PSF retains) on this matter if you are in any doubt about how to move forward.
## The Situation
I would normally bring this sort of thing up over on kennethreitz/requests3 first, but issues are disabled for that repo, so I've opened an issue here as it is of intrinsic consequence to this project as well. It appears the Apache 2.0 license link, terms, text and setup.py tag was [recently removed](https://github.com/kennethreitz/requests3/commit/69eb662703b40db58fdc6c095d0fe130c56649bb) from that repo and instead replaced with CC0, i.e. public domain.
Meanwhile, it is still referred to [several places](https://github.com/kennethreitz/requests3/search?q=apache&unscoped_q=apache) other than the changelog, including the documentation, the ``__version__.py`` and in `:license:` tags in three `__init__.py` subpackage docstrings, all of which state the authors of the particular submodule are @sigmavirus24 and @Lukasa , and state ``see LICENSE for more details`` which is no longer correct as that file refers to an entirely different license from that which the code is actually released under.
## Explanation
Any individual contributor is free to re-release their past and future contributions under a different license (though cannot revoke the old), which presuming license is compatible (as CC0/PD is) are then incorporated into the Apache 2.0 project requests3. Furthermore, a maintainer can change the license under which contributors agree to submit future contributions to the repo, i.e. by adding the new license to the repo root and making clear (e.g. through filename, readme, PR template, etc.) that it is the canonical one.
However, without a CLA in place or written permission from all 500+ contributors, no one individual has the right to unilaterally change the license of existing code that is not their own, nor impose a more permissive license than previously applied to the package as a whole.
For example, ISC and MIT --> Apache is permissible (though a copy of both these licenses still need to be included somewhere conspicuous, preferably along with at least a brief statement of what they apply to, e.g. in the Apache-mandated `NOTICE.txt`) since Apache is an effective superset of the terms of each of these licenses, so the combined derivative work may be licensed under it although the less strict ISC/MIT terms still apply to code as it existed up to the license switch.
## The Issue at Hand
In this case, moving the license of the combined work from Apache --> CC0 is not possible in practice without a from-scratch rewrite of every line of code that was either written by or meaningfully derived from code other than those who decide to relicense their work under the CC0, or separating out all that code into a different module, since all the Apache terms still apply except to code that's only ever been touched by the individual(s) relicensing it, or completely new code written from the point of the relicensing forward.
In particular, in section 4a and 4c of the Apache license applies,
> a. You must give any other recipients of the Work or Derivative Works a copy of this License; and
> c. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works
which is followed by,
> You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
## Okay, but what does this all mean?
This means that `requests3` now beaches the Apache 2.0 license under which this `requests` codebase is licensed, as the latter requires inclusion of a copy of said license in the codebase, and indication that the combined derivative work is still subject to the license's terms. Furthermore, it should be made clear by some method (per the following [section](https://www.apache.org/licenses/LICENSE-2.0#apply)) which files the Apache license applies to, whether by file headers, information in the NOTICE.txt file, or expansion of the existing `:license:` tags in doctrings. Otherwise, downstream distributors (linux distros, Python distributions, packages vendoring requests, etc) will not be able to easily discern what code is covered by which license and have to assume the more restrictive Apache 2.0 terms for all of it, making it effectively be treated as Apache 2.0-only.
Given the lack of an associated issue, PR, documentation or meta-file change, or descriptive commit message, and lack of any clarification in the commit contents itself, it is unclear if by making that commit, @kennethreitz has decided to relicense his past contributions under the CC0 and not just those following it. If that is not the case, then only future contributions are affected, of which there is only one trivial one. Ergo, the entire work is still de-facto licensed Apache 2.0 (minus that one contribution) and the change by itself does not have any effect except causing the breach of the Apache 2.0 license. Alternatively, and what I've generally assumed here, the intention was also to relicense his past contributions as well that comprise the present work. This should be clarified somewhere, or it further minimizes any practical effect of this change to the package's license status.
As an addendum, this also means that forward-porting any further requests 2 code, or any code from any other library like httpx, etc. is not possible without that code also being covered by the same license as the original (Apache 2,0 or BSD respectively) and those license terms applying. rather than CC0. Conversely, any CC0-licensed code in requests3 can be used by any other repo, e.g. requests or httpx, without any conditions whatsoever (including no need to attribute the original author or respect any license terms).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 1,
"-1": 1,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/5262/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5262/timeline
| null |
completed
| null | null | false |
[
"@nateprewitt I can't see your reply on here for some reason, only in my email, but the TL;DR of the above is due to what you mention, `requests3` is apparently in serious breach of _this project's_ license and that of all your contributors, due to the issue identified above. Ergo, given I couldn't open an issue over there since issues are disabled, I raised and documented it here.",
"Requests3 hasn't received any updates and is now \"archived\" so we're not interested in pursuing any action. In the rare case that this comes up in the future it will be easy to settle as the full Git history is public anyways.",
"Yup, I noticed that too and didn't pursue this further, so yeah, seems like a moot point now—thanks for following up and closing this @sethmlarson . Seems like the intent may have been to release the primary author's own contributions to the public domain. And just in case it gets forked/actively developed again, if any misunderstandings persist they can always be cleared up then."
] |
https://api.github.com/repos/psf/requests/issues/5261
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5261/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5261/comments
|
https://api.github.com/repos/psf/requests/issues/5261/events
|
https://github.com/psf/requests/pull/5261
| 522,350,952 |
MDExOlB1bGxSZXF1ZXN0MzQwNTY4MDA5
| 5,261 |
Doctest Updated
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13817417?v=4",
"events_url": "https://api.github.com/users/SKAUL05/events{/privacy}",
"followers_url": "https://api.github.com/users/SKAUL05/followers",
"following_url": "https://api.github.com/users/SKAUL05/following{/other_user}",
"gists_url": "https://api.github.com/users/SKAUL05/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SKAUL05",
"id": 13817417,
"login": "SKAUL05",
"node_id": "MDQ6VXNlcjEzODE3NDE3",
"organizations_url": "https://api.github.com/users/SKAUL05/orgs",
"received_events_url": "https://api.github.com/users/SKAUL05/received_events",
"repos_url": "https://api.github.com/users/SKAUL05/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SKAUL05/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SKAUL05/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SKAUL05",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-11-13T17:00:02Z
|
2021-08-30T00:06:34Z
|
2019-11-23T02:41:30Z
|
NONE
|
resolved
|
Added Response 404 Doctest
|
{
"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/5261/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5261/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5261.diff",
"html_url": "https://github.com/psf/requests/pull/5261",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5261.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5261"
}
| true |
[
"Hi @SKAUL05, thanks for this PR. Unfortunately, I don’t think we’ll be able to merge this. The doctstring is meant to be a simple example, so we won’t enumerate the potential status codes here."
] |
https://api.github.com/repos/psf/requests/issues/5260
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5260/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5260/comments
|
https://api.github.com/repos/psf/requests/issues/5260/events
|
https://github.com/psf/requests/pull/5260
| 521,747,071 |
MDExOlB1bGxSZXF1ZXN0MzQwMDY2Nzc3
| 5,260 |
Teste
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/42797266?v=4",
"events_url": "https://api.github.com/users/cydlos/events{/privacy}",
"followers_url": "https://api.github.com/users/cydlos/followers",
"following_url": "https://api.github.com/users/cydlos/following{/other_user}",
"gists_url": "https://api.github.com/users/cydlos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cydlos",
"id": 42797266,
"login": "cydlos",
"node_id": "MDQ6VXNlcjQyNzk3MjY2",
"organizations_url": "https://api.github.com/users/cydlos/orgs",
"received_events_url": "https://api.github.com/users/cydlos/received_events",
"repos_url": "https://api.github.com/users/cydlos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cydlos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cydlos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cydlos",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-11-12T19:12:06Z
|
2021-08-30T00:06:33Z
|
2019-11-23T02:41:41Z
|
NONE
|
resolved
|
Testando pull request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5260/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5260/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5260.diff",
"html_url": "https://github.com/psf/requests/pull/5260",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5260.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5260"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5259
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5259/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5259/comments
|
https://api.github.com/repos/psf/requests/issues/5259/events
|
https://github.com/psf/requests/pull/5259
| 521,648,645 |
MDExOlB1bGxSZXF1ZXN0MzM5OTg5NTIy
| 5,259 |
docs - clarify json() error exception for Python 3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5124946?v=4",
"events_url": "https://api.github.com/users/wesinator/events{/privacy}",
"followers_url": "https://api.github.com/users/wesinator/followers",
"following_url": "https://api.github.com/users/wesinator/following{/other_user}",
"gists_url": "https://api.github.com/users/wesinator/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wesinator",
"id": 5124946,
"login": "wesinator",
"node_id": "MDQ6VXNlcjUxMjQ5NDY=",
"organizations_url": "https://api.github.com/users/wesinator/orgs",
"received_events_url": "https://api.github.com/users/wesinator/received_events",
"repos_url": "https://api.github.com/users/wesinator/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wesinator/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wesinator/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wesinator",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-11-12T16:13:47Z
|
2021-08-30T00:06:32Z
|
2019-11-23T02:47:42Z
|
NONE
|
resolved
|
python 3 exception is `JSONDecodeError: Expecting value: line 1 column 1 (char 0)`
https://github.com/psf/requests/issues/4908
|
{
"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/5259/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5259/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5259.diff",
"html_url": "https://github.com/psf/requests/pull/5259",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5259.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5259"
}
| true |
[
"This should absolutely not be merged.",
"> This should absolutely not be merged.\r\n\r\nwhy ? ",
"Hi @wesinator, I think we’ll pass on this one. If you take a look at Python 3, you’ll find that JSONDecodeError to be a ValueError. Including the simplejson stack trace doesn’t provide information specific to Requests, just general stacktrace handling.",
"> \r\n> \r\n> Hi @wesinator, I think we’ll pass on this one. If you take a look at Python 3, you’ll find that JSONDecodeError to be a ValueError. Including the simplejson stack trace doesn’t provide information specific to Requests, just general stacktrace handling.\r\n\r\nok, fair. I know it's general stacktrace\r\n\r\nthanks,"
] |
https://api.github.com/repos/psf/requests/issues/5258
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5258/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5258/comments
|
https://api.github.com/repos/psf/requests/issues/5258/events
|
https://github.com/psf/requests/issues/5258
| 520,055,151 |
MDU6SXNzdWU1MjAwNTUxNTE=
| 5,258 |
Issue with Latin Characters in URL
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7874711?v=4",
"events_url": "https://api.github.com/users/daltonch/events{/privacy}",
"followers_url": "https://api.github.com/users/daltonch/followers",
"following_url": "https://api.github.com/users/daltonch/following{/other_user}",
"gists_url": "https://api.github.com/users/daltonch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daltonch",
"id": 7874711,
"login": "daltonch",
"node_id": "MDQ6VXNlcjc4NzQ3MTE=",
"organizations_url": "https://api.github.com/users/daltonch/orgs",
"received_events_url": "https://api.github.com/users/daltonch/received_events",
"repos_url": "https://api.github.com/users/daltonch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daltonch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daltonch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daltonch",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2019-11-08T14:48:07Z
|
2020-08-06T12:18:08Z
| null |
NONE
| null |
Getting UTF-8 when attempting to get a URL with Latin characters in the URL.
## Expected Result
<Response [200]>
## Actual Result
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 668, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 668, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 247, in resolve_redirects
**adapter_kwargs
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 681, in send
r._next = next(self.resolve_redirects(r, request, yield_requests=True, **kwargs))
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 149, in resolve_redirects
url = self.get_redirect_target(resp)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 115, in get_redirect_target
return to_native_string(location, 'utf8')
File "/usr/local/lib/python3.7/site-packages/requests/_internal_utils.py", line 25, in to_native_string
out = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 64: invalid continuation byte
## Reproduction Steps
```python
import requests
requests.get("http://www.janes.com/article/92450/south-korea-launches-philippine-navy-s-second-josé-rizal-class-frigate?from_rss=1")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "19.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000212f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5258/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5258/timeline
| null | null | null | null | false |
[
"**NB: Encoding of `é`: in utf-8, it is `\\xC3\\xA9`, in latin1, it is `\\xE9`**\r\n\r\nHere's what I found:\r\n\r\n## Opening with Firefox\r\nWhen I open with firefox, \r\n1. `http://www.janes.com/article/92450/south-korea-launches-philippine-navy-s-second-jos%C3%A9-rizal-class-frigate?from_rss=1` got 302 redirected to https url `http://www.janes.com/article/92450/south-korea-launches-philippine-navy-s-second-jos%C3%A9-rizal-class-frigate?from_rss=1`.\r\n\r\n2. UTF-8 encoding of diacritics `é` `https://www.janes.com/article/92450/south-korea-launches-philippine-navy-s-second-jos%C3%A9-rizal-class-frigate?from_rss=1` got 301 redirected with the following response headers:\r\n```\r\nHTTP/1.1 301 Moved Permanently\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nContent-Type: text/html;charset=UTF-8\r\nLocation: /article/92450/south-korea-launches-philippine-navy-s-second-josé-rizal-class-frigate?from_rss=1\r\nServer: Microsoft-IIS/7.5\r\nX-Powered-By: ASP.NET\r\nGsWebServer2: V-VWC2PPTSWB03\r\nDate: Tue, 12 Nov 2019 08:28:03 GMT\r\nContent-Length: 0\r\n```\r\n I don't know what encoding is being used in the firefox showing the HTTP headers. But:\r\n\r\n3. Firefox retries with `https://www.janes.com/article/92450/south-korea-launches-philippine-navy-s-second-jos%E9-rizal-class-frigate?from_rss=1`` and get a 200.\r\n\r\n## The source of the error (encoding mismatch)\r\nIn `requests`, we [encode the redirect url to `latin1`](https://github.com/psf/requests/commit/722b1dae96b0523dde5e01351dd743f102090f53) but later [decode it as `utf8`](https://github.com/psf/requests/commit/722b1dae96b0523dde5e01351dd743f102090f53). (i.e., `b'jos\\xe9a'.decode('utf-8')` will raise error in python.\r\n\r\n## Attempt to solve\r\nLooking at the `get_redirect_target` code\r\n``` python\r\n def get_redirect_target(self, resp):\r\n \"\"\"Receives a Response. Returns a redirect URI or ``None``\"\"\"\r\n # Due to the nature of how requests processes redirects this method will\r\n # ......\r\n if resp.is_redirect:\r\n location = resp.headers['location']\r\n # Currently the underlying http module on py3 decode headers\r\n # in latin1, but empirical evidence suggests that latin1 is very\r\n # rarely used with non-ASCII characters in HTTP headers.\r\n # It is more likely to get UTF8 header rather than latin1.\r\n # This causes incorrect handling of UTF8 encoded location headers.\r\n # To solve this, we re-encode the location in latin1.\r\n if is_py3:\r\n location = location.encode('latin1')\r\n return to_native_string(location, 'utf8')\r\n return None\r\n```\r\nLooks like I can fix it by changing it to \r\n``` python\r\n def get_redirect_target(self, resp):\r\n if resp.is_redirect:\r\n location = resp.headers['location']\r\n if is_py3:\r\n location = location.encode('latin1')\r\n return to_native_string(location, 'latin1')\r\n return to_native_string(location, 'utf8')\r\n return None\r\n```\r\nAnd yes, the previous error is gone, but I will get `requests.exceptions.TooManyRedirects: Exceeded 30 redirects`, since it misses the step 3 of the firefox smartly send the latin1 encoded url to get the 200. It might be solved if I can somehow passed the encoded location instead of passing the native string, but turns out that the rest of the function (`resolve_redirects`) depends on the fact that the url is native string.\r\n\r\n## Conclusion\r\nI don't know whether the problem is with the behavior of the website (not complying to RFC, but firefox nevertheless works on it). My speculation is that probably firefox will just reattempt with different encoding (first will try utf8, then try with latin1). And thus probably this website is one of the \"rarely\" website that use latin1 instead of utf-8.\r\n``` python\r\n # Currently the underlying http module on py3 decode headers\r\n # in latin1, but empirical evidence suggests that latin1 is very\r\n # rarely used with non-ASCII characters in HTTP headers.\r\n # It is more likely to get UTF8 header rather than latin1.\r\n # This causes incorrect handling of UTF8 encoded location headers.\r\n # To solve this, we re-encode the location in latin1.\r\n if is_py3:\r\n location = location.encode('latin1')\r\n```\r\n\r\nLet me know for any thoughts or suggestion for solution, I will be more than happy to try working on it.",
"This looks like a duplicate of #4372 and #4926 with an open (but old) PR #4933 "
] |
https://api.github.com/repos/psf/requests/issues/5257
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5257/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5257/comments
|
https://api.github.com/repos/psf/requests/issues/5257/events
|
https://github.com/psf/requests/pull/5257
| 519,861,422 |
MDExOlB1bGxSZXF1ZXN0MzM4NTUxNTU1
| 5,257 |
Safely handle, when uri contains IPv6 link local with %zone index
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1691611?v=4",
"events_url": "https://api.github.com/users/jjlogu/events{/privacy}",
"followers_url": "https://api.github.com/users/jjlogu/followers",
"following_url": "https://api.github.com/users/jjlogu/following{/other_user}",
"gists_url": "https://api.github.com/users/jjlogu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jjlogu",
"id": 1691611,
"login": "jjlogu",
"node_id": "MDQ6VXNlcjE2OTE2MTE=",
"organizations_url": "https://api.github.com/users/jjlogu/orgs",
"received_events_url": "https://api.github.com/users/jjlogu/received_events",
"repos_url": "https://api.github.com/users/jjlogu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jjlogu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jjlogu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jjlogu",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-11-08T07:40:46Z
|
2022-01-03T15:27:48Z
| null |
NONE
| null |
## Issue:
When URI contains IPv6 link local with zone index (Ex: fe80::726f:8a26:222a:2bf3%eth0), requote_uri encodes all % to %25. Because of it, requests.get was requesting different resource.
Screenshot:

I'm proposing to ignore domain part in utils.unquote_unreserved.
## Actual Result
<pre>
>>> requests.utils.requote_uri('http://[fe80::726f:8a26:222a:2bf3%eth0]:8080/a%20b/index.html')
'http://[fe80::726f:8a26:222a:2bf3%25eth0]:8080/a%2520b/index.html'
</pre>
## Expected Result
<pre>
>>> requests.utils.requote_uri('http://[fe80::726f:8a26:222a:2bf3%eth0]:8080/a%20b/index.html')
'http://[fe80::726f:8a26:222a:2bf3%eth0]:8080/a%20b/index.html'
</pre>
## System Information
<pre>
# python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.71-UNRELEASED-v4-00050-g76f27ecf9a52",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "18.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
}
</pre>
| 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/5257/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5257/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5257.diff",
"html_url": "https://github.com/psf/requests/pull/5257",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5257.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5257"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5256
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5256/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5256/comments
|
https://api.github.com/repos/psf/requests/issues/5256/events
|
https://github.com/psf/requests/issues/5256
| 519,143,834 |
MDU6SXNzdWU1MTkxNDM4MzQ=
| 5,256 |
[FEATURE REQUEST] Fire and forget
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/54025656?v=4",
"events_url": "https://api.github.com/users/PMLP-novo/events{/privacy}",
"followers_url": "https://api.github.com/users/PMLP-novo/followers",
"following_url": "https://api.github.com/users/PMLP-novo/following{/other_user}",
"gists_url": "https://api.github.com/users/PMLP-novo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PMLP-novo",
"id": 54025656,
"login": "PMLP-novo",
"node_id": "MDQ6VXNlcjU0MDI1NjU2",
"organizations_url": "https://api.github.com/users/PMLP-novo/orgs",
"received_events_url": "https://api.github.com/users/PMLP-novo/received_events",
"repos_url": "https://api.github.com/users/PMLP-novo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PMLP-novo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PMLP-novo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PMLP-novo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-07T09:28:16Z
|
2021-09-03T00:10:49Z
|
2019-11-23T03:16:33Z
|
NONE
|
resolved
|
In my project i need to perform fire and forget for REST-API post and patch calls.
My current solution is:
```
try:
requests.post(my_uri, params=data
timeout=1e-4)
except requests.exceptions.Timeout:
pass
```
I think a nicer solution could be:
`requests.fire_and_forget(my_uri, method='post', params=data)`
Where method default argument is `'post'`
This feature is requested by other users see this reddit thread
> https://www.reddit.com/r/learnpython/comments/8ljftm/fire_and_forget_http_request/
My current solution is not perfect since the size of the timeout is relevant. If I set it to 1e-8 and include data it will break before I have sent the data.
|
{
"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/5256/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5256/timeline
| null |
completed
| null | null | false |
[
"You can't actually \"forget\" about the connection because you'll need to hold it open, and possibly even wait for TLS negotiation (which requires a few RTT's). Run the connection in a thread, or use async libraries like [aiohttp](https://aiohttp.readthedocs.io/en/stable/client_quickstart.html#make-a-request) or Requests 3 and wrap it in a task (`asyncio.create_task`)",
"Hi @PMLP-novo, the Requests API is frozen right now, so we won’t be adding any new functions at the moment. Thanks for the suggestion!"
] |
https://api.github.com/repos/psf/requests/issues/5255
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5255/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5255/comments
|
https://api.github.com/repos/psf/requests/issues/5255/events
|
https://github.com/psf/requests/issues/5255
| 517,568,621 |
MDU6SXNzdWU1MTc1Njg2MjE=
| 5,255 |
Allow authentication methods to set client certficates
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1281144?v=4",
"events_url": "https://api.github.com/users/aragilar/events{/privacy}",
"followers_url": "https://api.github.com/users/aragilar/followers",
"following_url": "https://api.github.com/users/aragilar/following{/other_user}",
"gists_url": "https://api.github.com/users/aragilar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aragilar",
"id": 1281144,
"login": "aragilar",
"node_id": "MDQ6VXNlcjEyODExNDQ=",
"organizations_url": "https://api.github.com/users/aragilar/orgs",
"received_events_url": "https://api.github.com/users/aragilar/received_events",
"repos_url": "https://api.github.com/users/aragilar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aragilar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aragilar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aragilar",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-11-05T06:16:50Z
|
2019-11-05T06:16:50Z
| null |
NONE
| null |
Currently authentication methods can configure all the request options except for the `cert` option (the `verify` option also cannot be specified, but I don't a need for that). Would a PR to allow the setting of `cert` on the request object to be propagated up to send be acceptable?
| 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/5255/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5255/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5254
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5254/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5254/comments
|
https://api.github.com/repos/psf/requests/issues/5254/events
|
https://github.com/psf/requests/issues/5254
| 517,537,388 |
MDU6SXNzdWU1MTc1MzczODg=
| 5,254 |
Docsearch on the left menu bar is not working
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5844587?v=4",
"events_url": "https://api.github.com/users/Mariatta/events{/privacy}",
"followers_url": "https://api.github.com/users/Mariatta/followers",
"following_url": "https://api.github.com/users/Mariatta/following{/other_user}",
"gists_url": "https://api.github.com/users/Mariatta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Mariatta",
"id": 5844587,
"login": "Mariatta",
"node_id": "MDQ6VXNlcjU4NDQ1ODc=",
"organizations_url": "https://api.github.com/users/Mariatta/orgs",
"received_events_url": "https://api.github.com/users/Mariatta/received_events",
"repos_url": "https://api.github.com/users/Mariatta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Mariatta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Mariatta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Mariatta",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-05T04:08:16Z
|
2021-11-05T03:00:26Z
|
2021-08-07T02:46:30Z
|
NONE
|
resolved
|
Enter any text into the search bar on the left where it says "Search the doc" (see screenshot)
Press enter

## Expected Result
I expected to see some search results.
## Actual Result
It sends me to another url like https://2.python-requests.org/en/master/...
I think that search is hosted by community.algolia.com, and the url probably should be updated from that website.
Using the sphinx quick search works, but since that search box appears first on the top, that was the one I tried first.
It would be great to have it fixed. Thanks.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 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/5254/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5254/timeline
| null |
completed
| null | null | false |
[
"Forgot to attach screenshot. It's been added.",
"This was fixed last year but this wasn't resolved."
] |
https://api.github.com/repos/psf/requests/issues/5253
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5253/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5253/comments
|
https://api.github.com/repos/psf/requests/issues/5253/events
|
https://github.com/psf/requests/pull/5253
| 517,197,071 |
MDExOlB1bGxSZXF1ZXN0MzM2MzEzMjU0
| 5,253 |
Make ✨ 🍰 ✨ requests act like jQuery when passing nested objects to data/payload
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9326700?v=4",
"events_url": "https://api.github.com/users/Ousret/events{/privacy}",
"followers_url": "https://api.github.com/users/Ousret/followers",
"following_url": "https://api.github.com/users/Ousret/following{/other_user}",
"gists_url": "https://api.github.com/users/Ousret/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Ousret",
"id": 9326700,
"login": "Ousret",
"node_id": "MDQ6VXNlcjkzMjY3MDA=",
"organizations_url": "https://api.github.com/users/Ousret/orgs",
"received_events_url": "https://api.github.com/users/Ousret/received_events",
"repos_url": "https://api.github.com/users/Ousret/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Ousret/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ousret/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Ousret",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 14 |
2019-11-04T14:41:46Z
|
2021-08-29T00:07:03Z
|
2020-02-24T22:21:10Z
|
CONTRIBUTOR
|
resolved
|
Requests does not support dict with depth greater than 1 on parameter data for a x-www-form-urlencoded based request.
What I'm proposing here is to remove depth from a dict while keeping actual sent data untouched.
## Expected Result
```python
print(response.request.body)
# auth_user=test&auth_pwd=test&json_data%5Boperation%5D=core%2Fget&json_data%5Bclass%5D=ServiceChange&json_data%5Bkey%5D=SELECT+ServiceChange+WHERE+id%3D429&json_data%5Boutput_fields%5D=request_state&json_data%5Bh%5D%5Bt%5D=1
```
PHP/jQuery $.params support this syntax out of the box. As requests is not about supporting the way PHP/jQuery $.params work internally, this PR maybe doomed.
## Actual Result
What happened instead.
```python
print(response.request.body)
# auth_user=test&auth_pwd=test&json_data=operation&json_data=class&json_data=key&json_data=output_fields&json_data=h
```
Remote server only see json_data = h and that is actually wrong.
## Reproduction Steps
```python
from requests import post
from pprint import pprint
if __name__ == '__main__':
response = post(
'https://api.ipify.org?format=json',
{
'auth_user': 'test',
'auth_pwd': 'test',
'json_data': {
'operation': 'core/get',
'class': 'ServiceChange',
'key': 'SELECT ServiceChange WHERE id=429',
'output_fields': 'request_state',
'h': {
't': 1
}
}
}
)
pprint(
response.request.body
)
```
|
{
"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/5253/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5253/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5253.diff",
"html_url": "https://github.com/psf/requests/pull/5253",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5253.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5253"
}
| true |
[
"```python\r\nfrom requests.models import RequestEncodingMixin\r\n\r\nmy_dict_ = {\r\n 'json_data': {\r\n 'operation': 'get',\r\n 'class': 'ServiceChange',\r\n 'key': 'SELECT ServiceChange',\r\n 'output_fields': 'request_state',\r\n 'h': {\r\n 't': 1\r\n }\r\n },\r\n 'auth': 'blabla',\r\n}\r\n\r\n\r\nif __name__ == '__main__':\r\n\r\n print(\r\n RequestEncodingMixin._encode_params(my_dict_)\r\n )\r\n\r\n # Without change\r\n # urlencoded; json_data=operation&json_data=class&json_data=key&json_data=output_fields&json_data=h&auth=blabla\r\n\r\n # With change\r\n # urlencoded; auth=blabla&json_data%5Boperation%5D=get&json_data%5Bclass%5D=ServiceChange&json_data%5Bkey%5D=SELECT+ServiceChange&json_data%5Boutput_fields%5D=request_state&json_data%5Bh%5D%5Bt%5D=1\r\n # urldecoded; auth=blabla&json_data[operation]=get&json_data[class]=ServiceChange&json_data[key]=SELECT ServiceChange&json_data[output_fields]=request_state&json_data[h][t]=1\r\n```",
"Not sure if `to_key_val_list` should call `to_flat_dict`. ",
"Will most certainly need modifications but the idea is here. Waiting for review. Will rebase/squash commit later. ",
"Be to clear, there is no spec on uri that mention arrays. RFC3986 does not speak of it.\r\n\r\n[Is array syntax using square brackets in URL query strings valid?](https://stackoverflow.com/questions/11490326/is-array-syntax-using-square-brackets-in-url-query-strings-valid)\r\n[What RFC defines arrays transmitted over HTTP?](https://stackoverflow.com/questions/15854017/what-rfc-defines-arrays-transmitted-over-http)\r\n\r\n",
"More info about this, jQuery seems to use this array-like syntax on uri. https://api.jquery.com/jQuery.param/\r\n\r\n```javascript\r\n// >=1.4:\r\n$.param({ a: { b: 1, c: 2 }, d: [ 3, 4, { e: 5 } ] });\r\n// \"a[b]=1&a[c]=2&d[]=3&d[]=4&d[2][e]=5\"\r\n```\r\n\r\nAlso, this ? `&d[]=3&d[]=4`, Passing list to uri param.",
"As a non-reviewer: This seems like something application specific, not a feature-set that would live within the HTTP client.",
"Agreed. But something should happen when passing nested dict. This behavior is wrong. We loss data between passing and sending. At least raise a warning or whatnot. \r\nMaybe the good way is to propose the same as https://github.com/vuejs/vue-router/issues/1259\r\nAnd ship request with a jquery like uri string generator.\r\n\r\nAnd for the record, this impl does not interfere with previous simple usages. ",
"This PR is now ready for review.\r\n\r\nFor summary :\r\n\r\n```py\r\nr = requests.get(httpbin('get'), params={'test': ['foo', 'baz']})\r\n# will no longer output\r\n# old render : get?test=foo&test=baz\r\n# new render : get?test[]=foo&test[]=baz\r\n```\r\n\r\nWith this we embrace the way jQuery encode nested objects/arrays.\r\n\r\nWhy should we merge ?\r\n\r\n - [x] `requests` is on a higher level than urllib, this does not make sense in `urllib`, but can in `requests`\r\n - [x] PHP and Ruby on Rails support this syntax out of the box, and is used by more than 30 % of the remote backends.\r\n - [x] This PR would make it more beginner friendly, advanced users that are looking for `test=foo&test=baz` are more likely to encode their payload manually. Not the other way around.\r\n - [x] This change does not break or change actual behavior expect for the multivalued param case which is a very rare case in my opinion. \r\n\r\n@nateprewitt ",
"Related issues : \r\n\r\n - #1641\r\n - #3902\r\n - #864\r\n",
"<p align=\"center\">\r\n<img src=\"https://user-images.githubusercontent.com/9326700/73437904-756f6980-434d-11ea-9d07-8dfc435d9799.gif\" alt=\"Well, I don't think pfs/request is looking to change. I tried at least. Byebye :)\"/>\r\n</p>\r\n",
"@Ousret My thoughts on this PR haven't changed, this seems like application-specific behavior, not a feature that would be a part of the HTTP client library.",
"Thank you for the answer.",
"This is also handled by an external library: https://toolbelt.readthedocs.io/en/latest/formdata.html",
"Closing per above comment, please use toolbelt for this functionality. "
] |
https://api.github.com/repos/psf/requests/issues/5252
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5252/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5252/comments
|
https://api.github.com/repos/psf/requests/issues/5252/events
|
https://github.com/psf/requests/pull/5252
| 517,062,831 |
MDExOlB1bGxSZXF1ZXN0MzM2MjA0MzAx
| 5,252 |
RFC8288 support for link relations
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11753054?v=4",
"events_url": "https://api.github.com/users/dirkjonker/events{/privacy}",
"followers_url": "https://api.github.com/users/dirkjonker/followers",
"following_url": "https://api.github.com/users/dirkjonker/following{/other_user}",
"gists_url": "https://api.github.com/users/dirkjonker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dirkjonker",
"id": 11753054,
"login": "dirkjonker",
"node_id": "MDQ6VXNlcjExNzUzMDU0",
"organizations_url": "https://api.github.com/users/dirkjonker/orgs",
"received_events_url": "https://api.github.com/users/dirkjonker/received_events",
"repos_url": "https://api.github.com/users/dirkjonker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dirkjonker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dirkjonker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dirkjonker",
"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"
}
| 1 |
2019-11-04T10:28:57Z
|
2024-05-20T14:36:20Z
|
2024-05-20T14:36:20Z
|
NONE
| null |
Comply to RFC8288 for relation type (section 3.3)
https://tools.ietf.org/html/rfc8288#section-3.3
Changes:
- Only parse first "rel" parameter
- Allow multiple link relation types, i.e.
rel="start http://example.net/relation/other"
|
{
"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/5252/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5252/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5252.diff",
"html_url": "https://github.com/psf/requests/pull/5252",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5252.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5252"
}
| true |
[
"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/5251
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5251/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5251/comments
|
https://api.github.com/repos/psf/requests/issues/5251/events
|
https://github.com/psf/requests/pull/5251
| 515,961,634 |
MDExOlB1bGxSZXF1ZXN0MzM1MzEyMzc4
| 5,251 |
pytest 5
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15092?v=4",
"events_url": "https://api.github.com/users/jayvdb/events{/privacy}",
"followers_url": "https://api.github.com/users/jayvdb/followers",
"following_url": "https://api.github.com/users/jayvdb/following{/other_user}",
"gists_url": "https://api.github.com/users/jayvdb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jayvdb",
"id": 15092,
"login": "jayvdb",
"node_id": "MDQ6VXNlcjE1MDky",
"organizations_url": "https://api.github.com/users/jayvdb/orgs",
"received_events_url": "https://api.github.com/users/jayvdb/received_events",
"repos_url": "https://api.github.com/users/jayvdb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jayvdb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jayvdb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jayvdb",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-11-01T07:49:25Z
|
2021-08-29T00:06:55Z
|
2020-05-09T04:58:32Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5251/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5251/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5251.diff",
"html_url": "https://github.com/psf/requests/pull/5251",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5251.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5251"
}
| true |
[
"This may not be all of the changes needed to work on pytest 5, but it was enough for the openSUSE build to pass https://build.opensuse.org/request/show/744656 - it is using `-k \"not (TestTimeout or connect or test_https_warnings)\"`, so is skipping 12 and deselecting 16.",
"This should be resolved in #5027 "
] |
|
https://api.github.com/repos/psf/requests/issues/5250
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5250/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5250/comments
|
https://api.github.com/repos/psf/requests/issues/5250/events
|
https://github.com/psf/requests/pull/5250
| 514,919,960 |
MDExOlB1bGxSZXF1ZXN0MzM0NDY0NTU5
| 5,250 |
Fix link to requests-threads in community/recommended doc
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1845314?v=4",
"events_url": "https://api.github.com/users/MasterOdin/events{/privacy}",
"followers_url": "https://api.github.com/users/MasterOdin/followers",
"following_url": "https://api.github.com/users/MasterOdin/following{/other_user}",
"gists_url": "https://api.github.com/users/MasterOdin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MasterOdin",
"id": 1845314,
"login": "MasterOdin",
"node_id": "MDQ6VXNlcjE4NDUzMTQ=",
"organizations_url": "https://api.github.com/users/MasterOdin/orgs",
"received_events_url": "https://api.github.com/users/MasterOdin/received_events",
"repos_url": "https://api.github.com/users/MasterOdin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MasterOdin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MasterOdin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MasterOdin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-30T19:16:01Z
|
2021-08-30T00:06:33Z
|
2019-11-23T02:50:55Z
|
CONTRIBUTOR
|
resolved
|
The link for `Requests-Threads` was missing a trailing `_` causing it to be italicized instead of being a proper link.
|
{
"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/5250/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5250/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5250.diff",
"html_url": "https://github.com/psf/requests/pull/5250",
"merged_at": "2019-11-23T02:50:54Z",
"patch_url": "https://github.com/psf/requests/pull/5250.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5250"
}
| true |
[
"Might be worth adding doc building to the CI and either disabling `default_role` (such that using it is an error) or switching it out for `any` (though I don't know that that would find explicit link references)."
] |
https://api.github.com/repos/psf/requests/issues/5249
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5249/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5249/comments
|
https://api.github.com/repos/psf/requests/issues/5249/events
|
https://github.com/psf/requests/issues/5249
| 513,695,739 |
MDU6SXNzdWU1MTM2OTU3Mzk=
| 5,249 |
TLS Handshake issue | Python 2.7.6 | Requests 2.13.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3884911?v=4",
"events_url": "https://api.github.com/users/varkychen/events{/privacy}",
"followers_url": "https://api.github.com/users/varkychen/followers",
"following_url": "https://api.github.com/users/varkychen/following{/other_user}",
"gists_url": "https://api.github.com/users/varkychen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/varkychen",
"id": 3884911,
"login": "varkychen",
"node_id": "MDQ6VXNlcjM4ODQ5MTE=",
"organizations_url": "https://api.github.com/users/varkychen/orgs",
"received_events_url": "https://api.github.com/users/varkychen/received_events",
"repos_url": "https://api.github.com/users/varkychen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/varkychen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/varkychen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/varkychen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2019-10-29T05:05:52Z
|
2021-09-03T00:10:51Z
|
2019-11-14T15:23:36Z
|
NONE
|
resolved
|
Hi All
I'm kinda new to python and I'm facing issues with TLS handshakes. My project currently uses python 2.7.6, requests 2.13.0 with no pip. I'm running on a Windows machine. I've been currently asked to stick with these versions.
I'm using code similar to the the one below.
```
import requests
import requests.packages.urllib3
requests.packages.urllib3.disable_warnings()
response = requests.get('https://www.verisign.com')
print(response.status_code)
```
After running this code, I get the following error
`requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol`
I also tried this piece of code to check the underlying ssl library
```
import socket, ssl, certifi
print(certifi.where())
CIPHERS = (
'AES256-SHA:ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
'!eNULL:!MD5'
)
server_address = ('www.verisign.com', 443)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ssl_sock = ssl.wrap_socket(s,
cert_reqs=ssl.CERT_REQUIRED,
ca_certs=certifi.where(),
ssl_version=ssl.PROTOCOL_TLSv1,
ciphers=CIPHERS)
ssl_sock.connect(server_address)
print(ssl_sock.cipher())
```
This fails with
```
File "***python\2.7.6\lib\ssl.py", line 305, in do_handshake
self._sslobj.do_handshake()
socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host
```
I suspect this might have something to do with the older versions of TLS supported by python 2.7.6. Can anyone help me with this issue and how to fix this?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3884911?v=4",
"events_url": "https://api.github.com/users/varkychen/events{/privacy}",
"followers_url": "https://api.github.com/users/varkychen/followers",
"following_url": "https://api.github.com/users/varkychen/following{/other_user}",
"gists_url": "https://api.github.com/users/varkychen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/varkychen",
"id": 3884911,
"login": "varkychen",
"node_id": "MDQ6VXNlcjM4ODQ5MTE=",
"organizations_url": "https://api.github.com/users/varkychen/orgs",
"received_events_url": "https://api.github.com/users/varkychen/received_events",
"repos_url": "https://api.github.com/users/varkychen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/varkychen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/varkychen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/varkychen",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5249/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5249/timeline
| null |
completed
| null | null | false |
[
"There is no excuse to still be using python 2. Its being depricated in 2020 so dont expect anyone to help you, or things to ever be update for py2 after that date. Try running the same code in python 3 and the newest version of requests. ",
"I agree, and I'm pushing to use a higher version of python. I've also pointed out to them regarding the deprecation as well. They are still under consideration.\r\n\r\nI've run the code with 2.7.14 and the code works well.\r\n\r\nThe other observation is this issue seems to work fine with certain websites and doesn't seem to work on others. How would I be able to troubleshoot these issues ?",
"I don't know, The only thing that *could* be done would be to upgrade since it seems this was a fixed bug if it works on a newer version of python 2. That's really your only option.",
"I found a possible explanation here [Cannot download from an HTTPS site (ssl) with wget?](https://unix.stackexchange.com/a/479830/101949)\r\n\r\nBasically, the openssl version on python 2.7.6 is 0.9.8 which only supports TLS 1.0. Support for TSL 1.1 and 1.2 comes with openssl version 1.0.1 (https://cpython-test-docs.readthedocs.io/en/latest/library/ssl.html#module-ssl)\r\n\r\nIf a website offers only only TLS 1.2 support during the SSL negotiation, then we'd get the above errors.\r\n\r\nWould it be possible to bootstrap support for TLS 1.2 ?",
"Are you able to at least upgrade to a recent Python 2.7?\r\n\r\n* 2.7.6 was released on 2013-11-10, six years ago.\r\n\r\n* 2.7.17 is the newest, released on 2019-10-19.\r\n\r\nhttps://www.python.org/dev/peps/pep-0373/\r\n\r\nI doubt anyone is going to support a six-year-old Python 2.7 version, especially as the 2.7 EOL date is about 6 weeks away.\r\n",
"If wishes were upgrades... Unfortunately, upgrade is not a decision I alone can take.\r\n\r\nI found a work-around instead..."
] |
https://api.github.com/repos/psf/requests/issues/5248
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5248/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5248/comments
|
https://api.github.com/repos/psf/requests/issues/5248/events
|
https://github.com/psf/requests/issues/5248
| 511,959,321 |
MDU6SXNzdWU1MTE5NTkzMjE=
| 5,248 |
http://docs.python-requests.org/ and associated is down
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/23175939?v=4",
"events_url": "https://api.github.com/users/klarose/events{/privacy}",
"followers_url": "https://api.github.com/users/klarose/followers",
"following_url": "https://api.github.com/users/klarose/following{/other_user}",
"gists_url": "https://api.github.com/users/klarose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/klarose",
"id": 23175939,
"login": "klarose",
"node_id": "MDQ6VXNlcjIzMTc1OTM5",
"organizations_url": "https://api.github.com/users/klarose/orgs",
"received_events_url": "https://api.github.com/users/klarose/received_events",
"repos_url": "https://api.github.com/users/klarose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/klarose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/klarose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/klarose",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-24T13:50:36Z
|
2021-09-04T00:06:08Z
|
2019-10-24T13:52:44Z
|
NONE
|
resolved
|
I cannot retrieve the docs for python-requests without using non-TLS http.
## Expected Result
The following should return the page content at the end:
`curl -L http://docs.python-requests.org/ -v`
## Actual Result
Instead, I get a TLS error:
```
curl -L http://docs.python-requests.org/ -v
* Trying 3.13.31.214...
* TCP_NODELAY set
* Connected to docs.python-requests.org (3.13.31.214) port 80 (#0)
> GET / HTTP/1.1
> Host: docs.python-requests.org
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html; charset=utf-8
< Location: https://2.python-requests.org/
< X-Redirector-Version: 2.6.0-4f37d77
< Date: Thu, 24 Oct 2019 13:48:03 GMT
< Content-Length: 65
< Connection: close
<
* Closing connection 0
* Issue another request to this URL: 'https://2.python-requests.org/'
* Trying 3.13.31.214...
* TCP_NODELAY set
* Connected to 2.python-requests.org (3.13.31.214) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS alert, Server hello (2):
* error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
* stopped the pause stream!
* Closing connection 1
curl: (35) error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
```
## Reproduction Steps
Run the above curl.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/23175939?v=4",
"events_url": "https://api.github.com/users/klarose/events{/privacy}",
"followers_url": "https://api.github.com/users/klarose/followers",
"following_url": "https://api.github.com/users/klarose/following{/other_user}",
"gists_url": "https://api.github.com/users/klarose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/klarose",
"id": 23175939,
"login": "klarose",
"node_id": "MDQ6VXNlcjIzMTc1OTM5",
"organizations_url": "https://api.github.com/users/klarose/orgs",
"received_events_url": "https://api.github.com/users/klarose/received_events",
"repos_url": "https://api.github.com/users/klarose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/klarose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/klarose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/klarose",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5248/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5248/timeline
| null |
completed
| null | null | false |
[
"Seems like this is a duplicate of https://github.com/psf/requests/issues/5212. The fix just hasn't gone live."
] |
https://api.github.com/repos/psf/requests/issues/5247
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5247/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5247/comments
|
https://api.github.com/repos/psf/requests/issues/5247/events
|
https://github.com/psf/requests/issues/5247
| 511,919,392 |
MDU6SXNzdWU1MTE5MTkzOTI=
| 5,247 |
Android and ios project
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/56755465?v=4",
"events_url": "https://api.github.com/users/faout/events{/privacy}",
"followers_url": "https://api.github.com/users/faout/followers",
"following_url": "https://api.github.com/users/faout/following{/other_user}",
"gists_url": "https://api.github.com/users/faout/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/faout",
"id": 56755465,
"login": "faout",
"node_id": "MDQ6VXNlcjU2NzU1NDY1",
"organizations_url": "https://api.github.com/users/faout/orgs",
"received_events_url": "https://api.github.com/users/faout/received_events",
"repos_url": "https://api.github.com/users/faout/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/faout/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/faout/subscriptions",
"type": "User",
"url": "https://api.github.com/users/faout",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-24T12:43:30Z
|
2021-09-03T00:10:54Z
|
2019-10-25T02:52:37Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Hi there! i am new in app development but i have to submit an android and ios app within 2 weeks i do not know where to start. please help me . thank you
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5247/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5247/timeline
| null |
completed
| null | null | false |
[
"Hi @faout, this is a support forum for Requests. I would suggest posting on StackOverflow with questions about getting started with these topics. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5246
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5246/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5246/comments
|
https://api.github.com/repos/psf/requests/issues/5246/events
|
https://github.com/psf/requests/pull/5246
| 511,826,573 |
MDExOlB1bGxSZXF1ZXN0MzMxOTUwNjI0
| 5,246 |
Update documentation for response.json()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/53315310?v=4",
"events_url": "https://api.github.com/users/ellie/events{/privacy}",
"followers_url": "https://api.github.com/users/ellie/followers",
"following_url": "https://api.github.com/users/ellie/following{/other_user}",
"gists_url": "https://api.github.com/users/ellie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ellie",
"id": 53315310,
"login": "ellie",
"node_id": "MDQ6VXNlcjUzMzE1MzEw",
"organizations_url": "https://api.github.com/users/ellie/orgs",
"received_events_url": "https://api.github.com/users/ellie/received_events",
"repos_url": "https://api.github.com/users/ellie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ellie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ellie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ellie",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-10-24T09:36:45Z
|
2022-02-26T15:00:32Z
|
2021-11-28T14:15:03Z
|
NONE
|
resolved
|
The current documentation says that the function is encoding - actually, it is decoding!
I'm also wondering if it might be worth putting in some type annotations at some point
|
{
"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/5246/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5246/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5246.diff",
"html_url": "https://github.com/psf/requests/pull/5246",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5246.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5246"
}
| true |
[
"It doesn't return JSON body. It returns Python object.\r\n\r\nFixes #5245 ",
"As long as this is open - I would like to add that the \"if any\" clause is very unclear, from the code I can't tell what is meant to say.\r\n\r\nFrom what I can see the function tries to return the decoded representation *as if* the content were JSON - there are no checks if it actually is, is declared by the response to be, or even exists at all.",
"I think we'll keep the current docstring, thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5245
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5245/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5245/comments
|
https://api.github.com/repos/psf/requests/issues/5245/events
|
https://github.com/psf/requests/issues/5245
| 511,283,605 |
MDU6SXNzdWU1MTEyODM2MDU=
| 5,245 |
Incorrect json() docstring
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10272121?v=4",
"events_url": "https://api.github.com/users/alekna/events{/privacy}",
"followers_url": "https://api.github.com/users/alekna/followers",
"following_url": "https://api.github.com/users/alekna/following{/other_user}",
"gists_url": "https://api.github.com/users/alekna/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alekna",
"id": 10272121,
"login": "alekna",
"node_id": "MDQ6VXNlcjEwMjcyMTIx",
"organizations_url": "https://api.github.com/users/alekna/orgs",
"received_events_url": "https://api.github.com/users/alekna/received_events",
"repos_url": "https://api.github.com/users/alekna/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alekna/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alekna/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alekna",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 4 |
2019-10-23T12:16:53Z
|
2024-10-31T11:31:39Z
| null |
NONE
| null |
What `json()` actually does - it deserializes JSON into a Python object.
So the docstring below must be wrong:
https://github.com/psf/requests/blob/fab1fd10d0b115e635b9ef1364f8444089725000/requests/models.py#L894-L918
| 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/5245/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5245/timeline
| null | null | null | null | false |
[
"Do you mind if I take this task as an intro issue to the project? I'm looking to be a new contributor",
"This has tripped me up as well. I'm new to Python. I expected response.json() to return JSON, but it doesn't. I don't know if I'm expected to do something further to turn it into actual JSON (and if so, what), or if this is an oversight in the requests code.",
"I also ran into issues with this - besides the fact that it indeed returns a decoded Python representation of the content, I'm confused by the \"if any\" clause - there is nothing that checks the existence of content, nor if the response actually has Content-Type application/json set, it simply dumps `self.text` into a json loader.\r\n\r\nSo a better way to phrase this might be along the lines of:\r\n\"Tries to return a decoded representation of the response's content as if it were JSON\"",
"Plus one.\r\nWhy not fix it after passed so many years?"
] |
https://api.github.com/repos/psf/requests/issues/5244
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5244/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5244/comments
|
https://api.github.com/repos/psf/requests/issues/5244/events
|
https://github.com/psf/requests/pull/5244
| 511,200,500 |
MDExOlB1bGxSZXF1ZXN0MzMxNDQxODEz
| 5,244 |
Add option to hide url from raise_for_status
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/355251?v=4",
"events_url": "https://api.github.com/users/barroca/events{/privacy}",
"followers_url": "https://api.github.com/users/barroca/followers",
"following_url": "https://api.github.com/users/barroca/following{/other_user}",
"gists_url": "https://api.github.com/users/barroca/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/barroca",
"id": 355251,
"login": "barroca",
"node_id": "MDQ6VXNlcjM1NTI1MQ==",
"organizations_url": "https://api.github.com/users/barroca/orgs",
"received_events_url": "https://api.github.com/users/barroca/received_events",
"repos_url": "https://api.github.com/users/barroca/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/barroca/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/barroca/subscriptions",
"type": "User",
"url": "https://api.github.com/users/barroca",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-23T09:38:18Z
|
2021-08-29T00:07:08Z
|
2020-02-17T18:25:52Z
|
NONE
|
resolved
|
This PR adds an option on raise_for_status function that hides the url from the log message so it is possible to protect the sensitive data from the url without having to do complex parsing of it.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5244/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5244/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5244.diff",
"html_url": "https://github.com/psf/requests/pull/5244",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5244.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5244"
}
| true |
[
"This seems application specific. If the error message is being displayed to the user the URL can be masked in that section of application code or alternatively you can re-raise the exception with an edited message."
] |
https://api.github.com/repos/psf/requests/issues/5243
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5243/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5243/comments
|
https://api.github.com/repos/psf/requests/issues/5243/events
|
https://github.com/psf/requests/pull/5243
| 510,747,474 |
MDExOlB1bGxSZXF1ZXN0MzMxMDY3NzU2
| 5,243 |
Test on Python 3.8 final
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-10-22T15:47:28Z
|
2021-08-30T00:06:34Z
|
2019-10-25T02:32:26Z
|
CONTRIBUTOR
|
resolved
|
The Trove classifier is already added:
https://github.com/psf/requests/blob/fab1fd10d0b115e635b9ef1364f8444089725000/setup.py#L98
|
{
"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/5243/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5243/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5243.diff",
"html_url": "https://github.com/psf/requests/pull/5243",
"merged_at": "2019-10-25T02:32:26Z",
"patch_url": "https://github.com/psf/requests/pull/5243.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5243"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5242
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5242/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5242/comments
|
https://api.github.com/repos/psf/requests/issues/5242/events
|
https://github.com/psf/requests/pull/5242
| 510,641,630 |
MDExOlB1bGxSZXF1ZXN0MzMwOTgwMzU5
| 5,242 |
Improved setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45028982?v=4",
"events_url": "https://api.github.com/users/adisakshya/events{/privacy}",
"followers_url": "https://api.github.com/users/adisakshya/followers",
"following_url": "https://api.github.com/users/adisakshya/following{/other_user}",
"gists_url": "https://api.github.com/users/adisakshya/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adisakshya",
"id": 45028982,
"login": "adisakshya",
"node_id": "MDQ6VXNlcjQ1MDI4OTgy",
"organizations_url": "https://api.github.com/users/adisakshya/orgs",
"received_events_url": "https://api.github.com/users/adisakshya/received_events",
"repos_url": "https://api.github.com/users/adisakshya/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adisakshya/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adisakshya/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adisakshya",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-10-22T13:03:54Z
|
2021-08-27T00:08:38Z
|
2021-05-20T16:53:48Z
|
NONE
|
resolved
|
Improved support for setup.py upload command.
Replaced method of accepting `upload` command using `sys-command-line-arguments`, with `UploadCommand` class and added it in cmdClass.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45028982?v=4",
"events_url": "https://api.github.com/users/adisakshya/events{/privacy}",
"followers_url": "https://api.github.com/users/adisakshya/followers",
"following_url": "https://api.github.com/users/adisakshya/following{/other_user}",
"gists_url": "https://api.github.com/users/adisakshya/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adisakshya",
"id": 45028982,
"login": "adisakshya",
"node_id": "MDQ6VXNlcjQ1MDI4OTgy",
"organizations_url": "https://api.github.com/users/adisakshya/orgs",
"received_events_url": "https://api.github.com/users/adisakshya/received_events",
"repos_url": "https://api.github.com/users/adisakshya/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adisakshya/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adisakshya/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adisakshya",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5242/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5242/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5242.diff",
"html_url": "https://github.com/psf/requests/pull/5242",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5242.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5242"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5241
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5241/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5241/comments
|
https://api.github.com/repos/psf/requests/issues/5241/events
|
https://github.com/psf/requests/pull/5241
| 509,941,294 |
MDExOlB1bGxSZXF1ZXN0MzMwMzg4MzQ5
| 5,241 |
docs: update docstring
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/41265033?v=4",
"events_url": "https://api.github.com/users/chrisguox/events{/privacy}",
"followers_url": "https://api.github.com/users/chrisguox/followers",
"following_url": "https://api.github.com/users/chrisguox/following{/other_user}",
"gists_url": "https://api.github.com/users/chrisguox/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrisguox",
"id": 41265033,
"login": "chrisguox",
"node_id": "MDQ6VXNlcjQxMjY1MDMz",
"organizations_url": "https://api.github.com/users/chrisguox/orgs",
"received_events_url": "https://api.github.com/users/chrisguox/received_events",
"repos_url": "https://api.github.com/users/chrisguox/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrisguox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrisguox/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrisguox",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-21T12:50:26Z
|
2021-08-29T00:07:09Z
|
2020-02-15T06:49:51Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/41265033?v=4",
"events_url": "https://api.github.com/users/chrisguox/events{/privacy}",
"followers_url": "https://api.github.com/users/chrisguox/followers",
"following_url": "https://api.github.com/users/chrisguox/following{/other_user}",
"gists_url": "https://api.github.com/users/chrisguox/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrisguox",
"id": 41265033,
"login": "chrisguox",
"node_id": "MDQ6VXNlcjQxMjY1MDMz",
"organizations_url": "https://api.github.com/users/chrisguox/orgs",
"received_events_url": "https://api.github.com/users/chrisguox/received_events",
"repos_url": "https://api.github.com/users/chrisguox/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrisguox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrisguox/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrisguox",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5241/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5241/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5241.diff",
"html_url": "https://github.com/psf/requests/pull/5241",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5241.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5241"
}
| true |
[
"@adisakshya \r\n\r\nI merged new commits. but I'm not sure it's necessary.\r\n"
] |
|
https://api.github.com/repos/psf/requests/issues/5240
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5240/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5240/comments
|
https://api.github.com/repos/psf/requests/issues/5240/events
|
https://github.com/psf/requests/pull/5240
| 509,936,039 |
MDExOlB1bGxSZXF1ZXN0MzMwMzg0MTIz
| 5,240 |
fix: typo
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/41265033?v=4",
"events_url": "https://api.github.com/users/chrisguox/events{/privacy}",
"followers_url": "https://api.github.com/users/chrisguox/followers",
"following_url": "https://api.github.com/users/chrisguox/following{/other_user}",
"gists_url": "https://api.github.com/users/chrisguox/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrisguox",
"id": 41265033,
"login": "chrisguox",
"node_id": "MDQ6VXNlcjQxMjY1MDMz",
"organizations_url": "https://api.github.com/users/chrisguox/orgs",
"received_events_url": "https://api.github.com/users/chrisguox/received_events",
"repos_url": "https://api.github.com/users/chrisguox/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrisguox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrisguox/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrisguox",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-21T12:40:06Z
|
2021-08-30T00:06:36Z
|
2019-10-25T02:35:02Z
|
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/5240/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5240/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5240.diff",
"html_url": "https://github.com/psf/requests/pull/5240",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5240.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5240"
}
| true |
[
"Hi @chrisguox, thanks for contributing to Requests! I think the current usages probably make more sense than the new proposals, so we'll pass on this one."
] |
|
https://api.github.com/repos/psf/requests/issues/5239
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5239/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5239/comments
|
https://api.github.com/repos/psf/requests/issues/5239/events
|
https://github.com/psf/requests/pull/5239
| 509,914,002 |
MDExOlB1bGxSZXF1ZXN0MzMwMzY2MTU5
| 5,239 |
Catch AttributeError in utils.super_len
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/875184?v=4",
"events_url": "https://api.github.com/users/dimbleby/events{/privacy}",
"followers_url": "https://api.github.com/users/dimbleby/followers",
"following_url": "https://api.github.com/users/dimbleby/following{/other_user}",
"gists_url": "https://api.github.com/users/dimbleby/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dimbleby",
"id": 875184,
"login": "dimbleby",
"node_id": "MDQ6VXNlcjg3NTE4NA==",
"organizations_url": "https://api.github.com/users/dimbleby/orgs",
"received_events_url": "https://api.github.com/users/dimbleby/received_events",
"repos_url": "https://api.github.com/users/dimbleby/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dimbleby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dimbleby/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dimbleby",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] |
{
"closed_at": "2021-12-30T21:48:07Z",
"closed_issues": 11,
"created_at": "2021-09-02T07:23:33Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/29",
"id": 7115399,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/29/labels",
"node_id": "MI_kwDOABTKOs4AbJKH",
"number": 29,
"open_issues": 0,
"state": "closed",
"title": "2.27.0",
"updated_at": "2021-12-30T21:48:07Z",
"url": "https://api.github.com/repos/psf/requests/milestones/29"
}
| 1 |
2019-10-21T11:55:23Z
|
2022-02-26T21:00:46Z
|
2021-11-28T20:03:31Z
|
CONTRIBUTOR
|
resolved
|
This allows it to handle files obtained via `Tarfile.extractfile()`.
Fixes #5229.
|
{
"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/5239/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5239/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5239.diff",
"html_url": "https://github.com/psf/requests/pull/5239",
"merged_at": "2021-11-28T20:03:31Z",
"patch_url": "https://github.com/psf/requests/pull/5239.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5239"
}
| true |
[
"Wow, I had forgotten all about this. Still a good fix though, so I have rebased and added an entry to HISTORY.md"
] |
https://api.github.com/repos/psf/requests/issues/5238
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5238/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5238/comments
|
https://api.github.com/repos/psf/requests/issues/5238/events
|
https://github.com/psf/requests/issues/5238
| 509,754,840 |
MDU6SXNzdWU1MDk3NTQ4NDA=
| 5,238 |
monkey patching of urllib3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48501609?v=4",
"events_url": "https://api.github.com/users/christopher-hesse/events{/privacy}",
"followers_url": "https://api.github.com/users/christopher-hesse/followers",
"following_url": "https://api.github.com/users/christopher-hesse/following{/other_user}",
"gists_url": "https://api.github.com/users/christopher-hesse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/christopher-hesse",
"id": 48501609,
"login": "christopher-hesse",
"node_id": "MDQ6VXNlcjQ4NTAxNjA5",
"organizations_url": "https://api.github.com/users/christopher-hesse/orgs",
"received_events_url": "https://api.github.com/users/christopher-hesse/received_events",
"repos_url": "https://api.github.com/users/christopher-hesse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/christopher-hesse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/christopher-hesse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/christopher-hesse",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-10-21T06:21:35Z
|
2021-08-28T00:06:11Z
|
2020-11-10T00:34:04Z
|
NONE
|
resolved
|
I'm using urllib3 and recently ran into an issue where my library would fail if pyopenssl was installed and requests was imported (by some other library).
```
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/request.py", line 72, in request
**urlopen_kw)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/request.py", line 150, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/poolmanager.py", line 326, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request
self._validate_conn(conn)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
conn.connect()
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 355, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/root/miniconda3/envs/env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 478, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
urllib3.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)
```
This error happens when connecting to any https domain and is likely due to some mis-configured certs (though it happened on two unrelated linux machines I ran it on), but this behavior only occurs when pyopenssl is installed and requests is imported, so it's hard to test for something like this.
It looks like requests monkey patches urllib3: https://github.com/psf/requests/blob/3e7d0a873f838e0001f7ac69b1987147128a7b5f/requests/__init__.py#L93
Now that I know this, I could have my library require requests, import requests, and then run `urllib3.contrib.pyopenssl.extract_from_urllib3()` to reverse-monkey-patch urllib3, but this seems roundabout.
Is there any reason this is enabled for versions of python > 3.2? I think a decent fix to me is that the monkey patching code is only run on the versions of python that require it.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5238/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5238/timeline
| null |
completed
| null | null | false |
[
"I have this issue too, thank you for the workaround!\r\nCouldn't find this issue on google, so here are some keywords for future googlers: requests urllib3 ssl error pyopenssl\r\n\r\nAnd a few lines of code that reproduce the error, uncomment to enable workaround:\r\n\r\n```\r\nimport requests\r\nimport urllib3\r\n\r\n# urllib3.contrib.pyopenssl.extract_from_urllib3()\r\n\r\nhttp = urllib3.PoolManager()\r\nr = http.request('GET', \"https://www.google.com/\")\r\n```",
"This was resolved in #5443 and Requests no longer attempts this unless ssl isn't available through Python."
] |
https://api.github.com/repos/psf/requests/issues/5237
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5237/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5237/comments
|
https://api.github.com/repos/psf/requests/issues/5237/events
|
https://github.com/psf/requests/pull/5237
| 509,364,629 |
MDExOlB1bGxSZXF1ZXN0MzI5OTY1MTM0
| 5,237 |
Update translation links from http -> https
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/53452777?v=4",
"events_url": "https://api.github.com/users/chmreid/events{/privacy}",
"followers_url": "https://api.github.com/users/chmreid/followers",
"following_url": "https://api.github.com/users/chmreid/following{/other_user}",
"gists_url": "https://api.github.com/users/chmreid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chmreid",
"id": 53452777,
"login": "chmreid",
"node_id": "MDQ6VXNlcjUzNDUyNzc3",
"organizations_url": "https://api.github.com/users/chmreid/orgs",
"received_events_url": "https://api.github.com/users/chmreid/received_events",
"repos_url": "https://api.github.com/users/chmreid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chmreid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chmreid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chmreid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-10-19T00:35:38Z
|
2021-08-30T00:06:35Z
|
2019-10-25T02:46:05Z
|
CONTRIBUTOR
|
resolved
|
This modifies links to translations of the `requests` documentation for non-English languages to https instead of http
|
{
"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/5237/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5237/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5237.diff",
"html_url": "https://github.com/psf/requests/pull/5237",
"merged_at": "2019-10-25T02:46:05Z",
"patch_url": "https://github.com/psf/requests/pull/5237.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5237"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5236
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5236/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5236/comments
|
https://api.github.com/repos/psf/requests/issues/5236/events
|
https://github.com/psf/requests/pull/5236
| 509,185,058 |
MDExOlB1bGxSZXF1ZXN0MzI5ODI0Njg2
| 5,236 |
Change documentation website to requests.readthedocs.io
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/102495?v=4",
"events_url": "https://api.github.com/users/ssbarnea/events{/privacy}",
"followers_url": "https://api.github.com/users/ssbarnea/followers",
"following_url": "https://api.github.com/users/ssbarnea/following{/other_user}",
"gists_url": "https://api.github.com/users/ssbarnea/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ssbarnea",
"id": 102495,
"login": "ssbarnea",
"node_id": "MDQ6VXNlcjEwMjQ5NQ==",
"organizations_url": "https://api.github.com/users/ssbarnea/orgs",
"received_events_url": "https://api.github.com/users/ssbarnea/received_events",
"repos_url": "https://api.github.com/users/ssbarnea/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ssbarnea/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ssbarnea/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ssbarnea",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-18T16:29:33Z
|
2021-08-30T00:06:34Z
|
2019-10-25T03:02:55Z
|
CONTRIBUTOR
|
resolved
|
Fixes: #5212
|
{
"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/5236/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5236/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5236.diff",
"html_url": "https://github.com/psf/requests/pull/5236",
"merged_at": "2019-10-25T03:02:55Z",
"patch_url": "https://github.com/psf/requests/pull/5236.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5236"
}
| true |
[
"Looks like there's one more reference remaining in `docs/_templates/sidebarlogo.html` on line 57:\r\n\r\n```\r\n$ grep -n -r \"docs\\.python\" *\r\ndocs/_templates/sidebarlogo.html:57: <li><a href=\"http://docs.python-requests.org/\">English</a></li>\r\n...\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/5235
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5235/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5235/comments
|
https://api.github.com/repos/psf/requests/issues/5235/events
|
https://github.com/psf/requests/issues/5235
| 508,879,800 |
MDU6SXNzdWU1MDg4Nzk4MDA=
| 5,235 |
Python crashed while run requests.get() in a daemon process with pandas.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5044734?v=4",
"events_url": "https://api.github.com/users/virus-warnning/events{/privacy}",
"followers_url": "https://api.github.com/users/virus-warnning/followers",
"following_url": "https://api.github.com/users/virus-warnning/following{/other_user}",
"gists_url": "https://api.github.com/users/virus-warnning/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/virus-warnning",
"id": 5044734,
"login": "virus-warnning",
"node_id": "MDQ6VXNlcjUwNDQ3MzQ=",
"organizations_url": "https://api.github.com/users/virus-warnning/orgs",
"received_events_url": "https://api.github.com/users/virus-warnning/received_events",
"repos_url": "https://api.github.com/users/virus-warnning/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/virus-warnning/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/virus-warnning/subscriptions",
"type": "User",
"url": "https://api.github.com/users/virus-warnning",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-10-18T06:25:35Z
|
2021-09-02T00:07:15Z
|
2019-10-25T02:54:56Z
|
NONE
|
resolved
|
Run requests.get() in a daemon process with `import pandas` then python would be crashed.
* Comment `import pandas` it would be fine.
* Comment `.. os.fork() ...` it would be fine.
The problem was found on macOS only. (macOS Mojave 10.14.6)
## Expected Result
200
## Actual Result
```
objc[89863]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[89863]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
```
## Reproduction Steps
Would be crashed.
```python
import os
import pandas
import requests
def main():
if os.fork() > 0:
exit(0)
resp = requests.get('https://duckduckgo.com')
print(resp.status_code)
if __name__ == '__main__':
main()
```
It's OK!
```python
import os
# import pandas
import requests
def main():
if os.fork() > 0:
exit(0)
resp = requests.get('https://duckduckgo.com')
print(resp.status_code)
if __name__ == '__main__':
main()
```
It's OK!
```python
import os
import pandas
import requests
def main():
#if os.fork() > 0:
# exit(0)
resp = requests.get('https://duckduckgo.com')
print(resp.status_code)
if __name__ == '__main__':
main()
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "18.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5235/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5235/timeline
| null |
completed
| null | null | false |
[
"This is hard to say to be issue of the requests. It crashes on purpose in case of user does n't know what he is doing. \r\n\r\n> objc[1936]: +[NSValue initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.\r\n\r\nIf you do know what you are doing, the \"crashing script\"(test.py) can avoid to crash by :\r\n`$export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ; python3 test.py`",
"This is definitely an issue outside of Requests. It looks like you're running into an issue with Pandas. I would suggest posting something on StackOverflow and reviewing the bug tracker for Pandas.",
"Sounds related to #4768"
] |
https://api.github.com/repos/psf/requests/issues/5234
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5234/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5234/comments
|
https://api.github.com/repos/psf/requests/issues/5234/events
|
https://github.com/psf/requests/issues/5234
| 508,805,713 |
MDU6SXNzdWU1MDg4MDU3MTM=
| 5,234 |
Caused by NewConnectionError(<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F06C779470>)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47957320?v=4",
"events_url": "https://api.github.com/users/xiao1i/events{/privacy}",
"followers_url": "https://api.github.com/users/xiao1i/followers",
"following_url": "https://api.github.com/users/xiao1i/following{/other_user}",
"gists_url": "https://api.github.com/users/xiao1i/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xiao1i",
"id": 47957320,
"login": "xiao1i",
"node_id": "MDQ6VXNlcjQ3OTU3MzIw",
"organizations_url": "https://api.github.com/users/xiao1i/orgs",
"received_events_url": "https://api.github.com/users/xiao1i/received_events",
"repos_url": "https://api.github.com/users/xiao1i/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xiao1i/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xiao1i/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xiao1i",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-10-18T01:42:13Z
|
2021-09-02T00:07:29Z
|
2020-02-01T01:45:03Z
|
NONE
|
resolved
|
partial code as follows:
header = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"Content-Type": "text/html; charset=utf-8"
}
r = requests.get('https://nvd.nist.gov/vuln/detail/CVE-1999-0802',headers = header,verify = False)
When running this,I always meet such an error "HTTPSConnectionPool(host='nvd.nist.gov', port=443): Max retries exceeded with url: /vuln/detail/CVE-1999-0802 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000016033BC9828>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
",which comes from <class 'requests.exceptions.ConnectionError'>. When i open this url in google,it is ok.But why i cant get right response when using requests in pycharm?I wish that someone could help me.Appreciate very much!
|
{
"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/5234/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5234/timeline
| null |
completed
| null | null | false |
[
"Are you sure this is not a network issue on your end? This appears to be working for me. Have you tried URLs other than the one you have mentioned here?",
"Hi @Hacker1faker, this is a network issue likely with the interface you’re issuing the request on or perhaps the firewall. There isn’t anything we can do from Requests side in this case."
] |
https://api.github.com/repos/psf/requests/issues/5233
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5233/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5233/comments
|
https://api.github.com/repos/psf/requests/issues/5233/events
|
https://github.com/psf/requests/pull/5233
| 508,708,165 |
MDExOlB1bGxSZXF1ZXN0MzI5NDUxNjUz
| 5,233 |
Fix broken URLS in readme
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/53452777?v=4",
"events_url": "https://api.github.com/users/chmreid/events{/privacy}",
"followers_url": "https://api.github.com/users/chmreid/followers",
"following_url": "https://api.github.com/users/chmreid/following{/other_user}",
"gists_url": "https://api.github.com/users/chmreid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chmreid",
"id": 53452777,
"login": "chmreid",
"node_id": "MDQ6VXNlcjUzNDUyNzc3",
"organizations_url": "https://api.github.com/users/chmreid/orgs",
"received_events_url": "https://api.github.com/users/chmreid/received_events",
"repos_url": "https://api.github.com/users/chmreid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chmreid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chmreid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chmreid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-17T20:37:53Z
|
2021-08-30T00:06:37Z
|
2019-10-19T00:36:05Z
|
CONTRIBUTOR
|
resolved
|
[This commit](https://github.com/psf/requests/commit/74b72ce4265583db0430080ab67d3d5e0c4b44b2) removed several references to the URL 2.python-requests.org but left several behind. This PR cleans those up and replaces with requests.readthedocs.io
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/53452777?v=4",
"events_url": "https://api.github.com/users/chmreid/events{/privacy}",
"followers_url": "https://api.github.com/users/chmreid/followers",
"following_url": "https://api.github.com/users/chmreid/following{/other_user}",
"gists_url": "https://api.github.com/users/chmreid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chmreid",
"id": 53452777,
"login": "chmreid",
"node_id": "MDQ6VXNlcjUzNDUyNzc3",
"organizations_url": "https://api.github.com/users/chmreid/orgs",
"received_events_url": "https://api.github.com/users/chmreid/received_events",
"repos_url": "https://api.github.com/users/chmreid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chmreid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chmreid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chmreid",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5233/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5233/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5233.diff",
"html_url": "https://github.com/psf/requests/pull/5233",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5233.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5233"
}
| true |
[
"@ssbarnea looks like you were much more thorough in replacing the old URLs...\r\n\r\nAdmins - approve #5236 instead!"
] |
https://api.github.com/repos/psf/requests/issues/5232
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5232/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5232/comments
|
https://api.github.com/repos/psf/requests/issues/5232/events
|
https://github.com/psf/requests/pull/5232
| 508,622,251 |
MDExOlB1bGxSZXF1ZXN0MzI5MzgwODEy
| 5,232 |
Add timeout as a default attribute for Session objects
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9677399?v=4",
"events_url": "https://api.github.com/users/ofek/events{/privacy}",
"followers_url": "https://api.github.com/users/ofek/followers",
"following_url": "https://api.github.com/users/ofek/following{/other_user}",
"gists_url": "https://api.github.com/users/ofek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ofek",
"id": 9677399,
"login": "ofek",
"node_id": "MDQ6VXNlcjk2NzczOTk=",
"organizations_url": "https://api.github.com/users/ofek/orgs",
"received_events_url": "https://api.github.com/users/ofek/received_events",
"repos_url": "https://api.github.com/users/ofek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ofek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ofek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ofek",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2019-10-17T17:37:10Z
|
2022-01-03T15:28:12Z
| null |
CONTRIBUTOR
| null |
We encountered a bug today wherein we mistakenly assumed it was already supported as an attribute like all the other kwargs, https://github.com/DataDog/integrations-core/pull/4811
| 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/5232/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5232/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5232.diff",
"html_url": "https://github.com/psf/requests/pull/5232",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5232.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5232"
}
| true |
[
"@Lukasa @kennethreitz @nateprewitt Hello there! After opening this I came across https://github.com/psf/requests/issues/3341\r\n\r\nDoes that decision (from way back then) still remain true today? As it is, the behavior is not very user-friendly and is entirely unexpected, hence the reason so many people keep opening the same PR 😄 "
] |
https://api.github.com/repos/psf/requests/issues/5231
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5231/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5231/comments
|
https://api.github.com/repos/psf/requests/issues/5231/events
|
https://github.com/psf/requests/issues/5231
| 508,557,896 |
MDU6SXNzdWU1MDg1NTc4OTY=
| 5,231 |
Support for HTTP/3 (QUIC)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1223984?v=4",
"events_url": "https://api.github.com/users/mikehwang/events{/privacy}",
"followers_url": "https://api.github.com/users/mikehwang/followers",
"following_url": "https://api.github.com/users/mikehwang/following{/other_user}",
"gists_url": "https://api.github.com/users/mikehwang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikehwang",
"id": 1223984,
"login": "mikehwang",
"node_id": "MDQ6VXNlcjEyMjM5ODQ=",
"organizations_url": "https://api.github.com/users/mikehwang/orgs",
"received_events_url": "https://api.github.com/users/mikehwang/received_events",
"repos_url": "https://api.github.com/users/mikehwang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikehwang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikehwang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikehwang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-17T15:31:52Z
|
2021-09-03T00:10:54Z
|
2019-10-25T02:57:03Z
|
NONE
|
resolved
|
Is there currently a way to have requests to use HTTP/3 and thus QUIC as the transport protocol? If not, has there been discussion about supporting this in future releases?
Thank you
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5231/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5231/timeline
| null |
completed
| null | null | false |
[
"Hi mikehwang@, we don't have a way to support HTTP/3 or QUIC directly with Requests right now. I'd suggest taking a look at either the Python-Hyper project or httpx to see if they have plans for integrating that support."
] |
https://api.github.com/repos/psf/requests/issues/5230
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5230/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5230/comments
|
https://api.github.com/repos/psf/requests/issues/5230/events
|
https://github.com/psf/requests/pull/5230
| 507,797,007 |
MDExOlB1bGxSZXF1ZXN0MzI4NzE1MTMx
| 5,230 |
#3070 Defaults on session level
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6348620?v=4",
"events_url": "https://api.github.com/users/FilipMalczak/events{/privacy}",
"followers_url": "https://api.github.com/users/FilipMalczak/followers",
"following_url": "https://api.github.com/users/FilipMalczak/following{/other_user}",
"gists_url": "https://api.github.com/users/FilipMalczak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FilipMalczak",
"id": 6348620,
"login": "FilipMalczak",
"node_id": "MDQ6VXNlcjYzNDg2MjA=",
"organizations_url": "https://api.github.com/users/FilipMalczak/orgs",
"received_events_url": "https://api.github.com/users/FilipMalczak/received_events",
"repos_url": "https://api.github.com/users/FilipMalczak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FilipMalczak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FilipMalczak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FilipMalczak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-16T11:43:00Z
|
2023-05-12T00:03:08Z
|
2022-05-11T00:55:50Z
|
NONE
|
resolved
|
See #3070 and [this](https://stackoverflow.com/questions/41295142/is-there-a-way-to-globally-override-requests-timeout-setting). Also, compare #3341
TODO:
- [ ] docs for the session instance attributes
- [ ] tests for this attributes' usage
- [ ] decision on default value for timeout
----------------------------
At first commits I've added session-level `timeout=None` and `allow_redirects=True` attributes that are now used in `x or self.x` in `request(...)` method. I've also removed `allow_redirects` defaults in `get(...)` and friends.
Default values are a subject for discussion, but let's start at least drafting this.
|
{
"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": 29,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 29,
"url": "https://api.github.com/repos/psf/requests/issues/5230/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5230/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5230.diff",
"html_url": "https://github.com/psf/requests/pull/5230",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5230.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5230"
}
| true |
[
"I don't believe we'll be able to accept this. `timeout` was intentionally omitted from the Session class in Requests 2.x and we don't intend to add it within this major version."
] |
https://api.github.com/repos/psf/requests/issues/5229
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5229/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5229/comments
|
https://api.github.com/repos/psf/requests/issues/5229/events
|
https://github.com/psf/requests/issues/5229
| 507,728,405 |
MDU6SXNzdWU1MDc3Mjg0MDU=
| 5,229 |
requests.utils.super_len() can't cope with tarfile members
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/875184?v=4",
"events_url": "https://api.github.com/users/dimbleby/events{/privacy}",
"followers_url": "https://api.github.com/users/dimbleby/followers",
"following_url": "https://api.github.com/users/dimbleby/following{/other_user}",
"gists_url": "https://api.github.com/users/dimbleby/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dimbleby",
"id": 875184,
"login": "dimbleby",
"node_id": "MDQ6VXNlcjg3NTE4NA==",
"organizations_url": "https://api.github.com/users/dimbleby/orgs",
"received_events_url": "https://api.github.com/users/dimbleby/received_events",
"repos_url": "https://api.github.com/users/dimbleby/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dimbleby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dimbleby/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dimbleby",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-10-16T09:27:08Z
|
2022-02-26T21:00:45Z
|
2021-11-28T20:07:47Z
|
CONTRIBUTOR
|
resolved
|
## Expected Result
POSTing a large file that I have extracted from a tarfile. I expect that `requests` should be able to determine the length of that file, set the `Content-Length` header, and upload it efficiently.
## Actual Result
`requests` fails to determine the file length, goes with `Transfer-Encoding: chunked`, and the upload is much slower than desired.
## Reproduction Steps
Start with a small tarfile, say
```bash
echo foo > file1
tar cf tarfile.tar file1
```
Then use `requests.utils.super_len` to try and get the length of `file1` in the tarfile:
```python
#!/usr/bin/env python
import tarfile
import requests
tar = tarfile.open("tarfile.tar")
member = tar.extractfile("file1")
print(f"super_length of member is {requests.utils.super_len(member)}")
```
result:
```
Traceback (most recent call last):
File "./demo.py", line 7, in <module>
print(f"super_length of member is {requests.utils.super_len(member)}")
File "/data/developer/.virtualenvs/req-tar/lib/python3.6/site-packages/requests/utils.py", line 119, in super_len
fileno = o.fileno()
AttributeError: '_FileInFile' object has no attribute 'fileno'
```
The behavior of the member is quite strange here: `hasattr(member, fileno)` is true, but trying to call `member.fileno()` results in an `AttributeError`.
I expect that a sensible fix might be for [this exception](https://github.com/psf/requests/blob/fab1fd10d0b115e635b9ef1364f8444089725000/requests/utils.py#L121) to catch a broader range of errors.
One can get the length of the member by seeking, so I expect that `super_len()` should then succeed.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.8"
},
"platform": {
"release": "3.10.0-1062.1.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.25.6"
},
"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/5229/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5229/timeline
| null |
completed
| null | null | false |
[
"I feel it should be raising unsupported exception when the underlying attribute doesn't have fileno. I have opened https://bugs.python.org/issue38572",
"Sounds reasonable, thanks - though obviously I hope that meanwhile we can get a workaround/fix here, per #5239.",
"Resolved with #5239"
] |
https://api.github.com/repos/psf/requests/issues/5228
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5228/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5228/comments
|
https://api.github.com/repos/psf/requests/issues/5228/events
|
https://github.com/psf/requests/issues/5228
| 506,320,521 |
MDU6SXNzdWU1MDYzMjA1MjE=
| 5,228 |
num_connections is bigger than pool_maxsize
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/56507765?v=4",
"events_url": "https://api.github.com/users/joripage/events{/privacy}",
"followers_url": "https://api.github.com/users/joripage/followers",
"following_url": "https://api.github.com/users/joripage/following{/other_user}",
"gists_url": "https://api.github.com/users/joripage/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joripage",
"id": 56507765,
"login": "joripage",
"node_id": "MDQ6VXNlcjU2NTA3NzY1",
"organizations_url": "https://api.github.com/users/joripage/orgs",
"received_events_url": "https://api.github.com/users/joripage/received_events",
"repos_url": "https://api.github.com/users/joripage/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joripage/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joripage/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joripage",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-10-13T12:42:51Z
|
2021-09-02T00:07:20Z
|
2020-02-18T06:51:40Z
|
NONE
|
resolved
|
Hi,
I use requests.Session() to send a request in many threads. When timeout error occurs, I see num_connections increased and it's bigger than pool_maxsize.
Can you tell me if it is correct behaviour?
## Expected Result
num_connections is always less than pool_maxsize.
## Actual Result
num_connections is bigger than pool_maxsize when timeout error occur.
## Reproduction Steps
```python
import requests
import logging
import json
from threading import Thread
logger = logging.getLogger(__name__)
POOL_MAXSIZE_CONST = 2
def start_new_thread(target_function):
def decorator(*args, **kwargs):
t = Thread(target=target_function, args=args, kwargs=kwargs)
t.start()
return decorator
@start_new_thread
def send_post_request_using_pool(method, url, data=None, headers=None, timeout=5):
try:
HTTPConnectionManager.get_instance().session.request("POST", url, data=data, headers=headers, timeout=timeout)
return r
except Exception as ex:
conn = HTTPConnectionManager.get_instance().adapter.poolmanager.connection_from_url(url)
print ('num_connections: ' + str(conn.num_connections) + '\n')
class HTTPConnectionManager:
__instance = None
session = None
adapter = None
@staticmethod
def get_instance():
if HTTPConnectionManager.__instance is None:
HTTPConnectionManager()
return HTTPConnectionManager.__instance
def __init__(self):
if HTTPConnectionManager.__instance is not None:
raise Exception("This class is a singleton!")
else:
self.session = requests.Session()
self.adapter = requests.adapters.HTTPAdapter(pool_maxsize=POOL_MAXSIZE_CONST, pool_block=True)
self.session.mount('http://', self.adapter)
self.session.mount('https://', self.adapter)
HTTPConnectionManager.__instance = self
url = 'http://slowwly.robertomurray.co.uk/delay/2000/url/http://www.google.co.uk'
logging.basicConfig(level=logging.DEBUG)
for i in range(0,100):
try:
response = send_post_request_using_pool("GET", url, timeout=1)
except Exception as ex:
print("ex: " + str(ex))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020af"
},
"urllib3": {
"version": "1.25.6"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5228/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5228/timeline
| null |
completed
| null | null | false |
[
"Hi @joripage,\r\n\r\nThis doesn't appear related to Requests or a defect in our software. I'd recommend seeking advice on a platform like StackOverflow. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5227
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5227/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5227/comments
|
https://api.github.com/repos/psf/requests/issues/5227/events
|
https://github.com/psf/requests/issues/5227
| 506,156,376 |
MDU6SXNzdWU1MDYxNTYzNzY=
| 5,227 |
request timeouts connect vs read - clarification needed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6190824?v=4",
"events_url": "https://api.github.com/users/adithyaonline/events{/privacy}",
"followers_url": "https://api.github.com/users/adithyaonline/followers",
"following_url": "https://api.github.com/users/adithyaonline/following{/other_user}",
"gists_url": "https://api.github.com/users/adithyaonline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adithyaonline",
"id": 6190824,
"login": "adithyaonline",
"node_id": "MDQ6VXNlcjYxOTA4MjQ=",
"organizations_url": "https://api.github.com/users/adithyaonline/orgs",
"received_events_url": "https://api.github.com/users/adithyaonline/received_events",
"repos_url": "https://api.github.com/users/adithyaonline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adithyaonline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adithyaonline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adithyaonline",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-10-12T08:47:08Z
|
2021-09-02T00:07:22Z
|
2020-02-10T05:54:54Z
|
NONE
|
resolved
|
documentation reads :
`requests.get('https://github.com/', timeout=0.001)`
> timeout is not a time limit on the entire response download; rather, an exception is raised if the server has not issued a response for timeout seconds (more precisely, if no bytes have been received on the underlying socket for timeout seconds). If no timeout is specified explicitly, requests do not time out.
description seems to indicate the timeout specified is used as a "connect" timeout
however tracing the code i see :
same timeout value is being used for `connect` and `read`
https://github.com/psf/requests/blob/master/requests/adapters.py#L435
looking for some clarity on the matter,
do i trust the documentation (am i missing something here?)
or does the documentation need an update ?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5227/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5227/timeline
| null |
completed
| null | null | false |
[
"It expects a tuple in the format (connect timeout, read timeout) which you can see being used [here](https://github.com/psf/requests/blob/master/requests/adapters.py#L425)\r\n\r\nLn435 is what happens if only one value is passed (else).",
"hmm, then the documentation needs an update... \r\n\r\n`requests.get('https://github.com/', timeout=0.001)`\r\n> timeout is not a time limit on the entire response download\r\n\r\nthis is clearly not the case, as the same timeout value is getting duplicated for `connect` and `read` in Ln435\r\n\r\n",
"Hi @adithyaonline,\r\n\r\nThis should all be covered in our [timeout docs](https://requests.readthedocs.io/en/master/user/advanced/#timeouts). Passing a single value will be used for both the connect and read timeout. Passing a tuple will allow you to modify the two independently. The section quoted in the first comment is referencing the read timeout and that we'll wait <timeout> seconds between response packets.",
"oh, I think I got mislead by the Note on the quickstart guide thats all \r\nhttps://2.python-requests.org/en/master/user/quickstart/#timeouts\r\n\r\nthanks for clarifying..."
] |
https://api.github.com/repos/psf/requests/issues/5226
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5226/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5226/comments
|
https://api.github.com/repos/psf/requests/issues/5226/events
|
https://github.com/psf/requests/pull/5226
| 505,503,188 |
MDExOlB1bGxSZXF1ZXN0MzI2OTIzNzc3
| 5,226 |
Fix duplicated idna requirement
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5607572?v=4",
"events_url": "https://api.github.com/users/Jamim/events{/privacy}",
"followers_url": "https://api.github.com/users/Jamim/followers",
"following_url": "https://api.github.com/users/Jamim/following{/other_user}",
"gists_url": "https://api.github.com/users/Jamim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Jamim",
"id": 5607572,
"login": "Jamim",
"node_id": "MDQ6VXNlcjU2MDc1NzI=",
"organizations_url": "https://api.github.com/users/Jamim/orgs",
"received_events_url": "https://api.github.com/users/Jamim/received_events",
"repos_url": "https://api.github.com/users/Jamim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Jamim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jamim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Jamim",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2019-10-10T20:49:41Z
|
2021-08-29T00:07:00Z
|
2020-02-18T15:16:12Z
|
NONE
|
resolved
|
Hello everyone,
The `idna` is in the `install_requires` already, so it makes sense to remove it from extra requirements.
Also, `poetry` has been confused by this duplicated requirement.
https://github.com/sdispater/poetry/issues/1449
Best regards!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5226/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5226/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5226.diff",
"html_url": "https://github.com/psf/requests/pull/5226",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5226.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5226"
}
| true |
[
"Hello @nateprewitt,\r\nCould you please take a look at this PR?\r\nThank you!",
"Also looks to cause problems with recent setuptools/pip.",
"It looks like cryptography [removed its dependency of idna](https://github.com/pyca/cryptography/commit/7e422821b9f800f5345c37011c510dc9e76f552c), so we're free to remove this. @Jamim, can you rebase this onto the tip of master and we can merge. Thanks!",
"I've pulled this commit into https://github.com/psf/requests/pull/5342.",
"@sethmlarson - you've merged this commit so I suspect this PR can be closed :-)",
"@cjw296 Thanks for the ping, closed in favor of #5342."
] |
https://api.github.com/repos/psf/requests/issues/5225
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5225/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5225/comments
|
https://api.github.com/repos/psf/requests/issues/5225/events
|
https://github.com/psf/requests/pull/5225
| 505,159,923 |
MDExOlB1bGxSZXF1ZXN0MzI2NjQ2MzAx
| 5,225 |
Give the body of the response when raising an exception for a 400 error.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1815251?v=4",
"events_url": "https://api.github.com/users/RubenGarcia/events{/privacy}",
"followers_url": "https://api.github.com/users/RubenGarcia/followers",
"following_url": "https://api.github.com/users/RubenGarcia/following{/other_user}",
"gists_url": "https://api.github.com/users/RubenGarcia/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RubenGarcia",
"id": 1815251,
"login": "RubenGarcia",
"node_id": "MDQ6VXNlcjE4MTUyNTE=",
"organizations_url": "https://api.github.com/users/RubenGarcia/orgs",
"received_events_url": "https://api.github.com/users/RubenGarcia/received_events",
"repos_url": "https://api.github.com/users/RubenGarcia/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RubenGarcia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RubenGarcia/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RubenGarcia",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-10-10T09:49:36Z
|
2021-08-28T00:06:31Z
|
2020-05-09T05:54:05Z
|
NONE
|
resolved
|
This makes debugging the reason for the error much easier, e.g. in keycloak / OpenID.
Before the patch:
400 Client Error: Bad Request for url: <url>
After the patch:
400 Client Error: Bad Request for url: <url>, response body is {"error":"unauthorized_client","error_description":"Invalid client secret"}
|
{
"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/5225/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5225/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5225.diff",
"html_url": "https://github.com/psf/requests/pull/5225",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5225.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5225"
}
| true |
[
"Hi @RubenGarcia,\r\n\r\nWe've reviewed this proposal in the past but there are a number of cases, both unintentional and intentional, where an unreasonable amount of data is sent back through a connection. In that case you may not be able to do anything useful with this information, or more severe negative implications may happen with your program. For that reason, I don't think we'll accept this at this time.",
"Would something more intelligent, like sending the first 128 bytes of the body, be acceptable? It would be enough for APIs, and common cases, without being overly verbose in misconfigured servers.",
"No. "
] |
https://api.github.com/repos/psf/requests/issues/5224
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5224/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5224/comments
|
https://api.github.com/repos/psf/requests/issues/5224/events
|
https://github.com/psf/requests/issues/5224
| 504,608,266 |
MDU6SXNzdWU1MDQ2MDgyNjY=
| 5,224 |
utf-8 chars in name of file in post requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15328872?v=4",
"events_url": "https://api.github.com/users/FrostNecro/events{/privacy}",
"followers_url": "https://api.github.com/users/FrostNecro/followers",
"following_url": "https://api.github.com/users/FrostNecro/following{/other_user}",
"gists_url": "https://api.github.com/users/FrostNecro/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FrostNecro",
"id": 15328872,
"login": "FrostNecro",
"node_id": "MDQ6VXNlcjE1MzI4ODcy",
"organizations_url": "https://api.github.com/users/FrostNecro/orgs",
"received_events_url": "https://api.github.com/users/FrostNecro/received_events",
"repos_url": "https://api.github.com/users/FrostNecro/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FrostNecro/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FrostNecro/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FrostNecro",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-10-09T12:07:41Z
|
2019-10-09T12:08:22Z
| null |
NONE
| null |
I have some code like this:
``` python
files = {"file": ("some utf-8 chars like '№'", open("file.jpg", "rb"), "image/jpeg")}
r = requests.post("localhost", files=files)
```
and I receive broken jpg file (actually, 2x size of original)
## Expected Result
I expect to receive file.jpg
## Actual Result
But requests send to me broken file.
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.9"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000211f"
},
"urllib3": {
"version": "1.24.2"
},
"using_pyopenssl": true
}
```
| 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/5224/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5224/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5223
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5223/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5223/comments
|
https://api.github.com/repos/psf/requests/issues/5223/events
|
https://github.com/psf/requests/issues/5223
| 503,935,292 |
MDU6SXNzdWU1MDM5MzUyOTI=
| 5,223 |
Running requests in parallel from a zip archive can create race condition when unpacking the cacerts.pem file
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/35614?v=4",
"events_url": "https://api.github.com/users/tru/events{/privacy}",
"followers_url": "https://api.github.com/users/tru/followers",
"following_url": "https://api.github.com/users/tru/following{/other_user}",
"gists_url": "https://api.github.com/users/tru/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tru",
"id": 35614,
"login": "tru",
"node_id": "MDQ6VXNlcjM1NjE0",
"organizations_url": "https://api.github.com/users/tru/orgs",
"received_events_url": "https://api.github.com/users/tru/received_events",
"repos_url": "https://api.github.com/users/tru/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tru/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tru/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tru",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2019-10-08T09:34:58Z
|
2021-10-05T01:21:46Z
|
2021-07-07T00:14:52Z
|
NONE
|
resolved
|
We ran into a really crazy case and I understand this is a edge case but it might be worth fixing.
We started to see this backtrace in our CI:
```
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/api.py", line 75, in get
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/api.py", line 60, in request
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/sessions.py", line 533, in request
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/sessions.py", line 646, in send
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/adapters.py", line 416, in send
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/adapters.py", line 224, in cert_verify
[2019-10-08T08:01:13.655Z] File "/data/jenkins/postproc-asustor/204934530/conan/lib/conan-1.4.4-66-linux-py36.pyz/requests/utils.py", line 254, in extract_zipped_paths
[2019-10-08T08:01:13.655Z] File "/usr/local/pyenv/versions/3.6.4/lib/python3.6/zipfile.py", line 1484, in extract
[2019-10-08T08:01:13.655Z] return self._extract_member(member, path, pwd)
[2019-10-08T08:01:13.655Z] File "/usr/local/pyenv/versions/3.6.4/lib/python3.6/zipfile.py", line 1547, in _extract_member
[2019-10-08T08:01:13.655Z] os.makedirs(upperdirs)
[2019-10-08T08:01:13.655Z] File "/usr/local/pyenv/versions/3.6.4/lib/python3.6/os.py", line 220, in makedirs
[2019-10-08T08:01:13.655Z] mkdir(name, mode)
[2019-10-08T08:01:13.655Z] FileExistsError: [Errno 17] File exists: '/data/jenkins/postproc-asustor/204934530/_temp/certifi'
```
After a lot of confusion I think I understand this bug now. We distribute our python dependencies (including requests) as a pyz (created with zipapp) and the consumer in this case calls request inside a `ThreadPool`. requests then have logic to unpack `cacerts.pem` into the temp directory, but there is no race protection. So our parallel threads stepped on each other toes here when unpacking this file.
We solved this by a simple get call before starting the parallel invocation. But I think it might be worth fixing because it's very confusing.
## Expected Result
Not having the cacert being overwritten :)
## Actual Result
Exception above
## Reproduction Steps
create a pyz with zipapp of requests and it's dependencies (certifi)
```python
import requests from concurrent.futures import ThreadPoolExecutor
urls = ("https://github.com", "https://github.com", "https://github.com", "https://github.com")
def get(url):
print(f"Getting {url}")
requests.get(url)
with ThreadPoolExecutor(5) as pool:
pool.map(get, urls)
```
note that since it's a race it can trigger or not trigger a lot.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.8"
},
"platform": {
"release": "4.19.72-microsoft-standard",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010100f",
"version": "17.5.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.6"
},
"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/5223/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5223/timeline
| null |
completed
| null | null | false |
[
"This can be reproduced with running pip in parallel too.",
"Genuinely, it'd be best if there was a way not have to extract `cacerts.pem` from the zip file at all and be able to clean it up simply but that just doesn't exist. I've taken multiple approaches trying to fix this, and it's just not that simple to fix.",
"To be more specific:\r\n\r\n- We could attempt to extract on first use to a unique directory, but if we end up in a `multiprocessing` situation or threaded situation that could mean N copies on disk for N parallel workers\r\n- We could extract per-request which just is awful\r\n- We could try doing it at import time and then cleaning up with `atexit` but that's horribly unreliable and could leave resources lying around\r\n- We could add a dependency on a lockfile library and use that to prevent any two workers from extracting to the same directory at the same time, or trying to overwrite what's being written. This last one seems most reasonable but last I checked there was no good, well-maintained lockfile library for Python that we could trust to be secure and up-to-date.",
"What about using an application data folder to extract this (no cleanup), and do the writing in parallel safe manner (mkdir with exist ok)? This is how virtualenv handles this and no one - complained yet for adding a few kb files in application data folder).",
"We've had multiple complaints just about the fact that we write to a directory. I think previously we used a more predictable (between python interpreters) directory and that got people riled up too. In general, people don't want us creating files at all. The 100% best solution is the standard library `ssl` module accepting strings rather than requiring files on the system to verify certificates.\r\n\r\nAlso, can you clarify *your* definition of \"application data folder\" here? I think it's what we've done before and it opens us up to another utility in the user's space changing the file thus allowing something to corrupt the trust store (which is very bad)",
"A user write able temp folder is almost as easy to exploit as a user write able temp folder we have now. That being said I think for this issue the easiest solution is to put the extract operation in a try catch and silently swallow the exception if the file already exist. The race condition would no longer throw an exception and everything would work as expected. ",
"https://github.com/psf/requests/pull/5707 works around the issue by keeping the current solution but without the racing condition imposed by the os makedirs.",
"@sigmavirus24 alternatively we can export this into a context manager handled temporary file on a per ``send`` call basis, what do you think? Though that can get messy with session connections."
] |
https://api.github.com/repos/psf/requests/issues/5222
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5222/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5222/comments
|
https://api.github.com/repos/psf/requests/issues/5222/events
|
https://github.com/psf/requests/issues/5222
| 503,125,998 |
MDU6SXNzdWU1MDMxMjU5OTg=
| 5,222 |
Requests inexplicably aborts connection to https://dictionary.cambridge.org
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52673001?v=4",
"events_url": "https://api.github.com/users/abmyii/events{/privacy}",
"followers_url": "https://api.github.com/users/abmyii/followers",
"following_url": "https://api.github.com/users/abmyii/following{/other_user}",
"gists_url": "https://api.github.com/users/abmyii/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abmyii",
"id": 52673001,
"login": "abmyii",
"node_id": "MDQ6VXNlcjUyNjczMDAx",
"organizations_url": "https://api.github.com/users/abmyii/orgs",
"received_events_url": "https://api.github.com/users/abmyii/received_events",
"repos_url": "https://api.github.com/users/abmyii/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abmyii/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abmyii/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abmyii",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-10-06T16:37:47Z
|
2021-09-03T00:10:53Z
|
2019-10-25T03:01:58Z
|
NONE
|
resolved
|
I also tested the same url with `urllib.request.urlopen` and it works fine.
## Expected Result
To get a connection to https://dictionary.cambridge.org.
## Actual Result
Requests fails with the error:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 449, in send
chunked=chunked
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/dist-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.6/dist-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 453, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
```
## Reproduction Steps
```python
import requests
requests.get('https://dictionary.cambridge.org')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.7"
},
"platform": {
"release": "4.15.0-64-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.5.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5222/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5222/timeline
| null |
completed
| null | null | false |
[
"I don't understand much of what is happening at the lower level and I'm sure that is where the error is at (connection headers, ect.). I also came across this error which, if you could explain, I'd be much obliged:\r\n```\r\nurllib.request.urlopen('https://www.enotes.com')\r\n```\r\nGives the error:\r\n```\r\nTraceback (most recent call last):\r\n File \"references_to_urls.py\", line 60, in <module>\r\n html = urllib.request.urlopen(url).read().decode('utf-8', errors='ignore')\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 223, in urlopen\r\n return opener.open(url, data, timeout)\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 532, in open\r\n response = meth(req, response)\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 642, in http_response\r\n 'http', request, response, code, msg, hdrs)\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 570, in error\r\n return self._call_chain(*args)\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 504, in _call_chain\r\n result = func(*args)\r\n File \"/usr/lib/python3.6/urllib/request.py\", line 650, in http_error_default\r\n raise HTTPError(req.full_url, code, msg, hdrs, fp)\r\nurllib.error.HTTPError: HTTP Error 403: Forbidden\r\n```\r\nHowever the same link works with requests!",
"Using a user-agent (`requests.get('https://dictionary.cambridge.org', headers={'User-agent': 'Mozilla/5.0'})`) fixes the problem for requests. I wonder if urllib automatically uses a user-agent?",
"Yes, urllib automatically adds a user agent. Cambridge has chosen to block scraping with Requests by aborting connections with that user-agent."
] |
https://api.github.com/repos/psf/requests/issues/5221
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5221/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5221/comments
|
https://api.github.com/repos/psf/requests/issues/5221/events
|
https://github.com/psf/requests/pull/5221
| 501,663,168 |
MDExOlB1bGxSZXF1ZXN0MzIzODkyOTY0
| 5,221 |
Change raise_for_status message to hide password in URL
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/285063?v=4",
"events_url": "https://api.github.com/users/Overv/events{/privacy}",
"followers_url": "https://api.github.com/users/Overv/followers",
"following_url": "https://api.github.com/users/Overv/following{/other_user}",
"gists_url": "https://api.github.com/users/Overv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Overv",
"id": 285063,
"login": "Overv",
"node_id": "MDQ6VXNlcjI4NTA2Mw==",
"organizations_url": "https://api.github.com/users/Overv/orgs",
"received_events_url": "https://api.github.com/users/Overv/received_events",
"repos_url": "https://api.github.com/users/Overv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Overv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Overv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Overv",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 4 |
2019-10-02T18:49:19Z
|
2022-09-28T16:03:27Z
| null |
NONE
| null |
This PR fixes #5021 by replacing a password in the URL with asterisks.
Example:
```python
import requests
r = requests.get("http://foo:[email protected]/status/401")
r.raise_for_status()
```
Output:
```
Traceback (most recent call last):
File "5021.py", line 4, in <module>
r.raise_for_status()
File "***/python-requests/requests/requests/models.py", line 968, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: UNAUTHORIZED for url: http://foo:***@httpbin.org/status/401
```
| 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/5221/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5221/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5221.diff",
"html_url": "https://github.com/psf/requests/pull/5221",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5221.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5221"
}
| true |
[
"@jackyzha0 @barroca I'll have time to get back to this next weekend.",
"@Overv I opened a similar PR for this that might help you to write a test #5244 let me know if you need help.",
"I've added a unit test.",
"Running into this same issue for requests with `client_id` and `client_secret` parameters in the url. Those values would get exposed despite the proposed fix here. Seems like a more general solution is needed."
] |
https://api.github.com/repos/psf/requests/issues/5220
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5220/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5220/comments
|
https://api.github.com/repos/psf/requests/issues/5220/events
|
https://github.com/psf/requests/pull/5220
| 501,644,975 |
MDExOlB1bGxSZXF1ZXN0MzIzODc4MDE3
| 5,220 |
Fix connection pool managers not taking varying TLS parameters into account
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/285063?v=4",
"events_url": "https://api.github.com/users/Overv/events{/privacy}",
"followers_url": "https://api.github.com/users/Overv/followers",
"following_url": "https://api.github.com/users/Overv/following{/other_user}",
"gists_url": "https://api.github.com/users/Overv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Overv",
"id": 285063,
"login": "Overv",
"node_id": "MDQ6VXNlcjI4NTA2Mw==",
"organizations_url": "https://api.github.com/users/Overv/orgs",
"received_events_url": "https://api.github.com/users/Overv/received_events",
"repos_url": "https://api.github.com/users/Overv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Overv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Overv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Overv",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-10-02T18:12:03Z
|
2022-01-03T15:28:37Z
| null |
NONE
| null |
This PR fixes #5140 and #4325 by returning different connection and proxy pools based on the connection parameters for the current request.
I tested it with the following code:
```python
import requests
session = requests.Session()
print(session.get('https://client.badssl.com/'))
print(session.get('https://client.badssl.com/', cert=('client.crt', 'client.key')))
print(session.get('https://client.badssl.com/', cert=('client.crt', 'client.key')))
print(session.get('https://client.badssl.com/'))
print(session.get('https://client.badssl.com/'))
```
Which correctly outputs:
```
<Response [400]>
<Response [200]>
<Response [200]>
<Response [400]>
<Response [400]>
```
Instead of the previous output:
```
<Response [400]>
<Response [400]>
<Response [400]>
<Response [400]>
<Response [400]>
```
| 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/5220/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5220/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5220.diff",
"html_url": "https://github.com/psf/requests/pull/5220",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5220.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5220"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5219
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5219/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5219/comments
|
https://api.github.com/repos/psf/requests/issues/5219/events
|
https://github.com/psf/requests/pull/5219
| 501,113,140 |
MDExOlB1bGxSZXF1ZXN0MzIzNDQ5ODY5
| 5,219 |
Change requests.ConnectionError to inherit standard ConnectionError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/285063?v=4",
"events_url": "https://api.github.com/users/Overv/events{/privacy}",
"followers_url": "https://api.github.com/users/Overv/followers",
"following_url": "https://api.github.com/users/Overv/following{/other_user}",
"gists_url": "https://api.github.com/users/Overv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Overv",
"id": 285063,
"login": "Overv",
"node_id": "MDQ6VXNlcjI4NTA2Mw==",
"organizations_url": "https://api.github.com/users/Overv/orgs",
"received_events_url": "https://api.github.com/users/Overv/received_events",
"repos_url": "https://api.github.com/users/Overv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Overv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Overv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Overv",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-10-01T19:58:06Z
|
2023-05-12T00:03:09Z
|
2022-05-11T00:53:03Z
|
NONE
|
resolved
|
This PR changes the requests version of `ConnectionError` to also inherit from the built-in `ConnectionError`, see #5162
|
{
"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/5219/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5219/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5219.diff",
"html_url": "https://github.com/psf/requests/pull/5219",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5219.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5219"
}
| true |
[
"This PR doesn't solve the issue that `requests.exceptions.ConnectionError` redefines the builtin `ConnectionError`. What about renaming this to `RequestsConnectionError` or another name altogether?\r\n\r\nAlso - does this actually produce the result you're expecting? You expected:\r\n\r\n(<class 'requests.exceptions.ConnectionError'>, <class 'requests.exceptions.RequestException'>, <class 'ConnectionError'>, <class 'OSError'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)\r\n\r\n☝️ but the PR doesn't inherit from `ConnectionError` - it inherits from `OSError`. I suspect you'd find this PR creates a slightly different inheritance like this:\r\n\r\n(<class 'requests.exceptions.ConnectionError'>, <class 'requests.exceptions.RequestException'>, <class 'OSError'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)\r\n\r\nNote how this only shows the redefined builtin, not the actual builtin per the issue.",
"I don't believe this is an approach we can accept for #5162. We can't overwrite the standard lib ConnectionError."
] |
https://api.github.com/repos/psf/requests/issues/5218
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5218/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5218/comments
|
https://api.github.com/repos/psf/requests/issues/5218/events
|
https://github.com/psf/requests/issues/5218
| 501,106,361 |
MDU6SXNzdWU1MDExMDYzNjE=
| 5,218 |
sphinx.ext.autodoc intersphinx_mapping for python-requests throws SSLError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1781964?v=4",
"events_url": "https://api.github.com/users/serbant/events{/privacy}",
"followers_url": "https://api.github.com/users/serbant/followers",
"following_url": "https://api.github.com/users/serbant/following{/other_user}",
"gists_url": "https://api.github.com/users/serbant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/serbant",
"id": 1781964,
"login": "serbant",
"node_id": "MDQ6VXNlcjE3ODE5NjQ=",
"organizations_url": "https://api.github.com/users/serbant/orgs",
"received_events_url": "https://api.github.com/users/serbant/received_events",
"repos_url": "https://api.github.com/users/serbant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/serbant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/serbant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/serbant",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-10-01T19:44:00Z
|
2021-08-28T00:06:11Z
|
2020-11-10T00:44:19Z
|
NONE
|
resolved
|
Summary.
Sphinx documentation 'make html' throws warning about https://2.python-requests.org/en/master/objects.inv
## Expected Result
Sphinx make can pull the objects.inv without problems
## Actual Result
```
(phsa_venv) phsa@lvmsocq01:~/p_soc_auto/docs$ make html
Running Sphinx v2.1.2
loading pickled environment... done
loading intersphinx inventory from https://2.python-requests.org/en/master/objects.inv...
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://2.python-requests.org/en/master/objects.inv' not fetchable due to <class 'requests.exceptions.SSLError'>: HTTPSConnectionPool(host='2.python-requests.org', port=443): Max retries exceeded with url: /en/master/objects.inv (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:833)'),))
...
dumping object inventory... done
build succeeded, 2 warnings.
The HTML pages are in build/html.
(phsa_venv) phsa@lvmsocq01:~/p_soc_auto/docs$
```
## Reproduction Steps
This is the relevant extract from the Sphinx conf.py file:
```python
extensions = [
'sphinx.ext.autodoc',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx.ext.inheritance_diagram',
'celery.contrib.sphinx',
'sphinx.ext.autosectionlabel',
'sphinx.ext.todo',
'sphinx.ext.autosummary',
'sphinxcontrib.plantuml',
]
# ...
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'django': ('http://docs.djangoproject.com/en/2.2/',
'http://docs.djangoproject.com/en/2.2/_objects/'),
'urllib3': ('http://urllib3.readthedocs.org/en/latest', None),
'requests': ('https://2.python-requests.org/en/master/', None), }
```
Then run a Sphinx 'make html'
## System Information
$ python -m requests.help
```
(phsa_venv) phsa@lvmsocq01:~/p_soc_auto$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "3.10.0-862.3.2.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 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/5218/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5218/timeline
| null |
completed
| null | null | false |
[
"Isn't this a duplicate of #5212 ?",
"Fixed by using https://requests.readthedocs.io/en/master/ for intersphinx configuration.",
"I don't see a point in recent history for Requests where we've had an intersphinx_mapping like this. Assuming this is one you've created, Natim's response is correct. We recommend using the requests.readthedocs.io going forward.",
"> I don't see a point in recent history for Requests where we've had an intersphinx_mapping like this.\r\n\r\nI think that's a Sphinx capability."
] |
https://api.github.com/repos/psf/requests/issues/5217
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5217/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5217/comments
|
https://api.github.com/repos/psf/requests/issues/5217/events
|
https://github.com/psf/requests/issues/5217
| 501,092,513 |
MDU6SXNzdWU1MDEwOTI1MTM=
| 5,217 |
Requests does not preserve supplied CookiePolicy or CookieJar
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52045989?v=4",
"events_url": "https://api.github.com/users/jandersen-plaid/events{/privacy}",
"followers_url": "https://api.github.com/users/jandersen-plaid/followers",
"following_url": "https://api.github.com/users/jandersen-plaid/following{/other_user}",
"gists_url": "https://api.github.com/users/jandersen-plaid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jandersen-plaid",
"id": 52045989,
"login": "jandersen-plaid",
"node_id": "MDQ6VXNlcjUyMDQ1OTg5",
"organizations_url": "https://api.github.com/users/jandersen-plaid/orgs",
"received_events_url": "https://api.github.com/users/jandersen-plaid/received_events",
"repos_url": "https://api.github.com/users/jandersen-plaid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jandersen-plaid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jandersen-plaid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jandersen-plaid",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-10-01T19:14:46Z
|
2019-10-01T19:14:46Z
| null |
NONE
| null |
Recently, I have run into some niche issues with cookies where servers are sending cookies that they themselves do not accept. An example is in https://github.com/psf/requests/issues/4592 or where a `'Set-Cookie'` header has a value that contains ASCII control codes -- `r'[\x01-\x1F\x7F]'`. I fully accept that it is not within the scope of `requests` to validate cookies (nor should it be), which is why I have come to a solution of creating a new `CookiePolicy` which will refuse to set cookies that are similar to the previous `'Set-Cookie'` example.
Unfortunately, in using the new policy with the default `Session` class it appears that the policy is not preserved while making requests. In investigating further, it looks like `requests` just overrides whatever `CookieJar` or `CookiePolicy` is set by the user to be `RequestsCookieJar` instead of preserving the supplied `CookieJar`.
Since this is heavily reliant on what the server sends, I tried to supply as complete and self-contained of an example as possible below (which requires a quickly spun-up server), but let me know if the issue needs further explanation.
Additionally, I would be more than happy to submit a PR that supplies a fix and adequate tests if needed (though after validation that this is not intended behavior, of course).
## Expected Result
I expect for the cookie policy to be preserved while making requests within a session or requests at all. That is, there should be no `AssertionError`s or printed statements in the below example.
## Actual Result
```
Failed to preserve cookie policy with set_policy
Failed to preserve cookie policy with RequestsCookieJar
Failed to preserve cookie policy with NewCookieJar
```
## Reproduction Steps
Spin up a local server that sends a weird cookie
```python
from flask import Flask, redirect, make_response, request, url_for
app = Flask(__name__)
@app.route('/plain_req')
def plain_req():
resp = make_response('Single response')
resp.headers['Set-Cookie'] = "bad_cookie=\x01; path=/; HttpOnly"
return resp
@app.route('/redirect_1')
def redirect_1():
return redirect(url_for('redirect_2'), code=302)
@app.route('/redirect_2')
def redirect_2():
resp = make_response(redirect(url_for('redirect_3'), code=302))
resp.headers['Set-Cookie'] = "bad_cookie=\x01; path=/; HttpOnly"
return resp
@app.route('/redirect_3')
def redirect_3():
if '\x01' in request.cookies.get('bad_cookie'):
resp = make_response('Client Error: Bad cookies recieved', 401)
else:
resp = make_response('It all worked, yay!', 200)
return resp
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8000)
```
Test for the cookie (will raise AssertionError in either the context manager or
```python
import requests
from requests.cookies import RequestsCookieJar
from http.cookiejar import DefaultCookiePolicy, CookieJar
class NewCookiePolicy(DefaultCookiePolicy):
def set_ok(self, cookie, request):
valid = super(NewCookiePolicy, self).set_ok(cookie, request)
if '\x01' in cookie.value:
return False
return valid
def test_session(session):
# A plain request does not work
req = session.get('http://127.0.0.1:8000/plain_req')
assert '\x01' not in req.cookies.items()[0][1] # cookie still around
assert isinstance(req.cookies._policy, NewCookiePolicy) # Policy not preserved
# Requests with multiple redirects do not
req = session.get('http://127.0.0.1:8000/redirect_1')
assert '\x01' not in req.history[1].cookies.items()[0][1] # cookie still around
assert isinstance(req.history[1].cookies._policy, NewCookiePolicy) # Policy not preserved
# Comment out the above assertion to try the context manager
with requests.Session() as s:
s.cookies.set_policy(NewCookiePolicy())
context_req = s.get('http://127.0.0.1:8000/redirect_1')
assert '\x01' not in req.history[1].cookies.items()[0][1] # cookie still around
assert isinstance(context_req.history[0].cookies._policy, NewCookiePolicy) # Policy not preserved
policy_session = requests.Session()
policy_session.cookies.set_policy(NewCookiePolicy())
try:
test_session(policy_session)
except AssertionError:
print("Failed to preserve cookie policy with set_policy")
req_jar_session = requests.Session()
req_jar_session.cookies = RequestsCookieJar(policy=NewCookiePolicy())
try:
test_session(req_jar_session)
except AssertionError:
print("Failed to preserve cookie policy with RequestsCookieJar")
NewCookieJar = CookieJar(policy=NewCookiePolicy())
new_jar_session = requests.Session()
new_jar_session.cookies = NewCookieJar
try:
test_session(new_jar_session)
except AssertionError:
print("Failed to preserve cookie policy with NewCookieJar")
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "18.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.25.4"
},
"using_pyopenssl": false
}
```
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5217/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5217/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5216
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5216/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5216/comments
|
https://api.github.com/repos/psf/requests/issues/5216/events
|
https://github.com/psf/requests/pull/5216
| 499,937,156 |
MDExOlB1bGxSZXF1ZXN0MzIyNTE4MjQx
| 5,216 |
documentation link fixed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1415031?v=4",
"events_url": "https://api.github.com/users/Leetcore/events{/privacy}",
"followers_url": "https://api.github.com/users/Leetcore/followers",
"following_url": "https://api.github.com/users/Leetcore/following{/other_user}",
"gists_url": "https://api.github.com/users/Leetcore/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Leetcore",
"id": 1415031,
"login": "Leetcore",
"node_id": "MDQ6VXNlcjE0MTUwMzE=",
"organizations_url": "https://api.github.com/users/Leetcore/orgs",
"received_events_url": "https://api.github.com/users/Leetcore/received_events",
"repos_url": "https://api.github.com/users/Leetcore/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Leetcore/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Leetcore/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Leetcore",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-29T16:11:17Z
|
2021-08-30T00:06:36Z
|
2019-09-30T09:52:29Z
|
CONTRIBUTOR
|
resolved
|
websites is down, link to requests.readthedocs.io
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1200832?v=4",
"events_url": "https://api.github.com/users/ewdurbin/events{/privacy}",
"followers_url": "https://api.github.com/users/ewdurbin/followers",
"following_url": "https://api.github.com/users/ewdurbin/following{/other_user}",
"gists_url": "https://api.github.com/users/ewdurbin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ewdurbin",
"id": 1200832,
"login": "ewdurbin",
"node_id": "MDQ6VXNlcjEyMDA4MzI=",
"organizations_url": "https://api.github.com/users/ewdurbin/orgs",
"received_events_url": "https://api.github.com/users/ewdurbin/received_events",
"repos_url": "https://api.github.com/users/ewdurbin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ewdurbin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ewdurbin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ewdurbin",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5216/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5216/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5216.diff",
"html_url": "https://github.com/psf/requests/pull/5216",
"merged_at": "2019-09-30T09:52:29Z",
"patch_url": "https://github.com/psf/requests/pull/5216.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5216"
}
| true |
[
"Thank you @Leetcore, until we can sort out what happened with python-requests.org this looks good.",
"@ewdurbin also see #5236"
] |
https://api.github.com/repos/psf/requests/issues/5215
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5215/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5215/comments
|
https://api.github.com/repos/psf/requests/issues/5215/events
|
https://github.com/psf/requests/issues/5215
| 499,662,944 |
MDU6SXNzdWU0OTk2NjI5NDQ=
| 5,215 |
verify=False causing memory leak
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9195301?v=4",
"events_url": "https://api.github.com/users/tallona/events{/privacy}",
"followers_url": "https://api.github.com/users/tallona/followers",
"following_url": "https://api.github.com/users/tallona/following{/other_user}",
"gists_url": "https://api.github.com/users/tallona/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tallona",
"id": 9195301,
"login": "tallona",
"node_id": "MDQ6VXNlcjkxOTUzMDE=",
"organizations_url": "https://api.github.com/users/tallona/orgs",
"received_events_url": "https://api.github.com/users/tallona/received_events",
"repos_url": "https://api.github.com/users/tallona/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tallona/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tallona/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tallona",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2019-09-27T21:39:37Z
|
2021-12-03T21:00:30Z
|
2021-09-04T20:09:26Z
|
NONE
|
resolved
|
When I use `verify=False` in `requests.get` the memory usage creeps up over time until all memory is used up, if I remove `verify=False` then the memory usage is stable at approximately about 14.2-14.9mb over time.
I've changed the request to use `verify=True` and memory usage is stable at the expected usage I've seen as outlined above.
When using the `requests.get` function I can see the memory usage slowly creeping up via task manager by watching the spawned process.
I've watched this over a two hour period in both cases and when using `verify=False` the memory usage is at 1GB+ after two hours.
I've recreated the issue using a free API that uses no auth, sample script attached.
## What you expected
Memory usage to be stable enough during life time of script running.
## What happened instead
Memory usage creeps up over time and will use up all server memory available eventually.
## Sample Script
```python
#!/usr/bin/env python
import time, threading, requests, urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def check_status():
global running
url = "https://swapi.co/api/films/1/"
while running:
response = requests.get(url, verify=False)
time.sleep(5)
if __name__ == "__main__":
running = True
try:
check_status = threading.Thread(target=check_status)
check_status.start()
# To stop falling off main thread so it will catch a keyboard interrupt
while running:
time.sleep(1)
except KeyboardInterrupt:
running = False
except Exception as e:
running = False
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.5"
},
"using_pyopenssl": false
}
```
## Pympler summary
Some additional information, I've used pympler to give some memory usage with verify set as both possibilities.
# 1 - Start of script - verify=False
> types | # objects | total size
==================================== | =========== | ============
<class 'str | 13937 | 1.59 MB
<class 'dict | 2014 | 1.09 MB
<class 'code | 4445 | 626.77 KB
<class 'type | 563 | 588.95 KB
<class 'set | 147 | 144.16 KB
<class 'tuple | 1574 | 107.02 KB
<class 'wrapper_descriptor | 1213 | 94.77 KB
<class 'weakref | 1093 | 85.39 KB
<class 'abc.ABCMeta | 84 | 83.24 KB
<class 'builtin_function_or_method | 1042 | 73.27 KB
<class 'method_descriptor | 945 | 66.45 KB
<class 'int | 1891 | 56.13 KB
<class 'list | 314 | 53.05 KB
<class 'getset_descriptor | 689 | 48.45 KB
<class 're.Pattern | 87 | 44.62 KB
# 2 - 4/5 minutes into run - verify=False
types | # objects | total size
==================================== | =========== | ============
<class 'list | 61274 | 22.22 MB
<class 'str | 75877 | 5.81 MB
<class 'dict | 2434 | 1.17 MB
<class 'code | 4445 | 626.77 KB
<class 'type | 563 | 588.95 KB
<class 'int | 12663 | 350.91 KB
<class 'set | 167 | 148.53 KB
<class 'tuple | 1573 | 106.91 KB
<class 'wrapper_descriptor | 1213 | 94.77 KB
<class 'collections.OrderedDict | 104 | 92.80 KB
<class 'weakref | 1093 | 85.39 KB
<class 'abc.ABCMeta | 84 | 83.24 KB
<class 'builtin_function_or_method | 1042 | 73.27 KB
<class 'method_descriptor | 945 | 66.45 KB
<class 'bytes | 123 | 50.75 KB
# 3 - Start of script - verify=True
types | # objects | total size
==================================== | =========== | ============
<class 'str | 13937 | 1.59 MB
<class 'dict | 2014 | 1.09 MB
<class 'code | 4445 | 626.77 KB
<class 'type | 563 | 588.95 KB
<class 'set | 147 | 144.16 KB
<class 'tuple | 1574 | 107.02 KB
<class 'wrapper_descriptor | 1213 | 94.77 KB
<class 'weakref | 1081 | 84.45 KB
<class 'abc.ABCMeta | 84 | 83.24 KB
<class 'builtin_function_or_method | 1030 | 72.42 KB
<class 'method_descriptor | 945 | 66.45 KB
<class 'int | 1891 | 56.13 KB
<class 'list | 314 | 53.05 KB
<class 'getset_descriptor | 689 | 48.45 KB
<class 're.Pattern | 87 | 44.62 KB
# 4 - 4/5 minutes into run - verify=True
types | # objects | total size
==================================== | =========== | ============
<class 'str | 13936 | 1.59 MB
<class 'dict | 2014 | 1.09 MB
<class 'code | 4444 | 626.62 KB
<class 'type | 563 | 588.95 KB
<class 'set | 147 | 144.16 KB
<class 'tuple | 1573 | 106.91 KB
<class 'wrapper_descriptor | 1213 | 94.77 KB
<class 'weakref | 1081 | 84.45 KB
<class 'abc.ABCMeta | 84 | 83.24 KB
<class 'builtin_function_or_method | 1030 | 72.42 KB
<class 'method_descriptor | 945 | 66.45 KB
<class 'int | 1891 | 56.13 KB
<class 'list | 314 | 53.05 KB
<class 'getset_descriptor | 689 | 48.45 KB
<class 're.Pattern | 87 | 44.62 KB
|
{
"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/5215/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5215/timeline
| null |
completed
| null | null | false |
[
"@tallona Have you tried the same experiment with straight urllib3? I ask because it seems the verify code just reduces to this function where, if `verify = False`, then `conn.ca_certs` is not set on the urllib3 Connection object.\r\nhttps://github.com/psf/requests/blob/2e0f38c7913a1e248b32030f7c8c00defd365b08/requests/adapters.py#L203",
"@AndTheDaysGoBy I've just tried using urllib3 as seen in the function below and the memory usage is stable, slightly more then using the requests package but regardless the memory is stable at about approximately 15.1mb for over 30 minutes.\r\n\r\nIt's strange as it only happens when using verify=False on `requests.get` but like you said `cert_verify` doesn't do a whole lot, I see that in `cert_verify` there are default certs loaded when verify is False and there is also a call to `extract_zipped_paths` when verify is False, I haven't had time to dig further into either of these areas yet, could one of these be responsible for the memory usage creeping up?!\r\n\r\nI've also added some additional memory usage stats using pympler to the original post.\r\n\r\n```python\r\ndef check_status():\r\n\tglobal running\r\n\r\n\turl = \"https://swapi.co/api/films/1/\"\r\n\thttp = urllib3.PoolManager(key_file=None, cert_file=None, cert_reqs='CERT_NONE', ca_certs=None)\r\n\r\n\twhile running:\r\n\t\tresponse = http.request('GET', url)\r\n\t\t\r\n\t\ttime.sleep(5)\r\n```",
"@tallona Seems your statistics imply something is repeatedly generating lists in the case of `verify = False`? Also, surprising if things are constant in the case of just running the urllib3 code. In particular because the requests code can be understood as:\r\n\r\n`def get/post/put/etc.` -> `def request` -> `adapter.send()` (HTTPAdapter) where HTTPAdapter leads to a file which makes use of urllib3. E.g. the above function I mentioned.\r\n\r\nThe approach I'd take if I were you is to isolate further and further the issue. I.e., does the issue appear when using `requests.request()`? Does the issue appear when you use `preparedRequest + send`? Etc.\r\n\r\nEdit:\r\nAs an aside, presuming I'm performing your test properly, I don't believe I experience the same behavior. I.e. running the below has a diff on during the first 5 seconds, but empty diffs all subsequent times. Presumably because I'm not experiencing a leak, hence nothing is being continuously added to the memory footprint.\r\n```\r\n#!/usr/bin/env python\r\nfrom pympler import tracker\r\nimport time, threading, requests, urllib3\r\n\r\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\r\n\r\ndef check_status():\r\n global running, tr\r\n url = \"https://swapi.co/api/films/1/\"\r\n while running:\r\n response = requests.get(url, verify=False)\r\n tr.print_diff() \r\n time.sleep(5)\r\n\r\nif __name__ == \"__main__\":\r\n running = True\r\n tracker.SummaryTracker()\r\n try: \r\n check_status = threading.Thread(target=check_status)\r\n check_status.start()\r\n while running:\r\n time.sleep(1)\r\n except KeyboardInterrupt:\r\n running = False\r\n except:\r\n running = False\r\n```",
"@AndTheDaysGoBy Done a bit more testing using `requests.request` (example function below) and I'm seeing the same as using `requests.get`. When I set `verify=False` the memory usage creeps up over time and keeps increasing, but when I set `verify=True` the memory usage is stable.\r\n\r\nI've also taken your code example and run it locally, when using verify False I'm seeing a memory increase over time but using verify True the memory usage is stable.\r\n\r\n```python\r\ndef check_status():\r\n global running\r\n\r\n url = \"https://swapi.co/api/films/1/\"\r\n\r\n while running:\r\n response = requests.request(method='GET', url=url, verify=False)\r\n \r\n time.sleep(5)\r\n```",
"@tallona Meaning, you constantly see a memory diff? Or do you perform something like `top` or `watch pmap -x <pid>`? Because, if what you say it's true, I'm (personally) at a loss because I can't reproduce. Granted, I'm running Ubuntu, not Windows 10, but I have tried with Python 2.7 and 3.7 to reproduce your issue. I also noticed you in a different thread regarding memory leaks. What someone in that thread had mentioned is requests's caching that's the issue. Again, though, I can't reproduce it personally, so the most I can give is guidance on narrowing down the issue area.\r\n\r\nSince you state `requests.request` gives you the same issue, does `r = requests.Request(...); r.prepare_request(); r.send()` exhibit the same behavior?\r\n\r\nIf that still is the issue, then try instantiating https://github.com/psf/requests/blob/2e0f38c7913a1e248b32030f7c8c00defd365b08/requests/adapters.py#L84\r\nmanually, i.e. the adapters.py HTTPAdapter object and sending via that. If that no longer fails then the issue would at least be something in the sessions.py. If the issue persists, then the issue is likely somewhere in adapters.py.\r\n",
"The initial report was for Python 3.7.4 on Windows. You might be affected by the Windows-only bug https://bugs.python.org/issue37702",
"Can confirm this bug when using ``verify=False`` on requests to addresses with https. Memory consumption growing without bounds (requests 2.22.0)\r\n\r\nAffected environment: Winpython 64 3740/3741)\r\nEnvironment not affected: Winpython 64 3760\r\n\r\nThanks to @tiran to pointing that out!",
"Any solution, for this, I have the same problem.\r\n\r\npython: 3.7\r\nrequests: 2.23.0",
"OMG! I can confirm verify=False leaks memory so bad. The past 10 days has been hell for me trying to find the leak in my python app",
"> OMG! I can confirm verify=False leaks memory so bad. The past 10 days has been hell for me trying to find the leak in my python app\r\n\r\nWhat's your platform, Python version, and requests version?",
"> > OMG! I can confirm verify=False leaks memory so bad. The past 10 days has been hell for me trying to find the leak in my python app\r\n> \r\n> What's your platform, Python version, and requests version?\r\n\r\nWindows 10\r\npython: 3.7.4\r\nrequests: 2.23.0\r\n\r\n",
"You have to update to a newer version of 3.7 series. 3.7.4 has a memory leak that only affects Windows.",
"As @tiran pointed out this does appear to be resolved in https://bugs.python.org/issue37702. We haven't seen new reports of this in almost a year, so I'm going to resolve.\r\n\r\nIf you are still experiencing this on Python 3.7.5+, please open a new issue linking back to this one so we can track separately. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5214
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5214/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5214/comments
|
https://api.github.com/repos/psf/requests/issues/5214/events
|
https://github.com/psf/requests/issues/5214
| 499,154,249 |
MDU6SXNzdWU0OTkxNTQyNDk=
| 5,214 |
Website and documentation are offline
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5641900?v=4",
"events_url": "https://api.github.com/users/thedoc31/events{/privacy}",
"followers_url": "https://api.github.com/users/thedoc31/followers",
"following_url": "https://api.github.com/users/thedoc31/following{/other_user}",
"gists_url": "https://api.github.com/users/thedoc31/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thedoc31",
"id": 5641900,
"login": "thedoc31",
"node_id": "MDQ6VXNlcjU2NDE5MDA=",
"organizations_url": "https://api.github.com/users/thedoc31/orgs",
"received_events_url": "https://api.github.com/users/thedoc31/received_events",
"repos_url": "https://api.github.com/users/thedoc31/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thedoc31/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thedoc31/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thedoc31",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 14 |
2019-09-26T23:01:44Z
|
2021-11-10T09:02:12Z
|
2021-08-12T06:59:35Z
|
NONE
|
resolved
|
Looks like www.python-requests.org and docs.python-requests.org are redirecting to https://2.python-requests.org and failing SSL negotiation, making the site appear down. Google links are all dead, documentation links don't work, etc.
http://2.python-requests.org redirects to https://requests.kennethreitz.org/en/master/, which works.
## Expected Result
Website should appear or redirect to non-HTTPS link
## Actual Result
Redirection to https://2.python-requests.org breaks the site
## Reproduction Steps
Open browser of your choice
Attempt to browse to http://docs.python-requests.org or http://www.python-requests.org.
Browser gets redirect to https://2.python-requests.org which fails with an SSL_PROTOCOL_ERROR
## System Information
N/A
|
{
"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": 16,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 16,
"url": "https://api.github.com/repos/psf/requests/issues/5214/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5214/timeline
| null |
completed
| null | null | false |
[
"My first Google result is 2.python-requests.org, which is down. Came here to report this.",
"👍 Same here\r\n\r\nBtw, the new logo is cool AF. Kudos. ",
"https://requests.readthedocs.io/en/master/ is up.\r\n\r\nhttps://requests.kennethreitz.org/en/master/ is up.\r\n\r\nFrom @kennethreitz https://twitter.com/kennethreitz/status/1176637337553559552 :\r\n\r\n> *Been deleting domains for an hour. Down to 26.*\r\n\r\nThe repo desc and the README both link to https://2.python-requests.org \r\n\r\n@kennethreitz What's with all the whitespace in the README? Why no Kanye pics?",
"I opend a pull request for the link change to readthedocs: https://github.com/psf/requests/pull/5216",
"I've updated the link in the readme from #5216 as well as the link at the top of the Github project until @kennethreitz is able to fix python-requests.org. @kennethreitz do you need any assistance with this?",
"With (I believe) the same root cause, the search functionality on all (working) versions of the docs (eg https://requests.readthedocs.io/en/master/, https://requests.kennethreitz.org/en/master/) is broken, as all search results link to the old URLs.",
"Related: #5212 ",
"This should be resolved now with #5236. Thanks everyone!",
"Actually on second thought, I'm keeping this open till we get the domain fixed. We need to get python-requests.org configured correctly again.",
"Chiming in here vs. creating a separate issue as I think it aligns with the work: I would _strongly_ urge that `2.python-requests.org` is fixed/redirected somewhere appropriate. It was \"the domain\" for months, and a gigantic amount of content was written on blogs, StackOverflow, and more referencing it.",
"Additionally anything found using the quick search or \"search the docs\" routes to removed domains.",
"@nateprewitt one of the changes in #5236 looks incorrect: https://github.com/psf/requests/pull/5236/files#diff-85987f48f1258d9ee486e3191495582dR384 changes intersphinx mapping of *python* links to requests's RTD (this is used to [embed links to other external docs](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) in such a way that the refs can be tracked and the links updated automatically)\r\n\r\nAlso not sure whether this change is deployed, but using the quick search box still redirects back to 2.python-requests.org. This looks to be due to [the docsearch snippet](https://github.com/ssbarnea/requests/blob/e1d4fce98b9f0ba4c985496b8d06054afef19b7f/docs/_templates/sidebarlogo.html#L26-L32) which goes through an external API to provide FAYT results, and probably takes over regular submission to jump there as well, since this doesn't really look like the DOM for the normal search box (which should be a self-contained form, there's no form here). Either the PSF should create its own docsearch account and hook into that, or the search field should be reverted to the standard sphinx quicksearch (which would probably require more extensive template work).\r\n\r\nThere's also [a bunch of tracking and ad code](https://github.com/ssbarnea/requests/blob/e1d4fce98b9f0ba4c985496b8d06054afef19b7f/docs/_templates/hacks.html#L30-L75) in a sibling template, I don't know if it's intentional or leftovers from the original.",
"is this drawn by python turtle? if it is, how cool",
"Looks like the RTD version selector now lists versions v1.0.4 through v3.0.0. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5213
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5213/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5213/comments
|
https://api.github.com/repos/psf/requests/issues/5213/events
|
https://github.com/psf/requests/issues/5213
| 498,934,456 |
MDU6SXNzdWU0OTg5MzQ0NTY=
| 5,213 |
zlib.error: Error -3 while decompressing data: invalid distance too far back
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33418824?v=4",
"events_url": "https://api.github.com/users/zablah/events{/privacy}",
"followers_url": "https://api.github.com/users/zablah/followers",
"following_url": "https://api.github.com/users/zablah/following{/other_user}",
"gists_url": "https://api.github.com/users/zablah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zablah",
"id": 33418824,
"login": "zablah",
"node_id": "MDQ6VXNlcjMzNDE4ODI0",
"organizations_url": "https://api.github.com/users/zablah/orgs",
"received_events_url": "https://api.github.com/users/zablah/received_events",
"repos_url": "https://api.github.com/users/zablah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zablah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zablah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zablah",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-26T14:46:56Z
|
2021-09-04T00:06:09Z
|
2019-09-26T17:16:01Z
|
NONE
|
resolved
|
## Expected Result
I installed requests on raspberry pi and every thing run good but suddenly I can't start requests module and I got the following error
## Reproduction Steps
```python
import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 52, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/dist-packages/requests/packages/__init__.py", line 59, in <module>
vendored('urllib3.contrib.pyopenssl')
File "/usr/lib/python2.7/dist-packages/requests/packages/__init__.py", line 32, in vendored
__import__(vendored_name, globals(), locals(), level=0)
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 47, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 13, in <module>
from cryptography.hazmat.primitives.asymmetric import dsa, rsa
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
from cryptography.hazmat.backends.interfaces import RSABackend
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
import pkg_resources
zlib.error: Error -3 while decompressing data: invalid distance too far back
```
## System Information
```
$ python -m requests.help
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/usr/lib/python2.7/runpy.py", line 102, in _get_module_details
loader = get_loader(mod_name)
File "/usr/lib/python2.7/pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "/usr/lib/python2.7/pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "/usr/lib/python2.7/pkgutil.py", line 430, in iter_importers
__import__(pkg)
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 52, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/dist-packages/requests/packages/__init__.py", line 59, in <module>
vendored('urllib3.contrib.pyopenssl')
File "/usr/lib/python2.7/dist-packages/requests/packages/__init__.py", line 32, in vendored
__import__(vendored_name, globals(), locals(), level=0)
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 47, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 13, in <module>
from cryptography.hazmat.primitives.asymmetric import dsa, rsa
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
from cryptography.hazmat.backends.interfaces import RSABackend
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
import pkg_resources
zlib.error: Error -3 while decompressing data: invalid distance too far back
```
my python version is python 2.7.13
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33418824?v=4",
"events_url": "https://api.github.com/users/zablah/events{/privacy}",
"followers_url": "https://api.github.com/users/zablah/followers",
"following_url": "https://api.github.com/users/zablah/following{/other_user}",
"gists_url": "https://api.github.com/users/zablah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zablah",
"id": 33418824,
"login": "zablah",
"node_id": "MDQ6VXNlcjMzNDE4ODI0",
"organizations_url": "https://api.github.com/users/zablah/orgs",
"received_events_url": "https://api.github.com/users/zablah/received_events",
"repos_url": "https://api.github.com/users/zablah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zablah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zablah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zablah",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5213/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5213/timeline
| null |
completed
| null | null | false |
[
"`python -m pip freeze` might be useful to debug this issue. It looks like a file is getting decompressed in a way that doesn't work on a 32 bit machine perhaps?",
"I solve this issue by upgrade setuptools\r\n```\r\npip install --upgrade setuptools\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/5212
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5212/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5212/comments
|
https://api.github.com/repos/psf/requests/issues/5212/events
|
https://github.com/psf/requests/issues/5212
| 497,983,716 |
MDU6SXNzdWU0OTc5ODM3MTY=
| 5,212 |
URL in readme (https://2.python-requests.org/) is http only
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/53452777?v=4",
"events_url": "https://api.github.com/users/chmreid/events{/privacy}",
"followers_url": "https://api.github.com/users/chmreid/followers",
"following_url": "https://api.github.com/users/chmreid/following{/other_user}",
"gists_url": "https://api.github.com/users/chmreid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chmreid",
"id": 53452777,
"login": "chmreid",
"node_id": "MDQ6VXNlcjUzNDUyNzc3",
"organizations_url": "https://api.github.com/users/chmreid/orgs",
"received_events_url": "https://api.github.com/users/chmreid/received_events",
"repos_url": "https://api.github.com/users/chmreid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chmreid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chmreid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chmreid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2019-09-25T00:19:36Z
|
2021-09-03T00:10:53Z
|
2019-10-25T03:02:55Z
|
CONTRIBUTOR
|
resolved
|
The URL `//2.python-requests.org/` (which is in the readme) automatically resolves to `https://2.python-requests.org` which is down (there is no HTTPS version of the site). The HTTP version of the site, `http://2.python-requests.org`, is fine.
## Expected Result
I expect that when I click the link in the readme, it goes to a page that exists.
## Actual Result
When I click the link in the readme, the `//` prefix resolves to `https://`, but there is no HTTPS version of `2.python-requests.org`, so the page does not load.
## Reproduction Steps
```
>>> import requests
>>> requests.get('https://2.python-requests.org/')
Traceback (most recent call last):
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 472, in wrap_socket
cnx.do_handshake()
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1716, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1456, in _raise_ssl_error
_raise_current_error()
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/connectionpool.py", line 344, in _make_request
self._validate_conn(conn)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
conn.connect()
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 355, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 478, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')],)",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='2.python-requests.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')],)",),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='2.python-requests.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')],)",),))
>>> requests.get('http://2.python-requests.org/')
<Response [200]>
```
## System Information
N/A
|
{
"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/5212/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5212/timeline
| null |
completed
| null | null | false |
[
"I moved the site to requests.kennethreitz.org, in preparation to it being requests.psf.org (or something similar, ideally).",
"Can you fix up the redirect from `docs.pyhon-requests.org' so that it doesn't redirect to a URL that cannot work? \r\n\r\n`http://docs.python-requests.org/en/master/objects.inv` -> `https://2.python-requests.org//en/master/objects.inv` which now doesn't work.\r\n\r\nIt would be nice if the all old URLs could continue working and 30X to the new location.",
"requests.kennethreitz.org is blocked by company policy. docs.pyhon-requests.org was working fine.",
"bump",
"Is anyone working to fix this? Mainly I am forced to remove requests documentation links due to this bug.",
"Link to the documention on PyPi page is not working.\r\n\r\n\r\n\r\n[https://pypi.org/project/requests2/](https://pypi.org/project/requests2/)",
"https://requests.readthedocs.io/ is working fine as far as I can tell.",
"URL in readme was changed by @Leetcore\r\n\r\nhttps://github.com/psf/requests/commit/74b72ce4265583db0430080ab67d3d5e0c4b44b2\r\n\r\nClosing this issue, as 2.python-requests.org is no longer mentioned anywhere in docs",
"Search results still use this URL - search for `get` and then choose the first result - the URL is https://2.python-requests.org/en/master/user/install/#get-the-source-code",
"And as @pelid mentioned the published release still links to http://docs.python-requests.org/ which redirects to https://2.python-requests.org/ which doesn't work.",
"Just made an attempt to fix the docs. The amount of links inside the documentation would make a SEO Marketer envious. I doubt that's possible to repeat yourself more often that with this.\r\n\r\nPlease have a look and point if there are mistakes.",
"> The amount of links inside the documentation would make a SEO Marketer envious.\r\n\r\nSounds like a great application for Jinja2 ;)",
"Re-opening until @ssbarnea's pull request #5236 is merged, since there are a lot more links than I initially thought when I closed this issue"
] |
https://api.github.com/repos/psf/requests/issues/5211
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5211/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5211/comments
|
https://api.github.com/repos/psf/requests/issues/5211/events
|
https://github.com/psf/requests/issues/5211
| 497,948,210 |
MDU6SXNzdWU0OTc5NDgyMTA=
| 5,211 |
Clarification of timeline for removing Python 2.7 support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/842790?v=4",
"events_url": "https://api.github.com/users/brainwane/events{/privacy}",
"followers_url": "https://api.github.com/users/brainwane/followers",
"following_url": "https://api.github.com/users/brainwane/following{/other_user}",
"gists_url": "https://api.github.com/users/brainwane/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brainwane",
"id": 842790,
"login": "brainwane",
"node_id": "MDQ6VXNlcjg0Mjc5MA==",
"organizations_url": "https://api.github.com/users/brainwane/orgs",
"received_events_url": "https://api.github.com/users/brainwane/received_events",
"repos_url": "https://api.github.com/users/brainwane/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brainwane/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brainwane/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brainwane",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-09-24T22:08:43Z
|
2021-08-30T00:06:20Z
|
2020-01-09T17:55:20Z
|
CONTRIBUTOR
|
resolved
|
Hi, all. I'm trying to update some documentation regarding the [sunset/"end of life"/EOL of Python 2.x](https://www.python.org/doc/sunset-python-2/) and ran into a question regarding Requests. Could you confirm that Requests does NOT expect to drop support for Python 2.7 in 2020?
Context: https://github.com/python3statement/python3statement.github.io/issues/194 suggested that https://python3statement.org/#sections30-projects add Requests as a project that will drop support for Python 2.7 in 2020, but referred to a hint on the Requests homepage [that has since been removed](https://github.com/psf/requests/commit/69856f3052037e47113c59c5c22cc48d20a6f6b0#diff-e3e2a9bfd88566b05001b02a3f51d286). Requests is currently listed as a participating project in the Python 3 Statement. The [Python 3 support section of the FAQ](https://2.python-requests.org/en/latest/community/faq/#python-3-support) does not mention an estimated date for dropping Python 2.7 support. I see in https://github.com/psf/requests/issues/5199#issuecomment-533190419 that @nateprewitt said:
> Requests has a large user base with varying needs which means we'll need to maintain 2.7 support for sometime beyond EoL. Once pip is migrated to being Python 3 only (no ETA to my knowledge), we would be able to consider it, but there aren't any concrete plans at the moment.
In [this discussion of pip's plans for deprecating 2.7 support](https://discuss.python.org/t/packaging-and-python-2/662/) it does seem to me that there's no concrete timeline yet. And that implies to me that perhaps Requests should be removed from the Python 3 Statement list of "Participating Projects: These projects pledge to drop Python 2 support in or before 2020."
Is my understanding correct? If so I'd like to submit a PR to remove Requests from the Python 3 Statement.
Also, I suggest that we add a "Python 2 support?" question to the FAQ, and once I know the answer to my question above, I will be happy to contribute that as a pull request. Thanks!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5211/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5211/timeline
| null |
completed
| null | null | false |
[
"Hi @brainwane, thanks for reaching out on this. The quote above is correct, we don't have immediate plans to remove support for 2.7 from Requests. The earliest time we'd be able to remove support for 2.7 would be after pip had stopped support, but I'd expect around a 6 month ramp down after that. We'll make sure we're giving enough warning for users to migrate.\r\n\r\nThat said, depending on timelines, there may come a point Requests stops receiving feature updates for 2.7, but we'd maintain compatibility for the timetable above.",
"I made PR https://github.com/python3statement/python3statement.github.io/pull/280 to remove Requests from the statement. ",
"> Hi @brainwane, thanks for reaching out on this. The quote above is correct, we don't have immediate plans to remove support for 2.7 from Requests. The earliest time we'd be able to remove support for 2.7 would be after pip had stopped support, but I'd expect around a 6 month ramp down after that. We'll make sure we're giving enough warning for users to migrate.\r\n> \r\n> That said, depending on timelines, there may come a point Requests stops receiving feature updates for 2.7, but we'd maintain compatibility for the timetable above.\r\n\r\nAn update on the pip timeline:\r\n\r\n> pip will continue to ensure that it runs on Python 2.7 after the CPython 2.7 EOL date. Support for Python 2.7 will be dropped, if bugs in Python 2.7 itself make this necessary (which is unlikely) or in pip 21.0 (Jan 2021), whichever is earlier.\r\n\r\nhttps://pip.pypa.io/en/latest/development/release-process/#python-2-support\r\n\r\nhttps://github.com/pypa/pip/issues/6148\r\n\r\nhttps://github.com/pypa/pip/pull/8087"
] |
https://api.github.com/repos/psf/requests/issues/5210
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5210/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5210/comments
|
https://api.github.com/repos/psf/requests/issues/5210/events
|
https://github.com/psf/requests/pull/5210
| 497,268,276 |
MDExOlB1bGxSZXF1ZXN0MzIwNDMyMzM5
| 5,210 |
Session instance `verify` precedence over REQUESTS_CA_BUNDLE
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/636320?v=4",
"events_url": "https://api.github.com/users/fopina/events{/privacy}",
"followers_url": "https://api.github.com/users/fopina/followers",
"following_url": "https://api.github.com/users/fopina/following{/other_user}",
"gists_url": "https://api.github.com/users/fopina/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fopina",
"id": 636320,
"login": "fopina",
"node_id": "MDQ6VXNlcjYzNjMyMA==",
"organizations_url": "https://api.github.com/users/fopina/orgs",
"received_events_url": "https://api.github.com/users/fopina/received_events",
"repos_url": "https://api.github.com/users/fopina/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fopina/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fopina/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fopina",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2019-09-23T18:55:15Z
|
2023-04-13T00:02:59Z
|
2022-04-12T18:33:39Z
|
NONE
|
resolved
|
To fix #5209 (more details in the issue)
Results for the [newly-added test](https://github.com/fopina/requests/blob/ca_cert_instance_versus_env/tests/test_requests.py#L1946)
```
➜ git checkout master
➜ git checkout ca_cert_instance_versus_env -- tests/test_requests.py
➜ pipenv run py.test tests/test_requests.py::TestRequests::test_session_merge_environment_settings_verify
============================================================================================================================= test session starts ==============================================================================================================================
platform linux -- Python 3.7.4, pytest-3.10.1, py-1.8.0, pluggy-0.13.0
rootdir: /home/fopina/Documents/stuff/requests, inifile: pytest.ini
plugins: cov-2.7.1, xdist-1.25.0, httpbin-0.3.0, forked-1.0.2, mock-1.10.4
collected 1 item
tests/test_requests.py F [100%]
....
session.verify = OTHER_PEM
args[3] = None
with override_environ(REQUESTS_CA_BUNDLE=SOME_PEM):
> assert session.merge_environment_settings(*args)['verify'] == OTHER_PEM
E AssertionError: assert 'x.pem' == 'y.pem'
E - x.pem
E ? ^
E + y.pem
E ? ^
tests/test_requests.py:1973: AssertionError
=========================================================================================================================== 1 failed in 0.48 seconds ===========================================================================================================================
```
```
➜ git checkout ca_cert_instance_versus_env
➜ pipenv run py.test tests/test_requests.py::TestRequests::test_session_merge_environment_settings_verify
============================================================================================================================= test session starts ==============================================================================================================================
tests/test_requests.py . [100%]
=========================================================================================================================== 1 passed in 0.35 seconds ===========================================================================================================================
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/636320?v=4",
"events_url": "https://api.github.com/users/fopina/events{/privacy}",
"followers_url": "https://api.github.com/users/fopina/followers",
"following_url": "https://api.github.com/users/fopina/following{/other_user}",
"gists_url": "https://api.github.com/users/fopina/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fopina",
"id": 636320,
"login": "fopina",
"node_id": "MDQ6VXNlcjYzNjMyMA==",
"organizations_url": "https://api.github.com/users/fopina/orgs",
"received_events_url": "https://api.github.com/users/fopina/received_events",
"repos_url": "https://api.github.com/users/fopina/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fopina/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fopina/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fopina",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5210/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5210/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5210.diff",
"html_url": "https://github.com/psf/requests/pull/5210",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5210.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5210"
}
| true |
[
"Any reason to not merge this simple fix ?",
"@Patazerty \r\n\r\n1. Doesn't look like it would merge cleanly\r\n1. Is documented as the behaviour that's unfortunate but not fixable until a major version bump due to a strict backwards compatibility policy\r\n",
"@sigmavirus24 I think that if a PR from 10 months ago would merge cleanly it'd mean the project was quite inactive 😃 I can update it if its to be considered. Or is 1 related to something else?\n\nAbout 2, I couldn't find it as documented behavior anywhere and it hardly looks like expected behavior for anyone. If verify is not defined for Session, it keeps the same behavior ",
"I'm also very surprised by this behavior which cost me a couple of hours of debugging until I noticed that when unsetting `REQUESTS_CA_BUNDLE` the issue goes away.\r\n\r\nIMO env vars should never have priority over specific code instructions.",
"> IMO env vars should never have priority over specific code instructions.\r\n\r\nRight. It's been acknowledged as a bug, just not one that can be easily fixed in a 2.x release while maintaining the guarantees about minor version upgrades."
] |
https://api.github.com/repos/psf/requests/issues/5209
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5209/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5209/comments
|
https://api.github.com/repos/psf/requests/issues/5209/events
|
https://github.com/psf/requests/issues/5209
| 497,260,366 |
MDU6SXNzdWU0OTcyNjAzNjY=
| 5,209 |
REQUESTS_CA_BUNDLE overrides request.Session verify property
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/636320?v=4",
"events_url": "https://api.github.com/users/fopina/events{/privacy}",
"followers_url": "https://api.github.com/users/fopina/followers",
"following_url": "https://api.github.com/users/fopina/following{/other_user}",
"gists_url": "https://api.github.com/users/fopina/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fopina",
"id": 636320,
"login": "fopina",
"node_id": "MDQ6VXNlcjYzNjMyMA==",
"organizations_url": "https://api.github.com/users/fopina/orgs",
"received_events_url": "https://api.github.com/users/fopina/received_events",
"repos_url": "https://api.github.com/users/fopina/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fopina/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fopina/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fopina",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-23T18:37:38Z
|
2021-11-10T08:00:29Z
|
2021-08-12T07:01:09Z
|
NONE
|
resolved
|
When `REQUESTS_CA_BUNDLE` is defined, the CA certificate passed to `requests.Session` constructor is overridden when `requests.Session.request` is called.
Guilty method/lines:
https://github.com/psf/requests/blob/master/requests/sessions.py#L694-L710
## Expected Result
I would expect for the priority to be:
1. `requests.Session.request` verify kwarg
2. `requests.Session` verify property
3. `REQUESTS_CA_BUNDLE` / `CURL_CA_BUNDLE`
## Actual Result
As `requests.Session.request` verify kwarg was not set, it took the value from `REQUESTS_CA_BUNDLE` and only then `requests.Session.verify` was checked, but ignored, resulting in an invalid CA used (for that Session).
Related issue (in docker-py project) https://github.com/docker/docker-py/issues/2433
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "18.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5209/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5209/timeline
| null |
completed
| null | null | false |
[
"Same issues I presume:\r\nhttps://github.com/psf/requests/issues/4938\r\nhttps://github.com/home-assistant/home-assistant-cli/issues/184\r\n\r\nHad also opened a pull request, hopefully one of them gets merged in. This is a tiresome issue.\r\nhttps://github.com/psf/requests/pull/5172",
"This looks like a duplicate of https://github.com/psf/requests/issues/3829"
] |
https://api.github.com/repos/psf/requests/issues/5208
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5208/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5208/comments
|
https://api.github.com/repos/psf/requests/issues/5208/events
|
https://github.com/psf/requests/pull/5208
| 497,255,890 |
MDExOlB1bGxSZXF1ZXN0MzIwNDIyMjI1
| 5,208 |
Part II: The Principle of Polarity
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-23T18:27:34Z
|
2021-08-30T00:06:38Z
|
2019-09-23T20:08:41Z
|
CONTRIBUTOR
|
resolved
|
Love & Hated appear orthogonal, yet are extracted from the same substance & essences. The opposite of Love is not Hatred — but Apathy.
> Everything is dual; Everything has poles; Everything has its pair of opposites; Like and unlike are the same; Opposites are identical in nature, but different in degree; Extremes meet; All truths, are but half-truths; All paradoxes may be reconciled.
[As above, so below](https://www.kennethreitz.org/as-above-so-below).
☤
|
{
"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/5208/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5208/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5208.diff",
"html_url": "https://github.com/psf/requests/pull/5208",
"merged_at": "2019-09-23T20:08:41Z",
"patch_url": "https://github.com/psf/requests/pull/5208.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5208"
}
| true |
[
"Part III is a :sparkles: :cake: :sparkles:"
] |
https://api.github.com/repos/psf/requests/issues/5207
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5207/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5207/comments
|
https://api.github.com/repos/psf/requests/issues/5207/events
|
https://github.com/psf/requests/pull/5207
| 497,133,936 |
MDExOlB1bGxSZXF1ZXN0MzIwMzIzOTU1
| 5,207 |
Test on Python 3.8 beta
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-09-23T14:29:26Z
|
2021-08-30T00:06:38Z
|
2019-09-26T22:06:30Z
|
CONTRIBUTOR
|
resolved
|
Python 3.8.0 is due out in a month on 2019-10-21.
* https://www.python.org/dev/peps/pep-0569/#schedule
Test now to help test both Python 3.8 before it's released, and to make sure requests works on 3.8.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5207/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5207/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5207.diff",
"html_url": "https://github.com/psf/requests/pull/5207",
"merged_at": "2019-09-26T22:06:30Z",
"patch_url": "https://github.com/psf/requests/pull/5207.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5207"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5206
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5206/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5206/comments
|
https://api.github.com/repos/psf/requests/issues/5206/events
|
https://github.com/psf/requests/pull/5206
| 497,038,477 |
MDExOlB1bGxSZXF1ZXN0MzIwMjQ1NDIx
| 5,206 |
Tidy community files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-09-23T11:23:31Z
|
2021-08-29T00:07:11Z
|
2020-01-19T15:41:10Z
|
CONTRIBUTOR
|
resolved
|
These files can live under `.github/`, and there are already community files there.
Let's keep them together to keep the root directory a bit neater.
* https://help.github.com/en/articles/about-community-profiles-for-public-repositories
Also:
* Fix the image for Markdown not RST
* Fix headers, compare https://github.com/not-kennethreitz/requests3/blob/9b8206fdb74e4b9649b2bf3367af7a506f9b30a6/docs/community/vulnerabilities.rst
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5206/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5206/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5206.diff",
"html_url": "https://github.com/psf/requests/pull/5206",
"merged_at": "2020-01-19T15:41:10Z",
"patch_url": "https://github.com/psf/requests/pull/5206.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5206"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5205
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5205/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5205/comments
|
https://api.github.com/repos/psf/requests/issues/5205/events
|
https://github.com/psf/requests/issues/5205
| 496,839,546 |
MDU6SXNzdWU0OTY4Mzk1NDY=
| 5,205 |
Obtain all the content from https://free-ss.site/ by requests.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4",
"events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}",
"followers_url": "https://api.github.com/users/hongyi-zhao/followers",
"following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}",
"gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hongyi-zhao",
"id": 11155854,
"login": "hongyi-zhao",
"node_id": "MDQ6VXNlcjExMTU1ODU0",
"organizations_url": "https://api.github.com/users/hongyi-zhao/orgs",
"received_events_url": "https://api.github.com/users/hongyi-zhao/received_events",
"repos_url": "https://api.github.com/users/hongyi-zhao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hongyi-zhao",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-22T22:09:19Z
|
2021-09-03T00:10:53Z
|
2019-10-25T03:13:01Z
|
NONE
|
resolved
|
Hi,
I try to obtain the content from https://free-ss.site/ by requests.
But it seems that the above tools cannot get all of the content as the
stuff obtained by the firefox.
Is is possible to get all of the content just as the results via firefox
for this website by using requests?
Regards
|
{
"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/5205/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5205/timeline
| null |
completed
| null | null | false |
[
"Not necessarily. Reference https://github.com/psf/requests/issues/5189",
"@hongyi-zhao, Requests is not a browser, it's an HTTP client. It won't perform asynchronous calls or evaluate scripts in response bodies. I believe the issue you're hitting may be better solved with something like Selenium or Ghost.js."
] |
https://api.github.com/repos/psf/requests/issues/5204
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5204/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5204/comments
|
https://api.github.com/repos/psf/requests/issues/5204/events
|
https://github.com/psf/requests/issues/5204
| 496,059,064 |
MDU6SXNzdWU0OTYwNTkwNjQ=
| 5,204 |
SSL: CERTIFICATE_VERIFY_FAILED with urllib 1.25.4
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1697670?v=4",
"events_url": "https://api.github.com/users/xNinjaKittyx/events{/privacy}",
"followers_url": "https://api.github.com/users/xNinjaKittyx/followers",
"following_url": "https://api.github.com/users/xNinjaKittyx/following{/other_user}",
"gists_url": "https://api.github.com/users/xNinjaKittyx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xNinjaKittyx",
"id": 1697670,
"login": "xNinjaKittyx",
"node_id": "MDQ6VXNlcjE2OTc2NzA=",
"organizations_url": "https://api.github.com/users/xNinjaKittyx/orgs",
"received_events_url": "https://api.github.com/users/xNinjaKittyx/received_events",
"repos_url": "https://api.github.com/users/xNinjaKittyx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xNinjaKittyx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xNinjaKittyx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xNinjaKittyx",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-09-19T22:41:26Z
|
2021-09-04T00:06:11Z
|
2019-09-20T01:33:30Z
|
NONE
|
resolved
|
Have a bunch of code using verify=False because it's a local server with no certificate.
Fails with something like:
```
requests.exceptions.SSLError: HTTPSConnectionPool(host='hostname', port=80): Max retries exceeded with url: /api (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))
```
I was able to work around this by reverting back to 1.25.3 instead of 1.25.4
## Expected Result
Expected it to not check SSL Certificate.
## Actual Result
It checked SSL Certificate
## Reproduction Steps
```python
import requests
requests.get('https://nocertdomain.com/', verify=False)
# Certificate_verify_failed
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.7"
},
"platform": {
"release": "4.15.0-60-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.4"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5204/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5204/timeline
| null |
completed
| null | null | false |
[
"Thanks for opening a ticket @xNinjaKittyx. The issue is being tracked in urllib3 at urllib3/urllib3#1682. We’ll leave this open for visibility until the issue is resolved.",
"This issue is resolved in urllib3 1.25.5.",
"Thanks Seth! I’ll close this out then."
] |
https://api.github.com/repos/psf/requests/issues/5203
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5203/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5203/comments
|
https://api.github.com/repos/psf/requests/issues/5203/events
|
https://github.com/psf/requests/issues/5203
| 495,868,459 |
MDU6SXNzdWU0OTU4Njg0NTk=
| 5,203 |
Re-consider the occult imagery.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92340?v=4",
"events_url": "https://api.github.com/users/antlong/events{/privacy}",
"followers_url": "https://api.github.com/users/antlong/followers",
"following_url": "https://api.github.com/users/antlong/following{/other_user}",
"gists_url": "https://api.github.com/users/antlong/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/antlong",
"id": 92340,
"login": "antlong",
"node_id": "MDQ6VXNlcjkyMzQw",
"organizations_url": "https://api.github.com/users/antlong/orgs",
"received_events_url": "https://api.github.com/users/antlong/received_events",
"repos_url": "https://api.github.com/users/antlong/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/antlong/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/antlong/subscriptions",
"type": "User",
"url": "https://api.github.com/users/antlong",
"user_view_type": "public"
}
|
[
{
"color": "fbca04",
"default": false,
"description": "",
"id": 1576621295,
"name": "silly-but-understandable",
"node_id": "MDU6TGFiZWwxNTc2NjIxMjk1",
"url": "https://api.github.com/repos/psf/requests/labels/silly-but-understandable"
}
] |
closed
| true | null |
[] | null | 22 |
2019-09-19T15:19:22Z
|
2021-12-01T02:14:23Z
|
2019-09-21T17:16:29Z
|
NONE
|
resolved
|
The occult logo evokes strong emotion in viewers of certain faiths. An uninitiated looking for [more information](https://gnosticteachings.org/books-by-samael-aun-weor/the-doomed-aryan-race/1305-the-caduceus-of-mercury.html) on the logo would [easily](http://www.occultopedia.com/c/caduceus.htm) come to this [information](https://www.samaelaunweor.org/en/the-solar-bodies/the-caduceus-of-mercury) with a google search...
>The Gnostic Movement teaches its disciples that from their seminal system (during the esoteric practices of sexual transmutation) the lunar atoms ascend through the nervous canal of Ida and the solar atoms victoriously ascend through Pingala.
[RIU](https://www.rollitup.org/t/the-rod-of-asclepius-vs-the-caduceus-of-mercury.374706/):
>Mercury was the god of merchants and merchandise. Also the conductor of the dead to the afterlife, and protector of thieves and deceit. The Caduceus is a herald's staff representing Mercury (Hermes) and his undertakings, that was a gift from Apollo. It did not and does not represent medicine. An officer in the U.S. Army Medical Corps mistook the Caduceus for the Staff of Asclepius and introduced the new Medical Corps symbol at the beginning of the twentieth century. Not too long after that, everyone was adopting the same mistake. Including the American Medical Association (AMA), the largest association of physicians and medical students in the United States.
>Asclepius was the son of Apollo, and the god of medicine and healing. Asclepius's daughter is Hygieia, whose bowl is the well known international symbol of pharmacy and pharmacist. Asclepius's staff has many interpretations, but basically means, the snake is thought to signify a new beginning from old problems, as in shedding of the skin. The staff or rod, is thought to mean support and structure to help deal with the turmoil of life and death and being associated with them. Asclepius was so good as a healer that he was reputed to be able to bring people back from the dead. For this he angered Hades and Zeus because he raised Hippolytus from the dead and accepted gold for it, and was killed by Zeus with a thunder bolt. Zeus then placed him amongst the stars as the constellation Ophiuchus ("The Serpent Holder").
|
{
"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": 15,
"confused": 0,
"eyes": 3,
"heart": 0,
"hooray": 0,
"laugh": 7,
"rocket": 0,
"total_count": 27,
"url": "https://api.github.com/repos/psf/requests/issues/5203/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5203/timeline
| null |
completed
| null | null | false |
[
"Its a pretty common logo used by hospitals, ambulances and in healthcare. Its a common symbol of medicine in the US. At least, that's the first thing I was reminded of when I saw the logo. Google image search for `logo hospital` shows many similar images...\r\n\r\nhttps://www.google.com/search?q=logo+hospital&rlz=1C1GGRV_enUS752US754&sxsrf=ACYBGNQP1Pms8SvMIXQkbCuUROw9p84gMg:1568938296648&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjOlOLOjt7kAhUEuZ4KHZhaD8cQ_AUIEigB&biw=1626&bih=1141\r\n\r\nIts also used in Simcity 2013 for healthcare.\r\n\r\nAlso, here is some history about the use of that symbol in medicine in US - http://mentalfloss.com/article/30751/what-do-snakes-and-sticks-have-do-doctors\r\n\r\n> The mark was used by several publishers in their books because they thought of themselves, like Hermes, as messengers and diffusers of knowledge.\r\n\r\nI guess Kenneth Reitz would be able to give the reasoning for his choice.\r\n\r\nEither way, let the bikeshedding commence.\r\n",
"............. Because you included the word hospital...\n\nOn Thu, Sep 19, 2019 at 8:18 PM MotleyTech <[email protected]> wrote:\n\n> Its a pretty common logo used by hospitals, ambulances and in healthcare.\n> Its a common symbol of medicine in the US. At least, that's the first thing\n> I was reminded of when I saw the logo. Google image search for logo\n> hospital shows many similar images...\n>\n>\n> https://www.google.com/search?q=logo+hospital&rlz=1C1GGRV_enUS752US754&sxsrf=ACYBGNQP1Pms8SvMIXQkbCuUROw9p84gMg:1568938296648&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjOlOLOjt7kAhUEuZ4KHZhaD8cQ_AUIEigB&biw=1626&bih=1141\n>\n> Its also used in Simcity 2013 for healthcare.\n>\n> Also, here is some history about the use of that symbol in medicine in US\n> -\n> http://mentalfloss.com/article/30751/what-do-snakes-and-sticks-have-do-doctors\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNHFEWYTAVWW6U7VOCLQKQJEJA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7FFS2A#issuecomment-533354856>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNFRG3X5ZKPLESRHOT3QKQJEJANCNFSM4IYMSE3Q>\n> .\n>\n",
"Seeing a trend of people not actually reading the sources, and perhaps even\nthe initial post. Quite troubling you’d even take it a step further to\ncomment with anti-Christian imagery.\n\nOn Fri, Sep 20, 2019 at 8:14 AM fiveham <[email protected]> wrote:\n\n> There is no occult imagery.\n>\n> But maybe adding a little would be a good idea...\n>\n> [image: image]\n> <https://user-images.githubusercontent.com/12902107/65325940-3864c080-db7e-11e9-9e2e-c8169c150e1d.png>\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNEDFU3D7S6XK2CREQ3QKS5BHA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GP24Q#issuecomment-533527922>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNGONFK4X5NXS3HO4VLQKS5BHANCNFSM4IYMSE3Q>\n> .\n>\n",
"@antlong do you have a faith-based objection to the logo? And if so, what is it?",
"I think my objection of the behavior of this community is more important\nthan my prior objection. This is reprehensible. PSF will be reached for\ncomment.\n\nOn Fri, Sep 20, 2019 at 10:16 AM Barney Gale <[email protected]>\nwrote:\n\n> @antlong <https://github.com/antlong> do you have a basis in your\n> faith-based objection to the logo? And if so, what is it?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNEEW2OPCPYLV3CT6VDQKTLKPA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G2Q7I#issuecomment-533571709>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNGEZOVIE3BHMVJ4BWTQKTLKPANCNFSM4IYMSE3Q>\n> .\n>\n",
"OK, but on the original issue of \"occult imagery\" - is there anything inherently anti-Christian about it? The existence of Greek paganism is not itself anti-Christian, and it's worth noting the Christian New Testament itself makes reference to Greek pagan authors, e.g.:\r\n\r\n- Menander, Thais 218 (1 Cor. 15:33)\r\n- Epimenides, de Oraculis, (Titus 1:12-13, where Paul introduces Epimenides as \"a prophet of the Cretans,\" see Epimenides paradox)\r\n- Aratus, Phaenomena 5, (Acts 17:28, where Paul refers to the words of \"some of your own poets\")",
"- Explicit/sexualized/unsavory material associated with logo elements.\n- Completely avoidable, use something else.\n\nThe Anti-Christian commentary is unacceptable. Is this an edginess problem\nor discrimination, you tell me.\n\nOn Fri, Sep 20, 2019 at 10:23 AM Barney Gale <[email protected]>\nwrote:\n\n> OK, but on the original issue of \"occult imagery\" - is there anything\n> inherently anti-Christian about it? The existence of Greek paganism is not\n> itself anti-Christian, and it's worth noting the Christian New Testement\n> itself makes reference to Greek paganism, e.g.:\n>\n> - Menander, Thais 218 (1 Cor. 15:33)\n> - Epimenides, de Oraculis, (Titus 1:12-13, where Paul introduces\n> Epimenides as \"a prophet of the Cretans,\" see Epimenides paradox)\n> - Aratus, Phaenomena 5, (Acts 17:28, where Paul refers to the words of\n> \"some of your own poets\")\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNFJPASV4THIJE3G2Y3QKTMG5A5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3HDI#issuecomment-533574541>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNCUJU5QGZQA4CA5EJTQKTMG5ANCNFSM4IYMSE3Q>\n> .\n>\n",
"The disruptive and inflammatory responses to this issue have been removed. Please keep discussion of this issue on-topic and respectful. If necessary, this issue may be temporarily locked to contributors if it continues to devolve.",
"> Explicit/sexualized/unsavory material associated with logo elements.\r\n\r\nSo this is not a religious objection?",
"I'm not sure the sources you link to make any sort of coherent case.\r\n\r\nThe rollitup.org link talks only about the history of the Caduceus and the confusion with the Rod of Asclepius. Similarly the occultopedia link. The other two links are duplicates of the same passage, ostensibly from the same book, *The Doomed Aryan Race* by Samael Aun Weor in 1967, which [abuse.wikia.org](https://abuse.wikia.org/wiki/Aryan_race) describes thus:\r\n\r\n> [Samael Aun Weor] asserted that the Aryan \"Root Race\" is doomed to be destroyed by hydrogen bombs unless the people of the Aryan race learn tantric yoga.\r\n\r\nSeveral sources say that \"Aryan\" here is not meant with racist/antisemitic connotations. Nevertheless this all sounds like an extremely tenuous link to the Caduceus.\r\n\r\nCan you elaborate on how exactly this offends you?",
"None of the sources provide unbiased information.\r\n\r\nIf a site called “gnosticteachings.com” paints something as “occult”, that's not evidence for anything being wrong with it. Symbols get used in all kinds of contexts, anyone can adopt a symbol for any positive or negative purpose. Also it's easy to make cheap shots: Anything rodlike can be interpreted as “phallic” if one wants. But that doesn't mean anything is wrong with the symbol, it just means that conspiracy nutjobs have an easy time linking anything to everything.\r\n\r\nI'd agree that there has to be change if there was be solid evidence that the main usage of the symbol has shifted to something problematic (like the Hindu swastika having beim tainted by the Nazis). But since there isn't the slightest bit of problem with this symbol, let's close this and stop wasting our breath.",
"The antagonistic behavior like the satanic imagery linked in the thread\npointed toward me, the image of a butt-plug and libel also, wtf? Easily the\nmost toxic thread I’ve ever seen. Will be in touch, prefer not to discuss\nhere any further.\n\nOn Sat, Sep 21, 2019 at 11:34 AM Philipp A. <[email protected]>\nwrote:\n\n> None of the sources provide unbiased information.\n>\n> If a site called “gnosticteachings.com” paints something as “occult”,\n> that's not evidence for anything being wrong with it. Symbols get used in\n> all kinds of contexts, anyone can adopt a symbol for any positive or\n> negative purpose. Also it's easy to make cheap shots: Anything rodlike can\n> be interpreted as “phallic” if one wants. But that doesn't mean anything is\n> wrong with the symbol, it just means that conspiracy nutjobs have an easy\n> time linking anything to everything.\n>\n> I'd agree that there has to be change if there was be solid evidence that\n> the main usage of the symbol has shifted to something problematic (like the\n> Hindu swastika having beim tainted by the Nazis). But since there isn't the\n> slightest bit of problem with this symbol, let's close this and stop\n> wasting our breath.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRND2GZ4BG2I7CI2V5PLQKY5IBA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IT7IA#issuecomment-533807008>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNGAO3V5GFT3L3SLPA3QKY5IBANCNFSM4IYMSE3Q>\n> .\n>\n",
"Libel? Stay realistic, not everything is about you. E.g. in case you somehow interpreted my “conspiracy nutjobs” to be about you.\r\n\r\nAnd about the antagonistic comments: this thread was posted on the internet because of the hilarity of your accusations. Everybody can comment on GitHub, not only the python community. The python community removed the spam.\r\n\r\nYou still didn't say in any way how the logo could have possibly offended you. If you want to be taken seriously, you need to explain this to us without quoting more than dubious sources.",
"Cognitive dissonance, mundane; paired with narcissism. Gets old. I’ve been\non the internet a while. Philipp, if you need me to be more explicit, do\nnot mention me any further. You’re harassing me, and your behavior is sad\nand atrocious. Go away - seriously.\n\nOn Sat, Sep 21, 2019 at 1:01 PM Philipp A. <[email protected]> wrote:\n\n> Libel? Stay realistic, not everything is about you. E.g. in case you\n> somehow interpreted my “conspiracy nutjobs” to be about you.\n>\n> And about the antagonistic comments: this thread was posted on the\n> internet because of the hilarity of your accusations. Everybody can comment\n> on GitHub, not only the python community. The python community removed the\n> spam.\n>\n> You still didn't say in any way how the logo could have possibly offended\n> you. If you want to be taken seriously, you need to explain this to us\n> without quoting more than dubious sources.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNGKNXZLNZ6GKP3SQODQKZHO7A5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IVSXI#issuecomment-533813597>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNE6NJTTG2IYWXMHQXTQKZHO7ANCNFSM4IYMSE3Q>\n> .\n>\n",
"It doesn’t look like this thread is serving a productive purpose for discussion anymore. I’m going to resolve for now.",
"Sad to have been attacked and bullied.\n\nOn Sat, Sep 21, 2019 at 1:17 PM Nate Prewitt <[email protected]>\nwrote:\n\n> It doesn’t look like this thread is serving a productive purpose for\n> discussion anymore. I’m going to resolve for now.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNCSIEY4ZVYEW46C2C3QKZJLPA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IV4VA#issuecomment-533814868>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNA2225NAD6FVMGZQHDQKZJLPANCNFSM4IYMSE3Q>\n> .\n>\n",
"https://en.wikipedia.org/wiki/Alchemical_symbol",
"The true meaning is serialized here, for those curious: https://www.kennethreitz.org/values\r\n\r\nYou were close — :sparkles: :cake: :sparkles:",
"@antlong\r\n\r\nI too was sad to see the thread hijacked by aggressive and ugly comments. But those were deleted by the community and they are in no way representative of the people now in discussion with you.\r\n\r\nI hope you can get over that and engage in useful discussion, rather than continuing to be sad about those comments.\r\n\r\nEither way, since you brought up this issue, it is upto you to make an argument to back up your assertions. That's the only way to convince people to see things your way.\r\n\r\n\r\n",
"You don’t always get a second chance. Take care.\n\nOn Tue, Sep 24, 2019 at 10:28 PM MotleyTech <[email protected]>\nwrote:\n\n> @antlong <https://github.com/antlong>\n>\n> I too was sad to see the thread hijacked by aggressive and ugly comments.\n> But those were deleted by the community and they are in no way\n> representative of the people now in discussion with you.\n>\n> I hope you can get over that and engage in useful discussion, rather than\n> continuing to be sad about those comments. Sulking is not helping.\n>\n> Either way, since you brought up this issue, it is upto you to make an\n> argument to back up your assertions. That's the only way to convince people\n> to see things your way.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/issues/5203?email_source=notifications&email_token=AAAWRNAY4MTXOK2M2YCWSG3QLLEEZA5CNFSM4IYMSE32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7QMCZA#issuecomment-534823268>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAWRNGVOIFDEYTRWFGJVXTQLLEEZANCNFSM4IYMSE3Q>\n> .\n>\n",
"It's a little on the nose to complain about lack of polite discussion, and then decline the opportunity to have a polite discussion on multiple occasions.",
"Please restore the logo. When I transferred the project to the PSF, per textual agreement with @ewdurbin, my only requirement was that the logo stayed in place. It is my mark on the world — and is actually a tattoo that is on my body. It is my personal emblem, and I placed it on this project, as it is my Magnum Opus. \r\n\r\nI put my blood, sweat and tears into this project. Please restore the logo ASAP. "
] |
https://api.github.com/repos/psf/requests/issues/5202
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5202/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5202/comments
|
https://api.github.com/repos/psf/requests/issues/5202/events
|
https://github.com/psf/requests/issues/5202
| 495,858,434 |
MDU6SXNzdWU0OTU4NTg0MzQ=
| 5,202 |
Multipart post of image does not get the same result in requests as in Insomnia/Postman
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28776681?v=4",
"events_url": "https://api.github.com/users/ClerkCunt/events{/privacy}",
"followers_url": "https://api.github.com/users/ClerkCunt/followers",
"following_url": "https://api.github.com/users/ClerkCunt/following{/other_user}",
"gists_url": "https://api.github.com/users/ClerkCunt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ClerkCunt",
"id": 28776681,
"login": "ClerkCunt",
"node_id": "MDQ6VXNlcjI4Nzc2Njgx",
"organizations_url": "https://api.github.com/users/ClerkCunt/orgs",
"received_events_url": "https://api.github.com/users/ClerkCunt/received_events",
"repos_url": "https://api.github.com/users/ClerkCunt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ClerkCunt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ClerkCunt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ClerkCunt",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 3 |
2019-09-19T15:02:49Z
|
2020-04-07T23:23:16Z
| null |
NONE
| null |
I am trying to upload a .jpg file to a server using HTTP POST with the requests library in Python 3.7.
Target URL has some PHP code that handles the upload, taking 'fileToUpload' as the multipart variable.
I tried putting the request into a **with-statemen**t for opening the file, changing the **data=files to files=files** (as recommended by some example code), or setting the **headers** to multipart/form-data specifically.
```python
import requests
url = 'http://someurl.com/upload/dir/post.php'
files = {'fileToUpload' : open('image.jpg', 'rb')}
r = requests.post(url, data=files)
```
If I run the script I raise every single error message in the post.php file, while if I take the thing to Insomnia or Postman the upload works just fine, so the server-side seems to be working.
After all it seems that the problem is with opening the file, but I tried to stick to the [documentation ](https://2.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file)and still can't figure out what is wrong here.
| 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/5202/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5202/timeline
| null | null | null | null | false |
[
"Just a thought on how to debug the issue: create a preparedRequest() and then .send() that. If the same behavior arises, then just investigate what's in the prepared request and see if the binary data matches what you wish to send, etc.\r\nThis way you might be able to find a cut off point for where the code is either breaking or behaving in a manner you find unexpected.",
"Use `files`, not `data`:\r\n\r\n```\r\nr = requests.post(url, data=files)\r\n```\r\n\r\nvs\r\n\r\n```\r\nr = requests.post(url, files=files)\r\n```",
"@samrussell is correct"
] |
https://api.github.com/repos/psf/requests/issues/5201
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5201/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5201/comments
|
https://api.github.com/repos/psf/requests/issues/5201/events
|
https://github.com/psf/requests/pull/5201
| 495,763,435 |
MDExOlB1bGxSZXF1ZXN0MzE5MjQ3Njg4
| 5,201 |
Corrected "certianly" to "certainly"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/248982?v=4",
"events_url": "https://api.github.com/users/marcuse/events{/privacy}",
"followers_url": "https://api.github.com/users/marcuse/followers",
"following_url": "https://api.github.com/users/marcuse/following{/other_user}",
"gists_url": "https://api.github.com/users/marcuse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marcuse",
"id": 248982,
"login": "marcuse",
"node_id": "MDQ6VXNlcjI0ODk4Mg==",
"organizations_url": "https://api.github.com/users/marcuse/orgs",
"received_events_url": "https://api.github.com/users/marcuse/received_events",
"repos_url": "https://api.github.com/users/marcuse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marcuse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcuse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marcuse",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-19T12:20:24Z
|
2021-08-30T00:06:40Z
|
2019-09-19T12:22:25Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/248982?v=4",
"events_url": "https://api.github.com/users/marcuse/events{/privacy}",
"followers_url": "https://api.github.com/users/marcuse/followers",
"following_url": "https://api.github.com/users/marcuse/following{/other_user}",
"gists_url": "https://api.github.com/users/marcuse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marcuse",
"id": 248982,
"login": "marcuse",
"node_id": "MDQ6VXNlcjI0ODk4Mg==",
"organizations_url": "https://api.github.com/users/marcuse/orgs",
"received_events_url": "https://api.github.com/users/marcuse/received_events",
"repos_url": "https://api.github.com/users/marcuse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marcuse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcuse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marcuse",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5201/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5201/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5201.diff",
"html_url": "https://github.com/psf/requests/pull/5201",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5201.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5201"
}
| true |
[
"Whoops, duplicate."
] |
|
https://api.github.com/repos/psf/requests/issues/5200
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5200/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5200/comments
|
https://api.github.com/repos/psf/requests/issues/5200/events
|
https://github.com/psf/requests/pull/5200
| 495,693,970 |
MDExOlB1bGxSZXF1ZXN0MzE5MTkwNzky
| 5,200 |
Fixed a tiny typo
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1298583?v=4",
"events_url": "https://api.github.com/users/stuartmaxwell/events{/privacy}",
"followers_url": "https://api.github.com/users/stuartmaxwell/followers",
"following_url": "https://api.github.com/users/stuartmaxwell/following{/other_user}",
"gists_url": "https://api.github.com/users/stuartmaxwell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stuartmaxwell",
"id": 1298583,
"login": "stuartmaxwell",
"node_id": "MDQ6VXNlcjEyOTg1ODM=",
"organizations_url": "https://api.github.com/users/stuartmaxwell/orgs",
"received_events_url": "https://api.github.com/users/stuartmaxwell/received_events",
"repos_url": "https://api.github.com/users/stuartmaxwell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stuartmaxwell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stuartmaxwell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stuartmaxwell",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-19T09:52:42Z
|
2021-08-30T00:06:39Z
|
2019-09-19T15:31:06Z
|
NONE
|
resolved
|
certianly -> certainly
|
{
"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/5200/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5200/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5200.diff",
"html_url": "https://github.com/psf/requests/pull/5200",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5200.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5200"
}
| true |
[
"Hi @stuartmaxwell, thanks for contributing to Requests. It looks like this is a duplicate of #5197 so I'm goin resolve this in favor of the original. Cheers!"
] |
https://api.github.com/repos/psf/requests/issues/5199
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5199/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5199/comments
|
https://api.github.com/repos/psf/requests/issues/5199/events
|
https://github.com/psf/requests/issues/5199
| 495,540,808 |
MDU6SXNzdWU0OTU1NDA4MDg=
| 5,199 |
Python 2.7 Build Still Broken - Incompatible Requirements
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11529426?v=4",
"events_url": "https://api.github.com/users/AndTheDaysGoBy/events{/privacy}",
"followers_url": "https://api.github.com/users/AndTheDaysGoBy/followers",
"following_url": "https://api.github.com/users/AndTheDaysGoBy/following{/other_user}",
"gists_url": "https://api.github.com/users/AndTheDaysGoBy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AndTheDaysGoBy",
"id": 11529426,
"login": "AndTheDaysGoBy",
"node_id": "MDQ6VXNlcjExNTI5NDI2",
"organizations_url": "https://api.github.com/users/AndTheDaysGoBy/orgs",
"received_events_url": "https://api.github.com/users/AndTheDaysGoBy/received_events",
"repos_url": "https://api.github.com/users/AndTheDaysGoBy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AndTheDaysGoBy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AndTheDaysGoBy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AndTheDaysGoBy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-19T02:34:41Z
|
2021-09-04T00:06:12Z
|
2019-09-19T15:42:15Z
|
NONE
|
resolved
|
E.g. looking at https://travis-ci.com/psf/requests/jobs/237028717 or some of the more recent builds, we notice that there are issues in installing dependencies during the Python 2.7 build. In particular, the issue arises due to attempting the install `more-itertools==7.2.0`.
Looking at https://pypi.org/simple/more-itertools/ we find that it does exist and that the hashes do match those in the Pipfile.lock https://github.com/psf/requests/blob/146291795130cbe73e2a64f53c2a819244a4bd6b/Pipfile.lock#L435
However, inspect element on https://pypi.org/simple/more-itertools/ reveals that every version > 5.0 requires a Python version of the 3.X series (>= 3.4 in particular).
The solution is to either lower the used version of more-itertools to 5.0.0 or to drop Python 2.7 support.
Update:
We can see that this was the commit that resulted in this issue (load the second diff and CTRL+ f more-iter). So it seems it was originally kept at 5.0.0. Presumably reverting that is the desired approach?
https://github.com/psf/requests/commit/6c322457a219f9f18e3aa8ed83ad1326aa565210#diff-46bb8405eeb4d8a11deb635f562f7c48L500
|
{
"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/5199/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5199/timeline
| null |
completed
| null | null | false |
[
"Python 2.7 support is ending at the end of 2019. It might be better to just drop 2.7 support in requests too. https://pythonclock.org/",
"Hi @AndTheDaysGoBy, I've resolved the issue by pinning more-itertools at 5.x (a5f4f3c9), thanks for letting us know.\r\n\r\n@abaham, Requests has a large user base with varying needs which means we'll need to maintain 2.7 support for sometime beyond EoL. Once pip is migrated to being Python 3 only (no ETA to my knowledge), we would be able to consider it, but there aren't any concrete plans at the moment."
] |
https://api.github.com/repos/psf/requests/issues/5198
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5198/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5198/comments
|
https://api.github.com/repos/psf/requests/issues/5198/events
|
https://github.com/psf/requests/issues/5198
| 495,229,405 |
MDU6SXNzdWU0OTUyMjk0MDU=
| 5,198 |
Timeout parameter is ignored when using HTTP proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9042837?v=4",
"events_url": "https://api.github.com/users/jcarlosroldan/events{/privacy}",
"followers_url": "https://api.github.com/users/jcarlosroldan/followers",
"following_url": "https://api.github.com/users/jcarlosroldan/following{/other_user}",
"gists_url": "https://api.github.com/users/jcarlosroldan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jcarlosroldan",
"id": 9042837,
"login": "jcarlosroldan",
"node_id": "MDQ6VXNlcjkwNDI4Mzc=",
"organizations_url": "https://api.github.com/users/jcarlosroldan/orgs",
"received_events_url": "https://api.github.com/users/jcarlosroldan/received_events",
"repos_url": "https://api.github.com/users/jcarlosroldan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jcarlosroldan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jcarlosroldan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jcarlosroldan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-18T13:32:50Z
|
2021-09-04T00:06:12Z
|
2019-09-18T13:52:40Z
|
NONE
|
resolved
|
When I use a HTTP proxy, the `timeout` parameter is ignored.
## Expected Result
The request raising a TimeoutError after a given time.
## Actual Result
A blocking request that sometimes finishes with a 200 code, after much more than the given timeout.
## Reproduction Steps
```python
import requests
requests.get('http://example.com/', proxies={'http': '108.61.186.207:8080'}, timeout=5)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.0.0-29-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010102f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9042837?v=4",
"events_url": "https://api.github.com/users/jcarlosroldan/events{/privacy}",
"followers_url": "https://api.github.com/users/jcarlosroldan/followers",
"following_url": "https://api.github.com/users/jcarlosroldan/following{/other_user}",
"gists_url": "https://api.github.com/users/jcarlosroldan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jcarlosroldan",
"id": 9042837,
"login": "jcarlosroldan",
"node_id": "MDQ6VXNlcjkwNDI4Mzc=",
"organizations_url": "https://api.github.com/users/jcarlosroldan/orgs",
"received_events_url": "https://api.github.com/users/jcarlosroldan/received_events",
"repos_url": "https://api.github.com/users/jcarlosroldan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jcarlosroldan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jcarlosroldan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jcarlosroldan",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5198/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5198/timeline
| null |
completed
| null | null | false |
[
"As I read in the requests reference: ```timeout is not a time limit on the entire response download; rather, an exception is raised if the server has not issued a response for timeout seconds (more precisely, if no bytes have been received on the underlying socket for timeout seconds).```\r\n\r\nSo it seems that after starting the response there is no way to timeout requests."
] |
https://api.github.com/repos/psf/requests/issues/5197
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5197/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5197/comments
|
https://api.github.com/repos/psf/requests/issues/5197/events
|
https://github.com/psf/requests/pull/5197
| 495,157,404 |
MDExOlB1bGxSZXF1ZXN0MzE4NzU2Nzcy
| 5,197 |
Fix misspelling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20659309?v=4",
"events_url": "https://api.github.com/users/peterschutt/events{/privacy}",
"followers_url": "https://api.github.com/users/peterschutt/followers",
"following_url": "https://api.github.com/users/peterschutt/following{/other_user}",
"gists_url": "https://api.github.com/users/peterschutt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/peterschutt",
"id": 20659309,
"login": "peterschutt",
"node_id": "MDQ6VXNlcjIwNjU5MzA5",
"organizations_url": "https://api.github.com/users/peterschutt/orgs",
"received_events_url": "https://api.github.com/users/peterschutt/received_events",
"repos_url": "https://api.github.com/users/peterschutt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/peterschutt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/peterschutt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/peterschutt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-18T11:09:41Z
|
2021-08-30T00:06:40Z
|
2019-09-19T15:29:30Z
|
CONTRIBUTOR
|
resolved
|
Just noticed a small typo!
|
{
"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/5197/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5197/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5197.diff",
"html_url": "https://github.com/psf/requests/pull/5197",
"merged_at": "2019-09-19T15:29:30Z",
"patch_url": "https://github.com/psf/requests/pull/5197.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5197"
}
| true |
[
"Thanks @5uper5hoot!"
] |
https://api.github.com/repos/psf/requests/issues/5196
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5196/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5196/comments
|
https://api.github.com/repos/psf/requests/issues/5196/events
|
https://github.com/psf/requests/issues/5196
| 494,624,604 |
MDU6SXNzdWU0OTQ2MjQ2MDQ=
| 5,196 |
Host header is propagated on allow_redirects
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/333846?v=4",
"events_url": "https://api.github.com/users/stitch/events{/privacy}",
"followers_url": "https://api.github.com/users/stitch/followers",
"following_url": "https://api.github.com/users/stitch/following{/other_user}",
"gists_url": "https://api.github.com/users/stitch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stitch",
"id": 333846,
"login": "stitch",
"node_id": "MDQ6VXNlcjMzMzg0Ng==",
"organizations_url": "https://api.github.com/users/stitch/orgs",
"received_events_url": "https://api.github.com/users/stitch/received_events",
"repos_url": "https://api.github.com/users/stitch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stitch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stitch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stitch",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2019-09-17T13:28:37Z
|
2019-10-01T19:37:13Z
| null |
NONE
| null |
## Summary:
We use a combination of explicit IP addresses and Host header to contact a website explicitly via IPv4 and IPv6. The Host header is propagated in every redirect, which causes problems, as the Host header and the address will not match the visited address anymore. This might cause an infinite redirect loop if a server tries to correct the host with a redirect.
## Example:
```python
requests.get('http://40.101.81.152:80', allow_redirects=True, headers={'Host': 'autodiscover.drimmelen.nl', 'random_header': "test"})
```
If you debug this request, you'll see that both the random_header and Host are sent with every request. See code below...
## Expected Result
From the support request i've seen that requests does not explicitly allows navigation between IPv6 or IPv4. This is too bad, but that is not the problem here.
In this case the problem is that the Host header is not overwritten after a redirect. We'd expect the IP(v4 or v6) address be used in the redirect, with the Host url received. If that's not possible, we'd expect the Host be overwritten with the location we're at now, completely ignoring the concept of IPv4 or IPv6 (and just going the default route of underlying network settings).
## Actual Result
After 30 redirect, the Host was still set to the value specified. This creates a mismatch between the requested address (translated from the url) and the actual url.
The following headers where observed:
...ccept: */*\r\nConnection: keep-alive\r\nHost: autodiscover.drimmelen.nl\r\nrandom_header: test\r\nCookie: ClientId=3127...
Which means the random_header was progragated correctly... and also the Host header. Propagating the Host header after a redirect is obviously wrong and can cause all kinds of misunderstanding.
## Reproduction Steps
```python
import requests
requests.get('http://40.101.81.152:80', allow_redirects=True, headers={'Host': 'autodiscover.drimmelen.nl', 'random_header': "test"})
```
The code responsible seems to be here:
https://github.com/psf/requests/blob/3e7d0a873f838e0001f7ac69b1987147128a7b5f/requests/sessions.py#L149
This code blindly copies all kwargs, except a few chosen ones such as content-length (of course). We think Host should be one of the things changed as well to prevent the address and url mismatch on redirects.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "18.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010102f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
| 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/5196/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5196/timeline
| null | null | null | null | false |
[
"There has been some discussion about this before in #4002."
] |
https://api.github.com/repos/psf/requests/issues/5195
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5195/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5195/comments
|
https://api.github.com/repos/psf/requests/issues/5195/events
|
https://github.com/psf/requests/pull/5195
| 494,596,859 |
MDExOlB1bGxSZXF1ZXN0MzE4MzE3NDkx
| 5,195 |
Fix formatting of status code example
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15225902?v=4",
"events_url": "https://api.github.com/users/tesuji/events{/privacy}",
"followers_url": "https://api.github.com/users/tesuji/followers",
"following_url": "https://api.github.com/users/tesuji/following{/other_user}",
"gists_url": "https://api.github.com/users/tesuji/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tesuji",
"id": 15225902,
"login": "tesuji",
"node_id": "MDQ6VXNlcjE1MjI1OTAy",
"organizations_url": "https://api.github.com/users/tesuji/orgs",
"received_events_url": "https://api.github.com/users/tesuji/received_events",
"repos_url": "https://api.github.com/users/tesuji/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tesuji/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tesuji/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tesuji",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-09-17T12:36:50Z
|
2021-08-30T00:06:39Z
|
2019-09-19T15:32:14Z
|
CONTRIBUTOR
|
resolved
|
Currently the [website][1] looks like this:

[1]: https://2.python-requests.org/en/master/api/#status-code-lookup
|
{
"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/5195/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5195/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5195.diff",
"html_url": "https://github.com/psf/requests/pull/5195",
"merged_at": "2019-09-19T15:32:14Z",
"patch_url": "https://github.com/psf/requests/pull/5195.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5195"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5194
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5194/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5194/comments
|
https://api.github.com/repos/psf/requests/issues/5194/events
|
https://github.com/psf/requests/issues/5194
| 493,850,293 |
MDU6SXNzdWU0OTM4NTAyOTM=
| 5,194 |
json.dumps() fails for CookieJar deserialization after serialization
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2019-09-16T05:14:12Z
|
2019-10-03T12:59:17Z
| null |
NONE
| null |
Summary.
## Expected Result
Seamless serialization/deserialization to and from dictionary consisting of name:value pairs.
## Actual Result
Serialization succeeds but the object it returns is not a serialized dictionary. If one then tries to deserialize this resulting object using `json.loads(serialized_obj)` it would return an exception.
Since, deserialization requires a proper serialized dictionary, it fails there and then.
## Reproduction Steps
```python
import requests
import json
serialized_cookie_dict = ""
response = requests.get('example')
serialized_cookie_dict = json.dumps(response.cookies)
print(serialized_cookie_dict) #--- Notice the resulting object is nothing like a dictionary
deserialized_cookie_dict = requests.cookies.cookiejar_from_dict(json.loads(serialized_cookie_dict)) #--- Error!
```
## System Information
This is irrelevant for the concerned bug.
Tested on Python version 3.6
## Possible Solution/Workaround
```python
import requests
import json
serialized_cookie_dict = ""
response = requests.get('example')
serialized_cookie_dict = json.dumps(dict(response.cookies))
print(serialized_cookie_dict) #--- Correctly serialized CookieJar
deserialized_cookie_dict = requests.cookies.cookiejar_from_dict(json.loads(serialized_cookie_dict)) #--- Successful!
```
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/5194/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5194/timeline
| null | null | null | null | false |
[
"I cannot reproduce this. In your first example I get an error during serialization (`Object of type RequestsCookieJar is not JSON serializable`).",
"@Overv Forgive me for the late reply. Since I've moved on to other projects, I don't have time to look into this again.\r\n\r\nIf you do not see this being a problem then I welcome you to close this bug. In future projects if I face something like this again, I'll surely raise the issue in more detail and will try my best to follow up!\r\n\r\nThank you."
] |
https://api.github.com/repos/psf/requests/issues/5193
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5193/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5193/comments
|
https://api.github.com/repos/psf/requests/issues/5193/events
|
https://github.com/psf/requests/pull/5193
| 493,088,332 |
MDExOlB1bGxSZXF1ZXN0MzE3MTM3MTg1
| 5,193 |
Test under PyPy3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10340167?v=4",
"events_url": "https://api.github.com/users/johnthagen/events{/privacy}",
"followers_url": "https://api.github.com/users/johnthagen/followers",
"following_url": "https://api.github.com/users/johnthagen/following{/other_user}",
"gists_url": "https://api.github.com/users/johnthagen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/johnthagen",
"id": 10340167,
"login": "johnthagen",
"node_id": "MDQ6VXNlcjEwMzQwMTY3",
"organizations_url": "https://api.github.com/users/johnthagen/orgs",
"received_events_url": "https://api.github.com/users/johnthagen/received_events",
"repos_url": "https://api.github.com/users/johnthagen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/johnthagen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/johnthagen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/johnthagen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 17 |
2019-09-13T00:38:38Z
|
2021-08-29T00:07:11Z
|
2020-01-21T17:00:51Z
|
CONTRIBUTOR
|
resolved
|
`setup.py` and [`README.md`](https://github.com/psf/requests/blob/3c01cd708033295c65be3fd85dea9d453506c854/README.md#feature-support) explicitly list PyPy support. This PR extends testing to PyPy3 (which is currently Python 3.6-compatible). This will help ensure that support for PyPy3 does not regress.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5193/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5193/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5193.diff",
"html_url": "https://github.com/psf/requests/pull/5193",
"merged_at": "2020-01-21T17:00:51Z",
"patch_url": "https://github.com/psf/requests/pull/5193.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5193"
}
| true |
[
"PyPy3 build failure seems to be due to a stall?\r\n\r\n```\r\n============================= test session starts ==============================\r\nplatform linux -- Python 3.6.1[pypy-7.1.1-beta], pytest-3.10.1, py-1.8.0, pluggy-0.11.0\r\nrootdir: /home/travis/build/psf/requests, inifile: pytest.ini\r\nplugins: xdist-1.25.0, mock-1.10.4, httpbin-0.3.0, forked-1.0.2, cov-2.7.1\r\ngw0 [559] / gw1 [559] / gw2 [559] / gw3 [559] / gw4 [559] / gw5 [559] / gw6 [559] / gw7 [559]\r\n.....................\r\nNo output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.\r\n```\r\n\r\nThis could indicate an actual bug. If anyone knows the best way to enable some more verbose output, we could try that to see what is going on.\r\n\r\nEdit: I've seen something similar before in another project where the cause was one of the dependencies that didn't support PyPy3. Perhaps something similar is happening here.",
"Hi @johnthagen, it looks like PyPy3 is unable to run our test suite on Travis right now due to timeout issues. It's not clear if this is an issue with Travis, or PyPy3 using Requests. I'm going to close this out for now, but if you're able to get this working please feel free to raise another PR. Thanks!",
"It's PyPy3, I have the same problem locally. I'm not sure if it's a problem with requests or pytest-httpbin though, since the latter also has hanging tests. It may be PyPy3's ssl implementation as well.",
"CC @mattip from the PyPy team. Is there a potential PyPy issue here?",
"How do I reproduce this? I activated a clean PyPy virtualenv, cloned the repo, and did\r\n```\r\nmake init\r\nmake test-readme\r\n```\r\n\r\nThe second command failed with\r\n```\r\n$ make test-readme\r\nCourtesy Notice: Pipenv found itself running within a virtual environment, \\\r\nso it will automatically use that environment, instead of creating its own for \\\r\nany project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to \\\r\nignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 \\\r\nto suppress this warning.\r\nrunning check\r\nerror: The docutils package is needed.\r\nInvalid markup in README.rst or HISTORY.rst!\r\n```",
"It seems that `setup.py` is a bit broken. Edit it and change `pytest_args` to `'-vv'`. Then `pypy3 setup.py test` should give a reasonably verbose output to see where it hangs. For me, it's:\r\n\r\n```\r\ntests/test_lowlevel.py::test_use_proxy_from_environment[http_proxy-http]",
"~the problem is PyPy uses older logic for reading from a socket with no set timeout: if the other side closes the socket without writing anything it will hang (in `_socket.socket.recv_into`). I think this was changed on python3 to not hang. See [PyPy issue 3122](https://bitbucket.org/pypy/pypy/issues/3122)~\r\n\r\nEdit: wrong - this is simply a resource leak",
"The real problem is that the `test_server/server.py` does not close the [socket returned from `accept`](https://github.com/psf/requests/blob/v2.22.0/tests/testserver/server.py#L92). On CPython, the socket is automatically closed when the function returns or raises since the variable is local. On PyPy the GC does not kick in, so the process hangs. Even worse, since this is in a thread, the resource leak is not reported.\r\n\r\nThis can be solved by using a context manager. Instead of the line I marked, use\r\n```\r\nwith self._accept_connection() as sock:\r\n```\r\n\r\nand indent the subsequent block accordingly",
"Thank you very much for figuring this out.\r\n\r\n@johnthagen, do you need me to make a PR for this or will you handle it from here?",
"@nateprewitt Could you please re-open this PR? Per the discussion, we have identified a bug in the test suite that once corrected, should allow PyPy3 to run tests successfully.\r\n\r\n@mattip Can you confirm that this patch is what you were expecting for this fix?\r\n\r\n- https://github.com/psf/requests/commit/18de73cd9a2fa84ec6ef272c7d4f1ba1a507b820",
"Pinging @nateprewitt to see if this PR can be reopened.",
"Pinging @sethmlarson, could this PR be opened? We've solved the issues related to PyPy3 testing.",
"Reopening to see if CI now passes.",
"@mattip Mind double checking my fix?",
"@mattip Nice, your suggestion fixed all of Python 3 / PyPy3 CI.\r\n\r\nNow just 2.7 is failing: https://travis-ci.com/psf/requests/jobs/277906014\r\n\r\nSeems like something about the Python 2.7 object isn't supporting context managers?\r\n\r\n```\r\n_______________ test_use_proxy_from_environment[all_proxy-http] ________________\r\n[gw3] linux2 -- Python 2.7.15 /home/travis/virtualenv/python2.7.15/bin/python\r\nhttpbin = <function inner at 0x7f4fd1c33cf8>, var = 'all_proxy', scheme = 'http'\r\n @pytest.mark.parametrize(\"var,scheme\", _proxy_combos)\r\n def test_use_proxy_from_environment(httpbin, var, scheme):\r\n url = \"{}://httpbin.org\".format(scheme)\r\n fake_proxy = Server() # do nothing with the requests; just close the socket\r\n with fake_proxy as (host, port):\r\n proxy_url = \"socks5://{}:{}\".format(host, port)\r\n kwargs = {var: proxy_url}\r\n with override_environ(**kwargs):\r\n # fake proxy's lack of response will cause a ConnectionError\r\n with pytest.raises(requests.exceptions.ConnectionError):\r\n requests.get(url)\r\n \r\n # the fake proxy received a request\r\n> assert len(fake_proxy.handler_results) == 1\r\nE assert 0 == 1\r\nE + where 0 = len([])\r\nE + where [] = <Server(Thread-1, stopped 139980796024576)>.handler_results\r\ntests/test_lowlevel.py:203: AssertionError\r\n----------------------------- Captured stderr call -----------------------------\r\nException in thread Thread-1:\r\nTraceback (most recent call last):\r\n File \"/opt/python/2.7.15/lib/python2.7/threading.py\", line 801, in __bootstrap_inner\r\n self.run()\r\n File \"/home/travis/build/psf/requests/tests/testserver/server.py\", line 69, in run\r\n self._handle_requests()\r\n File \"/home/travis/build/psf/requests/tests/testserver/server.py\", line 92, in _handle_requests\r\n with self._accept_connection() as sock:\r\nAttributeError: __exit__\r\n```",
"yeah, a python2 socket.socket cannot be used as a context manager. You will have to go back to the original code and add a `try: ... finally: if sock: sock.close()`",
"@sethmlarson @mattip CI is now green across the board! 🎉 \r\n\r\nThis PR should be good to be merged now."
] |
https://api.github.com/repos/psf/requests/issues/5192
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5192/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5192/comments
|
https://api.github.com/repos/psf/requests/issues/5192/events
|
https://github.com/psf/requests/pull/5192
| 492,212,010 |
MDExOlB1bGxSZXF1ZXN0MzE2NDI3NTMz
| 5,192 |
Fixes indent for rst
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1926776?v=4",
"events_url": "https://api.github.com/users/0bsearch/events{/privacy}",
"followers_url": "https://api.github.com/users/0bsearch/followers",
"following_url": "https://api.github.com/users/0bsearch/following{/other_user}",
"gists_url": "https://api.github.com/users/0bsearch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/0bsearch",
"id": 1926776,
"login": "0bsearch",
"node_id": "MDQ6VXNlcjE5MjY3NzY=",
"organizations_url": "https://api.github.com/users/0bsearch/orgs",
"received_events_url": "https://api.github.com/users/0bsearch/received_events",
"repos_url": "https://api.github.com/users/0bsearch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/0bsearch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/0bsearch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/0bsearch",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-11T12:39:11Z
|
2021-08-30T00:06:41Z
|
2019-09-11T13:06:07Z
|
NONE
|
resolved
|
Fixes formatting for https://2.python-requests.org/en/master/api/#status-code-lookup
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1926776?v=4",
"events_url": "https://api.github.com/users/0bsearch/events{/privacy}",
"followers_url": "https://api.github.com/users/0bsearch/followers",
"following_url": "https://api.github.com/users/0bsearch/following{/other_user}",
"gists_url": "https://api.github.com/users/0bsearch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/0bsearch",
"id": 1926776,
"login": "0bsearch",
"node_id": "MDQ6VXNlcjE5MjY3NzY=",
"organizations_url": "https://api.github.com/users/0bsearch/orgs",
"received_events_url": "https://api.github.com/users/0bsearch/received_events",
"repos_url": "https://api.github.com/users/0bsearch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/0bsearch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/0bsearch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/0bsearch",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5192/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5192/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5192.diff",
"html_url": "https://github.com/psf/requests/pull/5192",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5192.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5192"
}
| true |
[
"Duplicates https://github.com/psf/requests/pull/5183"
] |
https://api.github.com/repos/psf/requests/issues/5191
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5191/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5191/comments
|
https://api.github.com/repos/psf/requests/issues/5191/events
|
https://github.com/psf/requests/issues/5191
| 490,401,273 |
MDU6SXNzdWU0OTA0MDEyNzM=
| 5,191 |
SSL: CERTIFICATE_VERIFY_FAILED -> During handling of the above exception, another exception occurred:
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/436227?v=4",
"events_url": "https://api.github.com/users/mattismyname/events{/privacy}",
"followers_url": "https://api.github.com/users/mattismyname/followers",
"following_url": "https://api.github.com/users/mattismyname/following{/other_user}",
"gists_url": "https://api.github.com/users/mattismyname/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mattismyname",
"id": 436227,
"login": "mattismyname",
"node_id": "MDQ6VXNlcjQzNjIyNw==",
"organizations_url": "https://api.github.com/users/mattismyname/orgs",
"received_events_url": "https://api.github.com/users/mattismyname/received_events",
"repos_url": "https://api.github.com/users/mattismyname/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mattismyname/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mattismyname/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mattismyname",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-06T15:53:28Z
|
2022-02-26T06:00:23Z
|
2021-11-28T05:39:09Z
|
NONE
|
resolved
|
Not sure if you'd consider this a bug, but from user's standpoint it's annoying because it causes messages printed to console that we'd rather not have printed. When SSL cert verification fails, there are several levels of unhandled exceptions being thrown from inside other exception handler contexts, which results in messages like this printed to the console:
Traceback (most recent call last):
File "site-packages-link4/urllib3/connectionpool.py", line 594, in urlopen
File "site-packages-link4/urllib3/connectionpool.py", line 810, in _prepare_proxy
File "site-packages-link4/urllib3/connection.py", line 326, in connect
File "site-packages-link4/urllib3/util/ssl_.py", line 325, in ssl_wrap_socket
File "ssl.py", line 401, in wrap_socket
File "ssl.py", line 808, in __init__
File "ssl.py", line 1061, in do_handshake
File "ssl.py", line 683, in do_handshake
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "site-packages-link4/requests/adapters.py", line 440, in send
File "site-packages-link4/urllib3/connectionpool.py", line 630, in urlopen
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "addr.py", line 122, in _MakeRPCCall
File "site-packages-link4/requests/sessions.py", line 502, in request
File "site-packages-link4/requests/sessions.py", line 634, in send
File "site-packages-link4/requests/sessions.py", line 634, in <listcomp>
File "site-packages-link4/requests/sessions.py", line 212, in resolve_redirects
File "site-packages-link4/requests/sessions.py", line 612, in send
File "site-packages-link4/requests/adapters.py", line 514, in send
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
## Expected Result
I expected request() to throw a single exception to me indicating the SSL failure, but not print all of the above messages to the console.
## Actual Result
See above
## Reproduction Steps
Use requests to reqeust a resource from a server where SSL verification will fail.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "3.0.101-108.87-default",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"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/5191/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5191/timeline
| null |
completed
| null | null | false |
[
"This is a side-effect or urlli3b retries, Requests can't do anything about this unfortunately. Closing this issue."
] |
https://api.github.com/repos/psf/requests/issues/5190
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5190/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5190/comments
|
https://api.github.com/repos/psf/requests/issues/5190/events
|
https://github.com/psf/requests/issues/5190
| 490,306,545 |
MDU6SXNzdWU0OTAzMDY1NDU=
| 5,190 |
Requests does not handle http status 103
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5447220?v=4",
"events_url": "https://api.github.com/users/asavah/events{/privacy}",
"followers_url": "https://api.github.com/users/asavah/followers",
"following_url": "https://api.github.com/users/asavah/following{/other_user}",
"gists_url": "https://api.github.com/users/asavah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asavah",
"id": 5447220,
"login": "asavah",
"node_id": "MDQ6VXNlcjU0NDcyMjA=",
"organizations_url": "https://api.github.com/users/asavah/orgs",
"received_events_url": "https://api.github.com/users/asavah/received_events",
"repos_url": "https://api.github.com/users/asavah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asavah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asavah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asavah",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-09-06T12:42:19Z
|
2021-09-02T00:07:27Z
|
2020-02-10T05:56:08Z
|
NONE
|
resolved
|
Summary.
## Expected Result
Requests is able to fetch html.
## Actual Result
Requests returns empty text/content if server makes use of 103 status code (checkpoint).
## Reproduction Steps
```python
import requests
r = requests.get("https://www.samba.org/ftp/talloc/")
print(r.status_code)
print(len(r.content))
print(r.text)
```
output:
```
103
0
```
expected output:
```
200
actual content length
actual html
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8.dev1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "5.0.0-27-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.1.0.dev"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
## Additional data:
wget and curl handle 103 status code properly by simply ignoring it
```
curl -v https://www.samba.org/ftp/talloc/
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
> GET /ftp/talloc/ HTTP/2
> Host: www.samba.org
> User-Agent: curl/7.66.0-DEV
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 103
< link: <screen.css>; rel=preload; as=style
< HTTP/2 200
< date: Fri, 06 Sep 2019 12:39:43 GMT
< server: Apache
< referrer-policy: strict-origin
< strict-transport-security: max-age=15552000; includeSubDomains;preload
< vary: Accept-Encoding
< public-key-pins: max-age=999999;pin-sha256="YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg=";pin-sha256="Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=";pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";pin-sha256="sRHdihwgkaib1P1gxX8HFszlD+7/gTfNvuAybgLPNis=";includeSubDomains;
< content-type: text/html;charset=UTF-8
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<wall of expected html here/>
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5190/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5190/timeline
| null |
completed
| null | null | false |
[
"Hi @asavah, I can't seem to reproduce your issue with your example. I'm able to get a 200 correctly from that address. Tested in both 2.7 and 3.6.\r\n\r\n```\r\n200\r\n12612\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\r\n<html>\r\n <head>\r\n <title>Index of /ftp/talloc</title>\r\n </head>\r\n <body>\r\n<h1>Index of /ftp/talloc</h1>\r\n <table>\r\n <tr><th valign=\"top\"><img src=\"/icons/blank.gif\" alt=\"[ICO]\"></th><th><a href=\"?C=N;O=D\">Name</a></th><th><a href=\"?C=M;O=A\">Last modified</a></th><th><a href=\"?C=S;O=A\">Size</a></th><th><a href=\"?C=D;O=A\">Description</a></th></tr>\r\n <tr><th colspan=\"5\"><hr></th></tr>\r\n<tr><td valign=\"top\"><img src=\"/icons/back.gif\" alt=\"[PARENTDIR]\"></td><td><a href=\"/ftp/\">Parent Directory</a></td><td> </td><td align=\"right\"> - </td><td> </td></tr>\r\n<tr><td valign=\"top\"><img src=\"/icons/compressed.gif\" alt=\"[ ]\"></td><td><a href=\"talloc-1.3.0.tar.gz\">talloc-1.3.0.tar.gz</a></td><td align=\"right\">2009-05-05 13:47 </td><td align=\"right\">225K</td><td> </td></tr>\r\n...\r\n```\r\n\r\n",
"Yes, but it's because that site config changed and no longer sends 103.\r\nThe issue itself still exists.",
"Hi @asavah, this is correct. Requests does not handle 100 responses currently because the underlying Python libraries are unable to handle them. This is a known issue but until Python has support or we replace the library underpinning urllib3, we won't be able to provide support for this."
] |
https://api.github.com/repos/psf/requests/issues/5189
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5189/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5189/comments
|
https://api.github.com/repos/psf/requests/issues/5189/events
|
https://github.com/psf/requests/issues/5189
| 490,093,802 |
MDU6SXNzdWU0OTAwOTM4MDI=
| 5,189 |
Requests module get method response says "JavaScript has been disabled on your browser"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31011485?v=4",
"events_url": "https://api.github.com/users/vempasiddhartha/events{/privacy}",
"followers_url": "https://api.github.com/users/vempasiddhartha/followers",
"following_url": "https://api.github.com/users/vempasiddhartha/following{/other_user}",
"gists_url": "https://api.github.com/users/vempasiddhartha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vempasiddhartha",
"id": 31011485,
"login": "vempasiddhartha",
"node_id": "MDQ6VXNlcjMxMDExNDg1",
"organizations_url": "https://api.github.com/users/vempasiddhartha/orgs",
"received_events_url": "https://api.github.com/users/vempasiddhartha/received_events",
"repos_url": "https://api.github.com/users/vempasiddhartha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vempasiddhartha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vempasiddhartha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vempasiddhartha",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-09-06T02:18:14Z
|
2021-09-04T00:06:11Z
|
2019-09-19T23:04:35Z
|
NONE
|
resolved
|
Summary.
I have a url whose html response has to be assigned to a variable. In order to do that I am using the below code
resp = requests.get(url, timeout=05, verify=False)
html_output = resp.text
from the above html_output variable I am expecting the total html response of the page. However I am seeing a intermediate html output which says "**If you're seeing this message, that means <strong>JavaScript has been disabled on your browser**"
## Expected Result
The response should contain actual html source code of the url which i have given.
What you expected.
The response should contain actual html source code of the url which i have given.
## Actual Result
The below is the output of resp.text
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="manifest" href="/manifest.json"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-title" content="react boilerplate"><link rel="apple-touch-icon" sizes="120x120" href="/icon-120x120.png"><link rel="apple-touch-icon" sizes="152x152" href="/icon-152x152.png"><link rel="apple-touch-icon" sizes="167x167" href="/icon-167x167.png"><link rel="apple-touch-icon" sizes="180x180" href="/icon-180x180.png"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"><link rel="icon" href="/favicon.ico"/><title>F1</title></head><body><noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>, please <strong>enable JS</strong> to make this app work.</noscript><div id="app" style="height:100%"></div><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"><script type="text/javascript" src="/main.7be1cefcdb84757d693b.js"></script></body></html>
What happened instead.
## Reproduction Steps
```python
import requests
url = "http://adwords-iq-staging-84824396.us-east-1.elb.amazonaws.com"
resp = requests.get(url, timeout=05, verify=False)
print resp.text
```
## System Information
$ python -m requests.help
```
python 2.7 and OS is both Amazon linux and Mac OS
```
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/5189/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5189/timeline
| null |
completed
| null | null | false |
[
"Could be my ignorance, but to me that has nothing to do with requests. I.e. this has to with the page being able to render before responding to your GET. I.e. sort of like how you need selenium for certain tasks because it allows certain necessary browser functionalities to exist.",
"Hi @vempasiddhartha, \r\n\r\n@AndTheDaysGoBy is correct. The server is rendering a page that requires JavaScript to load content. Requests is an http client rather than a browser, so we won’t have output that requires script execution. I’d recommend looking at something like selenium for this use case."
] |
https://api.github.com/repos/psf/requests/issues/5188
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5188/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5188/comments
|
https://api.github.com/repos/psf/requests/issues/5188/events
|
https://github.com/psf/requests/pull/5188
| 490,057,634 |
MDExOlB1bGxSZXF1ZXN0MzE0NzM5Njc2
| 5,188 |
Correct Travis 2.7 build
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/50109?v=4",
"events_url": "https://api.github.com/users/gliptak/events{/privacy}",
"followers_url": "https://api.github.com/users/gliptak/followers",
"following_url": "https://api.github.com/users/gliptak/following{/other_user}",
"gists_url": "https://api.github.com/users/gliptak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gliptak",
"id": 50109,
"login": "gliptak",
"node_id": "MDQ6VXNlcjUwMTA5",
"organizations_url": "https://api.github.com/users/gliptak/orgs",
"received_events_url": "https://api.github.com/users/gliptak/received_events",
"repos_url": "https://api.github.com/users/gliptak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gliptak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gliptak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gliptak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-09-05T23:24:51Z
|
2021-08-30T00:06:41Z
|
2019-09-15T01:39:24Z
|
NONE
|
resolved
|
Signed-off-by: Gábor Lipták <[email protected]>
failing build https://travis-ci.com/psf/requests/jobs/228220372
|
{
"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/5188/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5188/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5188.diff",
"html_url": "https://github.com/psf/requests/pull/5188",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5188.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5188"
}
| true |
[
"https://github.com/psf/requests/pull/5174",
"@kennethreitz please review",
"Hi @gliptak, this is a duplicate of #5174. We’re going to resolve this in favor of the outcome of that ticket. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5187
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5187/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5187/comments
|
https://api.github.com/repos/psf/requests/issues/5187/events
|
https://github.com/psf/requests/pull/5187
| 489,717,382 |
MDExOlB1bGxSZXF1ZXN0MzE0NDc0MTc5
| 5,187 |
Fix encode data which has a dict value
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11171020?v=4",
"events_url": "https://api.github.com/users/sunshineplan/events{/privacy}",
"followers_url": "https://api.github.com/users/sunshineplan/followers",
"following_url": "https://api.github.com/users/sunshineplan/following{/other_user}",
"gists_url": "https://api.github.com/users/sunshineplan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sunshineplan",
"id": 11171020,
"login": "sunshineplan",
"node_id": "MDQ6VXNlcjExMTcxMDIw",
"organizations_url": "https://api.github.com/users/sunshineplan/orgs",
"received_events_url": "https://api.github.com/users/sunshineplan/received_events",
"repos_url": "https://api.github.com/users/sunshineplan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sunshineplan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sunshineplan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sunshineplan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2019-09-05T12:23:04Z
|
2021-08-28T00:06:25Z
|
2020-07-21T06:45:04Z
|
NONE
|
resolved
|
If data contains a dict in dict value like {'a': 'b', 'c': {'d': 'e'}}, it will be encoded as a=b&c=d which is obviously wrong.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5187/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5187/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5187.diff",
"html_url": "https://github.com/psf/requests/pull/5187",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5187.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5187"
}
| true |
[
"requests.post('https://httpbin.org/post', data={'a': 'b', 'c': {'d': 'e'}}).text\r\n\r\n```\r\n{\r\n \"args\": {},\r\n \"data\": \"\",\r\n \"files\": {},\r\n \"form\": {\r\n \"a\": \"b\",\r\n \"c\": \"d\"\r\n },\r\n \"headers\": {\r\n \"Accept\": \"*/*\",\r\n \"Accept-Encoding\": \"gzip, deflate\",\r\n \"Content-Length\": \"7\",\r\n \"Content-Type\": \"application/x-www-form-urlencoded\",\r\n \"Host\": \"httpbin.org\",\r\n \"User-Agent\": \"python-requests/2.21.0\"\r\n },\r\n \"json\": null,\r\n \"origin\": \"x.x.x.x\",\r\n \"url\": \"https://httpbin.org/post\"\r\n}\r\n```\r\n\r\nurlopen(Request('https://httpbin.org/post', data=urlencode({'a': 'b', 'c': {'d': 'e'}}).encode())).read().decode()\r\n\r\n```\r\n{\r\n \"args\": {},\r\n \"data\": \"\",\r\n \"files\": {},\r\n \"form\": {\r\n \"a\": \"b\",\r\n \"c\": \"{'d': 'e'}\"\r\n },\r\n \"headers\": {\r\n \"Accept-Encoding\": \"identity\",\r\n \"Content-Length\": \"30\",\r\n \"Content-Type\": \"application/x-www-form-urlencoded\",\r\n \"Host\": \"httpbin.org\",\r\n \"User-Agent\": \"Python-urllib/3.7\"\r\n },\r\n \"json\": null,\r\n \"origin\": \"x.x.x.x\",\r\n \"url\": \"https://httpbin.org/post\"\r\n}\r\n```\r\n",
"This PR is connected to https://github.com/psf/requests/pull/5253\r\n",
"Hi @sunshineplan,\r\n\r\nThis functionality already exists today in the Request-Toolbelt library where some of the more non-standard or involved changes have been kept. You can find full documentation on how to use it here: https://toolbelt.readthedocs.io/en/latest/formdata.html."
] |
https://api.github.com/repos/psf/requests/issues/5186
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5186/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5186/comments
|
https://api.github.com/repos/psf/requests/issues/5186/events
|
https://github.com/psf/requests/pull/5186
| 489,002,190 |
MDExOlB1bGxSZXF1ZXN0MzEzOTA3Mjgx
| 5,186 |
defense programming to convert args from string to list
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5009485?v=4",
"events_url": "https://api.github.com/users/magus0219/events{/privacy}",
"followers_url": "https://api.github.com/users/magus0219/followers",
"following_url": "https://api.github.com/users/magus0219/following{/other_user}",
"gists_url": "https://api.github.com/users/magus0219/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/magus0219",
"id": 5009485,
"login": "magus0219",
"node_id": "MDQ6VXNlcjUwMDk0ODU=",
"organizations_url": "https://api.github.com/users/magus0219/orgs",
"received_events_url": "https://api.github.com/users/magus0219/received_events",
"repos_url": "https://api.github.com/users/magus0219/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/magus0219/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/magus0219/subscriptions",
"type": "User",
"url": "https://api.github.com/users/magus0219",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-09-04T07:58:19Z
|
2021-08-29T00:06:54Z
|
2020-05-09T05:57:26Z
|
NONE
|
resolved
|
fix #5180
|
{
"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/5186/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5186/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5186.diff",
"html_url": "https://github.com/psf/requests/pull/5186",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5186.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5186"
}
| true |
[
"Hi @magus0219, It's not immediately clear what the goal of this PR is. We have a Makefile setup and instructions for running tests in the documentation for correct usage of the testing infrastructure. I'm going to close this for now but let us know if we're missing something."
] |
https://api.github.com/repos/psf/requests/issues/5185
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5185/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5185/comments
|
https://api.github.com/repos/psf/requests/issues/5185/events
|
https://github.com/psf/requests/issues/5185
| 488,930,661 |
MDU6SXNzdWU0ODg5MzA2NjE=
| 5,185 |
confusing error for bad timeout value
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1731829?v=4",
"events_url": "https://api.github.com/users/bennn/events{/privacy}",
"followers_url": "https://api.github.com/users/bennn/followers",
"following_url": "https://api.github.com/users/bennn/following{/other_user}",
"gists_url": "https://api.github.com/users/bennn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bennn",
"id": 1731829,
"login": "bennn",
"node_id": "MDQ6VXNlcjE3MzE4Mjk=",
"organizations_url": "https://api.github.com/users/bennn/orgs",
"received_events_url": "https://api.github.com/users/bennn/received_events",
"repos_url": "https://api.github.com/users/bennn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bennn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bennn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bennn",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-09-04T04:16:48Z
|
2019-09-04T04:16:48Z
| null |
NONE
| null |
Calling `requests.get(...., timeout=X)` with a bad value for `X` causes `urllib3` to throw an exception.
If `X` is a tuple, then `requests` raises its own exception too (good!).
If not, then `requests` doesn't say that it got a bad timeout value.
#5017 suggested a fix, but was closed
## Expected Result
These two lines should both raise an exception in `requests`:
```
get("https://random.org", timeout=(True, True))
get("https://random.org", timeout=True)
```
## Actual Result
The first line outputs:
```
Traceback (most recent call last):
File "..../requests/adapters.py", line 425, in send
timeout = TimeoutSauce(connect=connect, read=read)
File "..../urllib3/util/timeout.py", line 94, in __init__
self._connect = self._validate_timeout(connect, 'connect')
File "..../urllib3/util/timeout.py", line 121, in _validate_timeout
raise ValueError("Timeout cannot be a boolean value. It must "
ValueError: Timeout cannot be a boolean value. It must be an int, float or None.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 3, in <module>
get("https://random.org", timeout=(True, True))
File "..../requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "..../requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "..../requests/sessions.py", line 537, in request
resp = self.send(prep, **send_kwargs)
File "..../requests/sessions.py", line 650, in send
r = adapter.send(request, **kwargs)
File "..../requests/adapters.py", line 431, in send
raise ValueError(err)
ValueError: Invalid timeout (True, True). Pass a (connect, read) timeout tuple, or a single float to set both timeouts to the same value
```
The second outputs:
```
Traceback (most recent call last):
File "test.py", line 3, in <module>
get("https://random.org", timeout=True)
File "..../requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "..../requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "..../requests/sessions.py", line 537, in request
resp = self.send(prep, **send_kwargs)
File "..../requests/sessions.py", line 650, in send
r = adapter.send(request, **kwargs)
File "..../requests/adapters.py", line 435, in send
timeout = TimeoutSauce(connect=timeout, read=timeout)
File "..../urllib3/util/timeout.py", line 94, in __init__
self._connect = self._validate_timeout(connect, 'connect')
File "..../urllib3/util/timeout.py", line 121, in _validate_timeout
raise ValueError("Timeout cannot be a boolean value. It must "
ValueError: Timeout cannot be a boolean value. It must be an int, float or None.
```
## Reproduction Steps
```python
import requests
get("https://random.org", timeout=True)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.3.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.1"
},
"platform": {
"release": "15.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1000208f",
"version": "16.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000212f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
| 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/5185/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5185/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5184
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5184/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5184/comments
|
https://api.github.com/repos/psf/requests/issues/5184/events
|
https://github.com/psf/requests/issues/5184
| 488,819,667 |
MDU6SXNzdWU0ODg4MTk2Njc=
| 5,184 |
different header handling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14077066?v=4",
"events_url": "https://api.github.com/users/obelix05/events{/privacy}",
"followers_url": "https://api.github.com/users/obelix05/followers",
"following_url": "https://api.github.com/users/obelix05/following{/other_user}",
"gists_url": "https://api.github.com/users/obelix05/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/obelix05",
"id": 14077066,
"login": "obelix05",
"node_id": "MDQ6VXNlcjE0MDc3MDY2",
"organizations_url": "https://api.github.com/users/obelix05/orgs",
"received_events_url": "https://api.github.com/users/obelix05/received_events",
"repos_url": "https://api.github.com/users/obelix05/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/obelix05/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/obelix05/subscriptions",
"type": "User",
"url": "https://api.github.com/users/obelix05",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2019-09-03T20:57:53Z
|
2019-09-03T21:02:24Z
| null |
NONE
| null |
There is a difference between the `requests.Request.prepare()` call and the `requests.Session().send()` call. I would like to explain a little:
When a `requests.Session()` is initialized, different `default_headers` are set ('Accept-Encoding', 'Accept' and 'Connection'). Such a session is also initialized by `requests.get()`. Then the `custom_headers` are merged with the `default_headers`. For the query of my URL it is important that 'Accept' and 'Connection' are set. However, calling `Request.prepare()` does not set these `default_headers` and calling `requests.Session().send()` overwrites any values already set (including the `default_headers`).
## Expected Result
`requests.Session()` and `requests.get()` have the same headers
## Actual Result
The default_headers are overwritten by `requests.Session().send()`
## Reproduction Steps
```python
import requests
resource = 'https://www.accuweather.com/en/de/hamburg/20095/biking-weather/178556'
method = 'GET'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
}
verify_ssl = True
timeout = 10
# this works fine
response = requests.get(resource, headers=headers, timeout=timeout)
# that causes an requests.exceptions.ReadTimeout
request = requests.Request(method, resource, headers=headers, auth=None, data=None).prepare()
with requests.Session() as sess:
response = sess.send(request, timeout=timeout, verify=verify_ssl)
# now this works fine again
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
'Accept': '*/*',
'Connection': 'keep-alive',
}
request = requests.Request(method, resource, headers=headers, auth=None, data=None).prepare()
with requests.Session() as sess:
response = sess.send(request, timeout=timeout, verify=verify_ssl)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.0.0-27-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010102f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5184/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5184/timeline
| null | null | null | null | false |
[] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.