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/6316
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6316/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6316/comments
|
https://api.github.com/repos/psf/requests/issues/6316/events
|
https://github.com/psf/requests/issues/6316
| 1,510,442,019 |
I_kwDOABTKOs5aB4Qj
| 6,316 |
pre-commit fails because of an outdated flake8 repo link
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/108201575?v=4",
"events_url": "https://api.github.com/users/ch-iv/events{/privacy}",
"followers_url": "https://api.github.com/users/ch-iv/followers",
"following_url": "https://api.github.com/users/ch-iv/following{/other_user}",
"gists_url": "https://api.github.com/users/ch-iv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ch-iv",
"id": 108201575,
"login": "ch-iv",
"node_id": "U_kgDOBnMGZw",
"organizations_url": "https://api.github.com/users/ch-iv/orgs",
"received_events_url": "https://api.github.com/users/ch-iv/received_events",
"repos_url": "https://api.github.com/users/ch-iv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ch-iv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ch-iv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ch-iv",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-12-25T23:38:00Z
|
2023-12-27T00:03:26Z
|
2022-12-26T04:24:17Z
|
CONTRIBUTOR
|
resolved
|
Running `pre-commit` will fail, because of an outdated flake8 repo link in `.pre-commit-config.yaml`. Flake8 has moved from https://gitlab.com/pycqa/flake8 to https://github.com/PyCQA/flake8.
Updating the link should fix the issue
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6316/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6316/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6315
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6315/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6315/comments
|
https://api.github.com/repos/psf/requests/issues/6315/events
|
https://github.com/psf/requests/issues/6315
| 1,506,946,420 |
I_kwDOABTKOs5Z0i10
| 6,315 |
Duplicate #6261
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47829077?v=4",
"events_url": "https://api.github.com/users/thetechnodino/events{/privacy}",
"followers_url": "https://api.github.com/users/thetechnodino/followers",
"following_url": "https://api.github.com/users/thetechnodino/following{/other_user}",
"gists_url": "https://api.github.com/users/thetechnodino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thetechnodino",
"id": 47829077,
"login": "thetechnodino",
"node_id": "MDQ6VXNlcjQ3ODI5MDc3",
"organizations_url": "https://api.github.com/users/thetechnodino/orgs",
"received_events_url": "https://api.github.com/users/thetechnodino/received_events",
"repos_url": "https://api.github.com/users/thetechnodino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thetechnodino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thetechnodino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thetechnodino",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-12-21T21:43:13Z
|
2023-12-22T00:03:36Z
|
2022-12-21T23:31:35Z
|
NONE
|
resolved
|
Duplicate #6261
Nate: Sorry i posted duplicate. Probably posted in the wrong place. Newbie and my first post on the forum.
You closed #6314 as duplicate of #6261. I was not making a feature request but seeking help.
I was hoping to get help in solving the issue I am experiencing with RequestsDependencyWarning error messages.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6315/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6315/timeline
| null |
completed
| null | null | false |
[
"Hi @thetechnodino, your last issue was closed because the warning you're encountering is discussed in the issue linked. For the time being you can downgrade to `charset_normalizer<3.0` if you're trying to get rid of the warning.\r\n\r\nFor future reference, please follow the instructions provided when you opened this issue. Thanks!\r\n\r\n> Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance."
] |
https://api.github.com/repos/psf/requests/issues/6314
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6314/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6314/comments
|
https://api.github.com/repos/psf/requests/issues/6314/events
|
https://github.com/psf/requests/issues/6314
| 1,506,909,615 |
I_kwDOABTKOs5Z0Z2v
| 6,314 |
RequestsDependencyWarning
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47829077?v=4",
"events_url": "https://api.github.com/users/thetechnodino/events{/privacy}",
"followers_url": "https://api.github.com/users/thetechnodino/followers",
"following_url": "https://api.github.com/users/thetechnodino/following{/other_user}",
"gists_url": "https://api.github.com/users/thetechnodino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thetechnodino",
"id": 47829077,
"login": "thetechnodino",
"node_id": "MDQ6VXNlcjQ3ODI5MDc3",
"organizations_url": "https://api.github.com/users/thetechnodino/orgs",
"received_events_url": "https://api.github.com/users/thetechnodino/received_events",
"repos_url": "https://api.github.com/users/thetechnodino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thetechnodino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thetechnodino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thetechnodino",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-12-21T21:06:52Z
|
2022-12-21T21:11:39Z
|
2022-12-21T21:11:03Z
|
NONE
| null |
Windows 11 (Professional); Pycharm 2022.3
Getting dependency warning in both Python 3.10 (latest) and Python 3.11 (latest). The code produces the desired results as well as a dependency warning is generated.
[python code]
<import requests
quote = requests.get(url="https://api.kanye.rest")
quote.raise_for_status()
kanye = quote.json()
print(kanye)>
Error message (copy & paste from console)
C:\Users\XXX\AppData\Local\Programs\Python\Python310\python.exe E:\Python_Projects\Kanye\scratch.py
C:\Users\XXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
warnings.warn(
{'quote': "I don't wanna see no woke tweets or hear no woke raps ... it's show time ... it's a whole different energy right now"}
Process finished with exit code 0
Installed Packages

|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6314/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6314/timeline
| null |
completed
| null | null | false |
[
"Duplicate #6261"
] |
https://api.github.com/repos/psf/requests/issues/6313
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6313/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6313/comments
|
https://api.github.com/repos/psf/requests/issues/6313/events
|
https://github.com/psf/requests/issues/6313
| 1,506,222,821 |
I_kwDOABTKOs5ZxyLl
| 6,313 |
requests ignores no_proxy which contains a IPv6 CIDR
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/883848?v=4",
"events_url": "https://api.github.com/users/derekhiggins/events{/privacy}",
"followers_url": "https://api.github.com/users/derekhiggins/followers",
"following_url": "https://api.github.com/users/derekhiggins/following{/other_user}",
"gists_url": "https://api.github.com/users/derekhiggins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/derekhiggins",
"id": 883848,
"login": "derekhiggins",
"node_id": "MDQ6VXNlcjg4Mzg0OA==",
"organizations_url": "https://api.github.com/users/derekhiggins/orgs",
"received_events_url": "https://api.github.com/users/derekhiggins/received_events",
"repos_url": "https://api.github.com/users/derekhiggins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/derekhiggins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/derekhiggins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/derekhiggins",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2022-12-21T12:27:54Z
|
2022-12-21T12:41:58Z
| null |
NONE
| null |
python requests supports a no_proxy environment variable with a IPv4 CIDR e.g.
e.g
```
+ export http_proxy no_proxy
+ http_proxy=http://localhost
+ python -c 'import requests.utils ; print(requests.utils.should_bypass_proxies("http://1.2.3.4", None))'
False
+ no_proxy=1.2.3.0/24
+ python -c 'import requests.utils ; print(requests.utils.should_bypass_proxies("http://1.2.3.4", None))'
True
```
but doesn't support a IPv6 CIDR e.g.
```
+ http_proxy=http://localhost
+ python -c 'import requests.utils ; print(requests.utils.should_bypass_proxies("http://[1:2:3::4]", None))'
False
+ no_proxy=1:2:3::/64
+ python -c 'import requests.utils ; print(requests.utils.should_bypass_proxies("http://[1:2:3::4]", None))'
False
```
## Expected Result
For proxy to be bypassed if a the url matches the IPv6 CIDR in no_proxy
## Actual Result
IPv6 CIDR ignored
## Reproduction Steps
as above
## System Information
[derekh@laptop ~]$ python -m requests.help
/usr/lib/python3.11/site-packages/requests/help.py:24: DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680
from urllib3.contrib import pyopenssl
{
"chardet": {
"version": "5.1.0"
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": "37.0.2"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.11.1"
},
"platform": {
"release": "6.0.13-300.fc37.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "30000050",
"version": "21.0.0"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "30000050"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": false,
"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/6313/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6313/timeline
| null | null | null | null | false |
[
"Proposed a fix here https://github.com/psf/requests/pull/5953 "
] |
https://api.github.com/repos/psf/requests/issues/6312
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6312/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6312/comments
|
https://api.github.com/repos/psf/requests/issues/6312/events
|
https://github.com/psf/requests/issues/6312
| 1,504,866,375 |
I_kwDOABTKOs5ZsnBH
| 6,312 |
HTTP PUT does not follow redirections before sending the data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/761483?v=4",
"events_url": "https://api.github.com/users/kratsg/events{/privacy}",
"followers_url": "https://api.github.com/users/kratsg/followers",
"following_url": "https://api.github.com/users/kratsg/following{/other_user}",
"gists_url": "https://api.github.com/users/kratsg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kratsg",
"id": 761483,
"login": "kratsg",
"node_id": "MDQ6VXNlcjc2MTQ4Mw==",
"organizations_url": "https://api.github.com/users/kratsg/orgs",
"received_events_url": "https://api.github.com/users/kratsg/received_events",
"repos_url": "https://api.github.com/users/kratsg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kratsg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kratsg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kratsg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2022-12-20T16:33:58Z
|
2023-12-21T00:03:10Z
|
2022-12-20T16:45:19Z
|
NONE
|
resolved
|
<!-- Summary. -->
Alternative title: *A bugfix in urlib3 raises a new bug in requests.* (I tried to figure out what changed in `urllib3` but was not able to do so).
I believe the issue has to do with these lines (https://github.com/psf/requests/blob/ac3be98b19f4d09c6a970b271a3ae30f3d0858f7/requests/adapters.py#L509-L539). It seems like the library is uploading the body with a `PUT` while it should first follow the redirection before uploading the body.
We've traced this down, confusingly, to different behavior for `requests` depending on the `urllib3` version. Essentially, on an older `urllib3`, python `requests` will send the entire file twice(!) which can be time-consuming for larger files. This is **incorrect** behavior. Upon a `PUT` to a node that responds with a 307/redirect, `requests` sends the whole body then handles redirects, and then `PUT` again.
## Expected Result
I expected for a `PUT` request receiving a 307 to redirect and re-`PUT` (It does) but doesn't send data immediately until after redirects are resolved. This should probably behave more like what `curl` is doing (see output below).
## Actual Result
Data is sent immediately instead of checking for redirects, causing the file to be sent at least twice.
## Reproduction Steps
```python
import requests
import subprocess
import logging
# These two lines enable debugging at httplib level (requests->urllib3->http.client)
# You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.
# The only thing missing will be the response.body which is not logged.
try:
import http.client as http_client
except ImportError:
# Python 2
import httplib as http_client
http_client.HTTPConnection.debuglevel = 1
# You must initialize logging, otherwise you'll not see debug output.
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
print("working with big file")
fpath = "big_file.txt"
fp = open(fpath, 'rb')
sever = "https:// .... " # our internal server
try:
ret = requests.put(f"{server}", headers={"Content-Type":"application/octet-stream"}, data=fp, allow_redirects = True, stream = True)
print(ret.status_code)
except Exception as exception:
print(exception)
```
Meanwhile, `curl` seems to do the RightThing™ here:
```bash
$ time curl -L -v https://server/large_file.txt --upload-file ./big_file.txt
* About to connect() to server port 443 (#0)
* Trying ADDRESS...
* Connected to server(ADDRESS) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS: client certificate not found (nickname not specified)
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: CN=CN_INFO
* start date: Jun 27 21:45:02 2022 GMT
* expire date: Aug 01 21:45:02 2023 GMT
* common name: SERVER
* issuer: CN=CN_AUTHORITY
> PUT /large_file.txt HTTP/1.1
> User-Agent: curl/7.29.0
> Host: server:443
> Accept: */*
> Content-Length: 1048576
> Expect: 100-continue
>
< HTTP/1.1 307 TEMPORARY_REDIRECT
< Connection: Keep-Alive
< Server: XrootD/5.5.5
< Content-Length: 0
< Date: Tue, 20 Dec 2022 14:34:33 GMT
< ETag: "751376756371357696:00000000"
< Location: http://server_redirect/large_file.txt
<
* Closing connection 0
* Issue another request to this URL: 'http://server_redirect/large_file.txt'
* About to connect() to server_redirect port 443 (#1)
* Trying ADDRESS...
* Connected to server_redirect (ADDRESS) port 443 (#1)
> PUT /server_redirect/large_file.txt HTTP/1.1
> User-Agent: curl/7.29.0
> Host: server_redirect:443
> Accept: */*
> Content-Length: 1048576
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< Connection: Close
< Server: OURSERVER
< Date: Tue, 20 Dec 2022 14:34:33 GMT
* We are completely uploaded and fine
< HTTP/1.1 201 CREATED
< Connection: Keep-Alive
< Server: OURSERVER
< Content-Length: 0
```
## System Information
$ python -m requests.help
This (older) version silently works:
```json
{
"chardet": {
"version": "4.0.0"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.9"
},
"platform": {
"release": "22.1.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "1010113f"
},
"urllib3": {
"version": "1.26.3"
},
"using_charset_normalizer": false,
"using_pyopenssl": false
}
```
This version breaks (correctly):
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.6"
},
"platform": {
"release": "22.1.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010113f"
},
"urllib3": {
"version": "1.26.13"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6312/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6312/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates.\n\nThere are *many* duplicates regardless of the confounder of urllib3 versions producing different behavior. What you're asking for has been discussed repeatedly for at least a decade and is not possible with python's current behavior and tools available. I won't go into detail because of how often this has been covered. ",
"> In the future, please search **closed and** open issues before creating new ones that are duplicates.\r\n> \r\n> There are _many_ duplicates regardless of the confounder of urllib3 versions producing different behavior. What you're asking for has been discussed repeatedly for at least a decade and is not possible with python's current behavior and tools available. I won't go into detail because of how often this has been covered.\r\n\r\nThis is not what this report is about. An older version of `urllib3` had a bug that was fixed in a newer version. The bugfix raised a bug that has existed in `requests`. This is definitely not a duplicate.\r\n\r\n@sigmavirus24 `requests` right now is currently crashing on a valid use case defined in the RFC for 307. This is still a valid bug report in my opinion and should not be closed.",
"@sigmavirus24 why does a PUT immediately upload some data before waiting for any reply from the server like curl is doing ?\r\nIf you get redirected, you will upload data twice: first to the headnode and then to the redirection destination...\r\n\r\nThanks in advance :)",
"Check closed and open issues. Neither library controls the socket and cannot read early. We can't read or see 100-continue. We can't get the 307 early. We don't write the data ourselves. And we're not in violation of the specification. Even if we were, we can't fix it ourselves. I'm not going to go into the details, again, because they are explained in excruciating detail elsewhere and it's not worth my time as you all have displayed a lack of respect for my time already by demanding an answer to something that is already answered. "
] |
https://api.github.com/repos/psf/requests/issues/6311
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6311/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6311/comments
|
https://api.github.com/repos/psf/requests/issues/6311/events
|
https://github.com/psf/requests/issues/6311
| 1,502,022,567 |
I_kwDOABTKOs5Zhwun
| 6,311 |
TypeError: 'ABCMeta' object is not subscriptable
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7271026?v=4",
"events_url": "https://api.github.com/users/lmilbaum/events{/privacy}",
"followers_url": "https://api.github.com/users/lmilbaum/followers",
"following_url": "https://api.github.com/users/lmilbaum/following{/other_user}",
"gists_url": "https://api.github.com/users/lmilbaum/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmilbaum",
"id": 7271026,
"login": "lmilbaum",
"node_id": "MDQ6VXNlcjcyNzEwMjY=",
"organizations_url": "https://api.github.com/users/lmilbaum/orgs",
"received_events_url": "https://api.github.com/users/lmilbaum/received_events",
"repos_url": "https://api.github.com/users/lmilbaum/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmilbaum/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmilbaum/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmilbaum",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2022-12-18T20:30:23Z
|
2023-12-19T00:03:21Z
|
2022-12-18T20:33:39Z
|
NONE
|
resolved
|
The error is thrown when linting with mypy and if `CaseInsensitiveDict` being used as a function return type hint with python 3.7 and 3.8.
The error is not thrown with python 3.9, 3.10 and 3.11.
## Expected Result
The error is not thrown
## Actual Result
See example:
https://github.com/python-gitlab/python-gitlab/actions/runs/3726391254/jobs/6319811114
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6311/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6311/timeline
| null |
not_planned
| null | null | false |
[
"Hi @lmilbaum, you'll want to report this to GitLab. This is not code maintained by this project.",
"> Hi @lmilbaum, you'll want to report this to GitLab. This is not code maintained by this project.\r\n\r\n@nateprewitt nateprewitt Apologies. i'm not following. Which code is not maintained by this project?\r\nThe issue I reported refers to a class which is declared by the `requests` package and being used by another project. ",
"The type definition in the GitLab code for requests_backend.py is incorrect. Mypy [does not support abc.collections](https://mypy.readthedocs.io/en/latest/builtin_types.html#generic-types) before 3.9, so your definition is only compatible in 3.9+.\n\nWe don't intend to change the superclass for CaseInsensitiveDict, so the typing will need to be updated in the GitLab code. There are multiple options to work with this but we'll leave that decision to the code owners.",
"Thank you for your feedback. I will work out with the project maintainers."
] |
https://api.github.com/repos/psf/requests/issues/6310
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6310/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6310/comments
|
https://api.github.com/repos/psf/requests/issues/6310/events
|
https://github.com/psf/requests/issues/6310
| 1,498,724,938 |
I_kwDOABTKOs5ZVLpK
| 6,310 |
Requests loses payload when encountering HTTP code 301
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/120609909?v=4",
"events_url": "https://api.github.com/users/uncommonephemera/events{/privacy}",
"followers_url": "https://api.github.com/users/uncommonephemera/followers",
"following_url": "https://api.github.com/users/uncommonephemera/following{/other_user}",
"gists_url": "https://api.github.com/users/uncommonephemera/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/uncommonephemera",
"id": 120609909,
"login": "uncommonephemera",
"node_id": "U_kgDOBzBcdQ",
"organizations_url": "https://api.github.com/users/uncommonephemera/orgs",
"received_events_url": "https://api.github.com/users/uncommonephemera/received_events",
"repos_url": "https://api.github.com/users/uncommonephemera/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/uncommonephemera/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/uncommonephemera/subscriptions",
"type": "User",
"url": "https://api.github.com/users/uncommonephemera",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-12-15T16:20:51Z
|
2023-12-16T00:03:15Z
|
2022-12-15T16:31:41Z
|
NONE
|
resolved
|
<!-- Summary. -->
When connecting to an endpoint with HTTP that has HTTP -> HTTPS redirect enabled, Requests loses the payload and sends no payload when reconnecting to the endpoint with HTTPS. It is considered good practice to redirect non-HTTPS traffic to HTTPS. The widely-accepted method is to set up a web server to send an HTTP 301 error ("Moved Permanently") back to the client with the equivalent HTTPS URL, and clients are expected to reconnect to the given HTTPS URL. When the requests library encounters this, it connects to the HTTPS URL, but does not re-send the payload.
<!-- What you expected. -->
Since the end user expects a 301 redirect to be transparent, Requests should re-send the payload to the new HTTPS endpoint URL.
<!-- What happened instead. -->
Requests sends no payload, the expected result is not seen from the API, and [I come to GitHub searching for help and coldly get told I didn't RTFM and I get my issue closed immediately before more empathic users have a chance to help me look into it.](https://github.com/psf/requests/issues/6308#issuecomment-1352419014)
```
#!/usr/local/bin/python3
import requests
id = 1000
api_url_root = "http://[api url]"
api_access_token = "[access token]"
api_url = api_url_root + "/items/filmstrips/" + str(id) + "?access_token=" + api_access_token
payload={'problem': False}
response = requests.patch(api_url, json=payload, headers = {'Content-type': 'application/json'})
```
By [enabling logging as outlined in this StackOverflow post](https://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application), I can see the data Requests is sending to my API. in this data we can see that the payload is not re-sent when Requests re-connects to the endpoint with HTTPS:
```
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): [redacted]:80
send: b'PATCH /items/filmstrips/1000?access_token=[access token] HTTP/1.1\r\nHost: [api url]\r\nUser-Agent: python-requests/2.28.1\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-type: application/json\r\nContent-Length: 18\r\n\r\n'
send: b'{"problem": false}'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Date: Thu, 15 Dec 2022 15:42:05 GMT
header: Server: Apache/2.4.41 (Ubuntu)
header: Location: https://[api url]/items/filmstrips/1000?access_token=[redacted]
header: Content-Length: 396
header: Keep-Alive: timeout=5, max=100
header: Connection: Keep-Alive
header: Content-Type: text/html; charset=iso-8859-1
DEBUG:urllib3.connectionpool:http://[api url]:80 "PATCH /items/filmstrips/1000?access_token=[access token] HTTP/1.1" 301 396
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): db.uncommonephemera.org:443
send: b'PATCH /items/filmstrips/1000?access_token=[access token] HTTP/1.1\r\nHost: [api url]\r\nContent-Length: 0\r\nUser-Agent: python-requests/2.28.1\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Thu, 15 Dec 2022 15:42:05 GMT
header: Server: Apache/2.4.41 (Ubuntu)
header: Content-Security-Policy: script-src 'self' 'unsafe-eval';worker-src 'self' blob:;child-src 'self' blob:;img-src 'self' data: blob: https://cdn.directus.io;media-src 'self' https://cdn.directus.io;connect-src 'self' https://*;default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';object-src 'none';script-src-attr 'none';style-src 'self' https: 'unsafe-inline'
header: X-Powered-By: Directus
header: Vary: Origin,Cache-Control
header: Access-Control-Allow-Credentials: true
header: Access-Control-Expose-Headers: Content-Range
header: Cache-Control: no-cache
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 1155
header: ETag: W/"483-sGHR5YbuBGXNuxYH9U0ytfDhitE"
header: Keep-Alive: timeout=5, max=100
header: Connection: Keep-Alive
DEBUG:urllib3.connectionpool:https://[api url]:443 "PATCH /items/filmstrips/1000?access_token=[access token] HTTP/1.1" 200 1155
```
If I change `http://` in the API URL to `https://`, there is no redirect, the payload is not lost, and the payload is sent to the API.
In my case, the use of `http://` over `https://` was inadvertent, and if I had not done this Requests would have worked as expected. However, this bug plus the reactionary response from Requests devs that I must be too stupid to use their library cost me almost a full day's worth of time. It is hoped that by publishing this issue, I can help others in my situation avoid dealing with people who do not want to help.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.8"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010113f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6310/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6310/timeline
| null |
not_planned
| null | null | false |
[
"This is a known behavior and consistent with RFCs for HTTP, please search closed issues before opening a new one.",
"Typical.\r\n\r\nI don't need to \"search for closed issues\" once I figured out what was happening, you either fix it or you don't. I can use https for the endpoint, it was inadvertent. I was hoping maybe it would help someone else who might come here and have their issue rudely closed seconds after typing it all out.\r\n\r\nWhat _would_ have been helpful is when I posted my issue originally yesterday, your admin friend said \"you're not by any chance running into this HTTP 301 behavior? Here's a link to the issue, we're not planning to fix it.\" That would have been the right thing to do. \r\n\r\nYou all need to stop replying \"RTFM\" and maybe do more LTFC: Learn to fucking communicate."
] |
https://api.github.com/repos/psf/requests/issues/6308
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6308/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6308/comments
|
https://api.github.com/repos/psf/requests/issues/6308/events
|
https://github.com/psf/requests/issues/6308
| 1,497,592,342 |
I_kwDOABTKOs5ZQ3IW
| 6,308 |
requests.patch does not work, REST app does
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/120609909?v=4",
"events_url": "https://api.github.com/users/uncommonephemera/events{/privacy}",
"followers_url": "https://api.github.com/users/uncommonephemera/followers",
"following_url": "https://api.github.com/users/uncommonephemera/following{/other_user}",
"gists_url": "https://api.github.com/users/uncommonephemera/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/uncommonephemera",
"id": 120609909,
"login": "uncommonephemera",
"node_id": "U_kgDOBzBcdQ",
"organizations_url": "https://api.github.com/users/uncommonephemera/orgs",
"received_events_url": "https://api.github.com/users/uncommonephemera/received_events",
"repos_url": "https://api.github.com/users/uncommonephemera/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/uncommonephemera/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/uncommonephemera/subscriptions",
"type": "User",
"url": "https://api.github.com/users/uncommonephemera",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-12-15T00:10:58Z
|
2023-12-16T00:03:16Z
|
2022-12-15T00:59:26Z
|
NONE
|
resolved
|
Hello. I am attempting to update records through the Directus API with requests.patch.
Given the following code:
```
#!/usr/local/bin/python3
import requests
id = 1000
api_url_root = "[redacted]"
api_access_token = "[redacted]"
api_url = api_url_root + "/items/filmstrips/" + str(id) + "?access_token=" + api_access_token
response = requests.patch(api_url, data={'problem':True})
```
The Directus server responds 200, and the Directus logs state:
```
[18:52:03] TRACE (4106 on uncommonephemera): [1.144ms] update `filmstrips` set `date_updated` = ?, `user_updated` = ? where `id` in (?) [Wed Dec 14 2022 23:52:03 GMT-0500 (Eastern Standard Time), [userid UUID redacted], 1000]
```
...which does not indicate the field "problem" is altered. Going in to Directus shows the field is not set to True.
I downloaded RapidAPI and sent the same request as shown in the screenshot:
[https://imgur.com/a/1IesDhD](https://imgur.com/a/1IesDhD)
The Directus logs show:
```
[19:03:17] TRACE (4106 on uncommonephemera): [0.876ms] update `filmstrips` set `problem` = ?, `date_updated` = ?, `user_updated` = ? where `id` in (?) [true, Thu Dec 15 2022 00:03:17 GMT-0500 (Eastern Standard Time), [userid UUID redacted], 1000]
```
....which shows that the field "problem" is updated. Upon going into Directus, the field is set to True.
Everything I've been able to read or search for about requests says this is how I'm supposed to do it. I've been at this all afternoon, trying different things, nothing works. Using version 2.28.1. How can I make this work?
|
{
"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/6308/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6308/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here. \n\nPlease also closely read the documentation about inspecting the data you've sent in a request, how to send JSON data, and how to send urlencoded data as I expect these will help you find your solution.\n\nAlso note that screenshots are useless for offering help as many people rely on screen readers and further they aren't searchable to help others encountering similar issues",
"I'd say if all the documentation available says to do it this way, and it doesn't work, that's a defect.\r\n\r\nI'm not entirely sure how to describe what I've done in a GUI app that wouldn't generate a thousand questions about what I inadvertently left out of the description or imply I didn't do something I should have.\r\n\r\nI tried json.dumps(payload), json=payload, and adding the Content-Type header, none of that made any difference.\r\n\r\nEither way, it sounds like everyone here is certain the library is problem-free (talk about needing a screen reader), so I'll be on my way. HTTP for humans, my ass"
] |
https://api.github.com/repos/psf/requests/issues/6307
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6307/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6307/comments
|
https://api.github.com/repos/psf/requests/issues/6307/events
|
https://github.com/psf/requests/issues/6307
| 1,496,387,417 |
I_kwDOABTKOs5ZMQ9Z
| 6,307 |
sdist is missing tox.ini
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3000173?v=4",
"events_url": "https://api.github.com/users/mtelka/events{/privacy}",
"followers_url": "https://api.github.com/users/mtelka/followers",
"following_url": "https://api.github.com/users/mtelka/following{/other_user}",
"gists_url": "https://api.github.com/users/mtelka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mtelka",
"id": 3000173,
"login": "mtelka",
"node_id": "MDQ6VXNlcjMwMDAxNzM=",
"organizations_url": "https://api.github.com/users/mtelka/orgs",
"received_events_url": "https://api.github.com/users/mtelka/received_events",
"repos_url": "https://api.github.com/users/mtelka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mtelka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mtelka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mtelka",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-12-14T11:17:48Z
|
2023-12-15T00:03:17Z
|
2022-12-14T12:10:41Z
|
NONE
|
resolved
|
The sdist at PyPI is missing `tox.ini` file. Please add the file to sdist to make downstream testing easier. Thank you.
|
{
"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/6307/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6307/timeline
| null |
completed
| null | null | false |
[
"It should be in the GitHub tarball associated with the tag which most downstairs use to my knowledge",
"I understand. The small problem with tarball at github is that it is not easily possible to find it automatically using PyPI API."
] |
https://api.github.com/repos/psf/requests/issues/6306
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6306/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6306/comments
|
https://api.github.com/repos/psf/requests/issues/6306/events
|
https://github.com/psf/requests/issues/6306
| 1,494,032,186 |
I_kwDOABTKOs5ZDR86
| 6,306 |
Please make a new release
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/137616?v=4",
"events_url": "https://api.github.com/users/intgr/events{/privacy}",
"followers_url": "https://api.github.com/users/intgr/followers",
"following_url": "https://api.github.com/users/intgr/following{/other_user}",
"gists_url": "https://api.github.com/users/intgr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/intgr",
"id": 137616,
"login": "intgr",
"node_id": "MDQ6VXNlcjEzNzYxNg==",
"organizations_url": "https://api.github.com/users/intgr/orgs",
"received_events_url": "https://api.github.com/users/intgr/received_events",
"repos_url": "https://api.github.com/users/intgr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/intgr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/intgr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/intgr",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2022-12-13T11:22:52Z
|
2023-12-14T00:03:10Z
|
2022-12-13T15:01:43Z
|
NONE
|
resolved
|
The last release of requests was from June 29.
Since then charset-normalizer 3.x has been released, which the release is incompatible with. This was already fixed in #6261, but is unreleased.
Clearly this affects many people, as this issue has been re-reported **so** many times:
* #6268
* #6272
* #6298
* #6288
* #6305
* #6281
* #6273
* #6272
If even just to stop people from wasting their time re-reporting this, please make a release.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6306/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6306/timeline
| null |
completed
| null | null | false |
[
"Thanks for the feedback, @intgr. As already stated in the other issues, this has been merged and will be in the next release 2.29.0.",
"Why are requests project maintainers so dismissive... I am fully aware that the PR was merged and will be in the next release, I already stated as much in my message.\r\n\r\nBut there is no planning/tracking issue or discussion about a release that I could find.\r\n\r\nWhat are the plans for the next release? Is it going to happen within days or months? Or is it still waiting for some blockers?\r\n",
"Why do you feel entitled to demanding we do something in our free time?\n\nWhy do you think we don't know we need to release it? Issues like this just take what little time we might otherwise have had to work on the release and wastes it. \n\nYou argue that we're wasting other people's time when the issues have been indexed by Google and are easily searchable on GitHub. So they're eating their time as well as ours. We're not responsible for people choosing to create duplicate issues when the original is easily found. We're not responsible for the 2 or 3 duplicates we received as soon as charset-normalizer released before it could be tested or fixed. ",
"> What are the plans for the next release? Is it going to happen within days or months? Or is it still waiting for some blockers?\n\nRequests has released twice yearly usually December and June since 2018, except for exceptional circumstances. You can find the full list of open issues attached to the milestone for 2.29.0.\n\nAs Ian has stated this is all easily discoverable through the tools GitHub provides to manage projects. It's linked from the original PR you've provided as well.\n\nI think there's some confusion about being dismissive v. needing to reiterate the same thing repeatedly. We've answered all of the above questions previously but there's an entitlement that we provide this information to you directly instead of taking the time to do minimal research. This isn't scalable to the millions of people using Requests, so responses are often curt.\n\nWe'll plan to do the next release in the coming week or after the new year, as is the normal release cadence. We're currently waiting to resolve final blockers for urllib3 2.0's release. "
] |
https://api.github.com/repos/psf/requests/issues/6305
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6305/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6305/comments
|
https://api.github.com/repos/psf/requests/issues/6305/events
|
https://github.com/psf/requests/issues/6305
| 1,493,511,210 |
I_kwDOABTKOs5ZBSwq
| 6,305 |
Broken dependency with latest charset-normalizer
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11760210?v=4",
"events_url": "https://api.github.com/users/pjhavariotis/events{/privacy}",
"followers_url": "https://api.github.com/users/pjhavariotis/followers",
"following_url": "https://api.github.com/users/pjhavariotis/following{/other_user}",
"gists_url": "https://api.github.com/users/pjhavariotis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pjhavariotis",
"id": 11760210,
"login": "pjhavariotis",
"node_id": "MDQ6VXNlcjExNzYwMjEw",
"organizations_url": "https://api.github.com/users/pjhavariotis/orgs",
"received_events_url": "https://api.github.com/users/pjhavariotis/received_events",
"repos_url": "https://api.github.com/users/pjhavariotis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pjhavariotis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pjhavariotis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pjhavariotis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-12-13T06:45:17Z
|
2023-12-14T00:03:11Z
|
2022-12-13T10:17:20Z
|
NONE
|
resolved
|
pip's dependency resolver generates the following error:
`requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.`
## Expected Result
<!-- What you expected. -->
## Actual Result
<!-- What happened instead. -->
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "3.0.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.7"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.13"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6305/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6305/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/6304
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6304/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6304/comments
|
https://api.github.com/repos/psf/requests/issues/6304/events
|
https://github.com/psf/requests/pull/6304
| 1,484,946,086 |
PR_kwDOABTKOs5Ezo4x
| 6,304 |
Update `certifi` dependency to patch known vulnerability.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/19497738?v=4",
"events_url": "https://api.github.com/users/qthequartermasterman/events{/privacy}",
"followers_url": "https://api.github.com/users/qthequartermasterman/followers",
"following_url": "https://api.github.com/users/qthequartermasterman/following{/other_user}",
"gists_url": "https://api.github.com/users/qthequartermasterman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/qthequartermasterman",
"id": 19497738,
"login": "qthequartermasterman",
"node_id": "MDQ6VXNlcjE5NDk3NzM4",
"organizations_url": "https://api.github.com/users/qthequartermasterman/orgs",
"received_events_url": "https://api.github.com/users/qthequartermasterman/received_events",
"repos_url": "https://api.github.com/users/qthequartermasterman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/qthequartermasterman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qthequartermasterman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/qthequartermasterman",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-12-08T16:05:54Z
|
2023-12-09T00:03:15Z
|
2022-12-08T16:22:21Z
|
NONE
|
resolved
|
`certifi>=2017.11.05, < 2022.12.07` has a known security vulnerability, described [here](https://github.com/advisories/GHSA-43fp-rhv2-5gv8). The currently supported `certifi` range `certifi>=2017.4.17` includes these vulnerable versions.
This pull request updates `certifi` to `2022.12.07` which patches the vulnerability.
|
{
"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/6304/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6304/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6304.diff",
"html_url": "https://github.com/psf/requests/pull/6304",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6304.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6304"
}
| true |
[
"Since we're not constraining upgrading to the latest version I think we're okay to keep the version range as-is, users should manage their dependencies and vulnerable versions. Going to close this."
] |
https://api.github.com/repos/psf/requests/issues/6303
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6303/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6303/comments
|
https://api.github.com/repos/psf/requests/issues/6303/events
|
https://github.com/psf/requests/issues/6303
| 1,483,316,679 |
I_kwDOABTKOs5YaZ3H
| 6,303 |
response.reason is None instead of the expected reason string
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/290167?v=4",
"events_url": "https://api.github.com/users/westy92/events{/privacy}",
"followers_url": "https://api.github.com/users/westy92/followers",
"following_url": "https://api.github.com/users/westy92/following{/other_user}",
"gists_url": "https://api.github.com/users/westy92/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westy92",
"id": 290167,
"login": "westy92",
"node_id": "MDQ6VXNlcjI5MDE2Nw==",
"organizations_url": "https://api.github.com/users/westy92/orgs",
"received_events_url": "https://api.github.com/users/westy92/received_events",
"repos_url": "https://api.github.com/users/westy92/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westy92/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westy92/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westy92",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-12-08T01:31:27Z
|
2023-12-09T00:03:13Z
|
2022-12-08T02:48:32Z
|
NONE
|
resolved
|
<!-- Summary. -->
`response.reason` is `None` instead of the expected reason string.
## Expected Result
Print `'INTERNAL SERVER ERROR'` or something similar
<!-- What you expected. -->
## Actual Result
`'None'` is printed
<!-- What happened instead. -->
## Reproduction Steps
```python
requests_mock.get(
'https://google.com',
json={},
status_code=500
)
response = requests.get('https://google.com')
print(response.reason)
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.11.0"
},
"platform": {
"release": "22.1.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010113f"
},
"urllib3": {
"version": "1.26.13"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6303/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6303/timeline
| null |
not_planned
| null | null | false |
[
"If the mocking library doesn't set it on the Response it creates, why do you think this is a bug in requests? ",
"Because the [docs](https://requests.readthedocs.io/en/latest/api/?highlight=reaso#requests.Response.reason) claim it will be there and the response reason phrase is [optional](https://stackoverflow.com/questions/17517086/can-an-http-response-omit-the-reason-phrase).\r\n\r\nIf this is indeed not planned, this should at least be reopened as a docs request to improve the documentation, claiming that the value will be `None` unless the server specifies a value.",
"You don't understand. Requests is not creating the response, requests-mock a separate unrelated project does https://github.com/jamielennox/requests-mock/blob/c19c3343d3a70a57427bd37fbb5fcffb0b7def1c/requests_mock/response.py#L142"
] |
https://api.github.com/repos/psf/requests/issues/6302
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6302/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6302/comments
|
https://api.github.com/repos/psf/requests/issues/6302/events
|
https://github.com/psf/requests/pull/6302
| 1,481,690,962 |
PR_kwDOABTKOs5EoEnp
| 6,302 |
Fix the proxy_bypass_registry function all returning true in some cases.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8475072?v=4",
"events_url": "https://api.github.com/users/flysee/events{/privacy}",
"followers_url": "https://api.github.com/users/flysee/followers",
"following_url": "https://api.github.com/users/flysee/following{/other_user}",
"gists_url": "https://api.github.com/users/flysee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/flysee",
"id": 8475072,
"login": "flysee",
"node_id": "MDQ6VXNlcjg0NzUwNzI=",
"organizations_url": "https://api.github.com/users/flysee/orgs",
"received_events_url": "https://api.github.com/users/flysee/received_events",
"repos_url": "https://api.github.com/users/flysee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/flysee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/flysee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/flysee",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] |
{
"closed_at": null,
"closed_issues": 13,
"created_at": "2023-08-13T17:04:53Z",
"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/33",
"id": 9786066,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/33/labels",
"node_id": "MI_kwDOABTKOs4AlVLS",
"number": 33,
"open_issues": 0,
"state": "open",
"title": "2.32.0",
"updated_at": "2024-05-20T14:17:03Z",
"url": "https://api.github.com/repos/psf/requests/milestones/33"
}
| 6 |
2022-12-07T11:31:41Z
|
2024-03-18T21:38:17Z
|
2024-03-18T21:38:17Z
|
CONTRIBUTOR
| null |
With the context code,i think we should avoid this situation with empty strings,thx!
|
{
"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/6302/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6302/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6302.diff",
"html_url": "https://github.com/psf/requests/pull/6302",
"merged_at": "2024-03-18T21:38:17Z",
"patch_url": "https://github.com/psf/requests/pull/6302.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6302"
}
| true |
[
"There's no clear description of a bug, how to reproduce or even tests to show this fixes something. Further you speak of empty strings and are filtering on None which are not the same thing. ",
"The value of proxyOverride is controlled by a third-party program on the computer, so it is not controllable.\r\nFor example, when I use fiddler on my computer, this value is `<-loopback>;`.(Not all computers)\r\nWhen proxyOverride splits, it's equal to `['<-loopback>', '']`.\r\nSo `re.match('', host, re.I)` will return true,that bypassing the proxy.\r\n\r\nAnd filter(function, iterable) is equivalent to the generator expression (item for item in iterable if item) if function is None,that is, all elements of iterable that are false are removed.\r\nRef:https://docs.python.org/3/library/functions.html#filter\r\n\r\nI think should be avoided for code robustness.",
"> The value of proxyOverride is controlled by a third-party program on the computer, so it is not controllable. For example, when I use fiddler on my computer, this value is `<-loopback>;`.(Not all computers) When proxyOverride splits, it's equal to `['<-loopback>', '']`. So `re.match('', host, re.I)` will return true,that bypassing the proxy.\r\n> \r\n> And filter(function, iterable) is equivalent to the generator expression (item for item in iterable if item) if function is None,that is, all elements of iterable that are false are removed. Ref:https://docs.python.org/3/library/functions.html#filter\r\n> \r\n> I think should be avoided for code robustness.\r\n\r\nYes, I also noticed this situation. This wastes a lot of my time discovering this problem. ProxyOverride sometimes ends with a semicolon and is difficult to reproduce. But it has not yet been merged into the main branch.",
"> > The value of proxyOverride is controlled by a third-party program on the computer, so it is not controllable. For example, when I use fiddler on my computer, this value is `<-loopback>;`.(Not all computers) When proxyOverride splits, it's equal to `['<-loopback>', '']`. So `re.match('', host, re.I)` will return true,that bypassing the proxy.\r\n> > And filter(function, iterable) is equivalent to the generator expression (item for item in iterable if item) if function is None,that is, all elements of iterable that are false are removed. Ref:https://docs.python.org/3/library/functions.html#filter\r\n> > I think should be avoided for code robustness.\r\n> \r\n> Yes, I also noticed this situation. This wastes a lot of my time discovering this problem. ProxyOverride sometimes ends with a semicolon and is difficult to reproduce. But it has not yet been merged into the main branch.\r\n\r\nI'm glad someone else is having the same problem as me, but I also hope that no one will waste time on this issue in the future, haha.",
"@flysee can you add tests for this change so it does not regress? ",
"> @flysee can you add tests for this change so it does not regress?\r\n\r\nOf course, test cases have been added."
] |
https://api.github.com/repos/psf/requests/issues/6301
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6301/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6301/comments
|
https://api.github.com/repos/psf/requests/issues/6301/events
|
https://github.com/psf/requests/issues/6301
| 1,479,532,381 |
I_kwDOABTKOs5YL99d
| 6,301 |
Adapter is eating MaxRetriesError's and throwing other errors
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47054603?v=4",
"events_url": "https://api.github.com/users/robs-nice99/events{/privacy}",
"followers_url": "https://api.github.com/users/robs-nice99/followers",
"following_url": "https://api.github.com/users/robs-nice99/following{/other_user}",
"gists_url": "https://api.github.com/users/robs-nice99/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/robs-nice99",
"id": 47054603,
"login": "robs-nice99",
"node_id": "MDQ6VXNlcjQ3MDU0NjAz",
"organizations_url": "https://api.github.com/users/robs-nice99/orgs",
"received_events_url": "https://api.github.com/users/robs-nice99/received_events",
"repos_url": "https://api.github.com/users/robs-nice99/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/robs-nice99/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robs-nice99/subscriptions",
"type": "User",
"url": "https://api.github.com/users/robs-nice99",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2022-12-06T16:23:34Z
|
2024-09-21T00:07:11Z
|
2023-09-21T22:11:32Z
|
NONE
|
resolved
|
```
except MaxRetryError as e:
if isinstance(e.reason, ConnectTimeoutError):
# TODO: Remove this in 3.0.0: see #2811
if not isinstance(e.reason, NewConnectionError):
raise ConnectTimeout(e, request=request)
if isinstance(e.reason, ResponseError):
raise RetryError(e, request=request)
if isinstance(e.reason, _ProxyError):
raise ProxyError(e, request=request)
if isinstance(e.reason, _SSLError):
# This branch is for urllib3 v1.22 and later.
raise SSLError(e, request=request)
raise ConnectionError(e, request=request)
```
When using adapter and urllib3....Retry I don't catch the [documented](https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html) exception "MaxRetryError"
> Errors will be wrapped in [MaxRetryError](https://urllib3.readthedocs.io/en/stable/reference/urllib3.exceptions.html#urllib3.exceptions.MaxRetryError) unless retries are disabled, in which case the causing exception will be raised.
This seems to have been addressed https://github.com/psf/requests/issues/4389, https://github.com/psf/requests/issues/5639 and https://github.com/psf/requests/issues/1198, although not as straightforward.
The question is why is Requests rethrowing the enclosed Exception, making it impossible to use urllib3 logic of the Retry class, where errors can be retried until a maximum number and then the MaxRetryError exception is raised.
This is additionally confusing because it's not documented.
|
{
"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/6301/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6301/timeline
| null |
not_planned
| null | null | false |
[
"I think you have some fundamental misunderstanding of what's happening but I can't understand what you're actually asking.\n\nIn case I can guess what you're asking, urllib3 retries don't function based on Requests exceptions. If urllib3 raises a MaxRetryError that means that all of those retries you configured in urllib3 failed and you reached the configured (specified by you) max. If we can we try to provide a consistent exception API across both use of retries and not and include the original exception in the new one so users can unwrap things and find the origin",
"Thanks for your help. Let me try to explain it better.\r\n\r\nI configured Retry and created some tests to make sure everything is working correctly. I'm testing a healthcheck endpoint of a service that is being bootstraped. I want to retry 10 times until I get an HTTP 200 OK response. During that time, I want to retry if I receive different HTTP codes (since during boot the server behavior might be undefined) and even if any connection problems occur (timeout, connection error, etc).\r\n\r\nIn order to test this, I created some unit tests and I was expecting to always get a MaxRetryError. What happens is that I get ConnectionError or RetryError. This is confusing, because I don't know if I miss configured Retry and it's only retrying on non 200 HTTP codes, but not on connection error. Also I'm receiving a RetryError exception, witch I was not expecting (I can't find any documentation about it).\r\n\r\n> \"If we can, we try to provide a consistent exception API across both use of retries and not\"\r\n\r\nSo, that's the issue. Since I'm using Retry, I was expecting to only get MaxRetryError. Because there's no documentation about Retry in Requests site, I assumed it would work as documented in urllib3.\r\n",
"> So, that's the issue. Since I'm using Retry, I was expecting to only get MaxRetryError. Because there's no documentation about Retry in Requests site\n\nIt's not documented because you shouldn't be getting a retry error directly. It's all meant to look the same so you don't need a million branches to handle some logic. ",
"I see. That seems reasonable. \r\n\r\nSo let me just share my experience. I was looking for a way to do reties, I found out it was already implemented. I think I found out how to use from SO, but even so, the documentation in the comments says to import urllib3's Retry. No more details, so I went to read urllib3's Retry documentation and was expecting to get that behavior.\r\n\r\nI do believe it makes more sense to always get a `MaxRetryError` when tResponseErrorhe max retries are over. Otherwise I have no way of knowing if I get an error on the first try or after the 5 reties I configured. And notice that instead of only catching `MaxRetryError`, I have to catch `ConnectTimeoutError`, `RetryError`, `ProxyError` and `SSLError`. Notice that `RetryError` is a new and undocumented way of handling the \"using\" of all retries (so, there's a retry error we get directly).\r\n\r\nBut I do see the value in having the same API for all the cases. There's never a way to make everyone happy.\r\n\r\n I was just sharing my experience, and pointing out that documenting this would have ease my coding.",
"There's now simple documentation on retries in the Advanced Usage section, added by https://github.com/psf/requests/pull/6258/: https://requests.readthedocs.io/en/latest/user/advanced/#example-automatic-retries\r\n\r\nIt's very basic at the moment but I'm sure maintainers would accept contributions with whatever additional information you think would be useful "
] |
https://api.github.com/repos/psf/requests/issues/6300
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6300/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6300/comments
|
https://api.github.com/repos/psf/requests/issues/6300/events
|
https://github.com/psf/requests/pull/6300
| 1,469,908,395 |
PR_kwDOABTKOs5D_CvD
| 6,300 |
Specify complete list of all available phony targets
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1859939?v=4",
"events_url": "https://api.github.com/users/jmarkowski/events{/privacy}",
"followers_url": "https://api.github.com/users/jmarkowski/followers",
"following_url": "https://api.github.com/users/jmarkowski/following{/other_user}",
"gists_url": "https://api.github.com/users/jmarkowski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jmarkowski",
"id": 1859939,
"login": "jmarkowski",
"node_id": "MDQ6VXNlcjE4NTk5Mzk=",
"organizations_url": "https://api.github.com/users/jmarkowski/orgs",
"received_events_url": "https://api.github.com/users/jmarkowski/received_events",
"repos_url": "https://api.github.com/users/jmarkowski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jmarkowski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jmarkowski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jmarkowski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-30T16:28:24Z
|
2023-12-02T00:03:10Z
|
2022-11-30T19:46:02Z
|
NONE
|
resolved
|
The list of phony targets was incomplete. Add a list of the phony targets explicitly at the end of the file.
|
{
"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/6300/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6300/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6300.diff",
"html_url": "https://github.com/psf/requests/pull/6300",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6300.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6300"
}
| true |
[
"I don't believe we're using this any longer. Thanks for trying to fix it up but I would just as soon delete it",
"If that's true, then there's a case for removing the Makefile from the repository. No point in keeping it around if any energy put towards maintaining it is dismissed.\r\n\r\nIf the Makefile is in fact used, and one can make a good argument for maintaining such a file in the repository (as analogously NPM based repositories offer a 'scripts' directive in the package.json file), then I maintain that the proposed changes are relevant."
] |
https://api.github.com/repos/psf/requests/issues/6299
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6299/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6299/comments
|
https://api.github.com/repos/psf/requests/issues/6299/events
|
https://github.com/psf/requests/issues/6299
| 1,469,420,504 |
I_kwDOABTKOs5XlZPY
| 6,299 |
How to change Keep-Alive parameters?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17105835?v=4",
"events_url": "https://api.github.com/users/mehtaanshul/events{/privacy}",
"followers_url": "https://api.github.com/users/mehtaanshul/followers",
"following_url": "https://api.github.com/users/mehtaanshul/following{/other_user}",
"gists_url": "https://api.github.com/users/mehtaanshul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mehtaanshul",
"id": 17105835,
"login": "mehtaanshul",
"node_id": "MDQ6VXNlcjE3MTA1ODM1",
"organizations_url": "https://api.github.com/users/mehtaanshul/orgs",
"received_events_url": "https://api.github.com/users/mehtaanshul/received_events",
"repos_url": "https://api.github.com/users/mehtaanshul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mehtaanshul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mehtaanshul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mehtaanshul",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-30T10:43:41Z
|
2023-12-01T00:03:47Z
|
2022-11-30T12:30:16Z
|
NONE
|
resolved
|
We have tried setting these headers ->
Connection: keep-alive
Keep-Alive: timeout=5, max=2
But it is not working as expected
|
{
"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/6299/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6299/timeline
| null |
not_planned
| null | null | false |
[
"https://requests.readthedocs.io/en/latest/user/advanced/#keep-alive\r\n\r\nDocumentation does not specify how to change the keep-alive parameters ",
"Hi there,\r\n\r\nThanks for reaching out. Unfortunately, there's too little detail in this issue to be able to help you and it's not reproducible. That indicates a likely problem in your environment which we are not responsible for debugging and which the maintainers of this project do not have the time to help you with. As a result, I'm closing this issue."
] |
https://api.github.com/repos/psf/requests/issues/6298
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6298/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6298/comments
|
https://api.github.com/repos/psf/requests/issues/6298/events
|
https://github.com/psf/requests/issues/6298
| 1,467,868,113 |
I_kwDOABTKOs5XfePR
| 6,298 |
Conflicting version with charset-normalizer
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/112568273?v=4",
"events_url": "https://api.github.com/users/talcher/events{/privacy}",
"followers_url": "https://api.github.com/users/talcher/followers",
"following_url": "https://api.github.com/users/talcher/following{/other_user}",
"gists_url": "https://api.github.com/users/talcher/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/talcher",
"id": 112568273,
"login": "talcher",
"node_id": "U_kgDOBrWn0Q",
"organizations_url": "https://api.github.com/users/talcher/orgs",
"received_events_url": "https://api.github.com/users/talcher/received_events",
"repos_url": "https://api.github.com/users/talcher/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/talcher/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/talcher/subscriptions",
"type": "User",
"url": "https://api.github.com/users/talcher",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-29T11:03:41Z
|
2023-12-06T00:03:14Z
|
2022-11-29T12:38:47Z
|
NONE
|
resolved
|
Hello,
I would like to update my virtual environment.
I am using python 3.9, requests 2.28.1 and charset-normalizer 2.1.1
When I update charset-normalizer:
` $ python3 -m pip install -U charset-normalizer`
I get this answer:
`ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.
`
Is a new version of the Requests library expected in a near future?
Thank you.
|
{
"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/6298/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6298/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"Already fixed in #6261, pending a release."
] |
https://api.github.com/repos/psf/requests/issues/6297
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6297/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6297/comments
|
https://api.github.com/repos/psf/requests/issues/6297/events
|
https://github.com/psf/requests/issues/6297
| 1,467,356,019 |
I_kwDOABTKOs5XdhNz
| 6,297 |
Where does the file download to?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/99759644?v=4",
"events_url": "https://api.github.com/users/jonbeacherdomuso/events{/privacy}",
"followers_url": "https://api.github.com/users/jonbeacherdomuso/followers",
"following_url": "https://api.github.com/users/jonbeacherdomuso/following{/other_user}",
"gists_url": "https://api.github.com/users/jonbeacherdomuso/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jonbeacherdomuso",
"id": 99759644,
"login": "jonbeacherdomuso",
"node_id": "U_kgDOBfI2HA",
"organizations_url": "https://api.github.com/users/jonbeacherdomuso/orgs",
"received_events_url": "https://api.github.com/users/jonbeacherdomuso/received_events",
"repos_url": "https://api.github.com/users/jonbeacherdomuso/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jonbeacherdomuso/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jonbeacherdomuso/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jonbeacherdomuso",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-29T02:35:15Z
|
2022-12-06T01:24:52Z
|
2022-11-29T05:12:10Z
|
NONE
| null |
I cant find 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/6297/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6297/timeline
| null |
not_planned
| null | null | false |
[
"This appears to be a general Python question. Accessing response content is covered in the docs but if you have further questions, [StackOverflow](https://stackoverflow.com) is the best place for those.",
"```python\r\ndef download_file(filename, url):\r\n\tr = requests.get(str(url))\r\n\topen(filename, 'wb').write(r.content)\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/6296
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6296/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6296/comments
|
https://api.github.com/repos/psf/requests/issues/6296/events
|
https://github.com/psf/requests/pull/6296
| 1,466,668,180 |
PR_kwDOABTKOs5D0NOx
| 6,296 |
Don't add extra whitespace when serializing JSON
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-11-28T15:57:43Z
|
2023-11-29T00:03:26Z
|
2022-11-28T16:35:53Z
|
CONTRIBUTOR
|
resolved
|
```py
json.dumps({'k': 'v'}) # {"k": "v"}
json.dumps({'k': 'v'}, separators=(',', ':')) # {"k":"v"}
```
This is how JavaScript's `JSON.stringify()` and most other programming languages serialize JSON.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6296/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6296/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6296.diff",
"html_url": "https://github.com/psf/requests/pull/6296",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6296.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6296"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6295
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6295/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6295/comments
|
https://api.github.com/repos/psf/requests/issues/6295/events
|
https://github.com/psf/requests/issues/6295
| 1,465,062,456 |
I_kwDOABTKOs5XUxQ4
| 6,295 |
Endless history: the history contains a self-reference
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1838534?v=4",
"events_url": "https://api.github.com/users/CachingFoX/events{/privacy}",
"followers_url": "https://api.github.com/users/CachingFoX/followers",
"following_url": "https://api.github.com/users/CachingFoX/following{/other_user}",
"gists_url": "https://api.github.com/users/CachingFoX/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CachingFoX",
"id": 1838534,
"login": "CachingFoX",
"node_id": "MDQ6VXNlcjE4Mzg1MzQ=",
"organizations_url": "https://api.github.com/users/CachingFoX/orgs",
"received_events_url": "https://api.github.com/users/CachingFoX/received_events",
"repos_url": "https://api.github.com/users/CachingFoX/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CachingFoX/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CachingFoX/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CachingFoX",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 6 |
2022-11-26T06:12:04Z
|
2024-07-04T12:37:14Z
| null |
NONE
| null |
The history of a requests contains a self-reference to the history owner. The history will be endless.
## Expected Result
If I traverse recursive the complete history of a requests, this will be a finally graph.
The history of a request is a tree without cycles.
```
R1 (history: 2)
R2 (no history)
R3 (no history)
```
## Actual Result
If I traverse recursive the complete history of a requests, the program breaks with recursive error. `RecursionError: maximum recursion depth exceeded while calling a Python object`
The history contains a self-reference to the history owner.
The history of a request is a graph with a cycle.
```
R1 (history: 2)
R2 (no history)
R3 (history: 1)
R3 (history: 1)
R3 (history: 1)
R3 (history: 1)
R3 (history: 1)
....
```
```
id=140537834271072 history=2
index=0 id=140537834079136
index=1 id=140537834080960
id=140537834079136 history=0
id=140537834080960 history=1
index=0 id=140537834080960
id=140537834080960 history=1
index=0 id=140537834080960
id=140537834080960 history=1
index=0 id=140537834080960
id=140537834080960 history=1
index=0 id=140537834080960
....
id=140537834080960 history=1
index=0 id=140537834080960
id=140537834080960 history=1
index=0 id=140537834080960
Traceback (most recent call last):
File "/Users/andreas/PycharmProjects/cce/main.py", line 12, in <module>
history(requests.get('https://coord.info/GC8T8E8'))
File "/Users/andreas/PycharmProjects/cce/main.py", line 9, in history
history(item)
File "/Users/andreas/PycharmProjects/cce/main.py", line 9, in history
history(item)
File "/Users/andreas/PycharmProjects/cce/main.py", line 9, in history
history(item)
[Previous line repeated 993 more times]
File "/Users/andreas/PycharmProjects/cce/main.py", line 5, in history
print(f"id={id(r)} history={len(r.history)}")
RecursionError: maximum recursion depth exceeded while calling a Python object
Process finished with exit code 1
```
## Reproduction Steps
```python
import requests
def history(r):
print(f"id={id(r)} history={len(r.history)}")
for index, item in enumerate(r.history):
print(f"\tindex={index} id={id(item)}")
for index, item in enumerate(r.history):
history(item)
history(requests.get('https://coord.info/GC8T8E8'))
```
## System Information
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.26.13"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6295/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6295/timeline
| null |
reopened
| null | null | false |
[
"We're aware, see https://github.com/psf/requests/issues/2690 which is documented in the README.",
"I'm confused. I do not talk about the GIT history. I talked about the history of an request. Please, can you reopen my issue?",
"Sorry about that!",
"You don't need to traverse it recursively. Each response should have the entire history of the prior response.\n\nIn other words,\n\n- You get `r3` back which has a history that looks like `[r2, r1]`.\n- `r2` has a history that looks like `[r1]`, etc.\n\nYou only need to look at this history of the one you're seeing as the final response. It will contain the whole history. \n",
"So, this is a consequence of someone years ago arguing that each history response should have it's own history despite the linearity of the history and the fact that the top-level response has the entire context.\r\n\r\nWhat's more helpful (in my view) for looking at this problem is:\r\n\r\n```\r\n>>> r = requests.get('https://httpbin.org/redirect/3')\r\n>>> for resp in r.history:\r\n... print(id(resp), end='->'); print([(id(_), len(_.history)) for _ in resp.history])\r\n... \r\n140058437748768->[]\r\n140058437750976->[(140058437750976, 1)]\r\n140058437751840->[(140058437750976, 1), (140058437751840, 2)]\r\n```\r\n\r\nNote that the 2nd response (which should have been the redirect request followed from the first item in the history) points to itself, not in fact to the first response.\r\n\r\nWhile this is wrong, and can be fixed, it hasn't been noticed in years, because folks that care about the history are just looking at the top-level history (which contains everything) and don't actually need to look at each response's history.\r\n\r\nI'd be in favor of just wiping those histories altogether instead of trying to make this look more correct. Either way, the place to fix this is in https://github.com/psf/requests/blob/15585909c3dd3014e4083961c8a404709450151c/requests/sessions.py#L182-L183\r\n\r\nNamely, the first time through, we are called with the initial response that triggered a redirect, so we're doing\r\n\r\n```py\r\nhist.append(resp)\r\nresp.history = hist[1:]\r\n```\r\n\r\nThis is correct because that 0th item in the final response's `history` has no other redirects.\r\n\r\nWe could also, write this two other ways:\r\n\r\n```py\r\nresp.history = hist[:]\r\nhist.append(resp)\r\n```\r\n\r\nThis will create a new list based off of the existing history we know about, so that initial request will still be `[]`, then the rest would look like:\r\n\r\n... \r\n140058437748768->[]\r\n140058437750976->[(140058437748768, 0)]\r\n140058437751840->[(140058437748768, 0), (140058437750976, 1)]\r\n```\r\n\r\nAlternatively, we could do\r\n\r\n```py\r\nhist.append(resp)\r\nresp.history = hist[:-1]\r\n```\r\n\r\nEither way should make this work, but I think then, it has downstream affects on https://github.com/psf/requests/blob/15585909c3dd3014e4083961c8a404709450151c/requests/sessions.py#L190 which we can easily change to\r\n\r\n```py\r\nif len(hist) >= self.max_redirects:\r\n```",
"should I work on this?"
] |
https://api.github.com/repos/psf/requests/issues/6294
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6294/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6294/comments
|
https://api.github.com/repos/psf/requests/issues/6294/events
|
https://github.com/psf/requests/issues/6294
| 1,462,357,280 |
I_kwDOABTKOs5XKc0g
| 6,294 |
PUT requests for zero-byte files get 'Transfer-Encoding': 'chunked' header
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26001154?v=4",
"events_url": "https://api.github.com/users/radu-malliu/events{/privacy}",
"followers_url": "https://api.github.com/users/radu-malliu/followers",
"following_url": "https://api.github.com/users/radu-malliu/following{/other_user}",
"gists_url": "https://api.github.com/users/radu-malliu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/radu-malliu",
"id": 26001154,
"login": "radu-malliu",
"node_id": "MDQ6VXNlcjI2MDAxMTU0",
"organizations_url": "https://api.github.com/users/radu-malliu/orgs",
"received_events_url": "https://api.github.com/users/radu-malliu/received_events",
"repos_url": "https://api.github.com/users/radu-malliu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/radu-malliu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/radu-malliu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/radu-malliu",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-11-23T20:20:33Z
|
2022-11-23T20:20:33Z
| null |
NONE
| null |
Context: uploading files to AWS S3 via requests. Files may be empty. When attempting to upload an empty file, a response of `501: Not implemented` is received. This seems to be because, when content length is 0, a `Transfer-Encoding: chunked` header is automatically added. S3 does not support the encoding.
## Expected Result
When an empty file PUT is attempted via `requests.put`, a `Content-Length: 0` header should be set on the request. A `Transfer-Encoding: chunked` header should not be set automatically.
## Actual Result
When an empty file PUT is attempted via `requests.put`, a `Transfer-Encoding: chunked` header is set. No `Content-Length` header is set. If a `Content-Length: 0` header is set explicitly, the `Transfer-Encoding: chunked` header is still set.
## Reproduction Steps
If AWS account, bucket, credentials for principal with PutObject permissions aren't available:
```python
import requests
file = open(<path_to_empty_file>, "rb")
session = requests.session()
link = "http://httpbin.org/put"
# using requests.put yields the same results. Using session.put here to examine request
# with S3 instead of httpbin.org, the call below results in a 501. Note the request headers
res_no_CL = session.put(link, data=file, headers={"Content-Type": "text/plain"})
print(res_no_CL.request.headers)
# with S3 instead of httpbin.org, the call below results in a 501. With httpbin.org it returns
# ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
# so can't examine headers, but I assume behaviour is consistent
res_explicit_CL = session.put(link, data=file, headers={"Content-Type": "text/plain", "Content-Length": "0"})
print(res_explicit_CL.request.headers)
```
If AWS prerequisites above are available:
```python
import requests
import boto3
s3 = boto3.client('s3')
file = open(<path_to_empty_file>, "rb")
session = requests.session()
link = s3.generate_presigned_url(ClientMethod="put_object", Params={"Bucket": "<your_bucket>", "Key": "<path_in_bucket>", "ContentType": "text/plain"})
# using requests.put yields the same results. Using session.put here to examine request
# the call below results in a 501. Note the request headers
res_no_CL = session.put(link, data=file, headers={"Content-Type": "text/plain"})
print(res_no_CL.request.headers)
# the call below results in a 501. Note the request headers
res_explicit_CL = session.put(link, data=file, headers={"Content-Type": "text/plain", "Content-Length": "0"})
print(res_explicit_CL.request.headers)
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.5"
},
"platform": {
"release": "5.10.102.1-microsoft-standard-WSL2",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| null |
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6294/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6294/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6293
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6293/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6293/comments
|
https://api.github.com/repos/psf/requests/issues/6293/events
|
https://github.com/psf/requests/issues/6293
| 1,461,255,552 |
I_kwDOABTKOs5XGP2A
| 6,293 |
JS Render
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/112097588?v=4",
"events_url": "https://api.github.com/users/abdulaev-sh-m/events{/privacy}",
"followers_url": "https://api.github.com/users/abdulaev-sh-m/followers",
"following_url": "https://api.github.com/users/abdulaev-sh-m/following{/other_user}",
"gists_url": "https://api.github.com/users/abdulaev-sh-m/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abdulaev-sh-m",
"id": 112097588,
"login": "abdulaev-sh-m",
"node_id": "U_kgDOBq55NA",
"organizations_url": "https://api.github.com/users/abdulaev-sh-m/orgs",
"received_events_url": "https://api.github.com/users/abdulaev-sh-m/received_events",
"repos_url": "https://api.github.com/users/abdulaev-sh-m/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abdulaev-sh-m/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abdulaev-sh-m/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abdulaev-sh-m",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-23T08:13:51Z
|
2023-11-24T00:03:13Z
|
2022-11-23T11:31:11Z
|
NONE
|
resolved
|
Greetings to all! I have a suggestion to create the possibility of rendering js scripts in requests. Yes, I know that there is a requests-html project, but it is abandoned, and somehow you need to cope with js
|
{
"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/6293/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6293/timeline
| null |
not_planned
| null | null | false |
[
"Requests is just a lib for (as the name suggests) http requests.Not more. It is not a Browser and will never be. You should take a look at Selenium, which allows you to control a Browser like Firefox or Chrome.",
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/6292
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6292/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6292/comments
|
https://api.github.com/repos/psf/requests/issues/6292/events
|
https://github.com/psf/requests/issues/6292
| 1,461,113,939 |
I_kwDOABTKOs5XFtRT
| 6,292 |
requests.put() does not respect timeout when data is chunked
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/42052121?v=4",
"events_url": "https://api.github.com/users/konlai/events{/privacy}",
"followers_url": "https://api.github.com/users/konlai/followers",
"following_url": "https://api.github.com/users/konlai/following{/other_user}",
"gists_url": "https://api.github.com/users/konlai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/konlai",
"id": 42052121,
"login": "konlai",
"node_id": "MDQ6VXNlcjQyMDUyMTIx",
"organizations_url": "https://api.github.com/users/konlai/orgs",
"received_events_url": "https://api.github.com/users/konlai/received_events",
"repos_url": "https://api.github.com/users/konlai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/konlai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/konlai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/konlai",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-23T06:22:11Z
|
2024-07-30T00:03:42Z
|
2023-07-30T01:14:58Z
|
NONE
|
resolved
|
`requests.put(url, data=some_generator, timeout=5.0)` does not timeout if the server accepts the connection but does not send a response.
## Expected Result
`requests.put(url, data=some_generator, timeout=5.0)` would time out after 5 seconds if the server does not send a response.
## Actual Result
`requests.put(url, data=some_generator, timeout=5.0)` can hang indefinitely if the server does not send a response and does not close the connection.
## Reproduction Steps
```python
import requests
def data_chunked():
data = [b'hello', b'world']
for chunk in data:
yield chunk
# This can block forever if the server accepts the connection but does not respond
requests.put("http://localhost:8080/", data=data_chunked(), timeout=5.0)
# This times out as expected
requests.put("http://localhost:8080/", data=b'hello', timeout=5.0)
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.10"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.6.8"
},
"platform": {
"release": "3.10.0-1062.18.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.26.8"
},
"using_charset_normalizer": true,
"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/6292/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6292/timeline
| null |
completed
| null | null | false |
[
"Thanks for the report, @missing64001. We moved to use urllib3's chunking behavior in 2.30.0 which should have resolved this. I'll close this out along with the PR since it no longer applies to the code base. Please let us know if you're still seeing the issue with the latest release."
] |
https://api.github.com/repos/psf/requests/issues/6291
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6291/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6291/comments
|
https://api.github.com/repos/psf/requests/issues/6291/events
|
https://github.com/psf/requests/pull/6291
| 1,458,509,944 |
PR_kwDOABTKOs5DYuG0
| 6,291 |
Replace git protocol URL in docs with an HTTPS URL
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/47097842?v=4",
"events_url": "https://api.github.com/users/oliviacrain/events{/privacy}",
"followers_url": "https://api.github.com/users/oliviacrain/followers",
"following_url": "https://api.github.com/users/oliviacrain/following{/other_user}",
"gists_url": "https://api.github.com/users/oliviacrain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oliviacrain",
"id": 47097842,
"login": "oliviacrain",
"node_id": "MDQ6VXNlcjQ3MDk3ODQy",
"organizations_url": "https://api.github.com/users/oliviacrain/orgs",
"received_events_url": "https://api.github.com/users/oliviacrain/received_events",
"repos_url": "https://api.github.com/users/oliviacrain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oliviacrain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oliviacrain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oliviacrain",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-11-21T20:09:10Z
|
2023-11-22T00:03:28Z
|
2022-11-21T22:06:02Z
|
CONTRIBUTOR
|
resolved
|
As of March 2022, [GitHub has removed support for cloning repositories using the `git://` protocol](https://github.blog/2021-09-01-improving-git-protocol-security-github/). This project's installation docs still use a URL starting with `git://` when telling users how to clone the source repo. Let's replace that with the HTTPS URL for this repository.
|
{
"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/6291/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6291/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6291.diff",
"html_url": "https://github.com/psf/requests/pull/6291",
"merged_at": "2022-11-21T22:06:02Z",
"patch_url": "https://github.com/psf/requests/pull/6291.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6291"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6290
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6290/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6290/comments
|
https://api.github.com/repos/psf/requests/issues/6290/events
|
https://github.com/psf/requests/issues/6290
| 1,457,864,434 |
I_kwDOABTKOs5W5T7y
| 6,290 |
Follow up to issue #6167
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22999195?v=4",
"events_url": "https://api.github.com/users/afriedma/events{/privacy}",
"followers_url": "https://api.github.com/users/afriedma/followers",
"following_url": "https://api.github.com/users/afriedma/following{/other_user}",
"gists_url": "https://api.github.com/users/afriedma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/afriedma",
"id": 22999195,
"login": "afriedma",
"node_id": "MDQ6VXNlcjIyOTk5MTk1",
"organizations_url": "https://api.github.com/users/afriedma/orgs",
"received_events_url": "https://api.github.com/users/afriedma/received_events",
"repos_url": "https://api.github.com/users/afriedma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/afriedma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/afriedma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/afriedma",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-11-21T12:30:19Z
|
2023-11-22T00:03:26Z
|
2022-11-21T14:18:10Z
|
NONE
|
resolved
|
Hi, could someone please answer my post? I cannot find a workaround, it seems the issue was merged, but not released.
https://github.com/psf/requests/issues/6167
|
{
"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/6290/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6290/timeline
| null |
not_planned
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6289
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6289/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6289/comments
|
https://api.github.com/repos/psf/requests/issues/6289/events
|
https://github.com/psf/requests/issues/6289
| 1,457,550,196 |
I_kwDOABTKOs5W4HN0
| 6,289 |
how to increase the chunk size when sending an http stream-upload request through request.post and receiving it through fastapi
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1699951?v=4",
"events_url": "https://api.github.com/users/TamarLevy/events{/privacy}",
"followers_url": "https://api.github.com/users/TamarLevy/followers",
"following_url": "https://api.github.com/users/TamarLevy/following{/other_user}",
"gists_url": "https://api.github.com/users/TamarLevy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TamarLevy",
"id": 1699951,
"login": "TamarLevy",
"node_id": "MDQ6VXNlcjE2OTk5NTE=",
"organizations_url": "https://api.github.com/users/TamarLevy/orgs",
"received_events_url": "https://api.github.com/users/TamarLevy/received_events",
"repos_url": "https://api.github.com/users/TamarLevy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TamarLevy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TamarLevy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TamarLevy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-21T08:50:13Z
|
2023-11-22T00:03:27Z
|
2022-11-21T11:23:19Z
|
NONE
|
resolved
|
This is fastapi http side:
```
from fastapi import Request
import aiofiles
@app.post('/upload')
async def upload(request: Request):
try:
filename = request.headers['filename']
async with aiofiles.open(filename, 'wb') as f:
async for chunk in request.stream():
await f.write(chunk)
except Exception:
return {"message": "There was an error uploading the file"}
return {"message": f"Successfuly uploaded {filename}"}
```
this is the request side:
```
def gen_file_stream():
with open(file_name, "rb") as f:
while True:
data = f.read(1024*1024)
if not data:
break
yield data
resp=requests.post(url,data=gen_file_stream())
```
when I check the size of the chunk its 64k and not 1MB (as Im trying to send here).
If I use TestClient from fastapi it is working, I mean Im able to send a chunk of 1MB, so it seems to me requests package is dividing the size of the chunk internally to 64KB.
is there any way I can make request.post to send a chunk of 1MB?
|
{
"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/6289/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6289/timeline
| null |
not_planned
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/6288
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6288/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6288/comments
|
https://api.github.com/repos/psf/requests/issues/6288/events
|
https://github.com/psf/requests/issues/6288
| 1,455,004,967 |
I_kwDOABTKOs5WuZ0n
| 6,288 |
charset-normalizer upgraded to 3.x
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7131288?v=4",
"events_url": "https://api.github.com/users/walterrowe/events{/privacy}",
"followers_url": "https://api.github.com/users/walterrowe/followers",
"following_url": "https://api.github.com/users/walterrowe/following{/other_user}",
"gists_url": "https://api.github.com/users/walterrowe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/walterrowe",
"id": 7131288,
"login": "walterrowe",
"node_id": "MDQ6VXNlcjcxMzEyODg=",
"organizations_url": "https://api.github.com/users/walterrowe/orgs",
"received_events_url": "https://api.github.com/users/walterrowe/received_events",
"repos_url": "https://api.github.com/users/walterrowe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/walterrowe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/walterrowe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/walterrowe",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-18T12:09:55Z
|
2023-11-19T00:03:40Z
|
2022-11-18T13:40:32Z
|
NONE
|
resolved
|
charset-normalizer has been upgraded to version 3. requests requires version >= 2 and < 3.
## Expected Result
support for charset-normalizer 3
## Actual Result
warning of incompatibility with charset-normalizer 3
## Reproduction Steps
```shell
% pip install --upgrade charset-normalizer
Requirement already satisfied: charset-normalizer in /usr/local/lib/python3.10/site-packages (3.0.0)
Collecting charset-normalizer
Downloading charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 2.5 MB/s eta 0:00:00
Installing collected packages: charset-normalizer
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.0.0
Uninstalling charset-normalizer-3.0.0:
Successfully uninstalled charset-normalizer-3.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.
Successfully installed charset-normalizer-3.0.1
```
## System Information
$ python -m requests.help
```shell
% python -m requests.help
/usr/local/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
warnings.warn(
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "3.0.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.8"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010113f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6288/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6288/timeline
| null |
completed
| null | null | false |
[
"This is addressed in https://github.com/psf/requests/pull/6261 but hasn't been released yet.\r\n\r\nFor what it's worth, this is on the 2.29.0 milestone."
] |
https://api.github.com/repos/psf/requests/issues/6287
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6287/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6287/comments
|
https://api.github.com/repos/psf/requests/issues/6287/events
|
https://github.com/psf/requests/issues/6287
| 1,452,017,331 |
I_kwDOABTKOs5WjAaz
| 6,287 |
Requests sends garbage when requesting to a web server on the same machine
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/62214409?v=4",
"events_url": "https://api.github.com/users/inyourface34456/events{/privacy}",
"followers_url": "https://api.github.com/users/inyourface34456/followers",
"following_url": "https://api.github.com/users/inyourface34456/following{/other_user}",
"gists_url": "https://api.github.com/users/inyourface34456/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/inyourface34456",
"id": 62214409,
"login": "inyourface34456",
"node_id": "MDQ6VXNlcjYyMjE0NDA5",
"organizations_url": "https://api.github.com/users/inyourface34456/orgs",
"received_events_url": "https://api.github.com/users/inyourface34456/received_events",
"repos_url": "https://api.github.com/users/inyourface34456/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/inyourface34456/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/inyourface34456/subscriptions",
"type": "User",
"url": "https://api.github.com/users/inyourface34456",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-16T17:40:58Z
|
2023-11-17T00:03:15Z
|
2022-11-16T17:56:42Z
|
NONE
|
resolved
|
## Summery
When sending to a web server located on the same machine as the python code is executing, it will send garbage data on all of the fields, the request itself, exiting with the error `Invalid SSL version`. The server logs show what looks like garbage data.

## Expected Result
I thought that it would work normally and just send a normal web request rather then garbage data.
## Actual Result
It sent a lot of garbage data and the server returned Status Code 400.
## Reproduction Steps
Shell Commands:
```bash
python -m http.server 8080
```
Python Code:
```python
import requests
requests.get('https://0.0.0.0:8080')
# you could also use https://127.0.0.1:8080, and https://localhost:8080 and you will get the same result. Using HTTP protocol also produces the same result.
```
## System Information
$ python -m requests.help
```json
{
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.8.12"
},
"platform": {
"release": "5.15.0-1021-gcp",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010df"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6287/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6287/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com/) for general usage and network fundamentals questions."
] |
https://api.github.com/repos/psf/requests/issues/6286
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6286/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6286/comments
|
https://api.github.com/repos/psf/requests/issues/6286/events
|
https://github.com/psf/requests/issues/6286
| 1,450,114,932 |
I_kwDOABTKOs5Wbv90
| 6,286 |
Move to urllib3 version 2.0.0 and Move Requests to version 2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5131271?v=4",
"events_url": "https://api.github.com/users/achapkowski/events{/privacy}",
"followers_url": "https://api.github.com/users/achapkowski/followers",
"following_url": "https://api.github.com/users/achapkowski/following{/other_user}",
"gists_url": "https://api.github.com/users/achapkowski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/achapkowski",
"id": 5131271,
"login": "achapkowski",
"node_id": "MDQ6VXNlcjUxMzEyNzE=",
"organizations_url": "https://api.github.com/users/achapkowski/orgs",
"received_events_url": "https://api.github.com/users/achapkowski/received_events",
"repos_url": "https://api.github.com/users/achapkowski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/achapkowski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/achapkowski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/achapkowski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-15T17:10:47Z
|
2023-11-16T00:03:11Z
|
2022-11-15T17:31:54Z
|
NONE
|
resolved
|
With urllib3 releasing the alpha of 2.0.0, is it time to consider moving requests to version 2.0.0 and make the long standing changes that are needed to improve the library?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6286/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6286/timeline
| null |
completed
| null | null | false |
[
"Requests is already on 2.x. Thanks for the feedback, we're aware of the upcoming changes to urllib3 and are finishing up preparations for the release. We may look at major version bumping Requests at a later date but have no immediate plans."
] |
https://api.github.com/repos/psf/requests/issues/6285
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6285/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6285/comments
|
https://api.github.com/repos/psf/requests/issues/6285/events
|
https://github.com/psf/requests/issues/6285
| 1,449,697,091 |
I_kwDOABTKOs5WaJ9D
| 6,285 |
Headers should allow subclasses of str or bytes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/35125624?v=4",
"events_url": "https://api.github.com/users/lemisky/events{/privacy}",
"followers_url": "https://api.github.com/users/lemisky/followers",
"following_url": "https://api.github.com/users/lemisky/following{/other_user}",
"gists_url": "https://api.github.com/users/lemisky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lemisky",
"id": 35125624,
"login": "lemisky",
"node_id": "MDQ6VXNlcjM1MTI1NjI0",
"organizations_url": "https://api.github.com/users/lemisky/orgs",
"received_events_url": "https://api.github.com/users/lemisky/received_events",
"repos_url": "https://api.github.com/users/lemisky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lemisky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lemisky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lemisky",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-15T12:21:32Z
|
2023-11-16T00:03:12Z
|
2022-11-15T13:43:25Z
|
NONE
|
resolved
|
<!-- Summary. -->
https://github.com/foyoux/aligo/issues/55
```py
from dataclasses import dataclass
import requests
@dataclass
class ShareToken(str):
"""
>>> assert isinstance(ShareToken('xxx'), str)
"""
share_token: str = None
expire_time: str = None
expires_in: int = None
def __new__(cls, *args, **kwargs):
share_token = kwargs.get('share_token')
if share_token is None:
share_token = args[0]
return super().__new__(cls, share_token)
def __str__(self):
return self.share_token
def main():
share_token = ShareToken('xxx')
resp = requests.get('https://github.com/', headers={
# Why am I doing this?
# Because the share_token has a short validity period,
# but the program may need it for a long time,
# the object used is convenient for updating in place when it fails.
# Maybe I didn't express clearly,
# but as far as my own application scenario is concerned,
# this is the best way. Of course, these are not the point,
# the point is that I think headers should allow subclasses of str or bytes. thanks
'x-share-token': share_token
})
print(resp.status_code)
if __name__ == '__main__':
main()
```
## Expected Result
<!-- What you expected. -->
The operation is successful, no error is reported, and 200 is printed out.
## Actual Result
<!-- What happened instead. -->
It is OK under requests==2.27.1, but the latest 2.28.0 & 2.28.1 reports an error "requests.exceptions.InvalidHeader: Header part (...."
```shell
Traceback (most recent call last):
File "/home/foyou/Desktop/projects/foyoux/aligo/main.py", line 42, in <module>
main()
File "/home/foyou/Desktop/projects/foyoux/aligo/main.py", line 27, in main
resp = requests.get('https://github.com/', headers={
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/models.py", line 369, in prepare
self.prepare_headers(headers)
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/models.py", line 491, in prepare_headers
check_header_validity(header)
File "/home/foyou/Desktop/projects/foyoux/aligo/venv/lib/python3.10/site-packages/requests/utils.py", line 1037, in check_header_validity
raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part (ShareToken(share_token='xxx', expire_time=None, expires_in=None)) from {'x-share-token': ShareToken(share_token='xxx', expire_time=None, expires_in=None)} must be of type str or bytes, not <class '__main__.ShareToken'>
```
## Reproduction Steps
run this code
```python
from dataclasses import dataclass
import requests
@dataclass
class ShareToken(str):
"""
>>> assert isinstance(ShareToken('xxx'), str)
"""
share_token: str = None
expire_time: str = None
expires_in: int = None
def __new__(cls, *args, **kwargs):
share_token = kwargs.get('share_token')
if share_token is None:
share_token = args[0]
return super().__new__(cls, share_token)
def __str__(self):
return self.share_token
def main():
share_token = ShareToken('xxx')
resp = requests.get('https://github.com/', headers={
# Why am I doing this?
# Because the share_token has a short validity period,
# but the program may need it for a long time,
# the object used is convenient for updating in place when it fails.
# Maybe I didn't express clearly,
# but as far as my own application scenario is concerned,
# this is the best way. Of course, these are not the point,
# the point is that I think headers should allow subclasses of str or bytes. thanks
'x-share-token': share_token
})
print(resp.status_code)
if __name__ == '__main__':
main()
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.5"
},
"platform": {
"release": "5.14.0-1051-oem",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6285/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6285/timeline
| null |
completed
| null | null | false |
[
"@nateprewitt :rose: ",
"Duplicate #6159"
] |
https://api.github.com/repos/psf/requests/issues/6284
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6284/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6284/comments
|
https://api.github.com/repos/psf/requests/issues/6284/events
|
https://github.com/psf/requests/issues/6284
| 1,446,575,807 |
I_kwDOABTKOs5WOP6_
| 6,284 |
downloading 125 KB file hangs lib
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6679119?v=4",
"events_url": "https://api.github.com/users/geetee24/events{/privacy}",
"followers_url": "https://api.github.com/users/geetee24/followers",
"following_url": "https://api.github.com/users/geetee24/following{/other_user}",
"gists_url": "https://api.github.com/users/geetee24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/geetee24",
"id": 6679119,
"login": "geetee24",
"node_id": "MDQ6VXNlcjY2NzkxMTk=",
"organizations_url": "https://api.github.com/users/geetee24/orgs",
"received_events_url": "https://api.github.com/users/geetee24/received_events",
"repos_url": "https://api.github.com/users/geetee24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/geetee24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/geetee24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/geetee24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-12T19:32:02Z
|
2023-11-17T00:03:14Z
|
2022-11-16T21:24:36Z
|
NONE
|
resolved
|
https://raw.githubusercontent.com/MycroftAI/mycroft-skills-data/21.02/skill-metadata.json
# hangs at this line
r = requests.get(market_info_url)
# never gets here.
Checked OS memory and have like 2 GB free.
Any clue how to fix this and me debug the lib?
is ver 2.28.1
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/6284/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6284/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com/) for general usage questions."
] |
https://api.github.com/repos/psf/requests/issues/6283
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6283/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6283/comments
|
https://api.github.com/repos/psf/requests/issues/6283/events
|
https://github.com/psf/requests/pull/6283
| 1,446,074,228 |
PR_kwDOABTKOs5CvCV8
| 6,283 |
Single-source required python version in setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/992317?v=4",
"events_url": "https://api.github.com/users/MestreLion/events{/privacy}",
"followers_url": "https://api.github.com/users/MestreLion/followers",
"following_url": "https://api.github.com/users/MestreLion/following{/other_user}",
"gists_url": "https://api.github.com/users/MestreLion/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MestreLion",
"id": 992317,
"login": "MestreLion",
"node_id": "MDQ6VXNlcjk5MjMxNw==",
"organizations_url": "https://api.github.com/users/MestreLion/orgs",
"received_events_url": "https://api.github.com/users/MestreLion/received_events",
"repos_url": "https://api.github.com/users/MestreLion/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MestreLion/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MestreLion/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MestreLion",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-11T22:50:18Z
|
2023-11-13T00:03:20Z
|
2022-11-12T00:42:39Z
|
CONTRIBUTOR
|
resolved
|
Since there is a `REQUIRED_PYTHON` tuple, use it to fill the `python_requires` argument of `setup()` to avoid hard-coding current "3.7" in multiple places.
|
{
"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/6283/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6283/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6283.diff",
"html_url": "https://github.com/psf/requests/pull/6283",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6283.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6283"
}
| true |
[
"It's \"hard coded\" in one place. It's not a problem and we also don't accept cosmetic changes"
] |
https://api.github.com/repos/psf/requests/issues/6282
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6282/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6282/comments
|
https://api.github.com/repos/psf/requests/issues/6282/events
|
https://github.com/psf/requests/issues/6282
| 1,443,045,891 |
I_kwDOABTKOs5WAyID
| 6,282 |
IPv6 Zone Identifiers are not correctly parsed (still)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15090?v=4",
"events_url": "https://api.github.com/users/benizl/events{/privacy}",
"followers_url": "https://api.github.com/users/benizl/followers",
"following_url": "https://api.github.com/users/benizl/following{/other_user}",
"gists_url": "https://api.github.com/users/benizl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/benizl",
"id": 15090,
"login": "benizl",
"node_id": "MDQ6VXNlcjE1MDkw",
"organizations_url": "https://api.github.com/users/benizl/orgs",
"received_events_url": "https://api.github.com/users/benizl/received_events",
"repos_url": "https://api.github.com/users/benizl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/benizl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/benizl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/benizl",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 4 |
2022-11-10T01:06:19Z
|
2024-06-25T20:00:04Z
| null |
NONE
| null |
Issue #5775 notes that IPv6 Zone Identifiers are not parsed correctly when the Zone ID is itself a valid percent-encoded character from the `UNRESERVED_SET`. That issue was incorrectly closed as a duplicate of #5126, in fact #5126 is to do with a different, resolved, bug in urllib. This ticket here *is* a duplicate of #5775 but commenting on that ticket is now locked.
IPv6 addresses can have the form `fe80::1:2:3:4%zone` where `zone` is any alphanumeric sequence and is platform-dependent. In order to address their use in URLs, where the `%zone` could be interpreted as a percent-escaped character, RFC6874 requires the `%` to be replaced with its own percent-escaped representation `%25`, e.g. `http://[fe80::1:2:3:4%25zone`.
In `requests`, this is not enough to protect the Zone ID in the URL, if the zone is a valid percent-escaped character from the `UNRESERVED_SET`. Specifically, `url.py::_normalize_host` removes the RFC6874 sequence and replaces it with a simple `%`, then the round trip through `quote/unquote_reserved` in `utils.py::requote_uri` called from `PreparedRequest::prepare_url` transforms the Zone ID in to the percent-escaped character anyway.
Note that *doubly* escaping the percent works, but the URL is then neither intuitive nor RFC-compliant.
## Expected Result
```python
requests.Request('GET', 'http://[fe80::1:2:3:4%61]').prepare().url -> Undefined/don't care (not RFC-compliant)
requests.Request('GET', 'http://[fe80::1:2:3:4%2561]').prepare().url -> 'http://[fe80::1:2:3:4%61]'
requests.Request('GET', 'http://[fe80::1:2:3:4%252561]').prepare().url -> 'http://[fe80::1:2:3:4%2561]'
```
## Actual Result
```python
requests.Request('GET', 'http://[fe80::1:2:3:4%61]').prepare().url -> 'http://[fe80::1:2:3:4a]'
requests.Request('GET', 'http://[fe80::1:2:3:4%2561]').prepare().url -> 'http://[fe80::1:2:3:4a]'
requests.Request('GET', 'http://[fe80::1:2:3:4%252561]').prepare().url -> 'http://[fe80::1:2:3:4%61]'
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.5"
},
"platform": {
"release": "22.1.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| 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/6282/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6282/timeline
| null | null | null | null | false |
[
"Hi @benizl,\r\nCan you please recheck if it is just showing the error in your system. Because it is working completely fine in my mine.",
"Sorry for the slow response @ritikBhandari, I've been away from dev for a bit.\r\n\r\nI still see\r\n```\r\nprint(requests.Request('GET', 'http://[fe80::1:2:3:4%2561]').prepare().url) # > http://[fe80::1:2:3:4a]/\r\n```\r\n\r\ni.e. the `61` scope specifier, escaped with `%25` as per RFC6874, gets incorrectly transformed in to the letter `a`. Since the above note, the help output is unchanged except `requests.version == 2.28.2` and `urllib3.version == 1.26.15`",
"Any update on this issue? I'm also seeing an issue when using iDRAC IPv6 link local address to make Redfish calls using requests module, returns 400 status code. If i use iDRAC IPv6 address to make the same Redfish call no issues. Also i can use iDRAC link local address to make the same Redfish call using curl command no issues. Issue only exists when using requests module.\r\n\r\nThanks\r\n",
"Same here, getting messages like `Failed to resolve 'fe80::6321:2df2:88b:d3b6%25enp0s3` when tryong to connect vie HTTPS."
] |
https://api.github.com/repos/psf/requests/issues/6281
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6281/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6281/comments
|
https://api.github.com/repos/psf/requests/issues/6281/events
|
https://github.com/psf/requests/issues/6281
| 1,442,281,749 |
I_kwDOABTKOs5V93kV
| 6,281 |
requests 2.28.1 is imcompatible with charset-normalizer 3.0.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15859460?v=4",
"events_url": "https://api.github.com/users/md-redwan-hossain/events{/privacy}",
"followers_url": "https://api.github.com/users/md-redwan-hossain/followers",
"following_url": "https://api.github.com/users/md-redwan-hossain/following{/other_user}",
"gists_url": "https://api.github.com/users/md-redwan-hossain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/md-redwan-hossain",
"id": 15859460,
"login": "md-redwan-hossain",
"node_id": "MDQ6VXNlcjE1ODU5NDYw",
"organizations_url": "https://api.github.com/users/md-redwan-hossain/orgs",
"received_events_url": "https://api.github.com/users/md-redwan-hossain/received_events",
"repos_url": "https://api.github.com/users/md-redwan-hossain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/md-redwan-hossain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/md-redwan-hossain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/md-redwan-hossain",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-09T15:14:46Z
|
2023-11-15T00:03:14Z
|
2022-11-09T17:33:44Z
|
NONE
|
resolved
|
I am using python 3.10.8 in Arch linux. When I update all pip packages, `requests 2.28.1` become broken and throws this error- `requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.0 which is incompatible.`
|
{
"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/6281/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6281/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"> \r\n\r\nrequests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.0 which is incompatible."
] |
https://api.github.com/repos/psf/requests/issues/6280
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6280/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6280/comments
|
https://api.github.com/repos/psf/requests/issues/6280/events
|
https://github.com/psf/requests/pull/6280
| 1,440,327,566 |
PR_kwDOABTKOs5CbkvX
| 6,280 |
__init__.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/71966071?v=4",
"events_url": "https://api.github.com/users/Praveensenpai/events{/privacy}",
"followers_url": "https://api.github.com/users/Praveensenpai/followers",
"following_url": "https://api.github.com/users/Praveensenpai/following{/other_user}",
"gists_url": "https://api.github.com/users/Praveensenpai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Praveensenpai",
"id": 71966071,
"login": "Praveensenpai",
"node_id": "MDQ6VXNlcjcxOTY2MDcx",
"organizations_url": "https://api.github.com/users/Praveensenpai/orgs",
"received_events_url": "https://api.github.com/users/Praveensenpai/received_events",
"repos_url": "https://api.github.com/users/Praveensenpai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Praveensenpai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Praveensenpai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Praveensenpai",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-11-08T14:38:40Z
|
2023-11-09T00:03:07Z
|
2022-11-08T15:14:50Z
|
NONE
|
resolved
|
replaced try with suppress and little bit rewrite code
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6280/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6280/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6280.diff",
"html_url": "https://github.com/psf/requests/pull/6280",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6280.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6280"
}
| true |
[
"Hi @Praveensenpai, Requests already has pre-commit auto-formatting the code and we generally don't accept stylistic PRs. We'll have to pass on this one, thanks.",
"We don't accept these kinds of PRs that rearrange things without clear functional benefits. Closing this."
] |
https://api.github.com/repos/psf/requests/issues/6279
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6279/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6279/comments
|
https://api.github.com/repos/psf/requests/issues/6279/events
|
https://github.com/psf/requests/issues/6279
| 1,440,191,701 |
I_kwDOABTKOs5V15TV
| 6,279 |
HTTPS Request through HTTP Proxy is sent incorrectly when using chunked body
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/96691861?v=4",
"events_url": "https://api.github.com/users/moshec2/events{/privacy}",
"followers_url": "https://api.github.com/users/moshec2/followers",
"following_url": "https://api.github.com/users/moshec2/following{/other_user}",
"gists_url": "https://api.github.com/users/moshec2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moshec2",
"id": 96691861,
"login": "moshec2",
"node_id": "U_kgDOBcNmlQ",
"organizations_url": "https://api.github.com/users/moshec2/orgs",
"received_events_url": "https://api.github.com/users/moshec2/received_events",
"repos_url": "https://api.github.com/users/moshec2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moshec2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moshec2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moshec2",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 3 |
2022-11-08T13:19:24Z
|
2023-06-22T14:43:32Z
| null |
NONE
| null |
I am using the chunked request body feature (`data=generator`). When defining a HTTP proxy and sending a request to a HTTPS URL, `requests` is trying to perform a TLS handshake with the (HTTP) proxy server, instead of sending a CONNECT request and performing the handshake with the target server through the tunnel. This behaviour prevents the request from completing successfully.
## Expected Result
`requests` should send a CONNECT request to the proxy and negotiate TLS with the target server through the tunnel.
## Actual Result
`requests` tries to negotiate TLS directly with the HTTP proxy server, and fails to do so.
## Reproduction Steps
Run an HTTP proxy on `127.0.0.1:8080` and execute the following code:
```python
import requests
def body_generator():
yield "test"
return
requests.post("https://www.google.com/",
proxies={"https": "http://127.0.0.1:8080/"},
data=body_generator(),
)
```
## More info
The chunked encoding generator feature is implemented in `requests/adapters.py`:
```python
try:
if not chunked:
resp = conn.urlopen(
...
)
# Send the request.
else:
if hasattr(conn, "proxy_pool"):
conn = conn.proxy_pool
low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)
try:
... Send request with chunked body ...
```
In the case of chunked encoding, instead of using `conn.urlopen` to send the request, it uses `conn._get_conn` and sends the request manually.
It seems like, for some reason, `conn._get_conn` is not handling the proxy correctly.
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6279/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6279/timeline
| null | null | null | null | false |
[
"I can confirm this is still an issue on latest release.\r\nI filed a duplicate issue (now closed) here: https://github.com/psf/requests/issues/6371",
"I am using requests 2.28.2 with urllib3 as 1.26.14, and getting below issue when calling the api (proxy is not added).\r\n\r\n`requests.exceptions.SSLError: HTTPSConnectionPool(host=\"my client host\", port=\"my client port\"): Max retries exceeded with url: /v1/omni-channel/message (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))`\r\n\r\nIs there anything else that I need to check?",
"Seems there is an issue with the SSL/TLS connection when making the API call. \r\n\r\nYou can check few things - \r\n\r\n1. Verify the URL: Ensure that the URL you are using is correct and corresponds to the intended API endpoint.\r\n2. Updating the libraries 'requests' and its dependencies 'urllib' and 'ssl' to the latest one.\r\n3. Verify the SSL/TLS version compatibility with the client-server versions"
] |
https://api.github.com/repos/psf/requests/issues/6278
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6278/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6278/comments
|
https://api.github.com/repos/psf/requests/issues/6278/events
|
https://github.com/psf/requests/issues/6278
| 1,438,625,526 |
I_kwDOABTKOs5Vv672
| 6,278 |
RFE: please provide support for latest `urllib3`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31284574?v=4",
"events_url": "https://api.github.com/users/kloczek/events{/privacy}",
"followers_url": "https://api.github.com/users/kloczek/followers",
"following_url": "https://api.github.com/users/kloczek/following{/other_user}",
"gists_url": "https://api.github.com/users/kloczek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kloczek",
"id": 31284574,
"login": "kloczek",
"node_id": "MDQ6VXNlcjMxMjg0NTc0",
"organizations_url": "https://api.github.com/users/kloczek/orgs",
"received_events_url": "https://api.github.com/users/kloczek/received_events",
"repos_url": "https://api.github.com/users/kloczek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kloczek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kloczek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kloczek",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-11-07T16:17:55Z
|
2023-11-18T00:03:23Z
|
2022-11-16T21:28:35Z
|
NONE
|
resolved
|
https://github.com/psf/requests/blob/1e62a3ec18e19f85ddae03b4cbbdf0b4c62834c0/setup.cfg#L6-L10
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6278/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6278/timeline
| null |
completed
| null | null | false |
[
"Just tested build with below patch:\r\n```patch\r\n--- a/setup.py\r\n+++ b/setup.py\r\n@@ -59,9 +59,9 @@\r\n sys.exit()\r\n\r\n requires = [\r\n- \"charset_normalizer>=2,<3\",\r\n- \"idna>=2.5,<4\",\r\n- \"urllib3>=1.21.1,<1.27\",\r\n+ \"charset_normalizer>=2\",\r\n+ \"idna>=2.5\",\r\n+ \"urllib3>=1.21.1\",\r\n ]\r\n test_requirements = [\r\n \"pytest-httpbin==0.0.7\",\r\n--- a/requests/__init__.py\r\n+++ b/requests/__init__.py\r\n@@ -54,66 +54,6 @@\r\n except ImportError:\r\n chardet_version = None\r\n\r\n-\r\n-def check_compatibility(urllib3_version, chardet_version, charset_normalizer_version):\r\n- urllib3_version = urllib3_version.split(\".\")\r\n- assert urllib3_version != [\"dev\"] # Verify urllib3 isn't installed from git.\r\n-\r\n- # Sometimes, urllib3 only reports its version as 16.1.\r\n- if len(urllib3_version) == 2:\r\n- urllib3_version.append(\"0\")\r\n-\r\n- # Check urllib3 for compatibility.\r\n- major, minor, patch = urllib3_version # noqa: F811\r\n- major, minor, patch = int(major), int(minor), int(patch)\r\n- # urllib3 >= 1.21.1, <= 1.26\r\n- assert major == 1\r\n- assert minor >= 21\r\n- assert minor <= 26\r\n-\r\n- # Check charset_normalizer for compatibility.\r\n- if chardet_version:\r\n- major, minor, patch = chardet_version.split(\".\")[:3]\r\n- major, minor, patch = int(major), int(minor), int(patch)\r\n- # chardet_version >= 3.0.2, < 6.0.0\r\n- assert (3, 0, 2) <= (major, minor, patch) < (6, 0, 0)\r\n- elif charset_normalizer_version:\r\n- major, minor, patch = charset_normalizer_version.split(\".\")[:3]\r\n- major, minor, patch = int(major), int(minor), int(patch)\r\n- # charset_normalizer >= 2.0.0 < 3.0.0\r\n- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)\r\n- else:\r\n- raise Exception(\"You need either charset_normalizer or chardet installed\")\r\n-\r\n-\r\n-def _check_cryptography(cryptography_version):\r\n- # cryptography < 1.3.4\r\n- try:\r\n- cryptography_version = list(map(int, cryptography_version.split(\".\")))\r\n- except ValueError:\r\n- return\r\n-\r\n- if cryptography_version < [1, 3, 4]:\r\n- warning = \"Old version of cryptography ({}) may cause slowdown.\".format(\r\n- cryptography_version\r\n- )\r\n- warnings.warn(warning, RequestsDependencyWarning)\r\n-\r\n-\r\n-# Check imported dependencies for compatibility.\r\n-try:\r\n- check_compatibility(\r\n- urllib3.__version__, chardet_version, charset_normalizer_version\r\n- )\r\n-except (AssertionError, ValueError):\r\n- warnings.warn(\r\n- \"urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported \"\r\n- \"version!\".format(\r\n- urllib3.__version__, chardet_version, charset_normalizer_version\r\n- ),\r\n- RequestsDependencyWarning,\r\n- )\r\n-\r\n # Attempt to enable urllib3's fallback for SNI support\r\n # if the standard library doesn't support SNI or the\r\n # 'ssl' library isn't available.\r\n@@ -128,10 +68,6 @@\r\n\r\n pyopenssl.inject_into_urllib3()\r\n\r\n- # Check cryptography version\r\n- from cryptography import __version__ as cryptography_version\r\n-\r\n- _check_cryptography(cryptography_version)\r\n except ImportError:\r\n pass\r\n\r\n```\r\nand looks like pytest is passing without aany problems\r\n```console\r\n+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-requests-2.28.1-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-requests-2.28.1-4.fc35.x86_64/usr/lib/python3.8/site-packages\r\n+ /usr/bin/pytest -ra tests\r\n=========================================================================== test session starts ============================================================================\r\nplatform linux -- Python 3.8.15, pytest-7.1.3, pluggy-1.0.0\r\nrootdir: /home/tkloczko/rpmbuild/BUILD/requests-2.28.1, configfile: pyproject.toml\r\nplugins: mock-3.10.0, httpbin-1.0.2\r\ncollected 593 items\r\n\r\ntests/test_help.py ... [ 0%]\r\ntests/test_hooks.py ... [ 1%]\r\ntests/test_lowlevel.py .................... [ 4%]\r\ntests/test_packages.py ... [ 4%]\r\ntests/test_requests.py ...................................127.0.0.1 - - [07/Nov/2022 16:15:04] \"GET /relative-redirect/20 HTTP/1.1\" 302 0\r\n.............................................................127.0.0.1 - - [07/Nov/2022 16:15:10] \"GET /status/404 HTTP/1.1\" 404 0\r\n.......................pytest-httpbin server hit an exception serving request: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1131)\r\nattempting to ignore so the rest of the tests can run\r\n...................... [ 28%]\r\n......................................................................127.0.0.1 - - [07/Nov/2022 16:15:11] \"GET /get HTTP/1.1\" 200 222\r\n................x............................................................................. [ 56%]\r\n............. [ 58%]\r\ntests/test_structures.py .................... [ 61%]\r\ntests/test_testserver.py ......s.... [ 63%]\r\ntests/test_utils.py ..s............................................................................................................................................. [ 88%]\r\n.......................................................sssssssssss..... [100%]\r\n\r\n========================================================================= short test summary info ==========================================================================\r\nSKIPPED [1] tests/test_testserver.py:94: this fails non-deterministically under pytest-xdist\r\nSKIPPED [1] tests/test_utils.py:49: condition: cStringIO is None\r\nSKIPPED [10] tests/test_utils.py:814: Test only on Windows\r\nSKIPPED [1] tests/test_utils.py:867: Test only on Windows\r\nXFAIL tests/test_requests.py::TestRequests::test_response_iter_lines_reentrant\r\n========================================================== 579 passed, 13 skipped, 1 xfailed in 76.39s (0:01:16) ===========================================================\r\n```",
"This is unrelated to urllib3. Resolving as duplicate of your other ticket: #6272.",
"Issue is as well that module initialisation should not contain such checks."
] |
https://api.github.com/repos/psf/requests/issues/6277
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6277/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6277/comments
|
https://api.github.com/repos/psf/requests/issues/6277/events
|
https://github.com/psf/requests/pull/6277
| 1,438,155,562 |
PR_kwDOABTKOs5CUMSM
| 6,277 |
Chore: remove unused imports
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48382094?v=4",
"events_url": "https://api.github.com/users/Bakhtiyar-Garashov/events{/privacy}",
"followers_url": "https://api.github.com/users/Bakhtiyar-Garashov/followers",
"following_url": "https://api.github.com/users/Bakhtiyar-Garashov/following{/other_user}",
"gists_url": "https://api.github.com/users/Bakhtiyar-Garashov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Bakhtiyar-Garashov",
"id": 48382094,
"login": "Bakhtiyar-Garashov",
"node_id": "MDQ6VXNlcjQ4MzgyMDk0",
"organizations_url": "https://api.github.com/users/Bakhtiyar-Garashov/orgs",
"received_events_url": "https://api.github.com/users/Bakhtiyar-Garashov/received_events",
"repos_url": "https://api.github.com/users/Bakhtiyar-Garashov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Bakhtiyar-Garashov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Bakhtiyar-Garashov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Bakhtiyar-Garashov",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-07T10:53:10Z
|
2023-11-08T00:03:10Z
|
2022-11-07T12:51:06Z
|
NONE
|
resolved
|
Hi!
While doing some debugging I have encountered with unused stuff. Here is a microscopic tiny PR for this. Btw, this is my first contribution to the project 🎉
|
{
"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/6277/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6277/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6277.diff",
"html_url": "https://github.com/psf/requests/pull/6277",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6277.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6277"
}
| true |
[
"Most people rely on these re-exports. They're not unused"
] |
https://api.github.com/repos/psf/requests/issues/6276
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6276/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6276/comments
|
https://api.github.com/repos/psf/requests/issues/6276/events
|
https://github.com/psf/requests/issues/6276
| 1,437,297,213 |
I_kwDOABTKOs5Vq2o9
| 6,276 |
"proxy_request_buffering off" in NGINX proxy causes ConnectionAbortedError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32140186?v=4",
"events_url": "https://api.github.com/users/ercymiranda/events{/privacy}",
"followers_url": "https://api.github.com/users/ercymiranda/followers",
"following_url": "https://api.github.com/users/ercymiranda/following{/other_user}",
"gists_url": "https://api.github.com/users/ercymiranda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ercymiranda",
"id": 32140186,
"login": "ercymiranda",
"node_id": "MDQ6VXNlcjMyMTQwMTg2",
"organizations_url": "https://api.github.com/users/ercymiranda/orgs",
"received_events_url": "https://api.github.com/users/ercymiranda/received_events",
"repos_url": "https://api.github.com/users/ercymiranda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ercymiranda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ercymiranda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ercymiranda",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-06T05:58:13Z
|
2023-11-07T00:03:07Z
|
2022-11-06T09:58:50Z
|
NONE
|
resolved
|
Hello guys. I've searched a lot about this error and ended up not finding any answer elsewhere. So I decided to ask here, in case anyone can help.
I'm getting this error whenever I use lib Requests on NGINX proxies with the parameter "proxy_request_buffering off" configured in nginx.conf:
The error happens when uploading any file.
At first, I take an HTTP 200 (OK) when I establish the connection and a 307 (Temporary Redirect) to send the file to the final destination.
But after a few seconds, I get the error: ConnectionAbortedError; [WinError 10053] An established connection was aborted by the software in your host machine
By Curl I can send the file normally without problems.
Any suggestions that don't involve stripping the "proxy_request_buffering off" parameter from the NGINX proxy? (I need him)
Thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6276/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6276/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/6275
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6275/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6275/comments
|
https://api.github.com/repos/psf/requests/issues/6275/events
|
https://github.com/psf/requests/issues/6275
| 1,435,476,003 |
I_kwDOABTKOs5Vj6Aj
| 6,275 |
[Feature request or doc oversight?] Apparently, there's still no way to read uncompressed content as file-like object #465
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/64124388?v=4",
"events_url": "https://api.github.com/users/ell1e/events{/privacy}",
"followers_url": "https://api.github.com/users/ell1e/followers",
"following_url": "https://api.github.com/users/ell1e/following{/other_user}",
"gists_url": "https://api.github.com/users/ell1e/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ell1e",
"id": 64124388,
"login": "ell1e",
"node_id": "MDQ6VXNlcjY0MTI0Mzg4",
"organizations_url": "https://api.github.com/users/ell1e/orgs",
"received_events_url": "https://api.github.com/users/ell1e/received_events",
"repos_url": "https://api.github.com/users/ell1e/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ell1e/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ell1e/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ell1e",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-11-04T02:58:55Z
|
2022-11-04T02:58:55Z
| null |
NONE
| null |
This was originally discussed here: https://github.com/psf/requests/issues/465 For some reason the ticket was however closed without a file-like object approach being added here: https://requests.readthedocs.io/en/latest/user/quickstart/ (Other than the somewhat odd `.raw` that returns something I suspect most people that just want a file-like stream aren't interested in.) There doesn't seem to be an explanation why that ticket was closed, and the discussion suggesting *something* was fixed but I can't really figure out what.
Since it's not that easy to wrap `iter_content()` to a file like object with arbitrary read amounts and just wrapping `.content` for that generically seems to be unsafe to me due to denial of service, it would be nice if this was provided and then documented here: https://requests.readthedocs.io/en/latest/user/quickstart/ (With a section alike to "Raw Response Content".)
The requests version I tested on is: 2.27.1
| 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/6275/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6275/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6274
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6274/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6274/comments
|
https://api.github.com/repos/psf/requests/issues/6274/events
|
https://github.com/psf/requests/pull/6274
| 1,434,045,629 |
PR_kwDOABTKOs5CGsc7
| 6,274 |
pylint and python 3 updates
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14829262?v=4",
"events_url": "https://api.github.com/users/marksmayo/events{/privacy}",
"followers_url": "https://api.github.com/users/marksmayo/followers",
"following_url": "https://api.github.com/users/marksmayo/following{/other_user}",
"gists_url": "https://api.github.com/users/marksmayo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marksmayo",
"id": 14829262,
"login": "marksmayo",
"node_id": "MDQ6VXNlcjE0ODI5MjYy",
"organizations_url": "https://api.github.com/users/marksmayo/orgs",
"received_events_url": "https://api.github.com/users/marksmayo/received_events",
"repos_url": "https://api.github.com/users/marksmayo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marksmayo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marksmayo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marksmayo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-11-03T03:18:49Z
|
2023-11-04T00:03:15Z
|
2022-11-03T04:47:30Z
|
NONE
|
resolved
|
some small tweaks to appease pylint and python 3 changes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6274/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6274/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6274.diff",
"html_url": "https://github.com/psf/requests/pull/6274",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6274.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6274"
}
| true |
[
"Hi @marksmayo, unfortunately I don't think we can take this PR. We generally don't accept stylistic PR updates. You can find our linting rules in the `pre-commit` file if you have any questions. Thanks"
] |
https://api.github.com/repos/psf/requests/issues/6273
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6273/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6273/comments
|
https://api.github.com/repos/psf/requests/issues/6273/events
|
https://github.com/psf/requests/issues/6273
| 1,430,345,158 |
I_kwDOABTKOs5VQVXG
| 6,273 |
Support charset-normalizer>=3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/43101822?v=4",
"events_url": "https://api.github.com/users/atauln/events{/privacy}",
"followers_url": "https://api.github.com/users/atauln/followers",
"following_url": "https://api.github.com/users/atauln/following{/other_user}",
"gists_url": "https://api.github.com/users/atauln/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atauln",
"id": 43101822,
"login": "atauln",
"node_id": "MDQ6VXNlcjQzMTAxODIy",
"organizations_url": "https://api.github.com/users/atauln/orgs",
"received_events_url": "https://api.github.com/users/atauln/received_events",
"repos_url": "https://api.github.com/users/atauln/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atauln/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atauln/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atauln",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-31T19:05:40Z
|
2023-11-01T00:03:23Z
|
2022-10-31T19:06:39Z
|
NONE
|
resolved
| null |
{
"avatar_url": "https://avatars.githubusercontent.com/u/43101822?v=4",
"events_url": "https://api.github.com/users/atauln/events{/privacy}",
"followers_url": "https://api.github.com/users/atauln/followers",
"following_url": "https://api.github.com/users/atauln/following{/other_user}",
"gists_url": "https://api.github.com/users/atauln/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atauln",
"id": 43101822,
"login": "atauln",
"node_id": "MDQ6VXNlcjQzMTAxODIy",
"organizations_url": "https://api.github.com/users/atauln/orgs",
"received_events_url": "https://api.github.com/users/atauln/received_events",
"repos_url": "https://api.github.com/users/atauln/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atauln/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atauln/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atauln",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6273/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6273/timeline
| null |
not_planned
| null | null | false |
[
"Duplicate #6263."
] |
https://api.github.com/repos/psf/requests/issues/6272
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6272/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6272/comments
|
https://api.github.com/repos/psf/requests/issues/6272/events
|
https://github.com/psf/requests/issues/6272
| 1,425,605,764 |
I_kwDOABTKOs5U-QSE
| 6,272 |
RFE: support for `charset_normalizer` >= 3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31284574?v=4",
"events_url": "https://api.github.com/users/kloczek/events{/privacy}",
"followers_url": "https://api.github.com/users/kloczek/followers",
"following_url": "https://api.github.com/users/kloczek/following{/other_user}",
"gists_url": "https://api.github.com/users/kloczek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kloczek",
"id": 31284574,
"login": "kloczek",
"node_id": "MDQ6VXNlcjMxMjg0NTc0",
"organizations_url": "https://api.github.com/users/kloczek/orgs",
"received_events_url": "https://api.github.com/users/kloczek/received_events",
"repos_url": "https://api.github.com/users/kloczek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kloczek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kloczek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kloczek",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2022-10-27T13:05:09Z
|
2023-12-06T00:03:13Z
|
2022-10-27T15:44:42Z
|
NONE
|
resolved
|
Any plans to provuide support for `charset_normalizer` >= 3?
|
{
"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/6272/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6272/timeline
| null |
completed
| null | null | false |
[
"```\r\nrequires = [\r\n \"charset_normalizer>=2,<4\",\r\n```\r\n\r\nit's already supported in main branch",
"There are as well checks in `__init__.py`",
"OK I see that changes in `__init__.py` are added as well.\r\nBTW: does really all those checs really necessary? 🤔 ",
"Already fixed in #6261, pending a release."
] |
https://api.github.com/repos/psf/requests/issues/6271
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6271/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6271/comments
|
https://api.github.com/repos/psf/requests/issues/6271/events
|
https://github.com/psf/requests/issues/6271
| 1,424,393,055 |
I_kwDOABTKOs5U5oNf
| 6,271 |
`content-length` is missing in headers of a `head` request while `curl` fetches it
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/895681?v=4",
"events_url": "https://api.github.com/users/dilawar/events{/privacy}",
"followers_url": "https://api.github.com/users/dilawar/followers",
"following_url": "https://api.github.com/users/dilawar/following{/other_user}",
"gists_url": "https://api.github.com/users/dilawar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dilawar",
"id": 895681,
"login": "dilawar",
"node_id": "MDQ6VXNlcjg5NTY4MQ==",
"organizations_url": "https://api.github.com/users/dilawar/orgs",
"received_events_url": "https://api.github.com/users/dilawar/received_events",
"repos_url": "https://api.github.com/users/dilawar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dilawar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dilawar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dilawar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-26T17:04:43Z
|
2023-11-01T00:03:24Z
|
2022-10-31T18:09:36Z
|
NONE
|
resolved
|
<!-- Summary. -->
## Expected Result
`content-length` missing in headers returned by a `requests.head` request while `curl` fetches it from the same URL. I was expecting headers to be (almost) the same whether I use `curl` or python-requests library.
<!-- What you expected. -->
## Actual Result
`content-length` doesn't show up in the headers of a `head` request. However `curl` returns the `contrent-length`.
<!-- What happened instead. -->
## Reproduction Steps
```python
>>> import requests
>>> r = requests.head("https://gitlab.subcom.tech/bitia/bitia-cli/-/raw/29a1d1c0d2f0aaea833d429b9bdd9aef7184db8b/README.md")
>>> r.headers
{'Server': 'nginx', 'Date': 'Wed, 26 Oct 2022 16:58:58 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding, Accept', 'Cache-Control': 'max-age=60, public', 'Content-Disposition': 'inline', 'Content-Security-Policy': '', 'Etag': 'W/"a6753ef41292910c06e5130c0d22bc3d"', 'X-Content-Type-Options': 'nosniff', 'X-Download-Options': 'noopen', 'X-Frame-Options': 'SAMEORIGIN', 'X-Permitted-Cross-Domain-Policies': 'none', 'X-Request-Id': '01GGAKQ6S9082M6NCJ7GPX3H33', 'X-Runtime': '0.122800', 'X-Ua-Compatible': 'IE=edge', 'X-Xss-Protection': '1; mode=block', 'Strict-Transport-Security': 'max-age=63072000', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'Content-Encoding': 'gzip'}
>>> 'content-length' in r.headers
False
```
Note that I don't have `content-length` in the header above. However, `curl` returns `content-length` in the headers.
```bash
$ curl -I https://gitlab.subcom.tech/bitia/bitia-cli/-/raw/29a1d1c0d2f0aaea833d429b9bdd9aef7184db8b/README.md
HTTP/2 200
server: nginx
date: Wed, 26 Oct 2022 16:59:54 GMT
content-type: text/plain; charset=utf-8
content-length: 725
vary: Accept-Encoding
cache-control: max-age=60, public
content-disposition: inline
content-security-policy:
etag: W/"a6753ef41292910c06e5130c0d22bc3d"
vary: Accept
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-request-id: 01GGAKRXFZHN4YK9F67Y5YFS6X
x-runtime: 0.068579
x-ua-compatible: IE=edge
x-xss-protection: 1; mode=block
strict-transport-security: max-age=63072000
referrer-policy: strict-origin-when-cross-origin
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.14"
},
"platform": {
"release": "5.19.10-1-default",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6271/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6271/timeline
| null |
completed
| null | null | false |
[
"@dilawar you can try append the gzip enable header in your curl. you can see the same headers with requests get. so it's not issue.\r\n\r\nDavid\r\n\r\n% curl -H \"Accept-Encoding: gzip\" -I https://gitlab.subcom.tech/bitia/bitia-cli/-/raw/29a1d1c0d2f0aaea833d429b9bdd9aef7184db8b/README.md\r\nHTTP/2 200 \r\nserver: nginx\r\ndate: Mon, 31 Oct 2022 17:47:55 GMT\r\ncontent-type: text/plain; charset=utf-8\r\nvary: Accept-Encoding\r\ncache-control: max-age=60, public\r\ncontent-disposition: inline\r\ncontent-security-policy: \r\netag: W/\"a6753ef41292910c06e5130c0d22bc3d\"\r\nvary: Accept\r\nx-content-type-options: nosniff\r\nx-download-options: noopen\r\nx-frame-options: SAMEORIGIN\r\nx-permitted-cross-domain-policies: none\r\nx-request-id: 01GGQJGDSPMB202JK6TAXVQMCT\r\nx-runtime: 0.071671\r\nx-ua-compatible: IE=edge\r\nx-xss-protection: 1; mode=block\r\nstrict-transport-security: max-age=63072000\r\nreferrer-policy: strict-origin-when-cross-origin\r\ncontent-encoding: gzip\r\n"
] |
https://api.github.com/repos/psf/requests/issues/6270
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6270/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6270/comments
|
https://api.github.com/repos/psf/requests/issues/6270/events
|
https://github.com/psf/requests/pull/6270
| 1,424,104,539 |
PR_kwDOABTKOs5Ble1Y
| 6,270 |
fix: pass response (self) to ConnectionError constructor
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1405370?v=4",
"events_url": "https://api.github.com/users/ErikBjare/events{/privacy}",
"followers_url": "https://api.github.com/users/ErikBjare/followers",
"following_url": "https://api.github.com/users/ErikBjare/following{/other_user}",
"gists_url": "https://api.github.com/users/ErikBjare/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ErikBjare",
"id": 1405370,
"login": "ErikBjare",
"node_id": "MDQ6VXNlcjE0MDUzNzA=",
"organizations_url": "https://api.github.com/users/ErikBjare/orgs",
"received_events_url": "https://api.github.com/users/ErikBjare/received_events",
"repos_url": "https://api.github.com/users/ErikBjare/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ErikBjare/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ErikBjare/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ErikBjare",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-10-26T14:10:56Z
|
2023-09-20T09:44:28Z
| null |
NONE
| null |
As far as I can tell, this is the only internal construction of `ConnectionError` that doesn't include `request` or `response`.
Part of improving typing for exceptions in requests: https://github.com/python/typeshed/pull/8989
| 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/6270/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6270/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6270.diff",
"html_url": "https://github.com/psf/requests/pull/6270",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6270.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6270"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6269
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6269/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6269/comments
|
https://api.github.com/repos/psf/requests/issues/6269/events
|
https://github.com/psf/requests/issues/6269
| 1,423,935,273 |
I_kwDOABTKOs5U34cp
| 6,269 |
`verify=True` is not always honoured
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/533081?v=4",
"events_url": "https://api.github.com/users/paulmillar/events{/privacy}",
"followers_url": "https://api.github.com/users/paulmillar/followers",
"following_url": "https://api.github.com/users/paulmillar/following{/other_user}",
"gists_url": "https://api.github.com/users/paulmillar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/paulmillar",
"id": 533081,
"login": "paulmillar",
"node_id": "MDQ6VXNlcjUzMzA4MQ==",
"organizations_url": "https://api.github.com/users/paulmillar/orgs",
"received_events_url": "https://api.github.com/users/paulmillar/received_events",
"repos_url": "https://api.github.com/users/paulmillar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/paulmillar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/paulmillar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/paulmillar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-10-26T12:24:12Z
|
2023-11-02T00:03:17Z
|
2022-10-30T18:02:45Z
|
NONE
|
resolved
|
The request `my_session.head(some_url, verify=True)` reuses existing connections, including any that were established with `verify=False`.
## Expected Result
I would expect that HTTP requests with `verify=True` would only reuse existing connections that were also established with `verify=True`.
## Actual Result
From my test-case, it seems that the session will reuse an existing connection, irrespective of how that connection was established.
## Reproduction Steps
The following code should demonstrate the problem.
```python
import requests
from urllib3.exceptions import (MaxRetryError, SSLError)
def do_head_request_on(strategy, verify):
try:
r = strategy.head("https://wrong.host.badssl.com/",
verify=verify)
print("With verify %s,\tHTTP request made OK." % verify)
except requests.exceptions.ConnectionError as ce:
cause = ce.__context__
if type(cause) is MaxRetryError:
cause = cause.reason
if type(cause) is SSLError:
print("With verify %s,\tTLS problem" % verify)
else:
raise ce
requests.packages.urllib3.disable_warnings()
print("NOT using sessions:")
do_head_request_on(requests, True)
do_head_request_on(requests, False)
do_head_request_on(requests, True)
session = requests.Session()
print("\nUSING sessions:")
do_head_request_on(session, True)
do_head_request_on(session, False)
do_head_request_on(session, True)
```
Here is the output on my machine:
```
NOT using sessions:
With verify True, TLS problem
With verify False, HTTP request made OK.
With verify True, TLS problem
USING sessions:
With verify True, TLS problem
With verify False, HTTP request made OK.
With verify True, HTTP request made OK.
```
The issue is that the final request has `verify=True` against a known-bad endpoint; however, the request is successful.
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": "37.0.4"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "5.10.0-18-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "30000050",
"version": "22.0.0"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.5"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6269/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6269/timeline
| null |
completed
| null | null | false |
[
"Seemingly `Response.close` doesn't close the underlying connection from the Session: it remains available for a subsequent request. Therefore, this doesn't provide a work-around for this issue.\r\n\r\nThere are (at least) a couple of work-around for this issue that do work.\r\n\r\n1. Don't use a Session when making non-verified requests.\r\n2. Use two Session objects: one Session object for \"proper\" TLS-verifying requests and a separate Session object for any requests with verifying disabled.\r\n\r\nThe above test-case demonstrates the first work-around. The following code demonstrates the second work-around:\r\n\r\n```python\r\nimport requests\r\nfrom urllib3.exceptions import (MaxRetryError, SSLError)\r\n\r\ndef do_head_request_on(strategy, verify):\r\n try:\r\n r = strategy.head(\"https://wrong.host.badssl.com/\",\r\n verify=verify)\r\n print(\"With verify %s,\\tHTTP request made OK.\" % verify)\r\n except requests.exceptions.ConnectionError as ce:\r\n cause = ce.__context__\r\n if type(cause) is MaxRetryError:\r\n cause = cause.reason\r\n if type(cause) is SSLError: \r\n print(\"With verify %s,\\tTLS problem\" % verify)\r\n else:\r\n raise ce\r\n\r\nrequests.packages.urllib3.disable_warnings()\r\n\r\nprint(\"NOT using sessions:\")\r\ndo_head_request_on(requests, True)\r\ndo_head_request_on(requests, False)\r\ndo_head_request_on(requests, True)\r\n\r\nsession = requests.Session()\r\ninsecure_session = requests.Session()\r\ninsecure_session.verify = False\r\n\r\nprint(\"\\nUSING sessions:\")\r\ndo_head_request_on(session, None)\r\ndo_head_request_on(insecure_session, None)\r\ndo_head_request_on(session, None)\r\n```\r\n\r\nUsing this code, I see the desired output:\r\n```\r\nNOT using sessions:\r\nWith verify True, TLS problem\r\nWith verify False, HTTP request made OK.\r\nWith verify True, TLS problem\r\n\r\nUSING sessions:\r\nWith verify None, TLS problem\r\nWith verify None, HTTP request made OK.\r\nWith verify None, TLS problem\r\n```\r\n",
"In the future, please search **closed and** open issues before creating new ones that are duplicates. https://github.com/psf/requests/issues/4391",
"Hi @sigmavirus24,\r\n\r\nSorry for the dup. I didn't search for closed bugs because (from my perspective) this bug is still active.\r\n\r\nIf I've understood #4391 correctly, a fix for this issue has been committed, just not to the v2 branch. Therefore, this problem with be fixed once people upgrade to the forthcoming (and currently unreleased) Requests v3.0.0.\r\n\r\nThat said, I humbly suggest that #4391 was prematurely closed.\r\n\r\nThis is because there is no release of Requests to which I can upgrade where the problem is fixed. It's not clear where v3.0.0 will be released, so I don't know when I will be able to upgrade Requests to benefit from this fix.\r\n\r\nMeanwhile, the problem still exists in v2.\r\n\r\nUnfortunately, #4391 is now locked: it cannot be reopened nor does it accept any comments. This issue (#6269) is also marked as \"closed\". I feel this, too, was premature, but at least I can add a comment here, saying this.\r\n\r\nIf this problem cannot be fixed with Requests v2 (I see a pull request was rejected) then I think this issue should be documented as a known limitation (ideally with some work-around suggestions). Ideally, the code would be updated to issue a warning if there's a likelihood of triggering this behaviour (provided the effort required is not too great).\r\n\r\nSo, please feel free to consider this issue as a problem with the documentation, if you feel v2 is unfixable.\r\n\r\nHTH,\r\nPaul."
] |
https://api.github.com/repos/psf/requests/issues/6268
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6268/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6268/comments
|
https://api.github.com/repos/psf/requests/issues/6268/events
|
https://github.com/psf/requests/issues/6268
| 1,423,303,078 |
I_kwDOABTKOs5U1eGm
| 6,268 |
charset-normalizer 3 is out, but unfortunately is incompatible with the current version of the requests.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/85622224?v=4",
"events_url": "https://api.github.com/users/thisisamirv/events{/privacy}",
"followers_url": "https://api.github.com/users/thisisamirv/followers",
"following_url": "https://api.github.com/users/thisisamirv/following{/other_user}",
"gists_url": "https://api.github.com/users/thisisamirv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thisisamirv",
"id": 85622224,
"login": "thisisamirv",
"node_id": "MDQ6VXNlcjg1NjIyMjI0",
"organizations_url": "https://api.github.com/users/thisisamirv/orgs",
"received_events_url": "https://api.github.com/users/thisisamirv/received_events",
"repos_url": "https://api.github.com/users/thisisamirv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thisisamirv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thisisamirv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thisisamirv",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-10-26T01:27:17Z
|
2023-12-06T00:03:12Z
|
2022-10-26T01:28:52Z
|
NONE
|
resolved
|
Please support this new version.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6268/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6268/timeline
| null |
completed
| null | null | false |
[
"Please check open and closed issues before opening new ones.",
"requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.0 which is incompatible.",
"Already fixed in #6261, pending a release."
] |
https://api.github.com/repos/psf/requests/issues/6267
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6267/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6267/comments
|
https://api.github.com/repos/psf/requests/issues/6267/events
|
https://github.com/psf/requests/issues/6267
| 1,421,528,012 |
I_kwDOABTKOs5UusvM
| 6,267 |
Using a custom CA certificate
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7886520?v=4",
"events_url": "https://api.github.com/users/chriskim06/events{/privacy}",
"followers_url": "https://api.github.com/users/chriskim06/followers",
"following_url": "https://api.github.com/users/chriskim06/following{/other_user}",
"gists_url": "https://api.github.com/users/chriskim06/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chriskim06",
"id": 7886520,
"login": "chriskim06",
"node_id": "MDQ6VXNlcjc4ODY1MjA=",
"organizations_url": "https://api.github.com/users/chriskim06/orgs",
"received_events_url": "https://api.github.com/users/chriskim06/received_events",
"repos_url": "https://api.github.com/users/chriskim06/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chriskim06/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chriskim06/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chriskim06",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-24T22:12:03Z
|
2023-10-26T00:03:00Z
|
2022-10-25T00:18:43Z
|
NONE
|
resolved
|
hi, i was hoping to use the `SSL_CERT_DIR` env var to use a custom ca, but it seems like this feature isn't actually in requests just yet based on this comment https://github.com/psf/requests/pull/2903#issuecomment-279012869. is there a way to use a custom ca with requests?
|
{
"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/6267/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6267/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/6266
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6266/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6266/comments
|
https://api.github.com/repos/psf/requests/issues/6266/events
|
https://github.com/psf/requests/pull/6266
| 1,419,886,053 |
PR_kwDOABTKOs5BXYek
| 6,266 |
Change to SPDX conform license string
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/19833368?v=4",
"events_url": "https://api.github.com/users/elprimato/events{/privacy}",
"followers_url": "https://api.github.com/users/elprimato/followers",
"following_url": "https://api.github.com/users/elprimato/following{/other_user}",
"gists_url": "https://api.github.com/users/elprimato/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elprimato",
"id": 19833368,
"login": "elprimato",
"node_id": "MDQ6VXNlcjE5ODMzMzY4",
"organizations_url": "https://api.github.com/users/elprimato/orgs",
"received_events_url": "https://api.github.com/users/elprimato/received_events",
"repos_url": "https://api.github.com/users/elprimato/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elprimato/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elprimato/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elprimato",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-10-23T18:37:01Z
|
2024-08-12T00:06:13Z
|
2023-08-12T18:51:42Z
|
NONE
|
resolved
|
I suggest to change the license string in the package information to an [SPDX parsable license expression](https://spdx.org/licenses/).
This makes it easier for downstream users to get the license information directly from the package metadata.
|
{
"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/6266/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6266/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6266.diff",
"html_url": "https://github.com/psf/requests/pull/6266",
"merged_at": "2023-08-12T18:51:42Z",
"patch_url": "https://github.com/psf/requests/pull/6266.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6266"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6265
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6265/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6265/comments
|
https://api.github.com/repos/psf/requests/issues/6265/events
|
https://github.com/psf/requests/pull/6265
| 1,419,643,957 |
PR_kwDOABTKOs5BWpG_
| 6,265 |
Fix setuptools deprecation warnings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4",
"events_url": "https://api.github.com/users/mgorny/events{/privacy}",
"followers_url": "https://api.github.com/users/mgorny/followers",
"following_url": "https://api.github.com/users/mgorny/following{/other_user}",
"gists_url": "https://api.github.com/users/mgorny/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mgorny",
"id": 110765,
"login": "mgorny",
"node_id": "MDQ6VXNlcjExMDc2NQ==",
"organizations_url": "https://api.github.com/users/mgorny/orgs",
"received_events_url": "https://api.github.com/users/mgorny/received_events",
"repos_url": "https://api.github.com/users/mgorny/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mgorny/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mgorny/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mgorny",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2022-10-23T05:24:51Z
|
2023-01-19T13:20:33Z
| null |
CONTRIBUTOR
| null |
Update keys used in `setup.cfg` in order to fix the following setuptools deprecation warnings:
> The license_file parameter is deprecated, use license_files instead.
> Usage of dash-separated 'provides-extra' will not be supported
> in future versions. Please use the underscore name 'provides_extra'
> instead
> Usage of dash-separated 'requires-dist' will not be supported
> in future versions. Please use the underscore name 'requires_dist'
> instead
| null |
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6265/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6265/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6265.diff",
"html_url": "https://github.com/psf/requests/pull/6265",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6265.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6265"
}
| true |
[
"Thanks for the efforts, but I have updated as you instructed but still getting this error:\r\n\r\nC:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\setuptools\\dist.py:771: UserWarning: Usage of dash-separated 'provides-extra' will not be supported in future versions. Please use the underscore name 'provides_extra' instead\r\n warnings.warn(\r\nC:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\setuptools\\dist.py:771: UserWarning: Usage of dash-separated 'requires-dist' will not be supported in future versions. Please use the underscore name 'requires_dist' instead\r\n warnings.warn(\r\nC:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\setuptools\\config\\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.\r\n warnings.warn(msg, warning_class)\r\nusage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\n or: setup.py --help [cmd1 cmd2 ...]\r\n or: setup.py --help-commands\r\n or: setup.py cmd --help\r\n\r\nerror: no commands supplied"
] |
https://api.github.com/repos/psf/requests/issues/6264
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6264/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6264/comments
|
https://api.github.com/repos/psf/requests/issues/6264/events
|
https://github.com/psf/requests/issues/6264
| 1,419,078,885 |
I_kwDOABTKOs5UlWzl
| 6,264 |
Requests __init__.py emits warnings about version numbers
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4327840?v=4",
"events_url": "https://api.github.com/users/bje-/events{/privacy}",
"followers_url": "https://api.github.com/users/bje-/followers",
"following_url": "https://api.github.com/users/bje-/following{/other_user}",
"gists_url": "https://api.github.com/users/bje-/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bje-",
"id": 4327840,
"login": "bje-",
"node_id": "MDQ6VXNlcjQzMjc4NDA=",
"organizations_url": "https://api.github.com/users/bje-/orgs",
"received_events_url": "https://api.github.com/users/bje-/received_events",
"repos_url": "https://api.github.com/users/bje-/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bje-/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bje-/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bje-",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-10-22T04:48:44Z
|
2023-10-23T00:03:06Z
|
2022-10-22T04:54:28Z
|
NONE
|
resolved
|
## Background
I have the following package versions installed alongside requests:
```
urllib3 1.26.12
charset-normalizer 3.0.0
```
This complies with the version constraints in the requests `setup.py`.
The `__init__.py` code in requests does not match what is in `setup.py` and so warns about the versions of both of these packages. `__init__.py` wants `urllib3 >= 1.21.1, <= 1.26` and `charset_normalizer >= 2.0.0 < 3.0.0`.
## Expected Result
No warning.
## Actual Result
A slightly confusing runtime warning appears!
## Reproduction Steps
```
$ python3 -m requests.help
/home/bje/source/nemo/myenv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a supported version!
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "3.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.6"
},
"platform": {
"release": "5.15.0-47-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"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/6264/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6264/timeline
| null |
completed
| null | null | false |
[
"Hi @bje-, please check open and closed issues before opening new ones. The current release of Requests doesn't support charset_normalizer 3.0, hence the warning. It will be updated in the next release.",
"Thanks, but why isn't this reflected in `setup.py` so that `pip` would have alerted me to the issue?",
"It is, the supported range in setup.py for 2.28.1 is `<3`. You've upgraded the package independently of Requests which is creating the conflict."
] |
https://api.github.com/repos/psf/requests/issues/6263
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6263/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6263/comments
|
https://api.github.com/repos/psf/requests/issues/6263/events
|
https://github.com/psf/requests/issues/6263
| 1,418,383,110 |
I_kwDOABTKOs5Uis8G
| 6,263 |
charset-normalizer released version 3.0.0, requests support <3 - unable to keep up to date packages as a result
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5310609?v=4",
"events_url": "https://api.github.com/users/naorlivne/events{/privacy}",
"followers_url": "https://api.github.com/users/naorlivne/followers",
"following_url": "https://api.github.com/users/naorlivne/following{/other_user}",
"gists_url": "https://api.github.com/users/naorlivne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/naorlivne",
"id": 5310609,
"login": "naorlivne",
"node_id": "MDQ6VXNlcjUzMTA2MDk=",
"organizations_url": "https://api.github.com/users/naorlivne/orgs",
"received_events_url": "https://api.github.com/users/naorlivne/received_events",
"repos_url": "https://api.github.com/users/naorlivne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/naorlivne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/naorlivne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/naorlivne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-21T13:55:58Z
|
2023-10-22T00:03:36Z
|
2022-10-21T13:58:14Z
|
CONTRIBUTOR
|
resolved
|
<!-- Summary. -->
charset-normalizer released version 3.0.0, requests require charset-normalizer <3, as a result packages can't be kept up to date (possible security issues left unpatched going forward)
```
The conflict is caused by:
The user requested charset-normalizer==3.0.0
requests 2.28.1 depends on charset-normalizer<3 and >=2
```
this is due to https://github.com/psf/requests/blob/main/setup.py#L62
Seems quite similar to and idna issue I fixed a while back at https://github.com/psf/requests/issues/5710
## Expected Result
Be able to install requests with the latest version of the dependent package
## Actual Result
Fails installing with the latest version of charset-normalizer
## Reproduction Steps
```shell
pip install charset-normalizer==3.0.0
pip install requests
```
Watch it fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5310609?v=4",
"events_url": "https://api.github.com/users/naorlivne/events{/privacy}",
"followers_url": "https://api.github.com/users/naorlivne/followers",
"following_url": "https://api.github.com/users/naorlivne/following{/other_user}",
"gists_url": "https://api.github.com/users/naorlivne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/naorlivne",
"id": 5310609,
"login": "naorlivne",
"node_id": "MDQ6VXNlcjUzMTA2MDk=",
"organizations_url": "https://api.github.com/users/naorlivne/orgs",
"received_events_url": "https://api.github.com/users/naorlivne/received_events",
"repos_url": "https://api.github.com/users/naorlivne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/naorlivne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/naorlivne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/naorlivne",
"user_view_type": "public"
}
|
{
"+1": 1,
"-1": 1,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/6263/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6263/timeline
| null |
completed
| null | null | false |
[
"And just now noticed that was fixed at https://github.com/psf/requests/pull/6261 just not released yet with a new version so gonna close this"
] |
https://api.github.com/repos/psf/requests/issues/6262
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6262/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6262/comments
|
https://api.github.com/repos/psf/requests/issues/6262/events
|
https://github.com/psf/requests/pull/6262
| 1,417,906,876 |
PR_kwDOABTKOs5BQ5rF
| 6,262 |
JSONDecodeError included in the documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/78548837?v=4",
"events_url": "https://api.github.com/users/winmorre/events{/privacy}",
"followers_url": "https://api.github.com/users/winmorre/followers",
"following_url": "https://api.github.com/users/winmorre/following{/other_user}",
"gists_url": "https://api.github.com/users/winmorre/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/winmorre",
"id": 78548837,
"login": "winmorre",
"node_id": "MDQ6VXNlcjc4NTQ4ODM3",
"organizations_url": "https://api.github.com/users/winmorre/orgs",
"received_events_url": "https://api.github.com/users/winmorre/received_events",
"repos_url": "https://api.github.com/users/winmorre/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/winmorre/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/winmorre/subscriptions",
"type": "User",
"url": "https://api.github.com/users/winmorre",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-21T07:45:17Z
|
2023-10-22T00:03:38Z
|
2022-10-21T16:37:48Z
|
CONTRIBUTOR
|
resolved
| null |
{
"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/6262/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6262/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6262.diff",
"html_url": "https://github.com/psf/requests/pull/6262",
"merged_at": "2022-10-21T16:37:48Z",
"patch_url": "https://github.com/psf/requests/pull/6262.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6262"
}
| true |
[
"Thanks @winmorre !"
] |
https://api.github.com/repos/psf/requests/issues/6261
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6261/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6261/comments
|
https://api.github.com/repos/psf/requests/issues/6261/events
|
https://github.com/psf/requests/pull/6261
| 1,416,344,534 |
PR_kwDOABTKOs5BLj28
| 6,261 |
Allow charset normalizer >=2 and <4
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/65482418?v=4",
"events_url": "https://api.github.com/users/deedy5/events{/privacy}",
"followers_url": "https://api.github.com/users/deedy5/followers",
"following_url": "https://api.github.com/users/deedy5/following{/other_user}",
"gists_url": "https://api.github.com/users/deedy5/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/deedy5",
"id": 65482418,
"login": "deedy5",
"node_id": "MDQ6VXNlcjY1NDgyNDE4",
"organizations_url": "https://api.github.com/users/deedy5/orgs",
"received_events_url": "https://api.github.com/users/deedy5/received_events",
"repos_url": "https://api.github.com/users/deedy5/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/deedy5/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deedy5/subscriptions",
"type": "User",
"url": "https://api.github.com/users/deedy5",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2022-10-20T10:09:22Z
|
2024-01-30T00:03:20Z
|
2022-10-20T18:26:19Z
|
CONTRIBUTOR
|
resolved
|
charset-normalizer 3.0.0 has been released.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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": 7,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 7,
"url": "https://api.github.com/repos/psf/requests/issues/6261/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6261/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6261.diff",
"html_url": "https://github.com/psf/requests/pull/6261",
"merged_at": "2022-10-20T18:26:19Z",
"patch_url": "https://github.com/psf/requests/pull/6261.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6261"
}
| true |
[
"v3.0.0 up to 4x faster than v2.1\r\nhttps://github.com/Ousret/charset_normalizer/releases/tag/3.0.0\r\nhttps://charset-normalizer.readthedocs.io/en/latest/community/speedup.html\r\n\r\n",
"Yes, and given this isn't critical path for most users it's not critical to force people through a major version change to get that. If they use character detection of any sort and need performance they can force it to upgrade, but that's not our job",
"Thanks @deedy5!",
"Any estimation on a new release with this fix? ",
"This should now be available on PyPI in Requests 2.28.2."
] |
https://api.github.com/repos/psf/requests/issues/6260
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6260/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6260/comments
|
https://api.github.com/repos/psf/requests/issues/6260/events
|
https://github.com/psf/requests/issues/6260
| 1,415,198,809 |
I_kwDOABTKOs5UWjhZ
| 6,260 |
Why isn't `JSONDecodeError` included in the documentation?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/106664639?v=4",
"events_url": "https://api.github.com/users/nbro10/events{/privacy}",
"followers_url": "https://api.github.com/users/nbro10/followers",
"following_url": "https://api.github.com/users/nbro10/following{/other_user}",
"gists_url": "https://api.github.com/users/nbro10/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nbro10",
"id": 106664639,
"login": "nbro10",
"node_id": "U_kgDOBluSvw",
"organizations_url": "https://api.github.com/users/nbro10/orgs",
"received_events_url": "https://api.github.com/users/nbro10/received_events",
"repos_url": "https://api.github.com/users/nbro10/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nbro10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nbro10/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nbro10",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] |
{
"closed_at": "2023-05-22T03:37:11Z",
"closed_issues": 3,
"created_at": "2022-11-16T21:23:42Z",
"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/31",
"id": 8662889,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/31/labels",
"node_id": "MI_kwDOABTKOs4AhC9p",
"number": 31,
"open_issues": 0,
"state": "closed",
"title": "2.29.0",
"updated_at": "2023-05-22T03:37:11Z",
"url": "https://api.github.com/repos/psf/requests/milestones/31"
}
| 3 |
2022-10-19T15:35:00Z
|
2024-01-28T00:03:54Z
|
2023-01-27T21:25:43Z
|
NONE
|
resolved
|
[The documentation](https://requests.readthedocs.io/en/stable/api/#exceptions) not include the exception [`JSONDecodeError`](https://github.com/psf/requests/blob/main/requests/exceptions.py#L31), which means that we can't reference it in our docs (i.e. ``:external:py:class:`requests.exceptions.JSONDecodeError` `` fails). Why is this? And can you include it in the docs?
|
{
"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/6260/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6260/timeline
| null |
completed
| null | null | false |
[
"@nbro10 \r\nLooks like already fixed in https://requests.readthedocs.io/en/latest/api/#:~:text=exception%20requests.JSONDecodeError",
"@PratikMMohite Thanks for pointing this out. But [the stable version](https://requests.readthedocs.io/en/stable/api/#exceptions) still doesn't contain this change. We're using the stable documentation.",
"Yes, this was fixed in https://github.com/psf/requests/pull/6262 as a result of this bug report. @nateprewitt I believe this can be safely closed now."
] |
https://api.github.com/repos/psf/requests/issues/6259
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6259/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6259/comments
|
https://api.github.com/repos/psf/requests/issues/6259/events
|
https://github.com/psf/requests/issues/6259
| 1,412,882,630 |
I_kwDOABTKOs5UNuDG
| 6,259 |
How to disable only hostname verification
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32157798?v=4",
"events_url": "https://api.github.com/users/SmadusankaB/events{/privacy}",
"followers_url": "https://api.github.com/users/SmadusankaB/followers",
"following_url": "https://api.github.com/users/SmadusankaB/following{/other_user}",
"gists_url": "https://api.github.com/users/SmadusankaB/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SmadusankaB",
"id": 32157798,
"login": "SmadusankaB",
"node_id": "MDQ6VXNlcjMyMTU3Nzk4",
"organizations_url": "https://api.github.com/users/SmadusankaB/orgs",
"received_events_url": "https://api.github.com/users/SmadusankaB/received_events",
"repos_url": "https://api.github.com/users/SmadusankaB/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SmadusankaB/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SmadusankaB/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SmadusankaB",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-18T09:29:51Z
|
2023-10-19T00:03:08Z
|
2022-10-18T19:53:41Z
|
NONE
|
resolved
|
Summary.
How to disable only hostname verification
## Expected Result
Communicate via SSL/TSL connection without hostname verification only
What you expected.
Disable hostname verification
## Actual Result
Communicate via SSL/TSL connection without hostname verification only
What happened instead.
Tried with Verify=False. But it disables entire certificate validation
## Reproduction Steps
```python
import requests
res = requests.get(<url>, headers=<headers>, timeout=30)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "3.10.0-1160.53.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.26.9"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"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/6259/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6259/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/6258
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6258/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6258/comments
|
https://api.github.com/repos/psf/requests/issues/6258/events
|
https://github.com/psf/requests/pull/6258
| 1,409,982,335 |
PR_kwDOABTKOs5A2ajF
| 6,258 |
Add an Example for automatic retries to the Advanced Usage docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4631191?v=4",
"events_url": "https://api.github.com/users/matthewarmand/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewarmand/followers",
"following_url": "https://api.github.com/users/matthewarmand/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewarmand/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewarmand",
"id": 4631191,
"login": "matthewarmand",
"node_id": "MDQ6VXNlcjQ2MzExOTE=",
"organizations_url": "https://api.github.com/users/matthewarmand/orgs",
"received_events_url": "https://api.github.com/users/matthewarmand/received_events",
"repos_url": "https://api.github.com/users/matthewarmand/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewarmand/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewarmand/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewarmand",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-10-15T00:19:49Z
|
2024-07-04T00:03:38Z
|
2023-07-03T20:38:22Z
|
CONTRIBUTOR
|
resolved
|
While Requests doesn't automatically retry failures, this is an extremely common advanced use case in real world applications.
Although there's a mention of this capability in the [`HTTPAdapter` API docs](https://requests.readthedocs.io/en/latest/api/#requests.adapters.HTTPAdapter), it's a bit buried and not very specific.
The ubiquity of the use case fits perfectly in the [Transport Adapters section of the Advanced Usage docs](https://requests.readthedocs.io/en/latest/user/advanced/#transport-adapters), so I thought it would be useful to have a simple Example of this capability.
I took a stab at such an addition, and tried to follow the style of the rest of the docs pretty closely.
Linking over to the [`urllib3.util.Retry` docs](https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry) seems like it should reinforce the fact that Requests isn't the owner of that code and that library should be consulted with questions about that class (rather than Requests' support of it).
I'm curious if maintainers have any feedback about the content or code example. Specifically I was curious whether you have any opinions as to the appropriate standard for the `Retry` import. While `urllib3.util.Retry` is where the class lives and what the `urllib3` docs reference, `from urllib3 import Retry` also works, and in some StackOverflow posts I've seen people use `from requests.adapters import Retry`. I felt that last one would telegraph an ownership by Requests that would be undesirable, but I'm wondering if anyone is particularly picky about the best practice for that import.
Also, let me know if this is non-trivial enough to add a HISTORY entry for.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6258/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6258/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6258.diff",
"html_url": "https://github.com/psf/requests/pull/6258",
"merged_at": "2023-07-03T20:38:22Z",
"patch_url": "https://github.com/psf/requests/pull/6258.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6258"
}
| true |
[
"@nateprewitt and @sethmlarson, apologies for the tag-summon (I find that a bit discourteous sometimes) but I think this is a pretty low-effort, low-risk, high-value docs change that folks would find useful, and I'm guessing it probably just got lost in the rest of the activity on this project.\r\n\r\nDo either of you (or any other maintainers) have any thoughts or feedback on the change in general, or the questions I posed above in the original post? Is this something you'd consider accepting into the docs?",
"Hi @matthewarmand, thanks for checking in. This does look reasonable at first glance, it appears to have fallen off the review radar. I'll do a quick review this evening and let you know if anything needs to change. Otherwise, I'm alright with adding this."
] |
https://api.github.com/repos/psf/requests/issues/6257
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6257/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6257/comments
|
https://api.github.com/repos/psf/requests/issues/6257/events
|
https://github.com/psf/requests/issues/6257
| 1,403,693,959 |
I_kwDOABTKOs5TqquH
| 6,257 |
Auth not working for post/put but works for get
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/105328293?v=4",
"events_url": "https://api.github.com/users/ekmathis/events{/privacy}",
"followers_url": "https://api.github.com/users/ekmathis/followers",
"following_url": "https://api.github.com/users/ekmathis/following{/other_user}",
"gists_url": "https://api.github.com/users/ekmathis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ekmathis",
"id": 105328293,
"login": "ekmathis",
"node_id": "U_kgDOBkcupQ",
"organizations_url": "https://api.github.com/users/ekmathis/orgs",
"received_events_url": "https://api.github.com/users/ekmathis/received_events",
"repos_url": "https://api.github.com/users/ekmathis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ekmathis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ekmathis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ekmathis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-10T20:44:32Z
|
2023-10-11T00:03:01Z
|
2022-10-10T21:08:17Z
|
NONE
|
resolved
|
Auth works fine with get requests, but failing in posts and puts
## Expected Result
Get a http status code
## Actual Result
` File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/api.py", line 130, in put
return request("put", url, data=data, **kwargs)
File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/models.py", line 372, in prepare
self.prepare_auth(auth, url)
File "/Users/erik.mathis/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/models.py", line 603, in prepare_auth
r = auth(self)
TypeError: 'dict' object is not callable`
## Reproduction Steps
```python
import requests
auth = HTTPBasicAuth('X', 'X')
headers = {
'Content-Type': 'application/json'
}
url="abc.com"
def get(path: str=None, auth: tuple=auth, headers: dict=headers):
uri=f'{url}{path}'
return requests.get(uri, auth: tuple=auth, headers=headers)
def post(path: str=None, auth: tuple=auth, headers: dict=headers, data: dict=None):
uri=f'{url}{path}'
return requests.post(uri, auth=auth, headers=headers, data=json.dumps(data))
```
## System Information
$ python -m requests.help
```json
$ python -m requests.help
{
"chardet": {
"version": "5.0.0"
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.5"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.11"
},
"using_charset_normalizer": false,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6257/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6257/timeline
| null |
completed
| null | null | false |
[
"Your reproduction steps are not working and your code looks woefully broken. You're also passing the wrong type in which means you'll never get a HTTP response code since we can't create a valid request for you with what you've given us. Please read the exception in the future and ask for help on Stack overflow "
] |
https://api.github.com/repos/psf/requests/issues/6256
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6256/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6256/comments
|
https://api.github.com/repos/psf/requests/issues/6256/events
|
https://github.com/psf/requests/pull/6256
| 1,402,016,974 |
PR_kwDOABTKOs5Ab86n
| 6,256 |
Feat: hook prepared requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8657791?v=4",
"events_url": "https://api.github.com/users/will-holley/events{/privacy}",
"followers_url": "https://api.github.com/users/will-holley/followers",
"following_url": "https://api.github.com/users/will-holley/following{/other_user}",
"gists_url": "https://api.github.com/users/will-holley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/will-holley",
"id": 8657791,
"login": "will-holley",
"node_id": "MDQ6VXNlcjg2NTc3OTE=",
"organizations_url": "https://api.github.com/users/will-holley/orgs",
"received_events_url": "https://api.github.com/users/will-holley/received_events",
"repos_url": "https://api.github.com/users/will-holley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/will-holley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/will-holley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/will-holley",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-10-08T17:50:34Z
|
2023-10-09T00:03:16Z
|
2022-10-08T17:50:41Z
|
NONE
|
resolved
| null |
{
"avatar_url": "https://avatars.githubusercontent.com/u/8657791?v=4",
"events_url": "https://api.github.com/users/will-holley/events{/privacy}",
"followers_url": "https://api.github.com/users/will-holley/followers",
"following_url": "https://api.github.com/users/will-holley/following{/other_user}",
"gists_url": "https://api.github.com/users/will-holley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/will-holley",
"id": 8657791,
"login": "will-holley",
"node_id": "MDQ6VXNlcjg2NTc3OTE=",
"organizations_url": "https://api.github.com/users/will-holley/orgs",
"received_events_url": "https://api.github.com/users/will-holley/received_events",
"repos_url": "https://api.github.com/users/will-holley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/will-holley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/will-holley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/will-holley",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6256/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6256/timeline
| null | null | true |
{
"diff_url": "https://github.com/psf/requests/pull/6256.diff",
"html_url": "https://github.com/psf/requests/pull/6256",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6256.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6256"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6255
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6255/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6255/comments
|
https://api.github.com/repos/psf/requests/issues/6255/events
|
https://github.com/psf/requests/issues/6255
| 1,401,998,263 |
I_kwDOABTKOs5TkMu3
| 6,255 |
Mention pickling in the docs for creating custom Transport Adapters
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9248891?v=4",
"events_url": "https://api.github.com/users/izabelakowal/events{/privacy}",
"followers_url": "https://api.github.com/users/izabelakowal/followers",
"following_url": "https://api.github.com/users/izabelakowal/following{/other_user}",
"gists_url": "https://api.github.com/users/izabelakowal/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/izabelakowal",
"id": 9248891,
"login": "izabelakowal",
"node_id": "MDQ6VXNlcjkyNDg4OTE=",
"organizations_url": "https://api.github.com/users/izabelakowal/orgs",
"received_events_url": "https://api.github.com/users/izabelakowal/received_events",
"repos_url": "https://api.github.com/users/izabelakowal/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/izabelakowal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/izabelakowal/subscriptions",
"type": "User",
"url": "https://api.github.com/users/izabelakowal",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-10-08T16:38:53Z
|
2022-10-08T16:38:53Z
| null |
NONE
| null |
While subclassing `HTTPAdapter` as well as `Session` the class variable `__attrs__` needs to be appended with any custom instance variables. Otherwise, the instance breaks during pickling, which can happen in many different scenarios - for example, during Django's `setUpTestData` deep copying/in-memory data isolation. I think it would be nice if this is mentioned in the documentation.
There's a classic example of a custom adapter for setting a timeout value that is mentioned in multiple blog posts. Unfortunately, all of these examples are essentially broken because of a lack of information about pickling and `__attrs__` class variable.
And yet the pattern of overriding `__attrs__` exists in many open source libs, for example:
https://github.com/requests/toolbelt/blob/master/requests_toolbelt/adapters/ssl.py#L46
https://github.com/docker/docker-py/blob/main/docker/transport/unixconn.py#L57
If this pattern is so commonly used and needed, it might be a good idea to add it to the docs. Again, this is because so many people can stumble upon this issue.
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6255/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6255/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6254
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6254/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6254/comments
|
https://api.github.com/repos/psf/requests/issues/6254/events
|
https://github.com/psf/requests/issues/6254
| 1,400,226,001 |
I_kwDOABTKOs5TdcDR
| 6,254 |
python context.verify_mode is ignored by requests module
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16211463?v=4",
"events_url": "https://api.github.com/users/revit13/events{/privacy}",
"followers_url": "https://api.github.com/users/revit13/followers",
"following_url": "https://api.github.com/users/revit13/following{/other_user}",
"gists_url": "https://api.github.com/users/revit13/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/revit13",
"id": 16211463,
"login": "revit13",
"node_id": "MDQ6VXNlcjE2MjExNDYz",
"organizations_url": "https://api.github.com/users/revit13/orgs",
"received_events_url": "https://api.github.com/users/revit13/received_events",
"repos_url": "https://api.github.com/users/revit13/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/revit13/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/revit13/subscriptions",
"type": "User",
"url": "https://api.github.com/users/revit13",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2022-10-06T19:57:23Z
|
2023-04-14T18:12:40Z
| null |
NONE
| null |
In the following code the response contains ssl error `SSL: CERTIFICATE_VERIFY_FAILED` although the default verify_mode `ssl.CERT_NONE` is set in the context by calling context=create_ssl_context() as hown below. I expected that I to get no ssl error.
It seems that `verify_mode` in the context is ignored by the requests module. It is not clear to me what attributes from the context are not ignored by the requests module? will it take context.minimum_version? Thanks
Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
```
def create_ssl_context(verify_mode=ssl.CERT_NONE,
key_file=None, cert_file=None,
cafile=None,
tls_min_version=None):
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode = verify_mode
if tls_min_version:
context.minimum_version = tls_min_version
if key_file or cert_file:
context.load_cert_chain(cert_file, key_file)
if cafile:
context.load_verify_locations(cafile)
else:
context.set_default_verify_paths()
return context
class SSLContextAdapter(requests.adapters.HTTPAdapter):
def __init__(self, ssl_context=None, **kwargs):
self.ssl_context = ssl_context
super().__init__(**kwargs)
def init_poolmanager(self, *args, **kwargs):
kwargs['ssl_context'] = self.ssl_context
return super(SSLContextAdapter, self).init_poolmanager(*args, **kwargs)
def client_side(context, hostname, data, headers):
s = requests.Session()
context = create_ssl_context()
s.mount('https://', SSLContextAdapter(context))
s.mount('http://', SSLContextAdapter(context))
print(context.verify_mode)
response = s.post(hostname, data=data, headers=headers)
print(response.text)
| null |
{
"+1": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/6254/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6254/timeline
| null | null | null | null | false |
[
"I identified the issue it is that the kwargs argument sends `verify` as True despite the adapter's verify_mode is is set to None.\r\nThe solution was to add a check to disable SSL certificate verification when the adapter's `ssl_context.verify_mode` is set to `ssl.CERT_NONE`, by setting the `verify` parameter to False in the `kwargs` argument.\r\nCheck the following [branch](https://github.com/eth7/requests/tree/fix-ssl-certification-validation-when-set-to-none)."
] |
https://api.github.com/repos/psf/requests/issues/6253
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6253/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6253/comments
|
https://api.github.com/repos/psf/requests/issues/6253/events
|
https://github.com/psf/requests/issues/6253
| 1,393,885,731 |
I_kwDOABTKOs5TFQIj
| 6,253 |
Response library in python give me back a wrong response status code when trying to request a JavaScript file
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52550328?v=4",
"events_url": "https://api.github.com/users/malekmahmed/events{/privacy}",
"followers_url": "https://api.github.com/users/malekmahmed/followers",
"following_url": "https://api.github.com/users/malekmahmed/following{/other_user}",
"gists_url": "https://api.github.com/users/malekmahmed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/malekmahmed",
"id": 52550328,
"login": "malekmahmed",
"node_id": "MDQ6VXNlcjUyNTUwMzI4",
"organizations_url": "https://api.github.com/users/malekmahmed/orgs",
"received_events_url": "https://api.github.com/users/malekmahmed/received_events",
"repos_url": "https://api.github.com/users/malekmahmed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/malekmahmed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/malekmahmed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/malekmahmed",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2022-10-02T20:15:56Z
|
2023-10-05T00:03:06Z
|
2022-10-04T04:11:13Z
|
NONE
|
resolved
|
<h3>Describe the bug</h3>
Hello,<br>
When I use the response library in python I get the wrong response status code but I get the right one when I use urllib.request
<br>Code Using Response library:
```
import requests
try:
r = requests.head("https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js")
print(r.status_code)
# prints the int of the status code. Find more at httpstatusrappers.com :)
except requests.ConnectionError:
print("failed to connect")
```
This URL `https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js` gives me back `404` status code even though it gives me 200 when I visit the URL in the browser and I can see the javascript response.
When I used the urllib.request library it gave back the right status code which is 200
Code Using urllib.request library:
```
from urllib.request import urlopen
urls = ['https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js','https://www.codecademy.com/idontexist.js']
results={}
for url in urls:
try:
ret = urlopen(url)
if ret.code == 200:
state="Exists"
print(url+' : {}'.format(state))
except:
state="Not exists"
print(url+' : {}'.format(state))
results[url]=state
```
<h3>Additional context</h3>
Maybe there are more situations where this happens than just JavaSript files I didn't try more URLs.
<h3>Version of responses</h3>
0.21.0
<h3>Steps to Reproduce</h3>
1- Go to this URL https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js in your browser and you will get a 200 response.
2- Run this code and you will get 404 not found
```
import requests
try:
r = requests.head("https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js")
print(r.status_code)
# prints the int of the status code. Find more at httpstatusrappers.com :)
except requests.ConnectionError:
print("failed to connect")
```
<h3>Expected Result</h3>
The code should have given back a 200 status code.
<h3>Actual Result</h3>
The code gives back 404 a status code.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6253/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6253/timeline
| null |
completed
| null | null | false |
[
"You are sending a HEAD request, change it to a GET request\r\n\r\n`r = requests.get(\"https://www.codecademy.com/cdn-cgi/challenge-platform/h/g/scripts/alpha/invisible.js\")`\r\n\r\nAlso you haven't even bothered to change your issue https://github.com/getsentry/responses/issues/591",
"Thanks, it's working now. If may I ask why HEAD doesn't give the right status code?",
"The server hasn't implemented consistent responses for different http methods. We aren't able to control this as it all happens server side.\n\nI'm going to resolve this as it's unrelated to Requests. If you have further questions, StackOverflow is likely the best place to check."
] |
https://api.github.com/repos/psf/requests/issues/6252
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6252/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6252/comments
|
https://api.github.com/repos/psf/requests/issues/6252/events
|
https://github.com/psf/requests/issues/6252
| 1,393,405,113 |
I_kwDOABTKOs5TDay5
| 6,252 |
Lib version for Python 3.4 ?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4154978?v=4",
"events_url": "https://api.github.com/users/Alexey-T/events{/privacy}",
"followers_url": "https://api.github.com/users/Alexey-T/followers",
"following_url": "https://api.github.com/users/Alexey-T/following{/other_user}",
"gists_url": "https://api.github.com/users/Alexey-T/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Alexey-T",
"id": 4154978,
"login": "Alexey-T",
"node_id": "MDQ6VXNlcjQxNTQ5Nzg=",
"organizations_url": "https://api.github.com/users/Alexey-T/orgs",
"received_events_url": "https://api.github.com/users/Alexey-T/received_events",
"repos_url": "https://api.github.com/users/Alexey-T/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Alexey-T/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Alexey-T/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Alexey-T",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-10-01T13:29:07Z
|
2023-10-02T00:03:17Z
|
2022-10-01T14:02:00Z
|
NONE
|
resolved
|
For CudaText editor with Python 3.4 on Windows XP, we need 'requests' for py 3.4.
Current version uses f-strings - not easy to fix all places. and it uses JSONDecodeError which is missing in py 3.4.
Pls help to find old release.
@spyrosmas needs it.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4154978?v=4",
"events_url": "https://api.github.com/users/Alexey-T/events{/privacy}",
"followers_url": "https://api.github.com/users/Alexey-T/followers",
"following_url": "https://api.github.com/users/Alexey-T/following{/other_user}",
"gists_url": "https://api.github.com/users/Alexey-T/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Alexey-T",
"id": 4154978,
"login": "Alexey-T",
"node_id": "MDQ6VXNlcjQxNTQ5Nzg=",
"organizations_url": "https://api.github.com/users/Alexey-T/orgs",
"received_events_url": "https://api.github.com/users/Alexey-T/received_events",
"repos_url": "https://api.github.com/users/Alexey-T/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Alexey-T/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Alexey-T/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Alexey-T",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6252/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6252/timeline
| null |
completed
| null | null | false |
[
"Found on pypi."
] |
https://api.github.com/repos/psf/requests/issues/6251
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6251/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6251/comments
|
https://api.github.com/repos/psf/requests/issues/6251/events
|
https://github.com/psf/requests/issues/6251
| 1,393,080,071 |
I_kwDOABTKOs5TCLcH
| 6,251 |
Accept-Encoding header can't be completely removed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-30T22:19:54Z
|
2023-10-01T00:03:48Z
|
2022-09-30T22:33:59Z
|
CONTRIBUTOR
|
resolved
|
I am essentially reposting #5564 (which is similar to #5671) with more details, since it was closed as a question but it isn't a question. It's reporting a mismatch between what the user wanted/expected and what actually happened.
In one terminal tab, I ran this command
```sh
nc -l 8888
```
in another I ran this Python code:
```pycon
>>> import requests
>>> requests.get('http://localhost:8888')
```
Which sent this HTTP request:
```none
GET / HTTP/1.1
Host: localhost:8888
User-Agent: python-requests/2.28.0
Accept-Encoding: gzip, deflate, br
Accept: */*
Connection: keep-alive
```
Next, I tried modifying my Python to not send any headers, which [the documentation](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) says you can do like this:
> Sometimes you’ll want to omit session-level keys from a dict parameter. To do this, you simply set that key’s value to `None` in the method-level parameter. It will automatically be omitted.
So I ran this Python code
```pycon
requests.get('http://localhost:8888', headers={
'Host': None,
'User-Agent': None,
'Accept-Encoding': None,
'Accept': None,
'Connection': None
})
```
## Expected Result
I expected to see an HTTP request with no headers:
```
GET / HTTP/1.1
```
## Actual Result
The `Accept` and `Connection` headers are removed, the `Host` header is kept, but `Accept-Encoding` and `User-Agent` do weird things.
```
GET / HTTP/1.1
Host: localhost:8888
Accept-Encoding: identity
User-Agent: python-urllib3/1.26.9
```
The solution here is the same as #5671:
```py
import requests
import urllib3
requests.get('http://localhost:8888', headers={
'Host': urllib3.util.SKIP_HEADER,
'User-Agent': urllib3.util.SKIP_HEADER,
'Accept-Encoding': urllib3.util.SKIP_HEADER,
'Accept': None,
'Connection': None
})
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.6"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.0"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6251/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6251/timeline
| null |
completed
| null | null | false |
[
"Closing this since this is already known and there's even #5693"
] |
https://api.github.com/repos/psf/requests/issues/6250
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6250/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6250/comments
|
https://api.github.com/repos/psf/requests/issues/6250/events
|
https://github.com/psf/requests/issues/6250
| 1,391,512,671 |
I_kwDOABTKOs5S8Mxf
| 6,250 |
apparent_encoding should be cached since chardet can be slow
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/236970?v=4",
"events_url": "https://api.github.com/users/mlissner/events{/privacy}",
"followers_url": "https://api.github.com/users/mlissner/followers",
"following_url": "https://api.github.com/users/mlissner/following{/other_user}",
"gists_url": "https://api.github.com/users/mlissner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mlissner",
"id": 236970,
"login": "mlissner",
"node_id": "MDQ6VXNlcjIzNjk3MA==",
"organizations_url": "https://api.github.com/users/mlissner/orgs",
"received_events_url": "https://api.github.com/users/mlissner/received_events",
"repos_url": "https://api.github.com/users/mlissner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mlissner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mlissner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mlissner",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 3 |
2022-09-29T21:15:59Z
|
2022-09-30T11:33:01Z
| null |
CONTRIBUTOR
| null |
We have some scraper code that sometimes gets back PDFs and other times gets back HTML. Today we learned that if you access r.text in a large-ish PDF (40MB), chardet is called, which uses a lot of CPU (and a ton of memory):
```
r = requests.get(some_url)
r.text
```
That's more or less fine (best not to try to get the text of a PDF this way), but if you access `r.text` more than once, chardet gets run over and over.
We have code like this that performs horribly:
```
r = requests.get(some_url)
if bad_text in r.text:
continue
if other_bad_text in r.text:
continue
# ...many more tests...
```
When you access `r.text`, it checks if the encoding can come from the HTTP headers. If not, it runs the `apparent_encoding` property, which looks like:
```
@property
def apparent_encoding(self):
"""The apparent encoding, provided by the charset_normalizer or chardet libraries."""
return chardet.detect(self.content)["encoding"]
```
I think that property should probably be cached since it's slow, so that repeated calls to r.text don't hurt so badly.
## Expected Result
I expected the calls to the text property to only calculate the encoding once per request.
## Actual Result
Each call to the text property re-calculates the encoding, which is slow and uses a lot of memory (this is probably a bug in chardet, but it uses hundreds of MB on a 40MB PDF right now).
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "5.0.0"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": "36.0.2"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.10.7"
},
"platform": {
"release": "5.4.209-116.363.amzn2.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "101010ef",
"version": "20.0.1"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.5"
},
"using_charset_normalizer": false,
"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/6250/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6250/timeline
| null | null | null | null | false |
[
"You can do this today by setting `r.encoding = r.apparent_encoding` ",
"Yeah, or by overriding the `text` or `apparent_encoding` methods. All of those approaches feel like workarounds though, right — or are you suggesting that the `apparent_encoding` method should set the `encoding` property when it finishes, and that could serve as the cache?\r\n\r\nOne other thought, I noticed that the `content` method actually has caching. Maybe instead of caching the `apparent_encoding` property, the `text` property should be cached to parallel how the the `content` one is.",
"No, I'm saying that while character detection can be slow, it usually isn't. If it's speed is a problem, the documented way if avoiding it is to set the encoding attribute yourself. This is you want it cached, set the encoding attribute yourself. It's easy and available today"
] |
https://api.github.com/repos/psf/requests/issues/6249
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6249/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6249/comments
|
https://api.github.com/repos/psf/requests/issues/6249/events
|
https://github.com/psf/requests/issues/6249
| 1,390,925,104 |
I_kwDOABTKOs5S59Uw
| 6,249 |
Requests stops parsing of headers after illegal space in header name.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33023300?v=4",
"events_url": "https://api.github.com/users/JannisBush/events{/privacy}",
"followers_url": "https://api.github.com/users/JannisBush/followers",
"following_url": "https://api.github.com/users/JannisBush/following{/other_user}",
"gists_url": "https://api.github.com/users/JannisBush/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JannisBush",
"id": 33023300,
"login": "JannisBush",
"node_id": "MDQ6VXNlcjMzMDIzMzAw",
"organizations_url": "https://api.github.com/users/JannisBush/orgs",
"received_events_url": "https://api.github.com/users/JannisBush/received_events",
"repos_url": "https://api.github.com/users/JannisBush/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JannisBush/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JannisBush/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JannisBush",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-09-29T13:57:56Z
|
2023-10-01T00:03:49Z
|
2022-09-29T15:57:29Z
|
NONE
|
resolved
|
Spaces are not allowed in header names: https://www.rfc-editor.org/rfc/rfc9112.html#name-field-line-parsing
When requests encounters such invalid header names, it will not only throw away the invalid header, but also stops parsing all following headers.
When the invalid header comes before headers such as `Content-Length`, this can lead to requests getting stuck indefinitely.
## Expected Result
Requests ignores the invalid header (or shows/fixes it; the RFC is only defining behavior for servers and proxies, it is unclear what the correct behavior for clients is and different clients behave differently) and continues parsing of the response.
## Actual Result
Requests ignores the invalid header and all headers after the invalid one. This can lead to requests getting stuck.
## Reproduction Steps
- `pip install wptserve`: server that allows us to send invalid responses
- `python test.py`
`test.py`:
```python
import wptserve
from wptserve.handlers import handler, as_is_handler
import requests
from requests.exceptions import ConnectionError
import subprocess
http1 = wptserve.WebTestHttpd(port=8081,
routes=[("*", "*.asis", as_is_handler)],
use_ssl=False,
key_file=None,
certificate=None,
)
http1.start()
@handler
def space_after_length(request, response):
return 200, [("Content-Length", 14), ("SPACE ",'space'), ("hidden", "hidden")], '<div>ABC</div>'
http1.router.register("*", "/space_after_length", space_after_length)
@handler
def space_first(request, response):
return 200, [("SPACE ",'space'), ("Content-Length", 14), ("hidden", "hidden")], '<div>ABC</div>'
http1.router.register("*", "/space_first", space_first)
for path in ["/space_first", "/space_after_length"]:
url = f"http://localhost:8081{path}"
curl = subprocess.check_output(["curl", "-s", "-I", url]).decode("utf-8")
try:
r = requests.get(url, timeout=1)
# r = requests.get(url) # Stuck forever
headers = r.headers
except ConnectionError:
headers = "Hangs forever or timeout"
finally:
print(f"{path}\ncurl output:\n{curl}requests output:\n{headers}\n")
```
`Output`:
```
/space_first
curl output:
HTTP/1.1 200 OK
SPACE : space
Content-Length: 14
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:58 GMT
requests output:
Hangs forever or timeout
/space_after_length
curl output:
HTTP/1.1 200 OK
Content-Length: 14
SPACE : space
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:59 GMT
requests output:
{'Content-Length': '14'}
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.6"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6249/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6249/timeline
| null |
completed
| null | null | false |
[
"I'm 99% certain this has been reported before and has in fact a problem with http.client which we depend on, not requests.\n\nIn the future, please search **closed and** open issues before creating new ones that are duplicates.",
"I had searched for this issue including closed ones and could not find any duplicates.\r\nAfter searching again, I now found a corresponding issue with a rather non-informative name: https://github.com/psf/requests/issues/3133\r\n\r\nIndeed, it is a problem of http.client and is rather unlikely to get fixed anytime soon: https://github.com/python/cpython/issues/69725\r\n"
] |
https://api.github.com/repos/psf/requests/issues/6248
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6248/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6248/comments
|
https://api.github.com/repos/psf/requests/issues/6248/events
|
https://github.com/psf/requests/issues/6248
| 1,390,004,728 |
I_kwDOABTKOs5S2cn4
| 6,248 |
`requests.utils._parse_content_type_header` gives the wrong value when multiple headers with the same name are present.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/103742086?v=4",
"events_url": "https://api.github.com/users/iulian-birlica/events{/privacy}",
"followers_url": "https://api.github.com/users/iulian-birlica/followers",
"following_url": "https://api.github.com/users/iulian-birlica/following{/other_user}",
"gists_url": "https://api.github.com/users/iulian-birlica/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/iulian-birlica",
"id": 103742086,
"login": "iulian-birlica",
"node_id": "U_kgDOBi76hg",
"organizations_url": "https://api.github.com/users/iulian-birlica/orgs",
"received_events_url": "https://api.github.com/users/iulian-birlica/received_events",
"repos_url": "https://api.github.com/users/iulian-birlica/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/iulian-birlica/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/iulian-birlica/subscriptions",
"type": "User",
"url": "https://api.github.com/users/iulian-birlica",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2022-09-28T22:16:12Z
|
2023-11-26T20:27:09Z
| null |
NONE
| null |
<!-- Summary. -->
The http rfc (specifically [section 4.2)](https://www.rfc-editor.org/rfc/rfc2616#section-4.2) allows multiple headers with the same name to be present, granted that they can be collapsed into a single header with comma separated values.
When encountered with a response containing these headers:
```
Content-Type: text/html; charset=UTF-8
Content-Type: text/javascript
```
requests parses them into a single dictionary value:
```
{'Content-Type': 'text/html; charset=UTF-8, text/javascript', ...}
```
but `requests.utils._parse_content_type_header` parses it wrong, by assuming that charset is `UTF-8, text/javascript`, instead of `UTF-8`
<!-- What you expected. -->
I expected requests to give the correct encoding, or at least one of the encodings from the two headers, preferably the first, `UTF-8`.
<!-- What happened instead. -->
I get the encoding for the response set to `UTF-8, text/javascript`
## Reproduction Steps
```python
import requests
res = requests.get("url-that-responds-with-two-content-headers")
print(res.encoding)
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "4.0.0"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": "36.0.2"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "4.9.0-16-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "101010ef",
"version": "20.0.1"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101000cf"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": false,
"using_pyopenssl": true
}
```
Seeing that converting the `dict` to a `list` would be much more trouble, my proposed fix is to ignore characters after the first comma. `requests.utils._parse_content_type_header` would start with `tokens = header.split(',')[0].split(";")`.
I can make a PR, if this bug is deemed true and if that is the solution.
| 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/6248/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6248/timeline
| null | null | null | null | false |
[
"A few things:\n\n1. I don't believe that requests is responsible for collapsing the headers here. I think one of our dependencies needs to be more careful with folding. \n\n1. Two Content-Type headers are not foldable if my memory serves correctly nor are the semantics of two Content-Type headers defined. Your assumption that utf8 is correct here is undefined behavior to the best of my knowledge. There's no clarity on this case\n\n```\nContent-Type: text/html; charset=cp-1252\nContent-Type: text/plain; charset=utf-8\n```\n\nWhich is the correct content type header? Those charsets are not compatible entirely. The server is sending mixed signals and shouldn't be sending two.\n\nIf we attempt to solve this, how do we handle `N` charsets from `M` Content-Type headers? Which one should be picked?\n\nI agree currently it's not great but I don't think we should try to define behavior arbitrarily because that's going to break someone else. I would prefer we raise an exception if we can detect this case but that's slightly backwards incompatible as this might \"Just Work\" if the headers were reversed in the order it sends them. ",
"Perhaps a warning could be raised instead? This is both backwards compatible and the warning message can describe the sunsetting of this behaviour with the exception-raising behaviour being introduced in a future version?"
] |
https://api.github.com/repos/psf/requests/issues/6247
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6247/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6247/comments
|
https://api.github.com/repos/psf/requests/issues/6247/events
|
https://github.com/psf/requests/issues/6247
| 1,386,211,370 |
I_kwDOABTKOs5Sn-gq
| 6,247 |
requests.delete does not support body parameter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/96174332?v=4",
"events_url": "https://api.github.com/users/aamir-remotebaser/events{/privacy}",
"followers_url": "https://api.github.com/users/aamir-remotebaser/followers",
"following_url": "https://api.github.com/users/aamir-remotebaser/following{/other_user}",
"gists_url": "https://api.github.com/users/aamir-remotebaser/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aamir-remotebaser",
"id": 96174332,
"login": "aamir-remotebaser",
"node_id": "U_kgDOBbuA_A",
"organizations_url": "https://api.github.com/users/aamir-remotebaser/orgs",
"received_events_url": "https://api.github.com/users/aamir-remotebaser/received_events",
"repos_url": "https://api.github.com/users/aamir-remotebaser/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aamir-remotebaser/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aamir-remotebaser/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aamir-remotebaser",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-26T14:44:40Z
|
2023-09-27T00:03:16Z
|
2022-09-26T19:56:52Z
|
NONE
|
resolved
|
Requests is not accepting feature requests at this time.
I just figured out that delete method does not support data payload
I have a requirement in my project that accepts json data in delete
It actually supports in other http clients like axios for frontend but not this one when I am using with Flask
Can you please add this feature ASAP.
|
{
"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/6247/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6247/timeline
| null |
completed
| null | null | false |
[
"Per HTTP RFC's, DELETE with a body has no defined semantics and should be avoided which is the same reasoning we don't support it natively. You can always pass `\"DELETE\"` and a `body` to the `request()` method yourself."
] |
https://api.github.com/repos/psf/requests/issues/6246
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6246/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6246/comments
|
https://api.github.com/repos/psf/requests/issues/6246/events
|
https://github.com/psf/requests/issues/6246
| 1,382,571,199 |
I_kwDOABTKOs5SaFy_
| 6,246 |
authentication via netrc has a different outcome than auth argument
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3383837?v=4",
"events_url": "https://api.github.com/users/itcarroll/events{/privacy}",
"followers_url": "https://api.github.com/users/itcarroll/followers",
"following_url": "https://api.github.com/users/itcarroll/following{/other_user}",
"gists_url": "https://api.github.com/users/itcarroll/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/itcarroll",
"id": 3383837,
"login": "itcarroll",
"node_id": "MDQ6VXNlcjMzODM4Mzc=",
"organizations_url": "https://api.github.com/users/itcarroll/orgs",
"received_events_url": "https://api.github.com/users/itcarroll/received_events",
"repos_url": "https://api.github.com/users/itcarroll/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/itcarroll/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/itcarroll/subscriptions",
"type": "User",
"url": "https://api.github.com/users/itcarroll",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] | null | 3 |
2022-09-22T14:41:42Z
|
2023-12-20T16:12:50Z
|
2023-12-03T01:51:37Z
|
NONE
| null |
NASA Earthdata uses basic authentication and cookies to respond to GET requests. When I use a `Session()` in combination with a `~/.netrc` file, the session object holds the cookies and everything works. When I use a `Session()` but supply my credentials with the `auth` argument, the session cannot hold its cookies. Authentication failure results. It would be great if the `auth` argument could do whatever the session does for netrc authentication.
To reproduce, you will have to have to follow these instructions for a free account: https://disc.gsfc.nasa.gov/earthdata-login
## Expected Result
```
<Response [200]>
```
## Actual Result
```
<Response [401]>
```
## Reproduction Steps
Have a NASA Earthdata account with `<USERNAME>` and `<PASSWORD>` stored in a text file at `~/.netrc` with permissions `-rw-------` and containing the line:
```
machine urs.earthdata.nasa.gov login <USERNAME> password <PASSWORD>
```
The following returns the expected result
```python
from requests import Session
resource = 'https://reason.gesdisc.eosdis.nasa.gov/data/nobm/NOBM_DAY.R2017/2015/day20151201.R2017.nc4'
with Session() as session:
response = session.get(resource)
response
```
The following returns the actual result
```python
from requests import Session
resource = 'https://reason.gesdisc.eosdis.nasa.gov/data/nobm/NOBM_DAY.R2017/2015/day20151201.R2017.nc4'
with Session() as session:
response = session.get(resource, auth=('<USERNAME>', '<PASSWORD>'))
response
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": "38.0.1"
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.10.6"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "30000050",
"version": "22.0.0"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"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/3383837?v=4",
"events_url": "https://api.github.com/users/itcarroll/events{/privacy}",
"followers_url": "https://api.github.com/users/itcarroll/followers",
"following_url": "https://api.github.com/users/itcarroll/following{/other_user}",
"gists_url": "https://api.github.com/users/itcarroll/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/itcarroll",
"id": 3383837,
"login": "itcarroll",
"node_id": "MDQ6VXNlcjMzODM4Mzc=",
"organizations_url": "https://api.github.com/users/itcarroll/orgs",
"received_events_url": "https://api.github.com/users/itcarroll/received_events",
"repos_url": "https://api.github.com/users/itcarroll/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/itcarroll/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/itcarroll/subscriptions",
"type": "User",
"url": "https://api.github.com/users/itcarroll",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6246/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6246/timeline
| null |
completed
| null | null | false |
[
"Maybe HTTPBasicAuth helps.. Try: \r\n\r\nfrom requests.auth import HTTPBasicAuth\r\nauth = HTTPBasicAuth(username, password\r\n",
"Ah, my problem was actually #2949.",
"For future reference, here is a workaround. I still think it's better to use a netrc file, but if you really want to avoid it...\r\n\r\n```python\r\nclass EarthdataSession(Session):\r\n\r\n def should_strip_auth(self, old_url, new_url):\r\n parsed_url = urlparse(new_url)\r\n if parsed_url.hostname == \"urs.earthdata.nasa.gov\":\r\n return False\r\n else:\r\n return super().should_strip_auth(old_url, new_url)\r\n```\r\n\r\nUse in place of `Session`."
] |
https://api.github.com/repos/psf/requests/issues/6245
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6245/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6245/comments
|
https://api.github.com/repos/psf/requests/issues/6245/events
|
https://github.com/psf/requests/issues/6245
| 1,382,483,856 |
I_kwDOABTKOs5SZweQ
| 6,245 |
Cookie having a Domain cookie-attribute with empty string fails to be added to the cookie jar
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/95308897?v=4",
"events_url": "https://api.github.com/users/ecclejau/events{/privacy}",
"followers_url": "https://api.github.com/users/ecclejau/followers",
"following_url": "https://api.github.com/users/ecclejau/following{/other_user}",
"gists_url": "https://api.github.com/users/ecclejau/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ecclejau",
"id": 95308897,
"login": "ecclejau",
"node_id": "U_kgDOBa5MYQ",
"organizations_url": "https://api.github.com/users/ecclejau/orgs",
"received_events_url": "https://api.github.com/users/ecclejau/received_events",
"repos_url": "https://api.github.com/users/ecclejau/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ecclejau/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ecclejau/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ecclejau",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2022-09-22T13:46:49Z
|
2023-04-15T13:27:10Z
| null |
NONE
| null |
<!-- Summary. -->
Using requests to access an API hosted on an application server we noticed that cookies were not added to the cookie jar in the session.
It seems that after an upgrade to the application server framework it adds a `domain=;` cookie-attribute to the cookies in the response.
## Expected Result
The cookie to be added to the jar
## Actual Result
The cookie is dropped.
## Reproduction Steps
```python
import unittest
from typing import Tuple
from unittest.mock import MagicMock
import requests
from hamcrest import assert_that, has_length
class TestMissingSessionCookieIssue(unittest.TestCase):
@staticmethod
def __make_mocks(cookie_header_value: str) -> Tuple[MagicMock, MagicMock]:
message = MagicMock()
message.get_all.side_effect = [[], [cookie_header_value]]
response = MagicMock()
response.info.return_value = message
request = MagicMock()
request.get_full_url.return_value = "http://localhost:1234/page"
request.origin_req_host = "localhost"
return request, response
def test_cookie_with_no_domain(self) -> None:
request, response = self.__make_mocks("SESSION_ID=12345678; HttpOnly; Path=/page; SameSite=Strict")
session = requests.session()
session.cookies.extract_cookies(response, request)
assert_that(session.cookies, has_length(1))
def test_cookie_with_empty_domain(self) -> None:
request, response = self.__make_mocks("SESSION_ID=12345678; domain=; path=/page; samesite=strict; httponly")
session = requests.session()
session.cookies.extract_cookies(response, request)
assert_that(session.cookies, has_length(1))
```
Requirements:
* `PyHamcrest==2.0.2`
* `requests==2.28.1`
* Python 3.9
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.5"
},
"platform": {
"release": "5.14.0-1052-oem",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
| null |
{
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6245/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6245/timeline
| null | null | null | null | false |
[
"\r\nThe issue is that the `set_ok_domain` function from the `DefaultCookiePolicy` from the `cookiejar` library does not allow a mismatch between request host and cookie domain.\r\nIn this code snippet below, the `set_ok` method has been overridden to always return `True`, effectively allowing any cookie to be set regardless of the request host and cookie domain match.\r\nIt's important to keep in mind that this should not be used in production.\r\nYou can however verify that it is indeed the `DefaultCookiePolicy`, which prevents such use-cases, as the empty string in the domain.\r\n\r\n\r\n```python\r\nimport requests\r\nfrom http import cookiejar\r\n\r\n\r\nclass DangerouslyAllowEverything(cookiejar.CookiePolicy):\r\n def set_ok(self, *args, **kwargs):\r\n return True\r\n\r\n netscape = True\r\n rfc2965 = False\r\n\r\n\r\nsession = requests.session()\r\nsession.cookies.set_policy(DangerouslyAllowEverything())\r\nresponse = session.get(\"http://localhost\")\r\n```\r\n"
] |
https://api.github.com/repos/psf/requests/issues/6244
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6244/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6244/comments
|
https://api.github.com/repos/psf/requests/issues/6244/events
|
https://github.com/psf/requests/pull/6244
| 1,382,365,379 |
PR_kwDOABTKOs4_bNsU
| 6,244 |
Fix bug, the encoding argument should be passed by keyword in func op…
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-22T12:25:46Z
|
2023-10-07T00:03:14Z
|
2022-10-06T03:23:51Z
|
NONE
|
resolved
|
Issue #6242
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6244/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6244/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6244.diff",
"html_url": "https://github.com/psf/requests/pull/6244",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6244.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6244"
}
| true |
[
"> This change is not necessary. `open()` function was imported from `codecs` module and is used correctly. Check out function definition in [codecs official docs](https://docs.python.org/3/library/codecs.html#codecs.open)\r\n\r\nThanks for your comments. I don't check the definition of open function. You're right. "
] |
https://api.github.com/repos/psf/requests/issues/6243
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6243/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6243/comments
|
https://api.github.com/repos/psf/requests/issues/6243/events
|
https://github.com/psf/requests/pull/6243
| 1,382,361,785 |
PR_kwDOABTKOs4_bM8D
| 6,243 |
Fix bug, the encoding argument should be passed by keyword in open()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-09-22T12:23:01Z
|
2023-09-23T00:03:04Z
|
2022-09-22T12:24:33Z
|
NONE
|
resolved
|
Issue #6242
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6243/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6243/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6243.diff",
"html_url": "https://github.com/psf/requests/pull/6243",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6243.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6243"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6242
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6242/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6242/comments
|
https://api.github.com/repos/psf/requests/issues/6242/events
|
https://github.com/psf/requests/issues/6242
| 1,382,324,349 |
I_kwDOABTKOs5SZJh9
| 6,242 |
setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-22T11:55:13Z
|
2023-10-02T00:03:18Z
|
2022-10-01T12:12:12Z
|
NONE
|
resolved
|
<!-- Summary. -->
## This bug does not affect usage, but it does exist
the bug code is in the "setup.py" file, line 78
here is code:
```python
with open(os.path.join(here, "requests", "__version__.py"), "r", "utf-8") as f:
exec(f.read(), about)
```
## It's an issue about function open()
I got this from Python Documentation
```python
open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
```
The argument ```"utf-8"``` should be passing by ```keyword```, but actually it's passed by ```position```,
and the third argument is ```buffering```(a int) .
So the system throws an ```TypeError```: 'str' object cannot be interpreted as an integer
## Fix
```python
with open(os.path.join(here, "requests", "__version__.py"), "r", encoding="utf-8") as f:
exec(f.read(), about)
```
## Reproduction Steps
open any file with the code, you will get the TypeError.
## System Information
TypeError: 'str' object cannot be interpreted as an integer
```python
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "requests", "__version__.py"), "r", "utf-8") as f:
exec(f.read(), about)
```
<!-- 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/20216049?v=4",
"events_url": "https://api.github.com/users/lucas-ccc/events{/privacy}",
"followers_url": "https://api.github.com/users/lucas-ccc/followers",
"following_url": "https://api.github.com/users/lucas-ccc/following{/other_user}",
"gists_url": "https://api.github.com/users/lucas-ccc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucas-ccc",
"id": 20216049,
"login": "lucas-ccc",
"node_id": "MDQ6VXNlcjIwMjE2MDQ5",
"organizations_url": "https://api.github.com/users/lucas-ccc/orgs",
"received_events_url": "https://api.github.com/users/lucas-ccc/received_events",
"repos_url": "https://api.github.com/users/lucas-ccc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucas-ccc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucas-ccc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucas-ccc",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6242/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6242/timeline
| null |
completed
| null | null | false |
[
"The function `open()` used in this context was imported from `codecs` and is not the built-in `open()` function in Python itself.\r\n`codecs.open(filename, mode='r', encoding=None, errors='strict', buffering=- 1)` , from [codecs official documentations](https://docs.python.org/3/library/codecs.html#codecs.open) "
] |
https://api.github.com/repos/psf/requests/issues/6241
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6241/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6241/comments
|
https://api.github.com/repos/psf/requests/issues/6241/events
|
https://github.com/psf/requests/issues/6241
| 1,376,795,296 |
I_kwDOABTKOs5SEDqg
| 6,241 |
Please help
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/85212372?v=4",
"events_url": "https://api.github.com/users/butogon/events{/privacy}",
"followers_url": "https://api.github.com/users/butogon/followers",
"following_url": "https://api.github.com/users/butogon/following{/other_user}",
"gists_url": "https://api.github.com/users/butogon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/butogon",
"id": 85212372,
"login": "butogon",
"node_id": "MDQ6VXNlcjg1MjEyMzcy",
"organizations_url": "https://api.github.com/users/butogon/orgs",
"received_events_url": "https://api.github.com/users/butogon/received_events",
"repos_url": "https://api.github.com/users/butogon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/butogon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/butogon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/butogon",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-09-17T15:00:12Z
|
2023-09-18T00:03:06Z
|
2022-09-17T15:09:20Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6241/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6241/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6240
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6240/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6240/comments
|
https://api.github.com/repos/psf/requests/issues/6240/events
|
https://github.com/psf/requests/issues/6240
| 1,375,783,523 |
I_kwDOABTKOs5SAMpj
| 6,240 |
backport chardet fix for Py3.6 & release 2.27.2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1330696?v=4",
"events_url": "https://api.github.com/users/mr-c/events{/privacy}",
"followers_url": "https://api.github.com/users/mr-c/followers",
"following_url": "https://api.github.com/users/mr-c/following{/other_user}",
"gists_url": "https://api.github.com/users/mr-c/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mr-c",
"id": 1330696,
"login": "mr-c",
"node_id": "MDQ6VXNlcjEzMzA2OTY=",
"organizations_url": "https://api.github.com/users/mr-c/orgs",
"received_events_url": "https://api.github.com/users/mr-c/received_events",
"repos_url": "https://api.github.com/users/mr-c/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mr-c/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mr-c/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mr-c",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-16T10:57:39Z
|
2023-09-17T00:03:14Z
|
2022-09-16T11:58:28Z
|
NONE
|
resolved
|
Please backport https://github.com/psf/requests/pull/6179 and make a new release supporting Python 3.6 users.
I know that it is EOL, but https://github.com/common-workflow-language/schema_salad/ and others still have to support Python 3.6.
Thanks,
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6240/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6240/timeline
| null |
completed
| null | null | false |
[
"We don't backport fixes for things we've dropped support for. We simply don't have the time"
] |
https://api.github.com/repos/psf/requests/issues/6239
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6239/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6239/comments
|
https://api.github.com/repos/psf/requests/issues/6239/events
|
https://github.com/psf/requests/issues/6239
| 1,374,667,041 |
I_kwDOABTKOs5R78Eh
| 6,239 |
Mount
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/101666465?v=4",
"events_url": "https://api.github.com/users/SUDDSDUDDS/events{/privacy}",
"followers_url": "https://api.github.com/users/SUDDSDUDDS/followers",
"following_url": "https://api.github.com/users/SUDDSDUDDS/following{/other_user}",
"gists_url": "https://api.github.com/users/SUDDSDUDDS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SUDDSDUDDS",
"id": 101666465,
"login": "SUDDSDUDDS",
"node_id": "U_kgDOBg9OoQ",
"organizations_url": "https://api.github.com/users/SUDDSDUDDS/orgs",
"received_events_url": "https://api.github.com/users/SUDDSDUDDS/received_events",
"repos_url": "https://api.github.com/users/SUDDSDUDDS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SUDDSDUDDS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SUDDSDUDDS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SUDDSDUDDS",
"user_view_type": "public"
}
|
[
{
"color": "d16014",
"default": false,
"description": "",
"id": 2392364523,
"name": "spam",
"node_id": "MDU6TGFiZWwyMzkyMzY0NTIz",
"url": "https://api.github.com/repos/psf/requests/labels/spam"
}
] |
closed
| true | null |
[] | null | 0 |
2022-09-15T14:56:57Z
|
2022-09-15T15:12:10Z
|
2022-09-15T15:11:50Z
|
NONE
| null |
<!-- Summary. -->
## Expected Result
<!-- What you expected. -->
## Actual Result
<!-- What happened instead. -->
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```json
{
"paste": "here"
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6239/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6239/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6238
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6238/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6238/comments
|
https://api.github.com/repos/psf/requests/issues/6238/events
|
https://github.com/psf/requests/issues/6238
| 1,374,478,536 |
I_kwDOABTKOs5R7ODI
| 6,238 |
LookupDict does not implement full contract of the dict class
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1168419?v=4",
"events_url": "https://api.github.com/users/michal-klimek/events{/privacy}",
"followers_url": "https://api.github.com/users/michal-klimek/followers",
"following_url": "https://api.github.com/users/michal-klimek/following{/other_user}",
"gists_url": "https://api.github.com/users/michal-klimek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michal-klimek",
"id": 1168419,
"login": "michal-klimek",
"node_id": "MDQ6VXNlcjExNjg0MTk=",
"organizations_url": "https://api.github.com/users/michal-klimek/orgs",
"received_events_url": "https://api.github.com/users/michal-klimek/received_events",
"repos_url": "https://api.github.com/users/michal-klimek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michal-klimek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michal-klimek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michal-klimek",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2022-09-15T12:48:54Z
|
2022-10-07T15:10:36Z
| null |
NONE
| null |
`LookupDict` absolutely includes all of the dict methods. In particular, it allows the use of `__setitem__` and other things from the dict class. It specifically does only one thing, which is override `__getitem__` to allow returning `None`.
So it's not ok to replace the dict with `object` in this case, even though the requests codebase doesn't use that functionality.
Thanks for reporting this issue though, and I hope you keep reading through the codebase!
_Originally posted by @Lukasa in https://github.com/psf/requests/issues/3848#issuecomment-277197592_
This is unfortunately a false statement. Take a look on the following checks:
```
In [1]: from requests.status_codes import codes
In [2]: codes
Out[2]: <lookup 'status_codes'>
In [3]: codes.keys()
Out[3]: dict_keys([])
In [4]: list(codes.keys())
Out[4]: []
```
If `LookupDict` pretends to quack like a duck it should do so. Or it should not derive from the `dict` if it works even worse:
```
In [8]: from requests.status_codes import codes
In [9]: codes["my_code"] = 700
In [10]: list(codes.keys())
Out[10]: ['my_code']
In [11]: codes["my_code"]
In [12]:
```
| 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/6238/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6238/timeline
| null | null | null | null | false |
[
"@Lukasa , @sigmavirus24 \r\n`LookupDict` object inherits `dict` object , so it's basically a dictionary. However, when setting a key to a value like `codes[\"my_code\"] = 700` from @michal-klimek example, that key is inaccessible because `__getitem__` and `get` methods have been overridden only to access the object's attributes.\r\nTo resolve this issue, we can override the `__setitem__` to write key-value pairs to object's attributes or `__dict__`.\r\nDo you agree with this solution?",
"1. It doesn't really need to be a dictionary\n1. I don't believe we intended the dictionary to be extendable\n1. If we did want it to be extendable, we'd have made a good API to allow for that "
] |
https://api.github.com/repos/psf/requests/issues/6237
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6237/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6237/comments
|
https://api.github.com/repos/psf/requests/issues/6237/events
|
https://github.com/psf/requests/pull/6237
| 1,368,938,993 |
PR_kwDOABTKOs4-u9uG
| 6,237 |
Improved documentation of exceptions in api.rst
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/73895101?v=4",
"events_url": "https://api.github.com/users/mhayworth/events{/privacy}",
"followers_url": "https://api.github.com/users/mhayworth/followers",
"following_url": "https://api.github.com/users/mhayworth/following{/other_user}",
"gists_url": "https://api.github.com/users/mhayworth/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mhayworth",
"id": 73895101,
"login": "mhayworth",
"node_id": "MDQ6VXNlcjczODk1MTAx",
"organizations_url": "https://api.github.com/users/mhayworth/orgs",
"received_events_url": "https://api.github.com/users/mhayworth/received_events",
"repos_url": "https://api.github.com/users/mhayworth/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mhayworth/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mhayworth/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mhayworth",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-09-11T12:57:23Z
|
2022-09-11T12:57:23Z
| null |
NONE
| null |
Added use cases and inheritance information for the common types of exceptions that are listed in docs/api.rst. Documentation already exists for the main interface, request sessions, and lower-level classes on the website, so those may want to be moved into api.rst as well for consistent formatting. Alternatively, this information could also be chosen to move to the website. I am open to any changes we might want to make to improve this documentation and help users better understand the exceptions their code may be throwing.
| 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/6237/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6237/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6237.diff",
"html_url": "https://github.com/psf/requests/pull/6237",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6237.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6237"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6236
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6236/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6236/comments
|
https://api.github.com/repos/psf/requests/issues/6236/events
|
https://github.com/psf/requests/pull/6236
| 1,367,491,400 |
PR_kwDOABTKOs4-qVCh
| 6,236 |
ci: add minimum GitHub token permissions for workflows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/100655670?v=4",
"events_url": "https://api.github.com/users/ashishkurmi/events{/privacy}",
"followers_url": "https://api.github.com/users/ashishkurmi/followers",
"following_url": "https://api.github.com/users/ashishkurmi/following{/other_user}",
"gists_url": "https://api.github.com/users/ashishkurmi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ashishkurmi",
"id": 100655670,
"login": "ashishkurmi",
"node_id": "U_kgDOBf_iNg",
"organizations_url": "https://api.github.com/users/ashishkurmi/orgs",
"received_events_url": "https://api.github.com/users/ashishkurmi/received_events",
"repos_url": "https://api.github.com/users/ashishkurmi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ashishkurmi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ashishkurmi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ashishkurmi",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-09T08:42:04Z
|
2024-01-12T00:03:27Z
|
2023-01-11T22:06:54Z
|
CONTRIBUTOR
|
resolved
|
### Description
This PR adds minimum token permissions for the GITHUB_TOKEN in GitHub Actions workflows using https://github.com/step-security/secure-workflows.
The GitHub Actions workflow has a GITHUB_TOKEN with write access to multiple scopes.
Here is an example of the permissions in one of the workflow runs:
https://github.com/psf/requests/runs/8179910695?check_suite_focus=true#step:1:19
After this change, the scopes will be reduced to the minimum needed for the following workflows:
- codeql-analysis.yml
- lint.yml
- run-tests.yml
The following workflow already has the least privileged token permission set:
- lock-issues.yml
### Motivation and Context
- This is a security best practice, so if the GITHUB_TOKEN is compromised due to a vulnerability or compromised Action, the damage will be reduced.
- GitHub recommends defining minimum GITHUB_TOKEN permissions.
https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
- The Open Source Security Foundation (OpenSSF) [Scorecards](https://github.com/ossf/scorecard) also treats not setting token permissions as a high-risk issue. This change will help increase the Scorecard score for this repository.
Signed-off-by: Ashish Kurmi <[email protected]>
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6236/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6236/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6236.diff",
"html_url": "https://github.com/psf/requests/pull/6236",
"merged_at": "2023-01-11T22:06:54Z",
"patch_url": "https://github.com/psf/requests/pull/6236.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6236"
}
| true |
[
"@nateprewitt / @theGOTOguy / @sigmavirus24 : could you please review this PR?"
] |
https://api.github.com/repos/psf/requests/issues/6235
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6235/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6235/comments
|
https://api.github.com/repos/psf/requests/issues/6235/events
|
https://github.com/psf/requests/issues/6235
| 1,364,419,722 |
I_kwDOABTKOs5RU2SK
| 6,235 |
SSL error with requests 2.28.x: certificate verify failed: unable to get local issuer certificate
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44014460?v=4",
"events_url": "https://api.github.com/users/fervand1/events{/privacy}",
"followers_url": "https://api.github.com/users/fervand1/followers",
"following_url": "https://api.github.com/users/fervand1/following{/other_user}",
"gists_url": "https://api.github.com/users/fervand1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fervand1",
"id": 44014460,
"login": "fervand1",
"node_id": "MDQ6VXNlcjQ0MDE0NDYw",
"organizations_url": "https://api.github.com/users/fervand1/orgs",
"received_events_url": "https://api.github.com/users/fervand1/received_events",
"repos_url": "https://api.github.com/users/fervand1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fervand1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fervand1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fervand1",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2022-09-07T10:07:35Z
|
2023-09-09T00:03:02Z
|
2022-09-08T12:08:00Z
|
NONE
|
resolved
|
<!-- Summary. -->
While doing an HTTP post transfer of report payloads with requests version 2.28.1 and SSL verification set to True, the request fails giving error (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))
However when I downgrade the requests module to 2.27.1 it works successfully
The client ssl certificate was installed on the windows cert store. Question is why does the request on version 2.27 succeeds and why does it complain when the version is 2.28.1? Has something changed the way requests picks up the SSL certificates from the windows store?
## Expected Result
Successful transfer of reports with SSL verification set to True in version 2.28.x
## Actual Result
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.10"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010df"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6235/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6235/timeline
| null |
completed
| null | null | false |
[
"The main change is that disabling certificate checking by setting an environment variable to an empty value is no longer valid in 2.28. Requests has never used the windows cert store. It's likely you were unwittingly ignoring verification before by having an env var set to globally disable certificate checking ",
"@sigmavirus24 I did not set any env variables, so if I do not set any env variable did it mean that it considered it as an empty string and disabled certificate verification from windows cert store? Also what is the env var that we talking about here? Is it \"CURL_CA_BUNDLE\" ? Which I see in the requests changelogs? Was it by default set to empty string?\r\nWhat is the resolution to this other than explicitly mentioning the cert path during request? I did come across `pip-system-certs` or `python-certifi-win32` https://stackoverflow.com/questions/50422136/python-requests-with-wincertstore",
"> so if I do not set any env variable did it mean that it considered it as an empty string and disabled certificate verification from windows cert store?\n\nNo that's not what it means. You would have had to set either environment variable explicitly and then forgotten.\n\nAt no point in time has requests ever relied on the windows cert store and the package your referencing monkey patches this library in a way that is incompatible with advanced usage of the library and I would not recommend it",
"@sigmavirus24 Got it. What would be the recommended way to do it? Would it be by explicitly specifying the path to certificate while making the request? Like\r\n```\r\nimport requests\r\nr = requests.get('https://server/api', auth=(user,password), verify='/path/to/cert.pem')\r\n```\r\nOr is there another way you would recommend to do this?",
"Sorry I think you edited to add a second library `pip-system-certs` monkey patches in an incompatible way.\n\nI have no experience with the wincertstore library.\n\nWindows didn't store files which is why requests doesn't work with it without some other library.\n\nOne way might be too use the second library. Another night be to expert the site's certificate chain to a pem encoded file as you suggest. That's documented in other issues and better documented by OpenSSL itself.\n\nI encourage you to check if either variable CURL_CA_BUNDLE or REQUESTS_CA_BUNDLE are set empty in your environment. The reason we broke that is because people can set it and forget it and that's exactly why it's dangerous. ",
"Got it. Thanks for the suggestions @sigmavirus24 "
] |
https://api.github.com/repos/psf/requests/issues/6234
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6234/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6234/comments
|
https://api.github.com/repos/psf/requests/issues/6234/events
|
https://github.com/psf/requests/pull/6234
| 1,364,243,316 |
PR_kwDOABTKOs4-fTYk
| 6,234 |
Fix CURL_CA_BUNDLE override example
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48517?v=4",
"events_url": "https://api.github.com/users/jaap3/events{/privacy}",
"followers_url": "https://api.github.com/users/jaap3/followers",
"following_url": "https://api.github.com/users/jaap3/following{/other_user}",
"gists_url": "https://api.github.com/users/jaap3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jaap3",
"id": 48517,
"login": "jaap3",
"node_id": "MDQ6VXNlcjQ4NTE3",
"organizations_url": "https://api.github.com/users/jaap3/orgs",
"received_events_url": "https://api.github.com/users/jaap3/received_events",
"repos_url": "https://api.github.com/users/jaap3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jaap3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jaap3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jaap3",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-09-07T07:49:28Z
|
2023-09-10T00:03:16Z
|
2022-09-09T19:10:15Z
|
CONTRIBUTOR
|
resolved
|
Promote REQUESTS_CA_BUNDLE as it is looked at first
|
{
"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/6234/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6234/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6234.diff",
"html_url": "https://github.com/psf/requests/pull/6234",
"merged_at": "2022-09-09T19:10:15Z",
"patch_url": "https://github.com/psf/requests/pull/6234.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6234"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6233
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6233/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6233/comments
|
https://api.github.com/repos/psf/requests/issues/6233/events
|
https://github.com/psf/requests/issues/6233
| 1,364,148,785 |
I_kwDOABTKOs5RT0Ix
| 6,233 |
Can not send json and files same as data and files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52992560?v=4",
"events_url": "https://api.github.com/users/sssanikhani/events{/privacy}",
"followers_url": "https://api.github.com/users/sssanikhani/followers",
"following_url": "https://api.github.com/users/sssanikhani/following{/other_user}",
"gists_url": "https://api.github.com/users/sssanikhani/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sssanikhani",
"id": 52992560,
"login": "sssanikhani",
"node_id": "MDQ6VXNlcjUyOTkyNTYw",
"organizations_url": "https://api.github.com/users/sssanikhani/orgs",
"received_events_url": "https://api.github.com/users/sssanikhani/received_events",
"repos_url": "https://api.github.com/users/sssanikhani/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sssanikhani/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sssanikhani/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sssanikhani",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-07T06:18:50Z
|
2023-09-08T00:03:08Z
|
2022-09-07T17:27:04Z
|
NONE
|
resolved
|
Some scenarios with requests can not be done straightforward.
For example when I want to send json and files in multipart form, I use `data` and `files` parameters in requests method.
But if data has some `None` values, it will be dropped from request body. So for this problem I use `json` parameter instead of `data`.
Now with `json` parameter, `files` parameter will overwrite request body and json body will be removed from request.
## Expected Result
I want to send json and files with multipart form request, while json body has some None values.
## Actual Result
This expectation can not be done straightforward. Some solutions are messy and will change request body to another schema. like [this](https://stackoverflow.com/a/35946962/11926259)
## Reproduction Steps
```python
import requests
data = {"key": None}
requests.patch(url, json=data, files=files_data)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": "3.4.8"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.4"
},
"platform": {
"release": "5.15.0-47-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "30000020",
"version": "21.0.0"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "30000020"
},
"urllib3": {
"version": "1.26.5"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6233/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6233/timeline
| null |
not_planned
| null | null | false |
[
"That's not how this works and it's documented as multipart only working with data and files parameters. If you need to send JSON inside a multipart field you need to encode it yourself and pass it to data with a field name. "
] |
https://api.github.com/repos/psf/requests/issues/6232
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6232/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6232/comments
|
https://api.github.com/repos/psf/requests/issues/6232/events
|
https://github.com/psf/requests/issues/6232
| 1,363,158,582 |
I_kwDOABTKOs5RQCY2
| 6,232 |
Headers that are subclass of str/byte are not accepted
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7687556?v=4",
"events_url": "https://api.github.com/users/CarliJoy/events{/privacy}",
"followers_url": "https://api.github.com/users/CarliJoy/followers",
"following_url": "https://api.github.com/users/CarliJoy/following{/other_user}",
"gists_url": "https://api.github.com/users/CarliJoy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CarliJoy",
"id": 7687556,
"login": "CarliJoy",
"node_id": "MDQ6VXNlcjc2ODc1NTY=",
"organizations_url": "https://api.github.com/users/CarliJoy/orgs",
"received_events_url": "https://api.github.com/users/CarliJoy/received_events",
"repos_url": "https://api.github.com/users/CarliJoy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CarliJoy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CarliJoy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CarliJoy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-09-06T11:51:41Z
|
2023-09-07T00:03:17Z
|
2022-09-06T13:09:19Z
|
NONE
|
resolved
|
Requests does not accept headers that are subclasses of string or byte.
They are required i.e. to obfuscate secrets in certain environments, so this is also a security related issue.
The issue was introduced by e36f34597ca96c40dbb81d63a8fe9ac0860b8dc3 at June this year by @nateprewitt
A possible fix is given in this PR https://github.com/psf/requests/pull/6230
## Expected Result
Headers are used as they are string/byte.
## Actual Result
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/lib64/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/tmp/venv/lib64/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/tmp/venv/lib64/python3.10/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/tmp/venv/lib64/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/tmp/venv/lib64/python3.10/site-packages/requests/models.py", line 369, in prepare
self.prepare_headers(headers)
File "/tmp/venv/lib64/python3.10/site-packages/requests/models.py", line 491, in prepare_headers
check_header_validity(header)
File "/tmp/venv/lib64/python3.10/site-packages/requests/utils.py", line 1037, in check_header_validity
raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part (Hidden) from {'token': Hidden} must be of type str or bytes, not <class '__main__.Secret'>
```
## Reproduction Steps
```python
import requests
class Secret(str):
def __repr__(self):
return "Hidden"
requests.get("https://google.com", headers={"token": Secret("Confidential")})
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.6"
},
"platform": {
"release": "5.19.6-100.fc35.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 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/6232/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6232/timeline
| null |
completed
| null | null | false |
[
"Hi @CarliJoy, please check other open issues before opening new ones. I'll resolve this as a duplicate of #6159.",
"Hi @nateprewitt and Sorry. Indeed I forgot to that. Sorry for the extra work."
] |
https://api.github.com/repos/psf/requests/issues/6231
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6231/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6231/comments
|
https://api.github.com/repos/psf/requests/issues/6231/events
|
https://github.com/psf/requests/issues/6231
| 1,362,509,456 |
I_kwDOABTKOs5RNj6Q
| 6,231 |
`❯` character becomes `â¯` in data after post
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11183274?v=4",
"events_url": "https://api.github.com/users/pcroland/events{/privacy}",
"followers_url": "https://api.github.com/users/pcroland/followers",
"following_url": "https://api.github.com/users/pcroland/following{/other_user}",
"gists_url": "https://api.github.com/users/pcroland/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pcroland",
"id": 11183274,
"login": "pcroland",
"node_id": "MDQ6VXNlcjExMTgzMjc0",
"organizations_url": "https://api.github.com/users/pcroland/orgs",
"received_events_url": "https://api.github.com/users/pcroland/received_events",
"repos_url": "https://api.github.com/users/pcroland/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pcroland/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pcroland/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pcroland",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2022-09-05T22:16:55Z
|
2023-09-07T00:03:15Z
|
2022-09-06T14:21:45Z
|
NONE
|
resolved
|
Code: https://github.com/pcroland/deew/blob/main/dev_scripts/post/doom9.py
On other sites it worked fine but on this site it changed the input character to gibberish. I guess it's related to urlencoding.
If I urlencode
```
Help:
❯ deew -h
```
urlencoder.org creates
```
Help%3A%0A%E2%9D%AF%20deew%20-h
```
while chrome creates
```
Help%3A%0A%u276F%20deew%20-h
```
Is there a way to mimic how Chrome encodes 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/6231/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6231/timeline
| null |
completed
| null | null | false |
[
"Hi @pcroland, it looks like this is a request for help. The question here doesn't appear to be related to a defect in Requests. We'd suggest making a post on [StackOverflow](https://stackoverflow.com/) to get further assistance.",
"requests encodes this character differently than Chrome and Firefox, isn't it possible that it's a bug?",
"If you have a minimal reproducible example showing a defect in Requests, please provide more details.\n\nWhat's currently been provided doesn't have any clear indication there's a defect.",
"requests uses normal urlencoding while Firefox and Chrome uses unicode escape for this character and apparantly some sites don't like the regular urlencoding for this character (and possibly others).",
"According to https://stackoverflow.com/q/912811/492203 it's a non-standard escape method that has been rejected by the W3C, but as we know Chrome has the monopoly... Maybe it would be worth adding it as an option. Here's some code I threw together quickly for it:\r\n\r\n```py\r\nimport urllib.parse\r\n\r\n\r\ndef urlquote_chrome(text: str, *_: Any) -> str:\r\n escaped = (\r\n urllib.parse.quote(text, encoding=\"unicode-escape\")\r\n .replace(\"%5Ca\", \"%07\")\r\n .replace(\"%5Cb\", \"%08\")\r\n .replace(\"%5Cf\", \"%0C\")\r\n .replace(\"%5Cn\", \"%0A\")\r\n .replace(\"%5Cr\", \"%0D\")\r\n .replace(\"%5Cu\", \"%u\")\r\n .replace(\"%5Cv\", \"%0B\")\r\n .replace(\"%5Cx\", \"%\")\r\n )\r\n\r\n # These are probably not needed but just in case\r\n escaped = re.sub(r\"%[a-f0-9]{2}\", lambda m: m[0].upper(), escaped)\r\n escaped = re.sub(r\"%u([a-f0-9]{4})\", lambda m: f\"%u{m[1].upper()}\", escaped)\r\n\r\n return escaped\r\n\r\n\r\nr = session.post(\r\n url=url,\r\n data=urllib.parse.urlencode(data, quote_via=urlquote_chrome),\r\n)\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/6230
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6230/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6230/comments
|
https://api.github.com/repos/psf/requests/issues/6230/events
|
https://github.com/psf/requests/pull/6230
| 1,361,925,370 |
PR_kwDOABTKOs4-Xjew
| 6,230 |
allow string/byte subtypes for header
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7687556?v=4",
"events_url": "https://api.github.com/users/CarliJoy/events{/privacy}",
"followers_url": "https://api.github.com/users/CarliJoy/followers",
"following_url": "https://api.github.com/users/CarliJoy/following{/other_user}",
"gists_url": "https://api.github.com/users/CarliJoy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CarliJoy",
"id": 7687556,
"login": "CarliJoy",
"node_id": "MDQ6VXNlcjc2ODc1NTY=",
"organizations_url": "https://api.github.com/users/CarliJoy/orgs",
"received_events_url": "https://api.github.com/users/CarliJoy/received_events",
"repos_url": "https://api.github.com/users/CarliJoy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CarliJoy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CarliJoy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CarliJoy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-09-05T13:01:22Z
|
2024-07-30T00:03:48Z
|
2023-07-30T01:53:09Z
|
NONE
|
resolved
|
We wrap our secret a in special subclass of string, that prevents leaking confidential information in some circumstances (i.e. stack traces) etc.
The current implementation of the header checks does a `type(val) == str` which is not recommended by PEP8.
Due to this implementation we can't pass this variables as headers. Converting them back to a normal string would defeat the purpose of wrapping them in the first place.
This PR fixes both issues.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6230/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6230/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6230.diff",
"html_url": "https://github.com/psf/requests/pull/6230",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6230.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6230"
}
| true |
[
"Related to https://github.com/psf/requests/issues/6159 -> there is also another fix defined there.",
"Resolving as I believe this was fixed in Requests 2.29.0."
] |
https://api.github.com/repos/psf/requests/issues/6229
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6229/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6229/comments
|
https://api.github.com/repos/psf/requests/issues/6229/events
|
https://github.com/psf/requests/issues/6229
| 1,361,019,002 |
I_kwDOABTKOs5RH4B6
| 6,229 |
When making a POST request, why doesn't `auth` or `session.auth` work when logging in, but `data=data` does?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25990657?v=4",
"events_url": "https://api.github.com/users/whompyjaw/events{/privacy}",
"followers_url": "https://api.github.com/users/whompyjaw/followers",
"following_url": "https://api.github.com/users/whompyjaw/following{/other_user}",
"gists_url": "https://api.github.com/users/whompyjaw/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/whompyjaw",
"id": 25990657,
"login": "whompyjaw",
"node_id": "MDQ6VXNlcjI1OTkwNjU3",
"organizations_url": "https://api.github.com/users/whompyjaw/orgs",
"received_events_url": "https://api.github.com/users/whompyjaw/received_events",
"repos_url": "https://api.github.com/users/whompyjaw/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/whompyjaw/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/whompyjaw/subscriptions",
"type": "User",
"url": "https://api.github.com/users/whompyjaw",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-09-04T03:07:40Z
|
2023-09-05T00:03:06Z
|
2022-09-04T19:20:42Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
I have a website that requires an Email and Password to log in. When I set these values in `session.auth` or `auth=(email, pw)` they don't get the right response data. But, when I pass in a `data` object, it works.
What is auth or session.auth doing in the background? Is it just assuming to use "username" or something?
login_url = https://prenotami.esteri.it/Home/Login
**data=data** (returns correct response html)
```python3
with requests.Session() as session:
data = {"Email": "[email protected]", "Password": pw}
login_response = session.post(
login_url,
data=data,
)
print(login_response.text)
```
**session.auth** (doesn't return correct response html)
```python3
with requests.Session() as session:
session.auth = (email, pw)
login_response = session.post(
login_url,
)
print(login_response.text)
```
**auth=()** (doesn't return correct html data)
```python3
with requests.Session() as session:
login_response = session.post(
login_url,
auth=("[email protected]", pw),
)
print(login_response.text)
```
|
{
"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/6229/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6229/timeline
| null |
completed
| null | null | false |
[
"> Please refer to our Stack Overflow tag for guidance\n\nYou ignored the template. Further, it doesn't seem you understand how HTTP works out the service you're trying to communicate with. The maintainers can't educate each person individually via issues. "
] |
https://api.github.com/repos/psf/requests/issues/6228
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6228/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6228/comments
|
https://api.github.com/repos/psf/requests/issues/6228/events
|
https://github.com/psf/requests/issues/6228
| 1,360,883,908 |
I_kwDOABTKOs5RHXDE
| 6,228 |
Explain the status and the future of the library (in PR template, README, docs site)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/94327?v=4",
"events_url": "https://api.github.com/users/tuukkamustonen/events{/privacy}",
"followers_url": "https://api.github.com/users/tuukkamustonen/followers",
"following_url": "https://api.github.com/users/tuukkamustonen/following{/other_user}",
"gists_url": "https://api.github.com/users/tuukkamustonen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tuukkamustonen",
"id": 94327,
"login": "tuukkamustonen",
"node_id": "MDQ6VXNlcjk0MzI3",
"organizations_url": "https://api.github.com/users/tuukkamustonen/orgs",
"received_events_url": "https://api.github.com/users/tuukkamustonen/received_events",
"repos_url": "https://api.github.com/users/tuukkamustonen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tuukkamustonen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tuukkamustonen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tuukkamustonen",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 3 |
2022-09-03T15:12:06Z
|
2023-04-06T19:38:02Z
| null |
NONE
| null |
Attempting to file a new feature request shows the text:
> Requests is not accepting feature requests at this time.
Fair enough, there must be reason for that (e.g. lack of maintainers).
However, maybe explain a bit more - if new features are not accepted, what is the future of the library in general? You could:
- Pin a ticket on the issue tracker
- Add a note to the README
- And/or maybe to the docs site
Current state leaves people (at least me) searching/googling for the status and explanation, yet nothing is found?
| null |
{
"+1": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/6228/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6228/timeline
| null | null | null | null | false |
[
"Additionally to this, it would be useful to know what issues are coming into the next release, and a sort of ETA / timeline of releases. I'm currently waiting for the next release, and if it wasn't for someone else also asking that question in an issue \"when is the next release coming?\" I wouldn't know... It doesn't seem to be documented anywhere (site or repo or otherwise).",
"@bourgeoisor You should be able to find the currently flagged changes for upcoming releases in our [Milestones](https://github.com/psf/requests/milestone/31), GitHub's standard mechanism for tracking changes. There is no formal release schedule but I'll note the current cadence in a future PR.",
"That's an oversight on my part-- The changes _are_ indeed in the GitHub Milestones. Thank you for documenting the expected release cadence, that would help a lot!"
] |
https://api.github.com/repos/psf/requests/issues/6227
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6227/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6227/comments
|
https://api.github.com/repos/psf/requests/issues/6227/events
|
https://github.com/psf/requests/issues/6227
| 1,360,720,166 |
I_kwDOABTKOs5RGvEm
| 6,227 |
Posting with data seems to truncate the response
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3732628?v=4",
"events_url": "https://api.github.com/users/fredericoschardong/events{/privacy}",
"followers_url": "https://api.github.com/users/fredericoschardong/followers",
"following_url": "https://api.github.com/users/fredericoschardong/following{/other_user}",
"gists_url": "https://api.github.com/users/fredericoschardong/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fredericoschardong",
"id": 3732628,
"login": "fredericoschardong",
"node_id": "MDQ6VXNlcjM3MzI2Mjg=",
"organizations_url": "https://api.github.com/users/fredericoschardong/orgs",
"received_events_url": "https://api.github.com/users/fredericoschardong/received_events",
"repos_url": "https://api.github.com/users/fredericoschardong/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fredericoschardong/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fredericoschardong/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fredericoschardong",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-09-03T01:38:15Z
|
2023-09-07T00:03:16Z
|
2022-09-06T14:29:30Z
|
NONE
|
resolved
|
Posting with data over SSL truncates the response. For example take this `app.py`:
```python
from flask import Flask
app = Flask(__name__)
@app.route('/', methods=["GET", "POST"])
def hello_world():
return {"access_token": "aa" * 50000}
```
Running with `python3 -m flask run --cert=adhoc`.
PS: It works as expected without SSL;
PS 2: Using GET produces the same behaviour;
## Expected Result
The following two snippets should return the same result (i.e. `100020`):
```python
>>> import requests
>>> len(requests.post('https://127.0.0.1:5000/', verify=False).content)
100020
>>> len(requests.post('https://127.0.0.1:5000/', data={'a':'b'}, verify=False).content)
100020
```
## Actual Result
However, if I add some data to the request, the response is truncated.
```python
>>> import requests
>>> len(requests.post('https://127.0.0.1:5000/', verify=False).content)
100020
>>> len(requests.post('https://127.0.0.1:5000/', data={'a':'b'}, verify=False).content)
81920
```
Curl produces the correct result:
```bash
$ curl -s -k -X POST https://127.0.0.1:5000/ -H 'Content-Type: application/json' -d '{"a":"b"}' | wc -m
100020
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "4.0.0"
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.4"
},
"platform": {
"release": "5.15.0-46-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "30000020"
},
"urllib3": {
"version": "1.26.5"
},
"using_charset_normalizer": false,
"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/6227/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6227/timeline
| null |
not_planned
| null | null | false |
[
"Hi @fredericoschardong, Requests isn't able to change the response from the server. If different inputs are resulting in different outputs, that's a product of your flask application. I'd recommend taking a look at the contents of the response for differences.\r\n\r\nIt's also important to note your curl request and Requests call are not the same. `data` is `application/x-www-form-urlencoded` not json. We'd recommend checking on [StackOverflow](https://stackoverflow.com/) for further assistance with debugging.",
"Hey @nateprewitt. Thanks for the reply. I have used `curlify` to fix the curl request. It still produces the expected result, while `Requests` does not:\r\n\r\n```\r\ncurl -s -k -X POST -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' -H 'Content-Length: 3' -H 'Content-Type: application/x-www-form-urlencoded' -H 'User-Agent: python-requests/2.28.1' -d a=b https://127.0.0.1:5000/ | wc -m\r\n100020\r\n```\r\n\r\nUpon further investigation, as you suggested, `urllib3` might be to blame:\r\n```python\r\n>>> requests.post('https://127.0.0.1:5000/', data={'a':'b'}, verify=False).raw.tell()\r\n81920\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/6226
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6226/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6226/comments
|
https://api.github.com/repos/psf/requests/issues/6226/events
|
https://github.com/psf/requests/pull/6226
| 1,358,095,881 |
PR_kwDOABTKOs4-LAKO
| 6,226 |
Use urllib3 native chunking ability
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17090999?v=4",
"events_url": "https://api.github.com/users/shadycuz/events{/privacy}",
"followers_url": "https://api.github.com/users/shadycuz/followers",
"following_url": "https://api.github.com/users/shadycuz/following{/other_user}",
"gists_url": "https://api.github.com/users/shadycuz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shadycuz",
"id": 17090999,
"login": "shadycuz",
"node_id": "MDQ6VXNlcjE3MDkwOTk5",
"organizations_url": "https://api.github.com/users/shadycuz/orgs",
"received_events_url": "https://api.github.com/users/shadycuz/received_events",
"repos_url": "https://api.github.com/users/shadycuz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shadycuz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shadycuz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shadycuz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] |
{
"closed_at": "2023-05-22T03:37:11Z",
"closed_issues": 3,
"created_at": "2022-11-16T21:23:42Z",
"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/31",
"id": 8662889,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/31/labels",
"node_id": "MI_kwDOABTKOs4AhC9p",
"number": 31,
"open_issues": 0,
"state": "closed",
"title": "2.29.0",
"updated_at": "2023-05-22T03:37:11Z",
"url": "https://api.github.com/repos/psf/requests/milestones/31"
}
| 10 |
2022-09-01T00:53:34Z
|
2024-04-23T00:03:54Z
|
2023-04-22T23:32:52Z
|
CONTRIBUTOR
|
resolved
|
This PR is the same as #5664 but rebased on to the `main` branch to bring it back up to date. This PR is needed to stay compatible with future changes in urllib3 introduced by https://github.com/urllib3/urllib3/pull/2649. The comments in that PR offer a lot of detail in the changes in urllib3 but this one provided a good overview https://github.com/urllib3/urllib3/pull/2649#issuecomment-1200197578.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6226/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6226/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6226.diff",
"html_url": "https://github.com/psf/requests/pull/6226",
"merged_at": "2023-04-22T23:32:52Z",
"patch_url": "https://github.com/psf/requests/pull/6226.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6226"
}
| true |
[
"@sethmlarson @nateprewitt Can you please approve the workflow. I'm curious if the SSL error I had locally still shows up in this pipeline. ",
"All tests passed except for linting but it needs approval again 🙃 ",
"@sethmlarson I have another linting error, I'll fix real quick",
"I ran all the checks locally this time :blush:\r\n\r\n```console\r\n$ pre-commit run -a\r\nCheck Yaml...............................................................Passed\r\nDebug Statements (Python)................................................Passed\r\nFix End of Files.........................................................Passed\r\nTrim Trailing Whitespace.................................................Passed\r\nisort....................................................................Passed\r\nblack....................................................................Passed\r\npyupgrade................................................................Passed\r\nflake8...................................................................Passed\r\n```",
"It is noteworthy that this change, while something I've been wanting for a long time, is a breaking API change. In particular, the problem is that in the current implementation `urllib3`'s `Retry` is sometimes bypassed when using chunked encoding: Users have to write their own custom retry logic based on capturing errors when using chunked encoding. Therefore, this change will quietly break everybody who has written custom error handling for chunked requests versus using `Retry` for non-chunked requests. ",
"@theGOTOguy is the bypassing of `Retry` something going on here in the request package or is this a bug in urllib3?",
"No, the issue wasn't with `urllib3`. The [part of the code you removed that executes if the request is chunked](https://github.com/psf/requests/pull/6226/files) clearly has at least some logic outside `urllib3`, and if an error happened anywhere there then it wouldn't be caught by `Retry` and a non-`urllib3` error would be raised that then had to be handled separately. I can't seem to find my notes on the specific errors, but in short, if I was dealing with chunked requests and a flaky or overloaded server, I couldn't rely on it being handled in `Retry`.\r\n\r\nTo be clear, I think that the way you are handling it here is 100% the right thing to do. My understanding based on the discussion in #5664 was that a change to the errors that are thrown during the course of handling chunked requests is something that won't happen until the next major release, but if it does happen now I would suggest a test simulating chunked requests against a flaky server (#5915, anyone?) and warn about the change in behavior in the changelog.\r\n\r\nEdit: It appears that the errors that weren't caught by `urllib3`'s `Retry` were tied to either timeouts or empty responses from the server. This would be straightforward to test and verify against a realistic Werkzeug server as opposed to the existing socket-based tests.",
"@sethmlarson @nateprewitt We are not getting very far on this =/ \r\n\r\nI have put in an application as PSF managing member. I'm not sure if that will make a difference, but maybe then we could have a call to discuss the path forward. \r\n\r\nIt looks like we need to cut a new major release branch for both urlib3 and requests and to start preparing for the next major version?",
"@shadycuz Unfortunately whether or not you're a managing member won't affect this PR being merged faster. People have obligations outside of open source, I've recently bought a new house which is [consuming all my open source time](https://twitter.com/sethmlarson/status/1565039700301283328). I can't speak for Nate but I know with certainty this PR isn't not being worked on for lack of desire to see it succeed. Have patience, promise we will get to this when we have the time.",
"@nateprewitt FYI we're going to skip the failing integration tests for chunking to get that PR merged, this PR will be needed to add full support for urllib3 v2.0 to Requests."
] |
https://api.github.com/repos/psf/requests/issues/6225
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6225/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6225/comments
|
https://api.github.com/repos/psf/requests/issues/6225/events
|
https://github.com/psf/requests/pull/6225
| 1,357,807,491 |
PR_kwDOABTKOs4-J_Zc
| 6,225 |
fix order of verify overrides in Sessions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7026198?v=4",
"events_url": "https://api.github.com/users/purajit/events{/privacy}",
"followers_url": "https://api.github.com/users/purajit/followers",
"following_url": "https://api.github.com/users/purajit/following{/other_user}",
"gists_url": "https://api.github.com/users/purajit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/purajit",
"id": 7026198,
"login": "purajit",
"node_id": "MDQ6VXNlcjcwMjYxOTg=",
"organizations_url": "https://api.github.com/users/purajit/orgs",
"received_events_url": "https://api.github.com/users/purajit/received_events",
"repos_url": "https://api.github.com/users/purajit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/purajit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/purajit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/purajit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-08-31T20:05:27Z
|
2023-09-01T00:03:14Z
|
2022-08-31T20:26:18Z
|
NONE
|
resolved
|
Currently, `Session` overrides the request-level `verify` parameter by
reading the environment, and then checks to see if it should choose that
or the session-level settings.
Let's consider the scenario where we've provided `REQUESTS_CA_BUNDLE` in
the environment, and then create a session with `s.verify = 'asdf'`. Now,
the final choice is going to be the environment-provided bundle, rather
than the session-provided setting, which is unexpected behavior.
The correct behavior would be to first do the merge of the request and
session-level parameters, and then use the environment-provided params
if needed.
|
{
"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/6225/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6225/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6225.diff",
"html_url": "https://github.com/psf/requests/pull/6225",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6225.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6225"
}
| true |
[
"See #3829 for why we can't just fix this in a bug patch release"
] |
https://api.github.com/repos/psf/requests/issues/6224
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6224/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6224/comments
|
https://api.github.com/repos/psf/requests/issues/6224/events
|
https://github.com/psf/requests/pull/6224
| 1,357,787,910 |
PR_kwDOABTKOs4-J7Bs
| 6,224 |
fix order of verify overrides in Sessions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7026198?v=4",
"events_url": "https://api.github.com/users/purajit/events{/privacy}",
"followers_url": "https://api.github.com/users/purajit/followers",
"following_url": "https://api.github.com/users/purajit/following{/other_user}",
"gists_url": "https://api.github.com/users/purajit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/purajit",
"id": 7026198,
"login": "purajit",
"node_id": "MDQ6VXNlcjcwMjYxOTg=",
"organizations_url": "https://api.github.com/users/purajit/orgs",
"received_events_url": "https://api.github.com/users/purajit/received_events",
"repos_url": "https://api.github.com/users/purajit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/purajit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/purajit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/purajit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2022-08-31T19:49:05Z
|
2023-09-01T00:03:15Z
|
2022-08-31T19:54:19Z
|
NONE
|
resolved
|
Currently, `Session` overrides the request-level `verify` parameter by
reading the environment, and then checks to see if it should choose that
or the session-level settings.
Let's consider the scenario where we've provided `REQUESTS_CA_BUNDLE` in
the environment, and then create a session with `s.verify = 'asdf'`. Now,
the final choice is going to be the environment-provided bundle, rather
than the session-provided setting, which is unexpected behavior.
The correct behavior would be to first do the merge of the request and
session-level parameters, and then use the environment-provided params
if needed.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7026198?v=4",
"events_url": "https://api.github.com/users/purajit/events{/privacy}",
"followers_url": "https://api.github.com/users/purajit/followers",
"following_url": "https://api.github.com/users/purajit/following{/other_user}",
"gists_url": "https://api.github.com/users/purajit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/purajit",
"id": 7026198,
"login": "purajit",
"node_id": "MDQ6VXNlcjcwMjYxOTg=",
"organizations_url": "https://api.github.com/users/purajit/orgs",
"received_events_url": "https://api.github.com/users/purajit/received_events",
"repos_url": "https://api.github.com/users/purajit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/purajit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/purajit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/purajit",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6224/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6224/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6224.diff",
"html_url": "https://github.com/psf/requests/pull/6224",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6224.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6224"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6223
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6223/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6223/comments
|
https://api.github.com/repos/psf/requests/issues/6223/events
|
https://github.com/psf/requests/issues/6223
| 1,357,163,453 |
I_kwDOABTKOs5Q5Ku9
| 6,223 |
requests.package.chardet* references not assigned correctly?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20907888?v=4",
"events_url": "https://api.github.com/users/babyhoo976/events{/privacy}",
"followers_url": "https://api.github.com/users/babyhoo976/followers",
"following_url": "https://api.github.com/users/babyhoo976/following{/other_user}",
"gists_url": "https://api.github.com/users/babyhoo976/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/babyhoo976",
"id": 20907888,
"login": "babyhoo976",
"node_id": "MDQ6VXNlcjIwOTA3ODg4",
"organizations_url": "https://api.github.com/users/babyhoo976/orgs",
"received_events_url": "https://api.github.com/users/babyhoo976/received_events",
"repos_url": "https://api.github.com/users/babyhoo976/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/babyhoo976/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/babyhoo976/subscriptions",
"type": "User",
"url": "https://api.github.com/users/babyhoo976",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] | null | 2 |
2022-08-31T10:56:22Z
|
2024-05-14T22:53:44Z
|
2024-05-14T22:53:43Z
|
NONE
| null |
I found that packages.py is assigning sys.modules['requests.package.chardet'] over and over with different modules, is this intentional or a bug?
I looked at the code and this `target` variable confuses me, it is assigned again in loop and placed with itself(so completely?), looks like a name confliction to me. Code is referenced from installed version 2.28.1.
```
target = chardet.__name__
for mod in list(sys.modules):
if mod == target or mod.startswith(f"{target}."):
target = target.replace(target, "chardet")
sys.modules[f"requests.packages.{target}"] = sys.modules[mod]
```
## Expected Result
every chardet.* package maps to requests.packages.chardet.* respectively
## Actual Result
only requests.package.chardet is assigned at last.
## Reproduction Steps
import requests
import sys
print([m for m in sys.modules if name.startswith('requests.packages.chardet')])
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/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/6223/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6223/timeline
| null |
completed
| null | null | false |
[
"Have proposed a fix here - https://github.com/psf/requests/pull/6562",
"Resolving as it appears #6562 ended up merged without closing this. Thanks @amkarn258!"
] |
https://api.github.com/repos/psf/requests/issues/6222
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6222/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6222/comments
|
https://api.github.com/repos/psf/requests/issues/6222/events
|
https://github.com/psf/requests/issues/6222
| 1,355,578,160 |
I_kwDOABTKOs5QzHsw
| 6,222 |
request google search news fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/112481361?v=4",
"events_url": "https://api.github.com/users/vagosbas/events{/privacy}",
"followers_url": "https://api.github.com/users/vagosbas/followers",
"following_url": "https://api.github.com/users/vagosbas/following{/other_user}",
"gists_url": "https://api.github.com/users/vagosbas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vagosbas",
"id": 112481361,
"login": "vagosbas",
"node_id": "U_kgDOBrRUUQ",
"organizations_url": "https://api.github.com/users/vagosbas/orgs",
"received_events_url": "https://api.github.com/users/vagosbas/received_events",
"repos_url": "https://api.github.com/users/vagosbas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vagosbas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vagosbas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vagosbas",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-08-30T10:59:55Z
|
2023-08-31T00:03:12Z
|
2022-08-30T14:20:29Z
|
NONE
|
resolved
|
when i run this code
monitored_tickers = ['GME', 'TSLA', 'BTC']

i get these results

why doesn't return the urls ?
is the problem in the request statement or in google account ?
i am using the greek version of chrome, and i am in greece .
|
{
"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/6222/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6222/timeline
| null |
completed
| null | null | false |
[
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/6221
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6221/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6221/comments
|
https://api.github.com/repos/psf/requests/issues/6221/events
|
https://github.com/psf/requests/issues/6221
| 1,355,430,987 |
I_kwDOABTKOs5QyjxL
| 6,221 |
allow_redirect will ignore HSTS(STRICT-TRANSPORT-SECURITY)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/100894276?v=4",
"events_url": "https://api.github.com/users/zer0ty/events{/privacy}",
"followers_url": "https://api.github.com/users/zer0ty/followers",
"following_url": "https://api.github.com/users/zer0ty/following{/other_user}",
"gists_url": "https://api.github.com/users/zer0ty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zer0ty",
"id": 100894276,
"login": "zer0ty",
"node_id": "U_kgDOBgOGRA",
"organizations_url": "https://api.github.com/users/zer0ty/orgs",
"received_events_url": "https://api.github.com/users/zer0ty/received_events",
"repos_url": "https://api.github.com/users/zer0ty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zer0ty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zer0ty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zer0ty",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2022-08-30T09:08:54Z
|
2022-08-30T09:08:54Z
| null |
NONE
| null |
while a website set header STRICT-TRANSPORT-SECURITY, it means tell browser use https, but requests is not judged
## Expected Result
sometimes, developer set 302 and redirect website to http . at the same time, someone config header with STRICT-TRANSPORT-SECURITY. To browser, this will be ok, but to requests, not able to access http://example.com because of use http protocol
## Actual Result

## Reproduction Steps
```python
import requests
r = requests.get('exmaple.com', allow_redirect=True)
r.status_code ==> 502
In Chrome:
r.status_code == 200
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": "37.0.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.10.2"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "30000030",
"version": "22.0.0"
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010df"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": false,
"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/6221/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6221/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/6220
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6220/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6220/comments
|
https://api.github.com/repos/psf/requests/issues/6220/events
|
https://github.com/psf/requests/pull/6220
| 1,352,794,631 |
PR_kwDOABTKOs495Rmj
| 6,220 |
Update comment to clarify request headers type
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3137263?v=4",
"events_url": "https://api.github.com/users/tpaulshippy/events{/privacy}",
"followers_url": "https://api.github.com/users/tpaulshippy/followers",
"following_url": "https://api.github.com/users/tpaulshippy/following{/other_user}",
"gists_url": "https://api.github.com/users/tpaulshippy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tpaulshippy",
"id": 3137263,
"login": "tpaulshippy",
"node_id": "MDQ6VXNlcjMxMzcyNjM=",
"organizations_url": "https://api.github.com/users/tpaulshippy/orgs",
"received_events_url": "https://api.github.com/users/tpaulshippy/received_events",
"repos_url": "https://api.github.com/users/tpaulshippy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tpaulshippy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tpaulshippy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tpaulshippy",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] | null | 0 |
2022-08-26T22:41:43Z
|
2023-12-11T05:47:52Z
|
2023-12-11T05:47:52Z
|
NONE
| null |
We ran into an issue where the CaseInsensitiveDict is not JSON serializable. The fix is easy - wrap in dict(). But comments that clarify that this class is used on both requests and responses would have been helpful.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3137263?v=4",
"events_url": "https://api.github.com/users/tpaulshippy/events{/privacy}",
"followers_url": "https://api.github.com/users/tpaulshippy/followers",
"following_url": "https://api.github.com/users/tpaulshippy/following{/other_user}",
"gists_url": "https://api.github.com/users/tpaulshippy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tpaulshippy",
"id": 3137263,
"login": "tpaulshippy",
"node_id": "MDQ6VXNlcjMxMzcyNjM=",
"organizations_url": "https://api.github.com/users/tpaulshippy/orgs",
"received_events_url": "https://api.github.com/users/tpaulshippy/received_events",
"repos_url": "https://api.github.com/users/tpaulshippy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tpaulshippy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tpaulshippy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tpaulshippy",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6220/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6220/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6220.diff",
"html_url": "https://github.com/psf/requests/pull/6220",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6220.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6220"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/6219
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6219/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6219/comments
|
https://api.github.com/repos/psf/requests/issues/6219/events
|
https://github.com/psf/requests/issues/6219
| 1,350,720,847 |
I_kwDOABTKOs5Qgl1P
| 6,219 |
psf to take over request/toolbelt project?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48057736?v=4",
"events_url": "https://api.github.com/users/RosterIn/events{/privacy}",
"followers_url": "https://api.github.com/users/RosterIn/followers",
"following_url": "https://api.github.com/users/RosterIn/following{/other_user}",
"gists_url": "https://api.github.com/users/RosterIn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RosterIn",
"id": 48057736,
"login": "RosterIn",
"node_id": "MDQ6VXNlcjQ4MDU3NzM2",
"organizations_url": "https://api.github.com/users/RosterIn/orgs",
"received_events_url": "https://api.github.com/users/RosterIn/received_events",
"repos_url": "https://api.github.com/users/RosterIn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RosterIn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RosterIn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RosterIn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 14 |
2022-08-25T11:03:12Z
|
2023-10-08T00:03:12Z
|
2022-10-07T12:18:54Z
|
NONE
|
resolved
|
requests project was moved to psf
however there was another project toolbelt https://github.com/requests/toolbelt which is not maintained.
according to https://github.com/requests/toolbelt/issues/322 it's suggested that psf might transfer ownership as it make sense that `requests-toolbelt `will be with same ownership as `requests`
What is psf take on this?
|
{
"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/6219/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6219/timeline
| null |
completed
| null | null | false |
[
"Agree. Or merge it into requests\r\nSuch as the ability below which is used by lots of users.\r\n```\r\nIf you are sending a very large file as a multipart/form-datarequest , you may want to stream the request. requestsNot supported by default , but a third-party package is supported. You can read [the toolbelt](https://toolbelt.rtfd.org/)[ documentation](https://toolbelt.rtfd.org/) to learn how to use it.requests-toolbelt\r\n```",
"No one on that thread is involved with the project or the PSF",
"@sigmavirus24 How about merge it and remove https://github.com/requests/toolbelt",
"This library is under feature freeze so merging it would violate that. Additionally a lot of things in the toolbelt are niché use cases or proofs if concept for others to build on top of, not things that belong in requests. As it is the streaming multipart form data encoder is being moved into urllib3 to be more generally useful. I believe that's what 99% of toolbelt users need it for anyway. ",
"The thing is that there is no alternative for toolbelt. This is why i asked here if psf has intentions of taking over this sub-project too.",
"> This is why i asked here if psf has intentions of taking over this sub-project too\n\nIt has never been a sub-project. It's where I started collecting recipes for things people were often wanting but which don't belong in this project. It's never been a particularly high priority for me.\n\nI also don't think people understand that moving organizations in GitHub doesn't change maintenance or the people involved (presently just me). The psf doesn't magic contributors who provide patches or people to help maintain. ",
"@sigmavirus24 I understand your point about maintaining the API. The toolbelt might get more help if it's moved into the `psf` org. \r\n\r\nJust my thought, feel free to ignore as needed. :) ",
"I can add people to the requests org if people care about the project but it sounds like people care more about joining the psf org and not the project. To be clear, the largest code of any value in the toolbelt will be in urllib3 v2.0. I'm not convinced the effort of moving the project is worth anything.\n\n",
"@sigmavirus24 Speaking as a fellow urllib3 maintainer here, I know we need to get your PR merged for urllib3 v2.0 but in the meantime I would be happy to have maintainers right on the toolbelt repo and the PyPI package to fix the urllib3 warnings that it's currently emitting. I agree that moving to the psf org isn't needed and to be clear I'm also not promising to fix any other issues.\r\n\r\nWhat do you think?",
"I'll add you as soon as I'm able @pquentin ",
"I'll help maintain the package as well. ",
"Thank you @sigmavirus24!\r\n\r\n@achapkowski I'm sure help will be needed to review PRs, fix CI, support new Python versions, etc.",
"@pquentin cool, send stuff my way!",
"With help from @achapkowski and @sigmavirus24 I released requests-toolbelt 0.10.0 today. There is no new work in it, it only contains all the fixes that were merged since 0.9.1, as well as a new feature, hence the bump to 0.10.0.\r\n\r\nI think this issue can now be closed."
] |
https://api.github.com/repos/psf/requests/issues/6218
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6218/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6218/comments
|
https://api.github.com/repos/psf/requests/issues/6218/events
|
https://github.com/psf/requests/issues/6218
| 1,350,446,108 |
I_kwDOABTKOs5Qfiwc
| 6,218 |
Unable to get local issuer certificate when using twine
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26429138?v=4",
"events_url": "https://api.github.com/users/wqh17101/events{/privacy}",
"followers_url": "https://api.github.com/users/wqh17101/followers",
"following_url": "https://api.github.com/users/wqh17101/following{/other_user}",
"gists_url": "https://api.github.com/users/wqh17101/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wqh17101",
"id": 26429138,
"login": "wqh17101",
"node_id": "MDQ6VXNlcjI2NDI5MTM4",
"organizations_url": "https://api.github.com/users/wqh17101/orgs",
"received_events_url": "https://api.github.com/users/wqh17101/received_events",
"repos_url": "https://api.github.com/users/wqh17101/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wqh17101/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wqh17101/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wqh17101",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2022-08-25T07:26:36Z
|
2023-08-26T00:03:03Z
|
2022-08-25T15:54:32Z
|
NONE
|
resolved
|
Hi there, i am using
```
export CURL_CA_BUNDLE=""
twine upload xxx
```
to upload packages.
What is strange is that i can use this cmd successfully with `twine==4.0.1 requests==2.27.1 certifi==2021.10.8 or 2022.6.15`。
Failed with `twine==4.0.1 requests==2.28.1 certifi==2021.10.8 or 2022.6.15`。
Also
```
export CURL_CA_BUNDLE=""
export REQUESTS_CA_BUNDLE=""
twine upload xxx
```
failed with requests==2.28.1
## Expected Result
Using `twine upload xxx` successfully.
## Actual Result
```
Traceback (most recent call last):
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/abc/python/python-3.9.2/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/abc/python/python-3.9.2/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/abc/python/python-3.9.2/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 815, in urlopen
return self.urlopen(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 815, in urlopen
return self.urlopen(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 815, in urlopen
return self.urlopen(
[Previous line repeated 7 more times]
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.cloudartifact.dgg.dragon.tools.huawei.com', port=443): Max retries exceeded with url: /artifactory/api/pypi/pypi-oss/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/abc/python/python-3.9.2/bin/twine", line 8, in <module>
sys.exit(main())
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/__main__.py", line 33, in main
error = cli.dispatch(sys.argv[1:])
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/cli.py", line 123, in dispatch
return main(args.args)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/commands/upload.py", line 198, in main
return upload(upload_settings, parsed_args.dists)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/commands/upload.py", line 142, in upload
resp = repository.upload(package)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/repository.py", line 186, in upload
resp = self._upload(package)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/twine/repository.py", line 172, in _upload
resp = self.session.post(
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/abc/python/python-3.9.2/lib/python3.9/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pypi.cloudartifact.dgg.dragon.tools.huawei.com', port=443): Max retries exceeded with url: /artifactory/api/pypi/pypi-oss/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
```
## Reproduction Steps
```
export CURL_CA_BUNDLE=""
twine upload xxxx
```
## System Information
$ python -m requests.help
### 2.27.1
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "4.19.36-vhulk1907.1.0.h619.eulerosv2r8.aarch64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010bf"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
### 2.28.1
```
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "4.19.36-vhulk1907.1.0.h619.eulerosv2r8.aarch64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010bf"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/6218/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6218/timeline
| null |
not_planned
| null | null | false |
[
"After i debug from source code, i found that this a bug.\r\nhttps://github.com/psf/requests/blob/177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/requests/sessions.py#L765-L770\r\nfrom these codes, if i set `REQUESTS_CA_BUNDLE=\"\" CURL_CA_BUNDLE=\"\" verfiy=None` and verify will equal to None\r\n```\r\n>>> (\"\" or \"\" or None) is None\r\nTrue\r\n```\r\nAfter that at https://github.com/psf/requests/blob/177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/requests/sessions.py#L775\r\n\r\nhttps://github.com/psf/requests/blob/177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/requests/sessions.py#L61-L86\r\nwhen `request_setting is None`, it will return `session_setting` which is `self.verify` that is `True` by default.\r\n\r\nSo that is why `REQUESTS_CA_BUNDLE=\"\" CURL_CA_BUNDLE=\"\" verfiy=None` will not work.\r\n\r\n\r\n",
"Related to #6071 which was documented in our changelog",
"@sigmavirus24 That is too long to read. Maybe you can tell me the conclusion.\r\nTwo question:\r\n1.Is this a bug to fix in the future?\r\n2.If this is not a bug,how to skip verify by cmd line.",
"> 1.Is this a bug to fix in the future?\n\nNo.\n\n> 2.If this is not a bug,how to skip verify by cmd line.\n\nThat's not a feature that's planned, as indicated by that thread you refuse to read. It also has the myriad reasons which I will not summarize for you. I also don't think this is a valid bug report, so I'm closing it"
] |
https://api.github.com/repos/psf/requests/issues/6217
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6217/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6217/comments
|
https://api.github.com/repos/psf/requests/issues/6217/events
|
https://github.com/psf/requests/issues/6217
| 1,347,242,700 |
I_kwDOABTKOs5QTUrM
| 6,217 |
Please Support Http2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24276074?v=4",
"events_url": "https://api.github.com/users/HangZhouCat/events{/privacy}",
"followers_url": "https://api.github.com/users/HangZhouCat/followers",
"following_url": "https://api.github.com/users/HangZhouCat/following{/other_user}",
"gists_url": "https://api.github.com/users/HangZhouCat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HangZhouCat",
"id": 24276074,
"login": "HangZhouCat",
"node_id": "MDQ6VXNlcjI0Mjc2MDc0",
"organizations_url": "https://api.github.com/users/HangZhouCat/orgs",
"received_events_url": "https://api.github.com/users/HangZhouCat/received_events",
"repos_url": "https://api.github.com/users/HangZhouCat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HangZhouCat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HangZhouCat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HangZhouCat",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2022-08-23T02:36:39Z
|
2023-08-24T00:03:12Z
|
2022-08-23T03:16:40Z
|
NONE
|
resolved
|
Http2 has been around for a long time, more and more websites are using HTTP2, please give your support
|
{
"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/6217/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6217/timeline
| null |
not_planned
| null | null | false |
[
"This is massive undertaking that would need to happen in urllib3. We're aware of all the benefits and the desire by users. No need to open further issues, it's in our minds already."
] |
https://api.github.com/repos/psf/requests/issues/6216
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/6216/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/6216/comments
|
https://api.github.com/repos/psf/requests/issues/6216/events
|
https://github.com/psf/requests/pull/6216
| 1,344,810,397 |
PR_kwDOABTKOs49e1TT
| 6,216 |
updated sha1 hasing to sha256 to avoid collisions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/702729?v=4",
"events_url": "https://api.github.com/users/joshmgrant/events{/privacy}",
"followers_url": "https://api.github.com/users/joshmgrant/followers",
"following_url": "https://api.github.com/users/joshmgrant/following{/other_user}",
"gists_url": "https://api.github.com/users/joshmgrant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joshmgrant",
"id": 702729,
"login": "joshmgrant",
"node_id": "MDQ6VXNlcjcwMjcyOQ==",
"organizations_url": "https://api.github.com/users/joshmgrant/orgs",
"received_events_url": "https://api.github.com/users/joshmgrant/received_events",
"repos_url": "https://api.github.com/users/joshmgrant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joshmgrant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joshmgrant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joshmgrant",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2022-08-19T19:11:02Z
|
2023-08-21T00:03:12Z
|
2022-08-20T19:00:40Z
|
NONE
|
resolved
|
Based on a [security review](https://pypi.openrefactory.com/requests/62ff1f9edd30551cbfff8eeb) of the requests repository, it looks like the `sha1` hashing algorithm should be updated here to avoid collisions.
I have not added any unit tests since this should be a `no-op` change with the expected behaviour after this change identical to the previous behaviour before the change. I'm also happy to help implement/clean up some of the code here as well.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/702729?v=4",
"events_url": "https://api.github.com/users/joshmgrant/events{/privacy}",
"followers_url": "https://api.github.com/users/joshmgrant/followers",
"following_url": "https://api.github.com/users/joshmgrant/following{/other_user}",
"gists_url": "https://api.github.com/users/joshmgrant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joshmgrant",
"id": 702729,
"login": "joshmgrant",
"node_id": "MDQ6VXNlcjcwMjcyOQ==",
"organizations_url": "https://api.github.com/users/joshmgrant/orgs",
"received_events_url": "https://api.github.com/users/joshmgrant/received_events",
"repos_url": "https://api.github.com/users/joshmgrant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joshmgrant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joshmgrant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joshmgrant",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6216/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/6216/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/6216.diff",
"html_url": "https://github.com/psf/requests/pull/6216",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6216.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6216"
}
| true |
[
"Hi @joshmgrant, for future reference, it's considered best practice to always report issues relating to suspected security problems through private channels. Most projects will have either a [SECURITY.md](https://github.com/psf/requests/blob/main/.github/SECURITY.md) or a [specific issue type](https://github.com/psf/requests/security/policy) with instructions on disclosure. This provides appropriate time for projects to mitigate vulnerabilities.\r\n\r\nThat said, I don't think this is an issue. The hash being used for the cnonce is already being truncated to 16 bytes, so changing this from SHA1 to SHA256 shouldn't have a meaningful effect on collisions. We also use the cnonce to compute the actual digest hash value which can be MD5, SHA1, SHA256, or SHA512.\r\n\r\nCan you clarify the practical attack vector you're observing here? This looks like a generic grep scanner report from what's been provided.",
"@nateprewitt Hello there! Thank you for the feedback on this. I this is my first pull request for a security-related issue (as such) so I was unaware of the instructions for security-related changes and/or vulnerability reporting. \r\n\r\nI was unable to create any sort of (practical) attack related to this change. I completely agree that, as you mention, since this is a cnonce value is used to compute the digest hash, it's not really a meaningful issue to use the SHA1 hash for the conce value. \r\n\r\nMy main motivation was that this change was reported by the scanner that I linked to earlier as a _possible_ security vulnerability but without any additional context. After some research and trying to create a meaningful attack, I decided to open the PR first and see what would happen. Now I know :) \r\n\r\nI will close this PR as unmerged but thank you for your patience. Let me know if there's any areas I could look at for contributions (not necessarily security related, I just like Python and Requests). Thank you so much!"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.